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

Re: New feature discussion: git rebase --status

From
MLMathieu Liénard--Mayor <mathieu.lienard--mayor@ensimag.fr>
Date
Jun 13, 2013, 12:19 UTC
Message-ID
<dc115f90be3bc5830473a6648bf37df5@ensibm.imag.fr>
In-Reply-To
<CALWbr2x-4_QSurvScYL+2Utn=-K3Knb7Kif9SAvV_V-ZdvPfCw@mail.gmail.com>
Le 2013-06-13 07:52, Antoine Pelisse a écrit :
Show 54 quoted lines
> On Thu, Jun 13, 2013 at 12:19 AM, Junio C Hamano <gitster@pobox.com> 
> wrote:
>> Antoine Pelisse <apelisse@gmail.com> writes:
>>
>>> Maybe we can display previous and next commits to provide some
>>> context. Like we do for diff.
>>> For example:
>>>
>>> $ git status
>>> # HEAD detached from ecb9f3e
>>> # Already applied 330 patches (displaying next 3):
>>> #     b170635... my_commit_message
>>> #     b170635... my_commit_message
>>> #     b170635... my_commit_message
>>> # Already applied 119 (displaying last 3)
>>> #     b170635... my_commit_message
>>> #     b170635... my_commit_message
>>> #     b170635... my_commit_message
>>
>> I think you meant one of them to be
>>
>>     # Still to be applied 119 (showing the first 3)
>>
>> instead.
>
> Of course,
>
>> I am not sure if it is worth 8 lines, especially given
>> that "git log --oneline -$n" would give you "Already applied" part
>> that is beyond what will be shown in this message easily if you
>> wanted to.  So it might be enough to show "The one that has last
>> been replayed" (aka "HEAD") and "The one you are in the middle of
>> replaying".
>
> That's very true. The piece of information that is hard to get is
> "what's left to be done".
>
> So something like this would make sense:
>
> $ git status
> # HEAD detached from ecb9f3e
> # You are currently editing a832578... my_commit_message [120/450]
> while rebasing.
> # 320 patches left to apply (showing next 3):
> #       b170635... my_commit_message
> #       b170635... my_commit_message
> #       b170635... my_commit_message
> #   (use "git commit --amend" to amend the current commit)
> #   (use "git rebase --continue" once you are satisfied with your 
> changes)
>
> So that's 4 extra lines compared to current output. But should we 
> make
> it a default ?
Personally I believe we should not make it the default output.
Currently, the output I'm working on is the following:

$ git status # HEAD detached from ecb9f3e # You are currently editing a832578 while rebasing branch 'split-rm-v7' on 'ecb9f3e'. # (use "git commit --amend" to amend the current commit) # (use "git rebase --continue" once you are satisfied with your changes)

$ git status --rebase-todo # HEAD detached from ecb9f3e # You are currently editing a832578 while rebasing branch 'split-rm-v7' on 'ecb9f3e'. # Still 2 patches left to apply: # e a832578 rm: better error message on failure for multiple files # e fd0330b rm: introduce advice.rmHints to shorten messages # (use "git commit --amend" to amend the current commit) # (use "git rebase --continue" once you are satisfied with your changes)

I'm still unsure about the name of the flag, I chose that one accordingly to .git/merge-rebase/rebase-todo

-- 
Mathieu Liénard--Mayor,
2nd year at Grenoble INP - ENSIMAG
(+33)6 80 56 30 02
Previous: Antoine PelisseNext: Matthieu Moy
Message 13 of 16 in “New feature discussion: git rebase --status”
  1. Mathieu Liénard--MayorJun 11, 2013
  2. Thomas RastJun 11, 2013
  3. John KeepingJun 11, 2013
  4. Matthieu MoyJun 11, 2013
  5. Hilco WijbengaJun 11, 2013
  6. Linus TorvaldsJun 11, 2013
  7. Mathieu Liénard--MayorJun 12, 2013
  8. Célestin MatteJun 12, 2013
  9. Mathieu Liénard--MayorJun 12, 2013
  10. Antoine PelisseJun 12, 2013
  11. Junio C HamanoJun 12, 2013
  12. Antoine PelisseJun 13, 2013
  13. Mathieu Liénard--MayorJun 13, 2013
  14. Matthieu MoyJun 12, 2013
  15. John KeepingJun 12, 2013
  16. Mathieu Liénard--MayorJun 12, 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.