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

Re: [PATCH v2 3/3] rebase (autostash): use an explicit OID to apply the stash

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 23, 2018, 04:13 UTC
Message-ID
<xmqqzhv5s3lf.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20181022223256.GI30222@szeder.dev>
SZEDER Gábor <szeder.dev@gmail.com> writes:
>> To prevent that from happening, let's append `^0` after the stash hash,
>> to make sure that it is interpreted as an OID rather than as a number.
>
> Oh, this is clever.

Yeah, we can do this as we know we'd be dealing with a commit-ish. If we made a mistake to use a tree object to represent a stash, this trick wouldn't have been possible ;-)

Show 5 quoted lines
> FWIW, all patches look good to me, barring the typo below.
> ...
>> +	/* Ensure that the hash is not mistake for a number */
>
> s/mistake/mistaken/
Will squash this in and add your reviewed-by before queuing.
Thanks, both.
Previous: SZEDER GáborNext: Johannes Schindelin
Message 5 of 9 in “Fix rebase autostash”
  1. 0/3 Fix rebase autostashJohannes Schindelin via GitGitGadget, Oct 22, 2018
  2. 3/3 rebase (autostash): use an explicit OID to apply the stashJohannes Schindelin via GitGitGadget, Oct 22, 2018
  3. Eric SunshineOct 22, 2018
  4. SZEDER GáborOct 22, 2018
  5. Junio C HamanoOct 23, 2018
  6. Johannes SchindelinOct 23, 2018
  7. Alban GruinOct 23, 2018
  8. 2/3 rebase (autostash): store the full OID in <state-dir>/autostashJohannes Schindelin via GitGitGadget, Oct 22, 2018
  9. 1/3 rebase (autostash): avoid duplicate call to state_dir_path()Johannes Schindelin via GitGitGadget, Oct 22, 2018

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.