git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-unpack-objects
@ 2006-05-01 22:52 Josh Boyer
  2006-05-01 23:09 ` git-unpack-objects Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Josh Boyer @ 2006-05-01 22:52 UTC (permalink / raw)
  To: Git Mailing List

I was playing around with git repack and decided to "undo" the repack
I did using git-unpack objects.  Below is the output:

[jwboyer@vader linux-2.6]$ git-unpack-objects <
.git/objects/pack/pack-497d1e639572013de48eeb00cb95738d2ca959e1.pack
Unpacking 236950 objects
 100% (236950/236950) done
[jwboyer@vader linux-2.6]$ ls -l .git/objects/
total 8
drwxrwxr-x 2 jwboyer jwboyer 4096 May  1 17:48 info
drwxrwxr-x 2 jwboyer jwboyer 4096 May  1 17:48 pack
[jwboyer@vader linux-2.6]$


As you can see, the objects don't seem to get unpacked back into the
.git directory.  So either I am misunderstanding what that command is
supposed to do, or it isn't working properly.

Any ideas?

thx,
josh

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

* Re: git-unpack-objects
  2006-05-01 22:52 git-unpack-objects Josh Boyer
@ 2006-05-01 23:09 ` Junio C Hamano
  2006-05-03 17:35   ` git-unpack-objects Josh Boyer
  0 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2006-05-01 23:09 UTC (permalink / raw)
  To: git

"Josh Boyer" <jwboyer@gmail.com> writes:

> I was playing around with git repack and decided to "undo" the repack
> I did using git-unpack objects.  Below is the output:
>
> [jwboyer@vader linux-2.6]$ git-unpack-objects <
> .git/objects/pack/pack-497d1e639572013de48eeb00cb95738d2ca959e1.pack
> Unpacking 236950 objects
> 100% (236950/236950) done
> [jwboyer@vader linux-2.6]$ ls -l .git/objects/
> total 8
> drwxrwxr-x 2 jwboyer jwboyer 4096 May  1 17:48 info
> drwxrwxr-x 2 jwboyer jwboyer 4096 May  1 17:48 pack
> [jwboyer@vader linux-2.6]$
>
> As you can see, the objects don't seem to get unpacked back into the
> .git directory.  So either I am misunderstanding what that command is
> supposed to do, or it isn't working properly.
>
> Any ideas?

unpack tries to unpack and if it already has the object it
skips.

If you really wanted to do it, here is a way to do so.

	mv .git/objets/pack/pack-49*.pack \
		.git/objets/pack/pack-49*.idx .
	git unpack-objects <pack-49*.pack

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

* Re: git-unpack-objects
  2006-05-01 23:09 ` git-unpack-objects Junio C Hamano
@ 2006-05-03 17:35   ` Josh Boyer
  2006-05-03 17:41     ` git-unpack-objects Linus Torvalds
  0 siblings, 1 reply; 9+ messages in thread
From: Josh Boyer @ 2006-05-03 17:35 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On 5/1/06, Junio C Hamano <junkio@cox.net> wrote:
>
> unpack tries to unpack and if it already has the object it
> skips.
>
> If you really wanted to do it, here is a way to do so.
>
>         mv .git/objets/pack/pack-49*.pack \
>                 .git/objets/pack/pack-49*.idx .
>         git unpack-objects <pack-49*.pack

Hm..  so it seems that git-unpack-objects is more intended to unpack a
pack one has gotten with git-fetch-pack, right?

I was looking for something more along the lines of an
"un-git-repack", where you have existing pack(s) and want to undo
them.  Maybe you want to repack everything into a single pack or
something like that.

josh

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

* Re: git-unpack-objects
  2006-05-03 17:35   ` git-unpack-objects Josh Boyer
@ 2006-05-03 17:41     ` Linus Torvalds
  2006-05-03 17:44       ` git-unpack-objects Josh Boyer
  0 siblings, 1 reply; 9+ messages in thread
From: Linus Torvalds @ 2006-05-03 17:41 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Junio C Hamano, git



On Wed, 3 May 2006, Josh Boyer wrote:
> 
> Hm..  so it seems that git-unpack-objects is more intended to unpack a
> pack one has gotten with git-fetch-pack, right?

Yeah. And for testing. I don't think it ever gets used directly.

> I was looking for something more along the lines of an
> "un-git-repack", where you have existing pack(s) and want to undo
> them.  Maybe you want to repack everything into a single pack or
> something like that.

That's what you just do "git repack -a -d" for.

		Linus

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

* Re: git-unpack-objects
  2006-05-03 17:41     ` git-unpack-objects Linus Torvalds
@ 2006-05-03 17:44       ` Josh Boyer
  2006-05-03 17:56         ` git-unpack-objects Linus Torvalds
  0 siblings, 1 reply; 9+ messages in thread
From: Josh Boyer @ 2006-05-03 17:44 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Junio C Hamano, git

On 5/3/06, Linus Torvalds <torvalds@osdl.org> wrote:
>
>
> On Wed, 3 May 2006, Josh Boyer wrote:
> >
> > Hm..  so it seems that git-unpack-objects is more intended to unpack a
> > pack one has gotten with git-fetch-pack, right?
>
> Yeah. And for testing. I don't think it ever gets used directly.
>
> > I was looking for something more along the lines of an
> > "un-git-repack", where you have existing pack(s) and want to undo
> > them.  Maybe you want to repack everything into a single pack or
> > something like that.
>
> That's what you just do "git repack -a -d" for.

But that doesn't roll exsisting packs into a new pack, does it?  I
thought it just packed loose objects into a new pack and deleted them.
 I ran that on a repo that already had a couple packs in it, and the
old packs were still there.

josh

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

* Re: git-unpack-objects
  2006-05-03 17:44       ` git-unpack-objects Josh Boyer
@ 2006-05-03 17:56         ` Linus Torvalds
  2006-05-04  0:31           ` git-unpack-objects Josh Boyer
  0 siblings, 1 reply; 9+ messages in thread
From: Linus Torvalds @ 2006-05-03 17:56 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Junio C Hamano, git



On Wed, 3 May 2006, Josh Boyer wrote:
> > 
> > That's what you just do "git repack -a -d" for.
> 
> But that doesn't roll exsisting packs into a new pack, does it? 

It does. That's what the "-a" (for "all") does.

I don't personally do incremental packs at all - the full repack is fast 
enough on the hardware I use (especially since Junio just kicked it into 
some serious performance shape) that I don't have the need for 
incrementals. 

		Linus

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

* Re: git-unpack-objects
  2006-05-03 17:56         ` git-unpack-objects Linus Torvalds
@ 2006-05-04  0:31           ` Josh Boyer
  2006-05-04 10:02             ` git-unpack-objects Marco Roeland
  0 siblings, 1 reply; 9+ messages in thread
From: Josh Boyer @ 2006-05-04  0:31 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Junio C Hamano, git

On 5/3/06, Linus Torvalds <torvalds@osdl.org> wrote:
>
>
> On Wed, 3 May 2006, Josh Boyer wrote:
> > >
> > > That's what you just do "git repack -a -d" for.
> >
> > But that doesn't roll exsisting packs into a new pack, does it?
>
> It does. That's what the "-a" (for "all") does.

Odd.  On one of my repos, I was seeing the correct behavior.  On
another, there were multiple packs left after doing the 'git repack -a
-d'.  Were there ever some packing bugs in older versions of git that
would have maybe produced some packs that wouldn't get deleted or
something?

At any rate, the above command does seem to do exactly what I want. 
Thanks for the help.

josh

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

* Re: git-unpack-objects
  2006-05-04  0:31           ` git-unpack-objects Josh Boyer
@ 2006-05-04 10:02             ` Marco Roeland
  2006-05-04 11:58               ` git-unpack-objects Josh Boyer
  0 siblings, 1 reply; 9+ messages in thread
From: Marco Roeland @ 2006-05-04 10:02 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Linus Torvalds, Junio C Hamano, git

On Wednesday May 3rd 2006 Josh Boyer wrote:

> >It does. That's what the "-a" (for "all") does.
> 
> Odd.  On one of my repos, I was seeing the correct behavior.  On
> another, there were multiple packs left after doing the 'git repack -a
> -d'.  Were there ever some packing bugs in older versions of git that
> would have maybe produced some packs that wouldn't get deleted or
> something?

Have you checked with "git fsck-objects" that maybe the "remaining"
packs contained non-reachable objects like dangling commits from resets
or from following volatile branches like +pu?
-- 
Marco Roeland

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

* Re: git-unpack-objects
  2006-05-04 10:02             ` git-unpack-objects Marco Roeland
@ 2006-05-04 11:58               ` Josh Boyer
  0 siblings, 0 replies; 9+ messages in thread
From: Josh Boyer @ 2006-05-04 11:58 UTC (permalink / raw)
  To: Marco Roeland; +Cc: Linus Torvalds, Junio C Hamano, git

On 5/4/06, Marco Roeland <marco.roeland@xs4all.nl> wrote:
> On Wednesday May 3rd 2006 Josh Boyer wrote:
>
> > >It does. That's what the "-a" (for "all") does.
> >
> > Odd.  On one of my repos, I was seeing the correct behavior.  On
> > another, there were multiple packs left after doing the 'git repack -a
> > -d'.  Were there ever some packing bugs in older versions of git that
> > would have maybe produced some packs that wouldn't get deleted or
> > something?
>
> Have you checked with "git fsck-objects" that maybe the "remaining"
> packs contained non-reachable objects like dangling commits from resets
> or from following volatile branches like +pu?

This was on a kernel repo, so no branches.  But dangling commits from
resets might have been present.  I can't tell now since I undid all
that packs and redid them into a single.  Thanks for the suggestion
though, that sounds like a perfectly reasonable explanation.

josh

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

end of thread, other threads:[~2006-05-04 11:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-01 22:52 git-unpack-objects Josh Boyer
2006-05-01 23:09 ` git-unpack-objects Junio C Hamano
2006-05-03 17:35   ` git-unpack-objects Josh Boyer
2006-05-03 17:41     ` git-unpack-objects Linus Torvalds
2006-05-03 17:44       ` git-unpack-objects Josh Boyer
2006-05-03 17:56         ` git-unpack-objects Linus Torvalds
2006-05-04  0:31           ` git-unpack-objects Josh Boyer
2006-05-04 10:02             ` git-unpack-objects Marco Roeland
2006-05-04 11:58               ` git-unpack-objects Josh Boyer

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).