git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Rewriting boundary parents when path-limiting
@ 2008-02-16 12:10 Paul Mackerras
  2008-02-19 17:41 ` Linus Torvalds
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Mackerras @ 2008-02-16 12:10 UTC (permalink / raw)
  To: torvalds, gitster; +Cc: git

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-24  1:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-16 12:10 Rewriting boundary parents when path-limiting Paul Mackerras
2008-02-19 17:41 ` Linus Torvalds
2008-02-24  1:55   ` Paul Mackerras

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).