From: Brian Norris <computersforpeace@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [BUG] git-log: tracking deleted file in a repository with multiple "initial commit" histories
Date: Thu, 18 Feb 2016 14:27:13 -0800 [thread overview]
Message-ID: <20160218222713.GA50021@google.com> (raw)
In-Reply-To: <20160216222942.GA9014@sigill.intra.peff.net>
On Tue, Feb 16, 2016 at 05:29:42PM -0500, Jeff King wrote:
> On Tue, Feb 16, 2016 at 01:24:29PM -0800, Brian Norris wrote:
>
> > On Tue, Feb 16, 2016 at 03:45:57PM -0500, Jeff King wrote:
> > > See the section on History Simplification in git-log. But basically,
> > > when you specify a pathspec, git does not traverse side branches that
> > > had no effect on the given pathspec.
> >
> > Thanks for the pointer. Is this done primarily for performance reasons,
> > or for UI simplicity (e.g., to avoid some kinds of double-counting)?
> > Seems like it generates unintuitive behaviors, but if it's helping block
> > other unintuitive behaviors, then maybe it can't be resolved easily.
>
> Both, I think. Try looking at "--full-history" and you will see that it
> has a lot of cruft that is probably not that interesting. But
I wasn't seeing the "cruft" at first, but now I see. It appears, BTW,
that 'git log --full-history -- <path>' gives vastly different commits
than 'git log --full-history --graph -- <path>'. (The latter has a lot
more "cruft" about unrelated merges.) That seems like a weird
inconsistency...
> simplifying further (e.g., with "--simplify-merges") doesn't tell much
> of the whole story (or maybe it does; we do see the final deletion
> there, which is the end state).
git log --full-history --simplify-merges -- init/iptables.conf
and
git log --full-history --simplify-merges --graph --oneline -- init/iptables.conf
give good results for me, showing every commit that actually modifies
the file, AFAICT.
> > FWIW, I quite often use git-log to look at the history of a deleted
> > file. Seems like a pretty big hole if the default behavior is going to
> > prune away the entire history of the file.
>
> It doesn't normally.
That doesn't really change my statement.
> What happened is that you had two parallel
> histories, and the final state of the file could be explained by
> following the simpler of the two histories (the one where it never
> existed in the first place).
I (sort of) understand what happened. But I disagree that it's a good
default. It's obviously not what the user is asking for.
> > > If you want to see the full history, you can with "--full-history"
> > > (there are some other simplification possibilities, but I don't think
> > > any of them are interesting for your particular case).
> >
> > --full-history gives me what I want (I'll admit, I didn't read through
> > all the other "History Simplification" documentation). Can I make this
> > the default somehow?
>
> No, but you can make an alias that includes it.
Sure.
Thanks for the help!
Brian
prev parent reply other threads:[~2016-02-18 22:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 20:24 [BUG] git-log: tracking deleted file in a repository with multiple "initial commit" histories Brian Norris
2016-02-16 20:45 ` Jeff King
2016-02-16 21:24 ` Brian Norris
2016-02-16 22:29 ` Jeff King
2016-02-18 22:27 ` Brian Norris [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=20160218222713.GA50021@google.com \
--to=computersforpeace@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).