Subject: Prune-safe StGIT (was Re: Two crazy proposals for changing git's diff commands)

From: Catalin Marinas <[email-masked]>
Date: Mon, 13 Feb 2006 22:00:14 +0000

Mark Wooding wrote:
> (I really look forward to a StGIT which can withstand git-prune.)

Since there were a few requests for this feature, I pushed it to the
public repository (and also included it in the latest snapshot).

As it was discussed a few months ago, the top id of each patch
(including the popped ones) is added to the
.git/refs/patches/<branch>/<patch> file. The git-prune command will
preserve these objects and their referents, making even the unapplied
patches safe. There is another advantage with this approach - gitk shows
the patch name for every corresponding commit.

Running any command (apart from help) on the current branch would create
the initial references. You would need to do the same with all the other
branches. Since this is a new feature, make sure you have backups before
pruning (though it worked OK for me).

--
Catalin