From: Thomas Rast <trast@student.ethz.ch>
To: Paul Mackerras <paulus@samba.org>
Cc: "Björn Steinbrink" <B.Steinbrink@gmx.de>, git@vger.kernel.org
Subject: [PATCH v2] gitk: fix direction of symmetric difference in optimized mode
Date: Wed, 5 Aug 2009 23:15:36 +0200 [thread overview]
Message-ID: <8a2113bfa2f1eaf6a13587cadfbaae81c8914947.1249506383.git.trast@student.ethz.ch> (raw)
In-Reply-To: <0fd5fc0f09779bb04c02b54d6ec8f43087a51bca.1249130587.git.trast@student.ethz.ch>
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 <trast@student.ethz.ch>
---
This supersedes the older patch, which was simply wrong; the triangle
directions in the affected section are correct.
The confusing part of this, but also how I stumbled across the real
bug, was that I was playing with --show-all and that flipped the
direction *again*. Turns out the option is not recognized by gitk and
lets it go back to unoptimized mode, where the bug does not exist.
gitk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitk b/gitk
index 4604c83..e103dab 100755
--- a/gitk
+++ b/gitk
@@ -288,7 +288,7 @@ proc parseviewrevs {view revs} {
if {$sdm != 2} {
lappend ret $id
} else {
- lset ret end [lindex $ret end]...$id
+ lset ret end $id...[lindex $ret end]
}
lappend pos $id
}
--
1.6.4.96.g577b
next prev parent reply other threads:[~2009-08-05 21:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-01 12:47 [GITK PATCH] gitk: fix direction of --left-right triangles Thomas Rast
2009-08-05 21:15 ` Thomas Rast [this message]
[not found] ` <19066.8802.98042.957009@cargo.ozlabs.ibm.com>
2009-08-06 7:19 ` [PATCH v2] gitk: fix direction of symmetric difference in optimized mode Thomas Rast
2009-08-08 16:34 ` [RFC PATCH] Simplify away duplicate commits with --cherry-pick --parents Thomas Rast
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=8a2113bfa2f1eaf6a13587cadfbaae81c8914947.1249506383.git.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=B.Steinbrink@gmx.de \
--cc=git@vger.kernel.org \
--cc=paulus@samba.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).