git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] rebase -i: write better reflog messages for start

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 10, 2013, 18:32 UTC
Message-ID
<7v8v2hizpc.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1370881332-9231-4-git-send-email-artagnon@gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 8 quoted lines
> Invoking 'git rebase -i' writes the following line to the reflog at the
> start of the operation:
>
>   rebase -i (start)
>
> This is not very useful.  Make it more informative like:
>
>   rebase -i (start): checkout master
Makes sense to me, at least within the scope of the patch context.
I am curious what breaks, though.
Show 25 quoted lines
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
>  git-rebase--interactive.sh | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> index 5822b2c..a05a6e4 100644
> --- a/git-rebase--interactive.sh
> +++ b/git-rebase--interactive.sh
> @@ -837,6 +837,7 @@ comment_for_reflog start
>  
>  if test ! -z "$switch_to"
>  then
> +	GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION: checkout $switch_to"
>  	output git checkout "$switch_to" -- ||
>  		die "Could not checkout $switch_to"
>  fi
> @@ -980,6 +981,7 @@ has_action "$todo" ||
>  
>  test -d "$rewritten" || test -n "$force_rebase" || skip_unnecessary_picks
>  
> +GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION: checkout $onto_name"
>  output git checkout $onto || die_abort "could not detach HEAD"
>  git update-ref ORIG_HEAD $orig_head
>  do_rest
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 8 of 12 in “Fix git checkout - (early preview)”
  1. 0/3 Fix git checkout - (early preview)Ramkumar Ramachandra, Jun 10, 2013
  2. 1/3 t/checkout-last: checkout - doesn't work after rebase -iRamkumar Ramachandra, Jun 10, 2013
  3. Junio C HamanoJun 10, 2013
  4. Ramkumar RamachandraJun 13, 2013
  5. 2/3 checkout: respect GIT_REFLOG_ACTIONRamkumar Ramachandra, Jun 10, 2013
  6. Junio C HamanoJun 10, 2013
  7. 3/3 rebase -i: write better reflog messages for startRamkumar Ramachandra, Jun 10, 2013
  8. Junio C HamanoJun 10, 2013
  9. Ramkumar RamachandraJun 10, 2013
  10. Ramkumar RamachandraJun 13, 2013
  11. Junio C HamanoJun 13, 2013
  12. Ramkumar RamachandraJun 13, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.