From: John Cai <jcai@gitlab.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Yuri <yuri@rawbw.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: 'git stash push' isn't atomic when Ctrl-C is pressed
Date: Wed, 26 Jan 2022 11:09:15 -0500 [thread overview]
Message-ID: <B6F534FC-FCEE-4A90-9576-233103865B3E@gitlab.com> (raw)
In-Reply-To: <220126.86bkzyfw3q.gmgdl@evledraar.gmail.com>
On 26 Jan 2022, at 8:41, Ævar Arnfjörð Bjarmason wrote:
> On Tue, Jan 25 2022, Yuri wrote:
>
>> Ctrl-C was pressed in the middle. git creates the stash record and
>> didn't update the files.
>>
>>
>> Expected behavior: Ctrl-C should cleanly roll back the operation.
>
> Yes, you're right. It really should be fixed.
>
> It's a known issue with builtin/stash.c being written in C, but really
> only still being a faithful conversion of the code we had in a
> git-stash.sh shellscript until relatively recently.
>
> (No fault of those doing the conversion, that's always the logical first
> step).
>
> So it modifies various refs, reflogs etc., but does so mostly via
> shelling out to other git commands, whereas it really should be moved to
> using the ref transaction API.
>
> Ig you or anyone else is interested in would be a most welcome project
> to work on…
I’d be happy to help with this!
next prev parent reply other threads:[~2022-01-26 16:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-25 17:13 'git stash push' isn't atomic when Ctrl-C is pressed Yuri
2022-01-26 13:41 ` Ævar Arnfjörð Bjarmason
2022-01-26 16:09 ` John Cai [this message]
2022-01-26 17:30 ` Ævar Arnfjörð Bjarmason
2022-01-26 19:58 ` Junio C Hamano
2022-01-26 20:47 ` Ævar Arnfjörð Bjarmason
2022-01-26 23:15 ` Junio C Hamano
2022-01-27 2:36 ` Ævar Arnfjörð Bjarmason
2022-01-27 18:05 ` Junio C Hamano
2022-01-27 1:53 ` John Cai
2022-01-26 20:23 ` Junio C Hamano
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=B6F534FC-FCEE-4A90-9576-233103865B3E@gitlab.com \
--to=jcai@gitlab.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=yuri@rawbw.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).