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

Re: [RFC/PATCH v2] create a skeleton for the command git rebase --status

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
May 29, 2015, 15:00 UTC
Message-ID
<vpq4mmvv37f.fsf@anie.imag.fr>
In-Reply-To
<12496325.145058.1432896023146.JavaMail.zimbra@ensimag.grenoble-inp.fr>
Guillaume Pages <guillaume.pages@ensimag.grenoble-inp.fr> writes:
Show 7 quoted lines
> rebase in progress; onto d9d448a You are currently rebasing branch
> 'branche1' on 'd9d448a'.  (fix conflicts and then run "git rebase
> --continue") (use "git rebase --skip" to skip this patch) (use "git
> rebase --abort" to check out the original branch) (5 commits applied,
> 3 remainings) Failed to apply:
>
> 252c273 commit message

You messed-up something with the formatting, but I agree that this would be nice. I'd reverse order between the hints ("(use ... to ...)") and the "Failed to apply: ...".

> And during an interactive rebase:
>
> rebase in progress;
This could even become "interactive rebase in progress".

Most of the time, you're supposed to remember whether you ran "git rebase" with -i, but a typical use-case is when a newbie requests help like "I don't know what I did, but can you fix it?", and then any information can be valuable.

Show 11 quoted lines
> Last commands done (5 commands done) :
>
> pick 62609785 commit message1 reword 85ae9001 new commit message2
>
> (See more at .git/rebase-merge/done)
>
> Next commands to do (3 remainings commands) :
>
> squash 62609785 commit message3 pick 85ae9001 commit message4
>
> (See more at .git/rebase-merge/git-rebase-todo)

Not sure the blank lines are meant to be there, but I wouldn't put them in the actual output. I'd format it as

Last commands done (5 commands done) :
  pick 62609785 commit message1
  (see more at .git/rebase-merge/done)
(lower-case "see" to be consistant with other hints)
> Is it a good practice to send the user find information in the .git
> directory?

We usually avoid doing that and provide commands to do this (e.g. "git rebase --edit-todo" instead of asking the user to do $EDITOR .git/rebase-merge/git-rebase-todo), but the ones you show seem OK to me.

There's already at least one instance of this when a rebase fails:
  Patch failed at 0001 foo
  The copy of the patch that failed is found in:
     /tmp/clone/.git/rebase-apply/patch
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Guillaume PagesNext: Junio C Hamano
Message 9 of 10 in “create a skeleton for the command git rebase --status”
  1. create a skeleton for the command git rebase --statusGuillaume Pagès, May 28, 2015
  2. Matthieu MoyMay 28, 2015
  3. Guillaume PagesMay 28, 2015
  4. Matthieu MoyMay 28, 2015
  5. Junio C HamanoMay 28, 2015
  6. Matthieu MoyMay 28, 2015
  7. Junio C HamanoMay 28, 2015
  8. Guillaume PagesMay 29, 2015
  9. Matthieu MoyMay 29, 2015
  10. Junio C HamanoMay 29, 2015

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.