Re: Getting gitk to display all refs but stgit logs

Previous thread: [ANNOUNCE] simple chronological versioning script by David Tweed on Monday, January 8, 2007 - 1:48 pm. (1 message)

Next thread: Re: a few remaining issues... by Junio C Hamano on Monday, January 8, 2007 - 2:59 pm. (2 messages)
From: Yann Dirson
Date: Monday, January 8, 2007 - 2:32 pm

Since v0.11, StGIT creates references to keep a hand on patch logs.
This has the unfortunate side-effect that "gitk --all" suddenly shows
all those very annoying, and soon becomes unusable on
repositories for which was very convenient.

I guess it would be acceptable to have stgit itself launch gitk with
the correct options.

The only way I could find to suppress these refs from the display is
to find the refs ourselves and pipe them to gitk using --stdin:

 find .git/refs/ -type f -not -name '*.log' -printf '%P\n'|gitk --stdin

Unfortunately, requesting an update from gitk then behaves as if
nothing had been given on command-line (obviously it is passing
--stdin to git-rev-list without repeating the data).

We could do slightly better by enclosing the find in backquotes on the
gitk command-line, but that would still hide new refs to git-rev-list
when updating the graph.

Is there a better way already, or should we work on something specific
here ?  A possible solution I think of could be to call something like:

 gitk --stdin-command="find .git/refs/ -type f -not -name '*.log' -printf '%P\n'"

Best regards,
-- 
Yann.
-

From: Marco Costalba
Date: Tuesday, January 9, 2007 - 5:17 am

Normally you only need branch names

gitk/qgit --all  --> practically equivalent to --> gitk/qgit <list of
branch names>

This is already done internally in qgit when, as example, retrieving a
file history to annotate.
-

From: Yann Dirson
Date: Tuesday, January 9, 2007 - 12:41 pm

Not exactly.  While qgit has knowledge of StGIT stacks and displays
unapplied patches [1], gitk does not, and requesting a branch only
shows the applied patches.  I have no opinion whether gitk should be
taught about them, but I'd like it to be usable on them anyway.

One thing that qgit also does not show, but which I regularly use when
viewing StGIT stacks in gitk, is the ancestry of unapplied patches
(eg. you can see at first glance whether an unapplied patch is
uptodate, or has not been ported yet atop the currently-applied ones.

[1] BTW, as of 1.5.3 it displays them backwards, causing all sors of
problems - I've not yet collected all of my comments for you, but at
least that one is sent now ;)

Best regards,
-- 
Yann.
-

From: Marco Costalba
Date: Tuesday, January 9, 2007 - 2:31 pm

I have quick tested on my  StGit repo and all qgit versions back to
qgit-1.2 show the same unapplied patches in the same sequence. Perhaps
something has changed in StGit or in git-rev-list in the meantime.

BTW qgit uses the following command to get the unapplied patches:

git rev-list --header --parents <unapplied SHA list> ^HEAD

Where <unapplied SHA list> info is retrieved from StGit (well, with
some shortcuts ;-) to speed up the thing).

P.S: The above 'git rev-list' command returns _also_ spurious revs
that must be filtered out matching against the given <unapplied SHA
list>
-

Previous thread: [ANNOUNCE] simple chronological versioning script by David Tweed on Monday, January 8, 2007 - 1:48 pm. (1 message)

Next thread: Re: a few remaining issues... by Junio C Hamano on Monday, January 8, 2007 - 2:59 pm. (2 messages)