From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: Thomas Rast <tr@thomasrast•ch>,
Jonathan Nieder <jrnieder@gmail•com>,
Alex Henrie <alexhenrie24@gmail•com>,
git@vger•kernel.org
Subject: Re: [PATCH v2] log: if --decorate is not given, default to --decorate=auto
Date: Thu, 30 Mar 2017 14:54:57 -0700 [thread overview]
Message-ID: <xmqq1ste2zwu.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170330213358.qjsobjcbons66skf@sigill.intra.peff.net> (Jeff King's message of "Thu, 30 Mar 2017 17:33:58 -0400")
Jeff King <peff@peff•net> writes:
> On Thu, Mar 30, 2017 at 11:03:51AM -0700, Junio C Hamano wrote:
>
>> With the "--decorate=auto" option becoming the default for "git
>> log", "git tbdiff" will be broken.
>> ...
> I'm confused. I thought "auto" would kick in only when we are outputting
> to a terminal. Or is the problem that the "is it a terminal" check is
> fooled by $GIT_PAGER_IN_USE, because you are running "git -p tbdiff"?
Interesting. Yes, I do use
[pager]
tbdiff
in my ~/.gitconfig file.
$ git tbdiff ..@{-1} @{-1}..
is one of the most frequently used commands in my ~/.bash_history
these days [*1*]. I by accident has been running the 'master'
version (not my private edition 'jch' that is a bit ahead of 'next')
for the past few weeks, and I just switched back to using the 'jch'
version so that I can say
$ git tbdiff ..- -..
instead, and that is when I noticed we broke "tbdiff".
> If so, this is the symptom of a more general problem, which is that
> a script outputting to a pager will have confused sub-processes, who do
> not know if their pipe is the pager one or not. Perhaps it is time to
> resurrect my patch from:
>
> http://public-inbox.org/git/20150810052353.GB15441@sigill.intra.peff.net/
>
> I think it would need a Windows-specific variant, but the general idea
> is sound.
Yes, that might be necessary.
[Footnote]
*1* The general flow to accept a reroll of a topic "au/topic" goes
like this:
$ git checkout au/topic
$ git log master.. ;# to remind me what it was about
$ git checkout master... ;# to go back to the original base
$ Meta/CP ./+au-topic.mbox ;# run checkpatch
$ git am -s3c
$ git tbdiff ..@{-1} @{-1}..
Then if the initial N patches are identical, e.g. when the
output of tbdiff begins like this:
1: f6d8dfd8b6 = 1: d681cf5ada do not check odb_mkstemp return value for errors
2: 52dcad2c2e = 2: abf30edce4 odb_mkstemp: write filename into strbuf
3: 033d6ae6cb = 3: 38fceca547 odb_mkstemp: use git_path_buf
4: 55e3179076 ! 4: 344267b632 diff: avoid fixed-size buffer for patch-ids
@@ ... @@
$ git rebase --onto 033d6ae6cb 38fceca547
$ git tbdiff ..@{-1} @{-1}..
That way, I can preserve the author and committer timestamps of
the earlier part that did not change.
prev parent reply other threads:[~2017-03-30 21:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 5:46 [PATCH v2] log: if --decorate is not given, default to --decorate=auto Alex Henrie
2017-03-24 17:41 ` Junio C Hamano
2017-03-24 18:38 ` Jonathan Nieder
2017-03-30 18:03 ` Junio C Hamano
2017-03-30 21:33 ` Jeff King
2017-03-30 21:54 ` Junio C Hamano [this message]
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=xmqq1ste2zwu.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=alexhenrie24@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=jrnieder@gmail$(echo .)com \
--cc=peff@peff$(echo .)net \
--cc=tr@thomasrast$(echo .)ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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