From: Roman Neuhauser <neuhauser@sigpipe.cz>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: git-diff-tree --root
Date: Sat, 13 Sep 2014 10:57:35 +0200 [thread overview]
Message-ID: <20140913085735.GA4075@isis.sigpipe.cz> (raw)
In-Reply-To: <xmqq61gsbv9p.fsf@gitster.dls.corp.google.com>
# gitster@pobox.com / 2014-09-12 10:31:30 -0700:
> Roman Neuhauser <neuhauser@sigpipe.cz> writes:
> > git-diff-tree without --root is absolutely silent for the root commit,
> > and i see no bad effects of --root on non-root commits. are there any
> > hidden gotchas? IOW, why is the --root behavior not the default?
>
> Because tools that was written before you proposed that change
> expect to see nothing for the root commit, and then you are suddenly
> breaking their expectations?
i'm not proposing anything, i'm just curious why it is this way.
my line of thinking: there must be (or have been) a grave reason to
break the simple consistency, or the current behavior must be very
useful for something and i'm just missing what it is. the reasons
for the behavior may have been invalidated by further developments,
or it may have been a wrong decision we're stuck with for BC; i'm
just curious about history.
motivation for my question is that i'm scripting git-diff-tree
and i need it to produce the diff for root commits as well. i like
my scripts as simple as possible, so i'd like to use --root *always*.
is it safe?
--
roman
next prev parent reply other threads:[~2014-09-13 8:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-12 13:06 git-diff-tree --root Roman Neuhauser
2014-09-12 17:31 ` Junio C Hamano
2014-09-13 8:57 ` Roman Neuhauser [this message]
2014-09-15 17:04 ` Junio C Hamano
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=20140913085735.GA4075@isis.sigpipe.cz \
--to=neuhauser@sigpipe.cz \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).