Re: [PATCH] git-filter-branch: Add an example on how to remove empty commits
- From
Pierre Habouzit <madcoder@debian.org>
- Date
- Oct 30, 2008, 15:10 UTC
- Message-ID
- <20081030151042.GH24098@artemis.corp>
- In-Reply-To
- <20081030150617.GA14098@euler>
On Thu, Oct 30, 2008 at 03:06:18PM +0000, Deskin Miller wrote:
Show 11 quoted lines
> On Thu, Oct 30, 2008 at 02:26:23PM +0100, Pierre Habouzit wrote: > > Why not add an option to filter-branch that removes a commit if it's > > empty ? It's quite useful, it helps the user concentrating on just > > keeping what matches *his* criteriums, and not caring about the minor > > details of cleansing the result. > > I've thought this would be useful at times myself. One potential complication, > however, is that the history could come from a SVN repository via git-svn, in > which case it's possible that empty commits exist due to an incomplete mapping > of SVN's changes, e.g. SVN property changes will get their own revision, even > if the file content does not change.
Well, if you want to migrate your git-svn repository to something else, it doesn't makes sense to add this limitation. I'd rather see this "problem" advertized in the manual page, rather than a limitation added.
Note that using git filter-branch on a git-svn repository and still expecting it to work with git-svn is IMHO wrong in so many ways that we should not really try that hard to prevent the user doing something stupid anyways.
-- ·O· Pierre Habouzit ··O madcoder@debian.org OOO http://www.madism.org