git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* [BUG] `git stash` exits without output when lockfile present
@ 2023-01-21 18:07 Keith Layne
  0 siblings, 0 replies; only message in thread
From: Keith Layne @ 2023-01-21 18:07 UTC (permalink / raw)
  To: git

What did you do before the bug happened? (Steps to reproduce your issue)

In clean repo root:

$ touch foo
$ touch .git/index.lock
$ git stash

What did you expect to happen? (Expected behavior)

An error message to stderr explaining that .git/index.lock exists, etc.

What happened instead? (Actual behavior)

`git stash` has an exit code of 1, with no output on stdout or stderr.

What's different between what you expected and what actually happened?

I didn't notice at first that the stash failed, and I was briefly 
confused. I guess I've never tried to stash and gotten this error 
before, but whenever I see the "lockfile exists" error I feel like the 
UX is very consistent with other commands. I expected stash to work the 
same way.

I apologize if this is a dupe, I don't know how to search the archives.


[System Info]
git version:
git version 2.34.1
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.19.16-76051916-generic 
#202210150742~1666053244~22.04~cf07008 SMP PREEMPT_DYNAMIC Tue O x86_64
compiler info: gnuc: 11.2
libc info: glibc: 2.35
$SHELL (typically, interactive shell): /bin/zsh


[Enabled Hooks]




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-21 18:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-21 18:07 [BUG] `git stash` exits without output when lockfile present Keith Layne

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).