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

Re: [PATCH] filter-branch: add passed/remaining seconds on progress

From
Jeff King <peff@peff.net>
Date
Sep 8, 2015, 21:44 UTC
Message-ID
<20150908214437.GB24159@sigill.intra.peff.net>
In-Reply-To
<xmqqsi6o95r7.fsf@gitster.mtv.corp.google.com>
On Tue, Sep 08, 2015 at 10:32:12AM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> Also git_filter_branch__commit_count is now used only inside this
> function, so it is easier to follow to increment it here.
> 
> I suspect that the variable has this unwieldy name for historic
> reasons, perhaps an attempt to avoid name clashes with the end user
> script, but it has many variables (e.g. $commits, $ref, etc.) that
> are way too generic and that I can see no attempt of name clash
> avoidance, so renaming it to $total_commits or something _might_
> make some sense.

I briefly wondered if it had the opposite reason; could it have a well-defined name because it is meant to be a public value the user-defined shell snippets can access?

But it is not documented, and I can imagine that "the current count" is not really useful without "total number of commits", so in practice I doubt anybody's filter branch script is relying on it.

And looking through the history turns up d5b0c97 (git-filter-branch: avoid collisions with variables in eval'ed commands, 2009-03-25), which seems fairly clear. :)

The original name was "i", which I think is probably too short. Calling it something meaningful but longer than one character is probably sufficient.

-Peff
Previous: Eric SunshineNext: Gabor Bernat
Message 16 of 19 in “filter-branch: add passed/remaining seconds on progress”
  1. filter-branch: add passed/remaining seconds on progressGábor Bernát, Sep 4, 2015
  2. Junio C HamanoSep 4, 2015
  3. Eric SunshineSep 4, 2015
  4. Gabor BernatSep 6, 2015
  5. Eric SunshineSep 6, 2015
  6. filter-branch: add passed/remaining seconds on progressGábor Bernát, Sep 6, 2015
  7. Junio C HamanoSep 6, 2015
  8. filter-branch: add passed/remaining seconds on progressGábor Bernát, Sep 7, 2015
  9. Ramsay JonesSep 7, 2015
  10. filter-branch: add passed/remaining seconds on progressGábor Bernát, Sep 7, 2015
  11. Eric SunshineSep 7, 2015
  12. Junio C HamanoSep 8, 2015
  13. Eric SunshineSep 8, 2015
  14. Junio C HamanoSep 21, 2015
  15. Eric SunshineSep 21, 2015
  16. Jeff KingSep 8, 2015
  17. Gabor BernatSep 22, 2015
  18. Junio C HamanoSep 22, 2015
  19. Gabor BernatSep 23, 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.