Thread (11 messages) flat view 11 messages, 4 authors, 2016-06-15

Re: auto-packing on kernel.org? please?

From: Catalin Marinas <hidden>
Date: 2016-06-15 22:42:13

On 22/11/05, Linus Torvalds [off-list ref] wrote:
On Tue, 22 Nov 2005, Chuck Lever wrote:
quoted
there are some things repacking does that breaks StGIT, though.

git repack -d

seems to remove old commits that StGIT was still depending on.
If that is true, then "git-fsck-cache" probably also reports errors on a
StGIT repository. No? Basically, it implies that the tool doesn't know how
to find all the "heads".
Indeed, 'git repack -d'  or 'git prune' might remove the patches which
are not applied since there is no link to them from .git/refs/.
Could somebody (Catalin?) perhaps tell how tools like git-fsck-cache and
git-repack could figure out which objects are still in use by stgit?
They don't figure this out at the moment. I initially thought about
implementing these commands in StGIT so that they would pass the
proper references.
Preferably with some generic mechanism that _other_ projects (not just
stgit) might want to use?

The preferred way would be to just list the references somewhere under
.git/refs/stgit, in which case fsck and repack should pick them up
automatically (so clearly stgit doesn't do that right now ;).
I thought about adding .git/refs/patches/<branch>/* files
corresponding to the every StGIT patch. Are the above git commands
looking at all depths in the .git/refs/ directory?
quoted
git repack -a -n

seems to work fine with StGIT,
Well, it "works", but not "fine". Since it doesn't know about the stgit
objects, it won't ever pack them.

But maybe that's what stgit wants (since they are "temporary"), but it
does mean that if you see a big advantage from packing, you might be
losing some of it.
The 'git repack -a' command would include the applied patches in the
newly created pack but leave out the unapplied ones. It would be even
better to leave all of them out since the StGIT patches are frequently
changed but an independent mechanism for this would complicate GIT -
'git repack' shouldn't pack any of the objects found in
.git/refs/patches/, even if they are reachable via .git/refs/heads/*
(and maybe call the patches directory something like
.git/refs/unpackable or volatile).

--
Catalin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help