threads / discuss / 6287

Getting gitk to display all refs but stgit logs

Subject: Getting gitk to display all refs but stgit logs

## tl;dr

4 messages between Jan 8, 2007 and Jan 9, 2007.

replies: 3people: 2as markdown or json

Yann Dirson· Jan 8, 2007, 21:32 UTC · lore

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.
Marco Costalba· Jan 9, 2007, 12:17 UTC · re: Yann Dirson · lore

Re: Getting gitk to display all refs but stgit logs

On 1/8/07, Yann Dirson <ydirson@altern.org> wrote:
Show 5 quoted lines
> 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.
>
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.

Yann Dirson· Jan 9, 2007, 19:41 UTC · re: Marco Costalba · lore

Re: Getting gitk to display all refs but stgit logs

On Tue, Jan 09, 2007 at 01:17:57PM +0100, Marco Costalba wrote:
Show 11 quoted lines
> On 1/8/07, Yann Dirson <ydirson@altern.org> wrote:
> >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.
> >
> 
> Normally you only need branch names
> 
> gitk/qgit --all  --> practically equivalent to --> gitk/qgit <list of
> branch names>

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.
Marco Costalba· Jan 9, 2007, 21:31 UTC · re: Yann Dirson · lore

Re: Getting gitk to display all refs but stgit logs

On 1/9/07, Yann Dirson <ydirson@altern.org> wrote:
>
> [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 ;)

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>

← back to recent threads