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

stash pop merge fails #35

Open
franciscolourenco opened this issue Mar 25, 2012 · 2 comments
Open

stash pop merge fails #35

franciscolourenco opened this issue Mar 25, 2012 · 2 comments

Comments

@franciscolourenco
Copy link

"If a stash pop merge fails, Legit stops. I'd like to add checking for a merge failure, and undo the command with friendly error reporting."

what do you mean with "Legit stops"?

@kennethreitz
Copy link
Collaborator

It errors out :)

@lovato
Copy link
Contributor

lovato commented Apr 15, 2014

Got this today.

(transitopoars)lovato@xlovato:/code/python/transitopoars/transitopoars (fixes201404) $ git checkout master
error: Your local changes to the following files would be overwritten by checkout:
tests/201403051659.txt
Please, commit your changes or stash them before you can switch branches.
Aborting
(transitopoars)lovato@xlovato:
/code/python/transitopoars/transitopoars (fixes201404) $ git switch master
Saving local changes.
Saved working directory and index state On fixes201404: Legit: stashing before switching branches.
HEAD is now at e728363 melhorias
Switching to master.
Restoring local changes.
Traceback (most recent call last):
File "/usr/local/bin/legit", line 9, in
load_entry_point('legit==0.1.1', 'console_scripts', 'legit')()
File "/usr/local/lib/python2.7/dist-packages/legit/cli.py", line 44, in main
command.call(args)
File "/usr/local/lib/python2.7/dist-packages/legit/cli.py", line 549, in call
return self.fn(_args, *_kw_args)
File "/usr/local/lib/python2.7/dist-packages/legit/cli.py", line 142, in cmd_switch
status_log(unstash_it, 'Restoring local changes.', branch=from_branch)
File "/usr/local/lib/python2.7/dist-packages/legit/cli.py", line 85, in status_log
log = func(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/legit/scm.py", line 102, in unstash_it
'stash', 'pop', 'stash@{{{0}}}'.format(stash_index)])
File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 377, in execute
raise GitCommandError(command, status, stderr_value)
git.exc.GitCommandError: 'git stash pop stash@{T}' returned exit status 1: fatal: ambiguous argument 'stash@{T}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'

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

No branches or pull requests

4 participants