Skip to content

Commit 2b1fbf9

Browse files
trastpaulusmack
authored andcommitted
gitk: Fix direction of symmetric difference in optimized mode
ee66e08 (gitk: Make updates go faster, 2008-05-09) implemented an optimized mode where gitk parses the arguments with rev-parse, and manually reads history in chunks. As mentioned in the commit message, symmetric differences are a problem there: One wrinkle is that we have to turn symmetric diff arguments (of the form a...b) back into symmetric diff form so that --left-right still works, as git rev parse turns a...b into a b ^merge_base(a,b). However, git-rev-parse returns a...b in the swapped order b a ^merge_base(a,b) This has been the case since at least 1f8115b (the state of master at the time of the abovementioned ee66e08; Merge branch 'maint', 2008-05-08). So gitk flipped the sides of symmetric differences whenever it was in optimized mode. Fix this by swapping the sides of the reconstruction code. Signed-off-by: Thomas Rast <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent ffe1529 commit 2b1fbf9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ proc parseviewrevs {view revs} {
288288
if {$sdm != 2} {
289289
lappend ret $id
290290
} else {
291-
lset ret end [lindex $ret end]...$id
291+
lset ret end $id...[lindex $ret end]
292292
}
293293
lappend pos $id
294294
}

0 commit comments

Comments
 (0)