Re: [PATCH] git-filter-branch: Add an example on how to remove empty commits

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

 



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.

Therefore, if one were to write a patch such as Pierre suggests, I'd strongly
suggest checking the commit message first for any git-svn-id: line, and either
refusing to work without some --force option from the user, or giving a strong
warning to the user that their git-svn setup may not work properly any more,
and clear instructions on how to recover those refs, or update the svn-related
metadata.

On further thought, automatically updating the svn metadata might be useful to
add as an option to filter-branch regardless; I'll think about that some
myself, any thoughts from others?

My $0.02,
Deskin Miller
--
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