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

Gitx dev stashes #239

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Gitx dev stashes #239

wants to merge 12 commits into from

Conversation

muhqu
Copy link

@muhqu muhqu commented Aug 7, 2013

Support for stashes (see #14 )

Major Tasks:

  • list stashes in sidebar (with libgit2)
  • pop stash (context menu)
  • apply stash (context menu)
  • drop stash (context menu)
  • view diff (context menu, open in new window)
  • stash save via commit dialog (Hold down ⌥-key in commit dialog to reveal 'Stash Changes' button and 'Keep Index' checkbox.)
  • app menu items:
    • "Stash Save ⌘Y"
    • "Stash Save - Keep Index ⌥⌘Y" (alternate)
    • "Stash Pop ⇧⌘Y"
  • display an error message when "stash save/pop/apply" result in error

Optional Todos:

  • implement "stash save/pop/apply" via objective-git or libgit2

gitx

gitx branch_ gitx-dev-stashes

As Objective-Git doesn't yet offer stash support use libgit2 right away. should be replaced by Objective-Git equivalent when available
add menu items for stash items: "Pop stash@..", "Apply", "View Diff" and "Drop"
but only "View Diff" functional yet
Note: use of deprecated [PBGitRepository outputInWorkdirForArguments:…] should be replaced with objective-git equivalent once stash-support is available.
Therefore the old controls, e.g. "Amend" checkbox, "Sign-off" and "Commit" buttons, have been moved into a tab-less NSTabView. The tab switches to the stash controls when holding the Alt-Key down.
Note: use of deprecated [PBGitRepository outputInWorkdirForArguments:…] should be replaced with objective-git equivalent once stash-support is available.
- added IBOutlet for stashButton
- added a trackedFilesController to easily get a count of tracked files
@muhqu muhqu mentioned this pull request Aug 7, 2013
@schmurfy
Copy link

schmurfy commented Aug 8, 2013

it looks great !

- "Stash Save ⌘Y"
- "Stash Save - Keep Index ⌥⌘Y" (alternate)
- "Stash Pop ⇧⌘Y"
@schmurfy
Copy link

I can test it out see if it works fine for me if you want, I will need a binary thought.
on the todo I think the error message is a really important thing to have, based on my own workflow half of the time applying a stash result in a conflict, most of the time a minor one but still I prefer to know it ^^

For me the main use of the stashes list in GitX would be to see what I have in store more than acting on it via GitX, I still do most of my actions in a console.

@kieran
Copy link

kieran commented Aug 15, 2013

👍

@emptyflask
Copy link

Well I don't know ObjC and I haven't tested this patch, but I want this feature, so 👍

if (retValue) {
NSString *title = [NSString stringWithFormat:@"Stash %@ failed!", command];
NSString *message = [NSString stringWithFormat:@"There was an error!"];
[self.windowController showErrorSheetTitle:title message:message arguments:arguments output:output];
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rowanj I know showErrorSheet... is deprecated, but what's the proposed alternative?

@muhqu
Copy link
Author

muhqu commented Aug 21, 2013

@schmurfy and anyone else who wants to test this PR without having to build it them self here's a link to a binary build by myself: http://muhqu.de/builds/[email protected]

@muhqu
Copy link
Author

muhqu commented Aug 21, 2013

Btw, I'm not sure what might be the best keyboard shortcuts for the menu items... I choose ⌘Y mostly because I feel "stash" in git it a bit like "yank" in vi, if you know what I mean. But If you guys have other ideas just let me know!

@emptyflask
Copy link

@muhqu thanks for that. It seems to work well...

@kieran
Copy link

kieran commented Aug 21, 2013

Seems good here as well! 💯

@schmurfy
Copy link

since we can rebind any shortcut anyway thanks to mac os x I don't think the default one is that important.

@schmurfy
Copy link

it seems to work well for me too (I am on 10.8.4)

@rowanj
Copy link
Owner

rowanj commented Aug 23, 2013

@muhqu I mostly deprecated the error sheet because it was really buggy after the ARC conversion; that should be fixed now. I think I never got around to un-deprecating it because it's not a particularly good UX design, but it's fine to use for now.

@mengelbrecht
Copy link

Is there an ETA for this pull request to get merged? Stash support directly in GitX would greatly improve my workflow.

@schmurfy
Copy link

same, and as far as I can tell the binary posted works fine.

@kieran
Copy link

kieran commented Sep 19, 2013

bump

Would love to have this in the main build ;-)

@muhqu
Copy link
Author

muhqu commented Sep 19, 2013

👍 me too.. ;-) version bump! ...version bump! ...version bump! ;-P

@muhqu
Copy link
Author

muhqu commented Sep 19, 2013

Btw, eventhough I have this in my build, I don't get much used to it. I'm still using DTerm for stash / stash pop stuff...

@kieran
Copy link

kieran commented Sep 19, 2013

I currently keep a Laullon build around for stashing & popping. I find it incredibly handy to browse the stashed diffs since I'm constantly switching contexts for hotfixes.

Thanks for this PR! Looking forward to only having one version :-)

rowanj added a commit that referenced this pull request Sep 20, 2013
rowanj added a commit that referenced this pull request Sep 20, 2013
rowanj added a commit that referenced this pull request Sep 20, 2013
Missing `[super init]`
rowanj added a commit that referenced this pull request Sep 20, 2013
rowanj added a commit that referenced this pull request Sep 20, 2013
rowanj added a commit that referenced this pull request Sep 20, 2013
@rowanj
Copy link
Owner

rowanj commented Sep 20, 2013

n.b. the merged branch (issues/239) is currently missing a few XIB changes that conflicted

@aoxborrow
Copy link

this will be handy. 👏

@pvinis
Copy link

pvinis commented Nov 11, 2014

any news about this issue?

@muhqu
Copy link
Author

muhqu commented Nov 11, 2014

@pvinis looks like I need to rebase this feature branch before @rowanj eventually might feel the urge to merge it.

While I implemented this feature, I never really got used to it when I was running my own builds of GitX-dev. When it comes to stashing and switching branches etc, I use DTerm (open-source context aware hud-style terminal) to invoke git commands.

@pvinis
Copy link

pvinis commented Nov 11, 2014

i often use stash and an easy way to make named stashed etc would be nice. i will check DTerm though. thanks

@schmurfy
Copy link

it would be really nice to have this, it would be sad to let the work you did go to waste :)

@pvinis
Copy link

pvinis commented Nov 12, 2014

tried DTerm. looks like a very useful little app. the only problem is that i also use git bisect, and bisect has to be ran at the root of the repo.. now im sad again :p

@muhqu
Copy link
Author

muhqu commented Nov 12, 2014

@pvinis without knowing much about git bisect, you might get what you want by adding an alias that just cds into the working copy's root directory and issues git bisect … there.

git config alias.biisect '!f(){(cd "$(git rev-parse --show-toplevel)"; git bisect "$@")};f'

…then you can use git biisect … from everywhere inside your working copy.

@tiennou tiennou mentioned this pull request Feb 13, 2015
@nguyenkims
Copy link

Hey, anyone has updates about this PR ?

@muhqu
Copy link
Author

muhqu commented Nov 4, 2015

...no. I haven't done any gitx development in a long time. Wondering if it even compiles with latest XCode... :-/

@pvinis
Copy link

pvinis commented Nov 4, 2015

i use it daily, but i have gitup for stashes.

On Τετ, Νοε 4, 2015 at 19:59, rowanj/gitx
[email protected]
wrote:
...no. I haven't done any gitx development in a long time. Wondering if it even
compiles with latest XCode... :-/


Reply to this email directly or view it on GitHub
[https://github.com//pull/239#issuecomment-153830795] .[https://github.com/notifications/beacon/AAGHiUyFl2FK13FiwaML4MLwLReTsc0Lks5pCk0NgaJpZM4A4iQX.gif]

@muhqu
Copy link
Author

muhqu commented Feb 1, 2018

FYI the stash support of this PR has actually been integrated into this very active fork: https://github.com/gitx/gitx 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants