Re: [RFC PATCH] Automatically save packfiles created during git-push

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andreas Ericsson <ae@xxxxxx> wrote:
> Shawn O. Pearce wrote:
> >By saving the packfile we are transferring over the network to a
> >local file we can remove the corresponding loose objects from the
> >objects directory and immediately benefit from the packing work
> >that was done to perform the network transport.  This is a form
> >of `git gc --auto` that happens automatically anytime the user
> >performs a push.
> 
> I'm sure this *could* be a good idea, but in my typical workflow I
> push about twice a day, and usually not more than 5-8 commits at a
> time. Since I'm a great believer in isolated changes, this usually
> contains changes to one or two files at a time. Is it worth the
> trouble saving 15-25 loose objects, creating two new packfiles / day?

Yes, I know.  Its a tuning thing.  In my normal work on git-gui I
am usually pushing under 20 objects when I publish to repo.or.cz.
Since I also do that about once a week I probably wouldn't mind
letting these packs be saved.  But for other users that might be
so small its not worth it.

In my day-job I'm usually pushing about 30-40 objects when I push.
I also believe in small isolated changes but often will do a long
string of those and only push to the public location once I am
reasonably happy with how that string turned out.  40 objects
is almost worth packing if we also have a cheap pack file merge
available (Junio's patch).

I work with about 30 others at day-job through Git.  Some of
them are able to remember to run `git gc` every once in a while.
Others don't.  Those who don't also have a workflow where they are
making a single commit and then pushing that commit as soon as it
is complete.  Usually that commit affects about 4-6 files one tree
down, so its a total of 9 new objects.  Packing 9 objects is most
likely not worth saving.  Yet these are the very users who also
cannot remember to run `git gc`.  :-\
 
> Otoh, I also rebase every once in a while, moving 50+ commits to some
> other branch, and then it would most definitely be worth it.

Yeah, its really only worthwhile if you are moving a reasonable
number of objects.  Maybe it should be enabled only if it at
least meets a minimum threshold of objects such as the fetch limit
(transfer.unpackLimit / fetch.unpackLimit) and also if the majority
of what it is sending is currently loose (my patch has it at 50%).
 
> >+			save_pack = 0;
> >+		else if (progress)
> >+			fprintf(stderr, "Also keeping saving packfile...\n");
> 
> keeping or saving? Pick one :)

It was late and a proof of concept.  I never meant for it to be
applied in the state it is in.  :)

-- 
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux