From: Brian Norris <computersforpeace@gmail.com>
To: git@vger.kernel.org
Subject: [BUG] git-log: tracking deleted file in a repository with multiple "initial commit" histories
Date: Tue, 16 Feb 2016 12:24:42 -0800 [thread overview]
Message-ID: <20160216202442.GH21465@google.com> (raw)
Hi,
I'm not sure if this is a known behavior or a new bug report. I at least
couldn't find anyone mentioning this exact problem.
I'm using a git repository that has multiple "inital commits" (i.e., a
few different directory trees were imported via svn-to-git as different
branches) whose histories have been merged together to the single master
branch, and the file I want to track is both added and removed in only
one of those lineages. When I try to do:
$ git log -- <file>
on the deleted file in the master branch, I get no history. But if I
checkout the particular sub-tree of the merge history, then git-log
returns the appropriate history.
For specifics, I'm looking at this repo:
https://chromium.googlesource.com/chromiumos/platform2
and this file:
init/iptables.conf
which is added in this commit:
882271d255f4 Still more platform modules.
and deleted here:
65a8de6f85b8 chromeos-init: Remove firewall upstart jobs from platform/init
and whose branch of history is merged in via the following merge commit:
8f4314b70b78 Move 'src/platform/init' to 'src/platform2'
.
Test 1:
$ git checkout 8f4314b70b78
$ git log -- init/iptables.conf
## No output
Test 2:
$ git checkout 8f4314b70b78^2
$ git log -- init/iptables.conf
## See proper history
The behavior of Test 1 seems like a bug to me. Thoughts?
Regards,
Brian
next reply other threads:[~2016-02-16 20:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 20:24 Brian Norris [this message]
2016-02-16 20:45 ` [BUG] git-log: tracking deleted file in a repository with multiple "initial commit" histories Jeff King
2016-02-16 21:24 ` Brian Norris
2016-02-16 22:29 ` Jeff King
2016-02-18 22:27 ` Brian Norris
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=20160216202442.GH21465@google.com \
--to=computersforpeace@gmail.com \
--cc=git@vger.kernel.org \
/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).