Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for git stash #14

Open
rowanj opened this issue Jan 6, 2012 · 27 comments
Open

Add support for git stash #14

rowanj opened this issue Jan 6, 2012 · 27 comments
Labels
Milestone

Comments

@rowanj
Copy link
Owner

rowanj commented Jan 6, 2012

Should display the list (stack?) of git stash objects that are available, and interfaces to create/apply them

@pipelineoptika
Copy link
Collaborator

Looking at the manual, stashes are always pushed to the end of the list, but can be popped (or applied -- no removal) from any stash in the list.

It can be used as a stack by issuing only git stash and git stash pop commands, but it's most certainly a list or queue implementation.

In terms of supported features, we should probably support:

  • save
  • list (implicit in the UI display - lefthand frame display?)
  • show (also implicit in the UI - review in top half of main window?)
  • pop (from dropdown on stash item in lefthand list?)
  • apply (ditto)
  • drop (ditto)
  • clear (from dropdown on overall stash list header in lefthand frame?)

@rowanj
Copy link
Owner Author

rowanj commented Jan 6, 2012

The major feature of this that I had in mind doesn't need much of an interface at all; when an operation (i.e. pull) fails because of local changes, provide a button to "Stash and retry"

@pipelineoptika
Copy link
Collaborator

Roger that.

Query: looking at libgit2, I can't quite figure out what the status of git stash support is. Is it that stash is simply another index and set of objects that one can access with the existing set of APIs under libgit2?

@pipelineoptika
Copy link
Collaborator

A button on the failure dialog, or similar?

On 06/01/2012, at 3:26 PM, Rowan [email protected] wrote:

The major feature of this that I had in mind doesn't need much of an interface at all; when an operation (i.e. pull) fails because of local changes, provide a button to "Stash and re-try"


Reply to this email directly or view it on GitHub:
#14 (comment)

@rowanj
Copy link
Owner Author

rowanj commented Jan 6, 2012

Yeah, that was the idea. The current workaround is to command-line stash it or actually commit it and ammend/rebase that out after the fact.

@RomainMuller
Copy link

I second that request. I would like to see all existing stashes of my repos right below the "branches" list. Being able to drop them from context menu is probably good as well. In my opinion, save, pop, apply are not priorities as long as the visibility is there. Also, from my point of view, a dropdown for stashes wouldn't be any improvement over using CLI (too many clicks involved) - everything should be context-menu available from the lefthand frame.

@killercup
Copy link

I would very much like to see this feature. GitX (L) supports this.

@williscool
Copy link

+1

You could probably just steal the from GitX (L) here. That part is reasonably quick

@jramsdale
Copy link

This was a really nice GitX(L) addition. I may move to gitx-dev anyway, but I'll be sad about losing this feature...

@claytonrcarter
Copy link

So maybe I'm being overly ambitious here, but I decided to see if I could port this over from GitX(L) (along w/ a couple other things I like from GitX(L)) and I simply couldn't get this GitX to build. I'm using XCode 4.5.2 on 10.8; I installed CMake, cloned this project from the URL specified, init'ed and updated submodules and ran into a few CMake errors (couldn't find CMakeLists.txt for one) and libgit2 errors (can't find git2/oid.h) and such. I'm still fairly new to XCode, but is the project pretty involved to get up and running to build? Any assistance to get this setup would be great since I have a little time and a lot of desire to being in stash support. Thanks.

@rowanj
Copy link
Owner Author

rowanj commented Feb 5, 2013

The objective-git submodule itself has submodules (libgit2); did you recursively init them?

I use git submodule update --init --recursive at the top-level GitX directory.

@claytonrcarter
Copy link

Thank you, yes, that fixed it. (Along with changing the code signing settings and a build clean.) Of course, now that I got it to build I realize I'm in way over my head. Alot of the changes look like they can be copied between files, but that was too tedious to do manually, and the organizational structure is too different for me to be able to figure out how to do a format-patch | am. Thanks for the help, but sorry I couldn't be more of one.

@rowanj
Copy link
Owner Author

rowanj commented Feb 6, 2013

Fortunately Git handles moved files pretty well; but yes, some of the changes I've made are quite intrusive to the project structure.

@claytoncarter If you've isolated the changes (and/or the commits they happened in on GitX (L)), that's a long way toward getting it done. Can you list them here easily?

@claytonrcarter
Copy link

Keeping in my that I'm in over my head and also very poor in ObjC, here's what it looks like to me:

There were two main efforts to get stashes working. The first happened on a branch starting with SHA 0a3b600 and was merged back after SHA 33e21e2, although it looks like there's a bunch of other stuff in that branch and most of the stash action happened in commits 0a3b600, cc5c93c, be507c8 and cb59e86.

The second effort was done on a branch starting with SHA 2158f1e and was merged into master after SHA ba51ae8.

After that, it looks like there were bug fix commits at b4557eb, 76c0a97, 5fde8e8, 12ca779.

@rjmunro
Copy link

rjmunro commented May 10, 2013

+1 to this. It's the biggest feature I miss since moving from GitX (L).

@schmurfy
Copy link

schmurfy commented Jun 7, 2013

If having a full stash list with actions is long to do it would be nice to have a list of the existing stashes like the branches list.

I tend to always forget what I have stashed since that's one of the last thing that is not clearly sown in gitx-dev.

@jzillmann
Copy link

Same with me. There was this other gitx clone having a visual stash representation. Liked that very much. Just the speed wasn't awesome, thats why i switched to your version and now looking after every update if the stash thing is now there ;)

Keep on the good work!

@schmurfy
Copy link

schmurfy commented Jun 7, 2013

the other must be GitX(L), I think we all took the same path ;)
GitX(L) has really nice fatures but performance was clearly not the main focus (if a focus at all).

@muhqu
Copy link

muhqu commented Jul 29, 2013

Looks like GitX(L) 's stashes feature was introduced by @krasnyk. He still has a separate 'stashes' branch in his repository. unfortunately it is based on nathan's experimental branch... https://github.com/krasnyk/gitx/compare/stashes

Could be a challenging task to rebase/cherry-pick the relevant changes to gitx-dev but I may give it a try.

@schmurfy
Copy link

it would really be awesome if you manage to :)

@muhqu muhqu mentioned this issue Aug 7, 2013
9 tasks
@muhqu
Copy link

muhqu commented Aug 7, 2013

Guys I tried hard to rebase the GitX(L)'s isolated stash commits. But It pretty quick turned out to be very hard to do, so I decided to go the easier way and implement it from scratch. see #239

To show the list of stashes in the sidebar I have directly used the libgit2 as objective-git doesn't support stashes at the moment. But there's already a pull request to add support, yay! Anyway, I have implemented this with the objective in mind to replace all stash functionality with the objective-git equivalent once its available.

What do you think?

@taoeffect
Copy link

+1. Very much wish GitX had this feature.

@schmurfy
Copy link

maybe this issue should be closed since we now have a pull request for this.

@taoeffect
Copy link

Close once fixed. :-)

@codeon-nat
Copy link

But where is it ? I am still running GitX(L) because I stash stuff all the time. ;)

@digitaljhelms
Copy link

@codeon-nat the #239 PR has conflicts that require a branch rebase, however, it doesn't appear that @muhqu is supporting the PR any longer...

@tiennou tiennou mentioned this issue Feb 13, 2015
@dip00dip
Copy link

Would be very happy to see "stash" support in GitX dev

ssp referenced this issue in gitx/gitx Dec 7, 2016
Clickable and fixed-width diff collapse arrows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests