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

Re: [PATCH 3/4] status: give more information during rebase -i

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 4, 2015, 17:19 UTC
Message-ID
<xmqqtwunv1bv.fsf@gitster.dls.corp.google.com>
In-Reply-To
<vpqfv67zylq.fsf@anie.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 9 quoted lines
>> +void get_two_last_lines(char *filename, int *numlines, char **lines)
>> +{
>> +...
>> +}
>> +
>> +void get_two_first_lines(char *filename, int *numlines, char **lines)
>> +{
>> +...
>> +}
I had a handful of comments on these:
 - Do we need two separate and overly specific functions like these,
   i.e. "two" and "first/last"?
 - Wouldn't people want to be able to configure the number of lines?
 - Do we really want get_two_{first,last}_LINES() functions?
   I am wondering if insn sheets these functions read include
   comments, in which case get_n_{first,last}_commands() may be a
   more correct name.
 - Wouldn't it be necessary for these functions to report the total
   number of commands, instead of giving "void" back?  Otherwise how
   would the caller produce summary like this:
       An interactive rebase of 14 commits in progress.  You have
       replayed 4 commits so far, the last few of which were:
          da66b27 remote.c: provide per-branch pushremote name
          f052154 remote.c: hoist branch.*.remote lookup out of
       and 10 more commits to go, the next few of which are:
          a9f9f8c remote.c: introduce branch_get_upstream helper
          8770e6f remote.c: hoist read_config into remote_get_1
       
   Note that I am not suggesting the phrasing or presentation.  The
   information content is what I am interested in.
Previous: Matthieu MoyNext: Guillaume Pages
Message 5 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.