All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Layne <keith@laynes.org>
To: git@vger.kernel.org
Subject: [BUG] `git stash` exits without output when lockfile present
Date: Sat, 21 Jan 2023 13:07:37 -0500	[thread overview]
Message-ID: <P0LUOR.9QAZEXOQT1VT1@laynes.org> (raw)

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]




                 reply	other threads:[~2023-01-21 18:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=P0LUOR.9QAZEXOQT1VT1@laynes.org \
    --to=keith@laynes.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.