git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: moti sd <motisd8@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git bug
Date: Mon, 5 Feb 2024 07:47:09 +0100	[thread overview]
Message-ID: <ZcCEbaId0HL4Briz@tanuki> (raw)
In-Reply-To: <CAPvDF0P7_s-iy_V7FNSHtXXc9v5E3Fm=AdgduDDsd0rM-zNg-g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1748 bytes --]

On Mon, Feb 05, 2024 at 12:42:03AM +0100, moti sd wrote:
> Dear Git Team,
> 
> I am writing to report a potential bug encountered while using the "git
> stash" command. The issue was observed during a troubleshooting. Please
> find the details below:
> 
> *Problem Description:*
> 
> The "git stash" command is not providing any feedback or indication of
> execution, even though modifications are present and the stash operation is
> attempted.
> *Steps to Reproduce:*
> 
> Make modifications to a file.
> Execute "git stash" to stash changes.
> *Expected Behavior:*
> 
> The "git stash" command should provide feedback on the stash operation,
> confirming whether it was successful or if there were any errors.
> *Additional Information:*
> The issue was initially observed when executing "git commit -a --amend" and
> pressing Ctrl+Z to exit. Subsequent attempts to use "git stash" resulted in
> an error.
> Testing with a provided ZIP file containing a problematic repository
> confirmed the issue's recurrence.
> *Investigation and Findings:*
> 
> Upon investigation, it was discovered that the use of Ctrl+Z after "git
> commit -a --amend" might be the root cause.
> Deleting a lock file left behind by the incomplete git command resolved the
> issue, indicating a potential bug in how "git stash" handles incomplete
> commands.
> *Recommendation:*

This is indeed it. The problem is that the index will be locked while
git-commit(1) is active, and thus git-stash(1) cannot write to it at the
same time. So this is working as designed. What's not though is the fact
that we don't print an error message.

I'll send a patch in reply to this message to fix this bug. Thanks for
your report!

Patrick

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-02-05  6:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-04 23:42 git bug moti sd
2024-02-05  6:47 ` Patrick Steinhardt [this message]
2024-02-05  7:01 ` [PATCH] builtin/stash: report failure to write to index Patrick Steinhardt
2024-02-05 22:22   ` Rubén Justo
2024-02-06  5:06     ` Patrick Steinhardt
2024-02-06  3:24   ` Junio C Hamano
2024-02-06  5:20     ` Patrick Steinhardt
2024-02-06  5:34 ` [PATCH v2] " Patrick Steinhardt
  -- strict thread matches above, loose matches on Subject: below --
2024-02-08 19:32 git bug Justin Tang
2023-04-14  9:41 Git bug Gabriel Furstenheim Milerud
2023-04-14 16:07 ` René Scharfe
     [not found]   ` <CAJN3DWpvh8uHnRFnaPgg8U6dW=3xP9YULBe-xfeTAg2SV7K+oQ@mail.gmail.com>
2023-04-17  9:46     ` Gabriel Furstenheim Milerud
2023-04-14  8:29 Gabriel Furstenheim Milerud
2023-04-14  9:26 ` Kristoffer Haugsbakk
2020-08-06 14:59 git bug PANEL Christian
2020-08-06 14:48 PANEL Christian
2020-08-06 20:23 ` René Scharfe
2020-08-07  0:02   ` Jeff King
2020-08-10  5:56     ` René Scharfe
2020-08-10 17:20       ` PANEL Christian
2012-10-22 16:28 git BUG Коньков Евгений

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=ZcCEbaId0HL4Briz@tanuki \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=motisd8@gmail.com \
    /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.
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).