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

Re: [PATCH 1/4] status: factor two rebase-related messages together

From
GPGuillaume Pages <guillaume.pages@ensimag.grenoble-inp.fr>
Date
Jun 9, 2015, 07:33 UTC
Message-ID
<968122035.288953.1433835215140.JavaMail.zimbra@ensimag.grenoble-inp.fr>
In-Reply-To
<xmqqbngp97yp.fsf@gitster.dls.corp.google.com>
"Junio C Hamano" <gitster@pobox.com> writes:
>Hmmm, it obviously does not break anything but it is not obvious why 
>this is a good change. 
Show 5 quoted lines
>Is it that you wanted to have a single instance of "if on a branch, 
>we say 'you are rebasing that branch', otherwise we say 'you are 
>rebasing'"? Even then, I am not sure if this code movement was the 
>best way to do so (an obvious alternative is to use a shared helper 
>function and call from the two arms of if/elseif/... chain). 

I made this change because at first sight, this piece of code was difficult to read for me. There was two long branches very similar and I had to spot the differences, and the actual differences were at the very end of the branches so I had to check back what the condition was about. It seems now much more natural to me: the part in common of both branches is in OR-condition and the differences between branches are gathered with the test on the variable they depend.

By the way, I agree that this change is not absolutely necessary.
Previous: Junio C Hamano
Message 11 of 11 in “status: factor two rebase-related messages together”
  1. 1/4 status: factor two rebase-related messages togetherGuillaume Pagès, Jun 3, 2015
  2. 2/4 status: differentiate interactive from non-interactive rebasesGuillaume Pagès, Jun 3, 2015
  3. 3/4 status: give more information during rebase -iGuillaume Pagès, Jun 3, 2015
  4. Matthieu MoyJun 4, 2015
  5. Junio C HamanoJun 4, 2015
  6. Guillaume PagesJun 5, 2015
  7. Junio C HamanoJun 5, 2015
  8. 4/4 status: add new tests for status during rebase -iGuillaume Pagès, Jun 3, 2015
  9. Matthieu MoyJun 4, 2015
  10. Junio C HamanoJun 8, 2015
  11. Guillaume PagesJun 9, 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.