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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 08, 2015 at 10:32:12AM -0700, Junio C Hamano wrote:

> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]