Rewriting boundary parents when path-limiting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux