From: Paul Mackerras <paulus@samba.org>
To: torvalds@linux-foundation.org, gitster@pobox.com
Cc: git@vger.kernel.org
Subject: Rewriting boundary parents when path-limiting
Date: Sat, 16 Feb 2008 23:10:21 +1100 [thread overview]
Message-ID: <18358.53933.747911.449078@cargo.ozlabs.ibm.com> (raw)
When using both path and commit limiting, git log --parents --boundary
rewrites the parents that are actually in the graph but doesn't
rewrite the parents on the boundary, that is, the boundary parents may
be commits that don't modify any of the specified paths. I'm
wondering if there is a way to get the boundary parents rewritten too.
The reason is this. One of the nice things about the dev branch of
gitk is that updating the graph is really quick, because the git log
that gitk does when updating excludes all the commits that gitk has
already seen, using commit limiting.
Without path limiting, that works nicely, and the boundary of the new
set consists of commits that are already in the graph, so gitk can
join the new graph into the old. But if path limiting is being used,
the boundary commits of the new set aren't necessarily commits that
are already in the graph, so gitk can't (at present) join the new
graph to the old properly.
Here's an example: suppose the repository looks like this:
HEAD -> c modifies file x
|
b modifies file y
|
a modifies file x
Suppose you run "gitk -- x", so gitk will display:
c
|
a
Then suppose commit c gets amended, and still modifies file x, so the
HEAD is now commit c', whose parent is b. Then if you do "Update" in
gitk (or press F5), gitk will do
git log HEAD ^c -- x
and it will get one entry, which is c', with b listed as its parent.
So then gitk ends up displaying:
c'
|
b
c
|
a
because it doesn't realize that the parent of c' in the path-limited
graph should be a.
So can anyone suggest a good way for gitk to know that the parent of
c' should be a in this situation?
Paul.
next reply other threads:[~2008-02-16 12:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-16 12:10 Paul Mackerras [this message]
2008-02-19 17:41 ` Rewriting boundary parents when path-limiting Linus Torvalds
2008-02-24 1:55 ` Paul Mackerras
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=18358.53933.747911.449078@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=torvalds@linux-foundation.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).