From: Linus Torvalds <torvalds@osdl.org>
To: Paul Mackerras <paulus@samba.org>
Cc: git@vger.kernel.org
Subject: Re: gitk highlight feature
Date: Wed, 3 May 2006 09:57:51 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0605030946260.4086@g5.osdl.org> (raw)
In-Reply-To: <17496.7073.507895.484698@cargo.ozlabs.ibm.com>
On Wed, 3 May 2006, Paul Mackerras wrote:
>
> Linus Torvalds writes:
>
> > The obvious way to do it would be to just have two buttons per view: one
> > exclusive one (for the main view - only one selected at a time), and the
> > other one for the "highlight" one where you could allow multiple views to
> > be selected for highlighting.
>
> That's hard to do in a menu, but I could do it in a separate pane.
> Or, I could draw a series of tabs between the menu bar and the
> graph/headline/author/date panes. Each tab would have the view name,
> a radiobutton to select it for highlighting, and a close button.
Actually, having used this thing (and thought about) some more, I'm afraid
that I'll have to just admit that my whole "highlight" thing was
misdesigned.
One is just an interface issue, and I think that it would be fixed by just
removing the highlight entry from the "view" menu, and making it a menu of
its own. That, I think, would fix the user interface to be more obvious
and intuitive.
But the real thing I found is that when I decided I wanted to highlight, I
didn't actually want to highlight by "git-rev-list" at all. At least not
most of the time.
So far, what I've wanted to highlight by is:
- "does it touch this file/directory/pathspec"
This is _close_ to "git-rev-list", and you can (and do) actually
implement it as that, but it's stupid to do it that way. You just spend
extra time. It's literally much better to do
cat commit-list | git-diff-tree -s --stdin -- <pathspec>
which is a hell of a lot more efficient, since you already have the
commit-list you're interested in (and, in fact, this allows you to do
things efficiently only for the current _visible_ commits, if you want
to, which might be an important optimization for large views).
- "Does the author/committer match xyz*"
I ended up using the "search" button for this, and it worked, but the
highlight feature would just have done it much better. Especially if
there was a way to do "go to next highlight", instead of just "go to
next commit"
Again, this is actually most easily done by just using the commit-list
you already _have_. Not with adding a new argument to "git-rev-list"
and trying to filter two views. Also, again, this can actually be done
for just the "visible" ones, not the whole view.
- "highlight the commits [not] reachable from the selected commit"
Now, this literally is "git-rev-list", but it's a variation on it: you
don't want a new view, you really want the _old_ view (exact same
git-rev-list arguments), but you add "^commit" to the list of
revisions. And then you (conditionally) invert the highlighting if you
wanted "reachable" rather than "not reachable".
And the current "create a new view, and overlay that on the old one"
approach really isn't that good. My mistake, it was me who suggested it.
What do you think?
Linus
next prev parent reply other threads:[~2006-05-03 16:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-02 23:44 gitk highlight feature Paul Mackerras
2006-05-02 23:48 ` Junio C Hamano
2006-05-03 0:17 ` Paul Mackerras
2006-05-03 0:07 ` Linus Torvalds
2006-05-03 0:23 ` Linus Torvalds
2006-05-03 2:55 ` Paul Mackerras
2006-05-03 16:57 ` Linus Torvalds [this message]
2006-05-03 23:08 ` Paul Mackerras
2006-05-03 23:25 ` Linus Torvalds
2006-05-20 0:07 ` Paul Mackerras
2006-05-20 16:42 ` Linus Torvalds
2006-05-21 0:40 ` Paul Mackerras
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=Pine.LNX.4.64.0605030946260.4086@g5.osdl.org \
--to=torvalds@osdl.org \
--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).