Re: [PATCH] log: make --abbrev-commit's ellipsis configurable

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

 



On Fri, Feb 13, 2009 at 02:37:39PM +0100, Thomas Rast wrote:

> > How about making this an option, and passing it in rev_opts instead?  This 
> > option could then be defaulted to in git-log, when the user said 
> > --abbrev-commit.
> 
> But the 'git_config(git_log_config, NULL);' that sets the new variable
> to false is only called from cmd_{log,show,whatchanged,reflog}.  I
> should have indicated this in the commit messaged, sorry.

We use that technique elsewhere in git, and personally I am not a fan of
it, as it comes down to setting a global variable. That worked fine when
we had a lot of one-shot programs that read the config, did a defined
piece of work, and then exited.

But more and more we are performing multiple actions in a single run
(especially as many scripts become builtin porcelains), and those
globals are applied to all actions. So a porcelain trying to do a
plumbing-ish thing can run into problems.

I can't recall the exact details, but I remember dealing with something
like this related to external diff. Using an ALLOW_EXTERNAL diffopt
ended up being more reliable, _and_ easier to read and follow in the
code.

Now I don't think this is probably a big problem for this particular
option, but I'd rather not see the technique propagated.

-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]

  Powered by Linux