1
0
mirror of https://github.com/git/git.git synced 2024-09-30 09:01:24 +02:00
Git Source Code Mirror. Please follow Documentation/SubmittingPatches procedure for any of your improvements.
Go to file
Paul Mackerras f806f0fba8 gitk: Handle updating with path limiting better
When updating the graph, gitk uses a git log command with commit
limiting in order to get just the new commits.  When path limiting
is also in effect, git log rewrites the parents of the commits it
outputs in order to represent just the subgraph that modifies the
listed paths, but it doesn't rewrite the parents on the boundary
of the graph.  The result is that when updating, git log does not
give gitk the information about where the new commits join in to
the existing graph.

This solves the problem by explicitly rewriting boundary parents
when updating.  If we are updating and are doing path limiting,
then when gitk finds an unlisted commit (one where git log puts a
"-" in front of the commit ID to indicate that it isn't actually
part of the graph), then gitk will execute:

    git rev-list --first-parent --max-count=1 $id -- paths...

which returns the first ancestor that affects the listed paths.
(Currently gitk executes this synchronously; it could do it
asynchronously, which would be more complex but would avoid the
possibility of the UI freezing up if git rev-list takes a long time.)

Then, if the result is a commit that we know about, we rewrite the
parents of the children of the original commit to point to the new
commit.  That is mostly a matter of adjusting the parents and children
arrays and calling fix_reversal to fix up the graph.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-02-24 12:16:56 +11:00
po gitk: Update German translation. 2008-01-11 00:51:13 -08:00
gitk gitk: Handle updating with path limiting better 2008-02-24 12:16:56 +11:00
Makefile gitk: Fix the Makefile to cope with systems lacking msgfmt 2008-01-11 00:51:08 -08:00