git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: 'git stash push' isn't atomic when Ctrl-C is pressed

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 26, 2022, 23:15 UTC
Message-ID
<xmqqczkeozpx.fsf@gitster.g>
In-Reply-To
<220126.864k5qdx66.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> I understood this problem as being one where we do the ref work first,
> which we could start a transaction for, the user then ctrl+c's after the
> ref work is done, but before the working tree is updated.

If the process is killed while the working tree is half updated, nothing you do with ref transaction will help.

Show 7 quoted lines
>> I suspect that the untold thinking behind your statement was that we
>> should try not to discourage new users from asking, and I agree with
>> the sentiment to a certain degree.  But at the same time, I think it
>> is simply irresponsible to do so without distinguising between
>> asking for something realistic and unrealistic.
>
> I must admit I'm not deeply familiar with builtin/stash.c in particular,

Then you can try to be on the conservative side, perhaps, to avoid misleading less experienced folks next time? Thanks.

Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 7 of 11 in “'git stash push' isn't atomic when Ctrl-C is pressed”
  1. YuriJan 25, 2022
  2. Ævar Arnfjörð BjarmasonJan 26, 2022
  3. John CaiJan 26, 2022
  4. Ævar Arnfjörð BjarmasonJan 26, 2022
  5. Junio C HamanoJan 26, 2022
  6. Ævar Arnfjörð BjarmasonJan 26, 2022
  7. Junio C HamanoJan 26, 2022
  8. Ævar Arnfjörð BjarmasonJan 27, 2022
  9. Junio C HamanoJan 27, 2022
  10. John CaiJan 27, 2022
  11. Junio C HamanoJan 26, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.