Re: want <reason> option to git-rebase

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

 



Hi,

Ian Jackson wrote[1]:

> git-rebase leaves entries like this in the reflog:
>
>   c15f4d5391 HEAD@{33}: rebase: checkout c15f4d5391ff07a718431aca68a73e672fe8870e
>
> It would be nice if there were an option to control this message.
> Particularly, when another tool invokes git-rebase, the other tool may
> specify an interesting --onto, and there is no way to record any
> information about that --onto commit.
>
> git-rebase already has a -m option, so I suggest
>   --reason=<reason>
>
> It doesn't matter much exactly how the provided string is used.
> Any of the following would be good IMO:
>   <reason>
>   rebase start: <reason>
>
> I think:
>   rebase: checkout c15f4d5391ff07a718431aca68a73e672fe8870e <reason>
> would be rather cumbersome.

>From git(1):

 GIT_REFLOG_ACTION
	When a ref is updated, reflog entries are created to keep
	track of the reason why the ref was updated (which is
	typically the name of the high-level command that updated the
	ref), in addition to the old and new values of the ref. A
	scripted Porcelain command can use set_reflog_action helper
	function in git-sh-setup to set its name to this variable when
	it is invoked as the top level command by the end user, to be
	recorded in the body of the reflog.

"git rebase" sets this itself, so it doesn't solve your problem.

Can you say more about what your tool does?  I'm wondering if it would
make sense for it to use lower-level commands where GIT_REFLOG_ACTION
applies, instead of the more user-facing git rebase.

Thanks,
Jonathan

[1] https://bugs.debian.org/901805



[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