git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Remove "historical" objects from repository to save place
@ 2006-01-21 19:18 Andrey Borzenkov
  2006-01-21 19:58 ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Andrey Borzenkov @ 2006-01-21 19:18 UTC (permalink / raw)
  To: git

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is it possible to conserve space by removing old versions? Let's say I am not 
interested in kernel versions before 2.6.15 - is it possible to remove them 
from repository cloned from one of "official" ones (Linus or stable).

Description of git-prune suggests that it may be possible by removing tags 
from refs/tags; OTOH I may have commit chain that will prevent them. Also 
won't those tags come back after git fetch --tags?

TIA

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD0okaR6LMutpd94wRAqEZAKC5VAkNMlL9TEmgELynIUf24Dd9oQCeOejQ
Mdmc4lFsYXBHqofjQhgEIlU=
=2j5N
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Remove "historical" objects from repository to save place
  2006-01-21 19:18 Remove "historical" objects from repository to save place Andrey Borzenkov
@ 2006-01-21 19:58 ` Junio C Hamano
  2006-01-21 20:06   ` Petr Baudis
  2006-01-21 21:46   ` Andrey Borzenkov
  0 siblings, 2 replies; 8+ messages in thread
From: Junio C Hamano @ 2006-01-21 19:58 UTC (permalink / raw)
  To: Andrey Borzenkov; +Cc: git

Andrey Borzenkov <arvidjaar@mail.ru> writes:

> Description of git-prune suggests that it may be possible by removing tags 
> from refs/tags

If the documentation suggests that, then it is misleading.

> OTOH I may have commit chain that will prevent them.

Correct.

> Also 
> won't those tags come back after git fetch --tags?

Correct.

You might be able to cauterize the history at a specific commit
and then re-clone.  I've talked about how in "[QUESTION] about
.git/info/grafts file" thread yesterday, so I won't repeat that.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Remove "historical" objects from repository to save place
  2006-01-21 19:58 ` Junio C Hamano
@ 2006-01-21 20:06   ` Petr Baudis
  2006-01-21 20:25     ` Junio C Hamano
  2006-01-21 23:27     ` Andrey Borzenkov
  2006-01-21 21:46   ` Andrey Borzenkov
  1 sibling, 2 replies; 8+ messages in thread
From: Petr Baudis @ 2006-01-21 20:06 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Andrey Borzenkov, git

Dear diary, on Sat, Jan 21, 2006 at 08:58:55PM CET, I got a letter
where Junio C Hamano <junkio@cox.net> said that...
> You might be able to cauterize the history at a specific commit
> and then re-clone.  I've talked about how in "[QUESTION] about
> .git/info/grafts file" thread yesterday, so I won't repeat that.

Shouldn't the git-prune be sufficient after cauterizing the history?

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Of the 3 great composers Mozart tells us what it's like to be human,
Beethoven tells us what it's like to be Beethoven and Bach tells us
what it's like to be the universe.  -- Douglas Adams

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Remove "historical" objects from repository to save place
  2006-01-21 20:06   ` Petr Baudis
@ 2006-01-21 20:25     ` Junio C Hamano
  2006-01-21 20:49       ` Randal L. Schwartz
  2006-01-21 23:27     ` Andrey Borzenkov
  1 sibling, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2006-01-21 20:25 UTC (permalink / raw)
  To: git

Petr Baudis <pasky@suse.cz> writes:

>> You might be able to cauterize the history at a specific commit
>> and then re-clone.  I've talked about how in "[QUESTION] about
>> .git/info/grafts file" thread yesterday, so I won't repeat that.
>
> Shouldn't the git-prune be sufficient after cauterizing the history?

Logically yes, but practically no.

Most likely what the original requestor cloned from Linus has
been already packed so git-prune would not do much.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Remove "historical" objects from repository to save place
  2006-01-21 20:25     ` Junio C Hamano
@ 2006-01-21 20:49       ` Randal L. Schwartz
  2006-01-21 21:46         ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Randal L. Schwartz @ 2006-01-21 20:49 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

>>>>> "Junio" == Junio C Hamano <junkio@cox.net> writes:

Junio> Most likely what the original requestor cloned from Linus has
Junio> been already packed so git-prune would not do much.

Wait.  Does that mean that:

$ git-checkout -b playground
$ work work work
$ git-commit -m 'snapshot'
$ git-checkout -b master
$ git-repack -a -d

means that even if I do

$ git-branch -d playground
$ git-repack -a -d

I still have the commit from playground as objects inside my one big pack?

Ick.  How do I make that go away?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Remove "historical" objects from repository to save place
  2006-01-21 20:49       ` Randal L. Schwartz
@ 2006-01-21 21:46         ` Junio C Hamano
  0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2006-01-21 21:46 UTC (permalink / raw)
  To: Randal L. Schwartz; +Cc: git

merlyn@stonehenge.com (Randal L. Schwartz) writes:

>>>>>> "Junio" == Junio C Hamano <junkio@cox.net> writes:
>
> Junio> Most likely what the original requestor cloned from Linus has
> Junio> been already packed so git-prune would not do much.
>
> Wait.  Does that mean that:
>
> $ git-checkout -b playground
> $ work work work
> $ git-commit -m 'snapshot'
> $ git-checkout -b master
> $ git-repack -a -d
>
> means that even if I do
>
> $ git-branch -d playground
> $ git-repack -a -d
>
> I still have the commit from playground as objects inside my one big pack?

Repack retraces from all the available refs, so that is fine.

Pasky was talking about prune, which is a different animal.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Remove "historical" objects from repository to save place
  2006-01-21 19:58 ` Junio C Hamano
  2006-01-21 20:06   ` Petr Baudis
@ 2006-01-21 21:46   ` Andrey Borzenkov
  1 sibling, 0 replies; 8+ messages in thread
From: Andrey Borzenkov @ 2006-01-21 21:46 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 21 January 2006 22:58, Junio C Hamano wrote:
>
> You might be able to cauterize the history at a specific commit
> and then re-clone.  I've talked about how in "[QUESTION] about
> ..git/info/grafts file" thread yesterday, so I won't repeat that.

thank you, quite complete description. One question - any caveats in using git 
ls-remote to fetch graft point?

echo $(git ls-remote 
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git v2.6.15 
| cut -f1) > .git/info/grafts

etc

this avoids downloading over 1G in the first place.

regards

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD0qu6R6LMutpd94wRAtuzAJoCT15+8d9BcIEhOxmD9lrRGWE6EQCghg5l
SR5g1+nAUNlltYyXydxsFAs=
=U2cu
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Remove "historical" objects from repository to save place
  2006-01-21 20:06   ` Petr Baudis
  2006-01-21 20:25     ` Junio C Hamano
@ 2006-01-21 23:27     ` Andrey Borzenkov
  1 sibling, 0 replies; 8+ messages in thread
From: Andrey Borzenkov @ 2006-01-21 23:27 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Junio C Hamano, git

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 21 January 2006 23:06, Petr Baudis wrote:
> Dear diary, on Sat, Jan 21, 2006 at 08:58:55PM CET, I got a letter
> where Junio C Hamano <junkio@cox.net> said that...
>
> > You might be able to cauterize the history at a specific commit
> > and then re-clone.  I've talked about how in "[QUESTION] about
> > .git/info/grafts file" thread yesterday, so I won't repeat that.
>
> Shouldn't the git-prune be sufficient after cauterizing the history?

this did not work for me, at least applied naively. May be, it is due to the 
way I setup repository - first I created local version from 2.6.15 tree and 
then pulled in remote one.

Anyway repacking and pruning resulted in over 500MB size reduction so its OK 
for me so far. I'll probably try fetching cleanly later.

thank you and best regards

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD0sN8R6LMutpd94wRAt1WAKC18LjAl+MbyfmvSvvNQGUF/mlbIgCfcu6s
nuZtYttRsd673Yqlq3aKr+A=
=B6jN
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-01-21 23:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-21 19:18 Remove "historical" objects from repository to save place Andrey Borzenkov
2006-01-21 19:58 ` Junio C Hamano
2006-01-21 20:06   ` Petr Baudis
2006-01-21 20:25     ` Junio C Hamano
2006-01-21 20:49       ` Randal L. Schwartz
2006-01-21 21:46         ` Junio C Hamano
2006-01-21 23:27     ` Andrey Borzenkov
2006-01-21 21:46   ` Andrey Borzenkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).