threads / discuss / 16942

Do moves add to repository size?

Subject: Do moves add to repository size?

## tl;dr

4 messages between Dec 31, 2008 and Dec 31, 2008.

replies: 3people: 3as markdown or json

Simon Chiang· Dec 31, 2008, 09:11 UTC · lore

Hey, I'm quite curious to know if moves/renames duplicate the file content in the repository (and hence grow the repository size) or if they just change the location of the content. I want to drastically reorganize a repository and I'm wondering if will double it in size.

Thanks,
- Simon
demerphq· Dec 31, 2008, 09:46 UTC · re: Simon Chiang · lore

Re: Do moves add to repository size?

2008/12/31 Simon Chiang <simon.a.chiang@gmail.com>:
> Hey, I'm quite curious to know if moves/renames duplicate the file
> content in the repository (and hence grow the repository size) or if
> they just change the location of the content.  I want to drastically
> reorganize a repository and I'm wondering if will double it in size.

No it wont. Git uses a content addressable storage. And since in a rename the content doesnt change....

Yves
-- 
perl -Mre=debug -e "/just|another|perl|hacker/"
Alex Riesen· Dec 31, 2008, 15:17 UTC · re: Simon Chiang · lore

Re: Do moves add to repository size?

2008/12/31 Simon Chiang <simon.a.chiang@gmail.com>:
> Hey, I'm quite curious to know if moves/renames duplicate the file
> content in the repository (and hence grow the repository size) or if
> they just change the location of the content.  I want to drastically
> reorganize a repository and I'm wondering if will double it in size.

It wont double its size, but it will grow a little: the tree objects which contain names of the data (the file names) will be all changed.

← back to recent threads