From: Jeff King <peff@peff.net>
To: Thomas Rast <trast@student.ethz.ch>
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
git@vger.kernel.org, "Adeodato Simó" <dato@net.com.org.es>,
"Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH] log: make --abbrev-commit's ellipsis configurable
Date: Fri, 13 Feb 2009 14:27:24 -0500 [thread overview]
Message-ID: <20090213192724.GA6782@coredump.intra.peff.net> (raw)
In-Reply-To: <200902131437.49293.trast@student.ethz.ch>
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
next prev parent reply other threads:[~2009-02-13 19:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-13 12:58 [PATCH] log: make --abbrev-commit's ellipsis configurable Thomas Rast
2009-02-13 13:20 ` Johannes Schindelin
2009-02-13 13:37 ` Thomas Rast
2009-02-13 13:47 ` Johannes Schindelin
2009-02-13 14:24 ` [PATCH v2] " Thomas Rast
2009-02-13 15:32 ` Johannes Sixt
[not found] ` <m363jeux00.fsf@localhost.localdomain>
2009-02-13 16:45 ` Jakub Narebski
2009-02-13 19:27 ` Jeff King [this message]
2009-02-13 21:32 ` [PATCH] " Junio C Hamano
2009-02-13 22:10 ` [PATCH] log: do not print ellipses with --abbrev-commit Thomas Rast
2009-02-13 22:24 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090213192724.GA6782@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=dato@net.com.org.es \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=trast@student.ethz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).