git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Ian Jackson <ijackson@chiark.greenend.org.uk>
Cc: git@vger.kernel.org
Subject: Re: want <reason> option to git-rebase
Date: Mon, 18 Jun 2018 18:06:55 -0700	[thread overview]
Message-ID: <20180619010655.GA173168@aiede.svl.corp.google.com> (raw)
In-Reply-To: <23335.52730.475955.861241@chiark.greenend.org.uk>

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

       reply	other threads:[~2018-06-19  1:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <23335.52730.475955.861241@chiark.greenend.org.uk>
2018-06-19  1:06 ` Jonathan Nieder [this message]
2018-06-19 10:19   ` want <reason> option to git-rebase Ian Jackson
2018-06-19 18:31   ` Johannes Sixt
2018-06-20  1:49     ` Jonathan Nieder
2018-06-20 10:43       ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180619010655.GA173168@aiede.svl.corp.google.com \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ijackson@chiark.greenend.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).