From: tytso@mit.edu Date: Sat, 06 Feb 2010 13:32:27 GMT Subject: Re: [RFC/PATCH] rebase: add -x option to record original commit name Message-ID: <20100206133227.GE321@thunk.org> In-Reply-To: <76718491002052119j5d6bae35s146bed8da03e3983@mail.gmail.com> On Sat, Feb 06, 2010 at 12:19:02AM -0500, Jay Soffian wrote: > On Fri, Feb 5, 2010 at 11:43 PM, Junio C Hamano wrote: > > How could that be a counterproposal to a deprecation of -x and adding > > hooks as a replacement, as a solution to more general issues? > > Sorry, it's been a long week and I wasn't thinking clearly. > > Yes, adding post-cherry/rebase hook(s) would keep all parties happy. :-) I really don't think it's a contamination of the log when it's used to record a cherry pick of patch from the dev stream to an older maintainance branch, but I'll grudgingly accept doing via a hook; but can there be an easy way to control whether or not the hook is actually executed? *Normally* I don't want cherry-pick -x, but some of the time I do want it, and manually enabling and disabling the hook by having to do some kind of "chmod -x .git/hooks/cherry-pick" command. I suppose I could create an alias for cherry-pick-record which does a "chmod a+x `git rev-parse --git-dir`/hooks/cherry-pick; git cherry-pick $*; chmod a-x `git rev-parse --git-dir`/hooks/cherry-pick", but that seems really hacky. :-( So it would be nice if there was some kind of command-line option to cherry-pick which could be passed to the hook script. - Ted