threads / discuss / 9697

Visualising stashed commits in gitk/qgit/giggle

Subject: Visualising stashed commits in gitk/qgit/giggle

## tl;dr

2 messages between Aug 30, 2007 and Aug 30, 2007.

replies: 1people: 2as markdown or json

Martin Langhoff· Aug 30, 2007, 00:38 UTC · lore

Now that we have had git stash in master for a while, I've gotten completely addicted to it. :-) Before I used to create mini branches all the time, and my working repos were littered with 'WIP-nn' branches everywhere.

Which was mucky... but appeared in gitk/qgit transparently.
Is there any way to get them to appear in gitk or any other gui history browser?
cheers,
martin
Jeff King· Aug 30, 2007, 08:29 UTC · re: Martin Langhoff · lore

Re: Visualising stashed commits in gitk/qgit/giggle

On Thu, Aug 30, 2007 at 12:38:35PM +1200, Martin Langhoff wrote:
Show 9 quoted lines
> Now that we have had git stash in master for a while, I've gotten
> completely addicted to it. :-) Before I used to create mini branches
> all the time, and my working repos were littered with 'WIP-nn'
> branches everywhere.
> 
> Which was mucky... but appeared in gitk/qgit transparently.
> 
> Is there any way to get them to appear in gitk or any other gui
> history browser?

The stash list is stored as a reflog, so any browser that understands reflogs will visualize them fine. gitk's visualization of reflogs (gitk -g) tends to be a bit cluttered, because it finds and displays the real parents, which doesn't quite mesh with the reflog-ordered view of history. You can try "gitk stash" to see the structure of the latest stash, and you can try "gitk -g stash", but it's pretty unreadable.

You really need another way to get the refs into gitk's view without using '-g'. You can do this: "gitk stash@{0} stash@{1} stash@{2}" which looks OK, but doesn't scale for obvious reasons.

Tig actually displays reflogs nicely, because it has a much simpler concept of viewing history. 'tig -g stash' will give you the stashes, in order, for inspection.

Perhaps not the answer you were looking for, but it might give you a start on implementing something. What kind of display were you looking for? A view of the stashes as if they were a chain of commits (like tig gives), or the stashes inserted into the full history graph (like gitk stash@{0} stash@{1})?

-Peff

← back to recent threads