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

Re: [PATCH 3/3] git-pull.sh: introduce --[no-]autostash and pull.autostash

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Mar 24, 2013, 21:12 UTC
Message-ID
<CALkWK0k0Ek0Dqxrrv7dAzUgF2X2hCcz2SodcPEgiRdLFgc-gXA@mail.gmail.com>
In-Reply-To
<CALkWK0k=jei8Z+n-4O92obQOR88FR6iFCSifVhDDS8jv37rOjA@mail.gmail.com>
Ramkumar Ramachandra wrote:
Show 26 quoted lines
> Junio C Hamano wrote:
>> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>>
>>>>> +     elif test "$autostash" = false
>>>>> +     then
>>>>>               require_clean_work_tree "pull with rebase" "Please commit or stash them."
>>>>>       fi
>>>>
>>>> A safety net, after you run "git stash", to validate that the
>>>> added "git stash" indeed made the working tree clean, is necessary
>>>> below, but there does not seem to be any.
>>>
>>> Um, isn't that part of the "git stash" testsuite?
>>
>> You should always "trust but verify" what other commands do at key
>> points of the operation; and I think this "require-clean-work-tree"
>> is a key precondition for this mode of operation to work correctly.
>>
>> Especially because you do not even bother to check the result of
>> "git stash" before continuing ;-).
>
> If you think it's enough to replicate the codepath that precedes the
> actual saving in 'git stash' (which is essentially
> require-clean-work-tree), I'm in agreement with you.  I thought you
> were implying a wider safety net, that wouldn't even assume the basic
> sanity of stash.

Er, s/codepath that precedes the actual saving in 'git stash'/codepath that precedes the actual pulling or merging in 'git pull'/

I'm feeling a little muddled up today; weekends are usually bad.
Previous: Ramkumar Ramachandra
Message 11 of 11 in “Introduce pull.autostash”
  1. 0/3 Introduce pull.autostashRamkumar Ramachandra, Mar 22, 2013
  2. 1/3 git-pull.sh: prefer invoking "git <command>" over "git-<command>"Ramkumar Ramachandra, Mar 22, 2013
  3. 2/3 t5521 (pull-options): use test_commit() where appropriateRamkumar Ramachandra, Mar 22, 2013
  4. Junio C HamanoMar 22, 2013
  5. Ramkumar RamachandraMar 23, 2013
  6. 3/3 git-pull.sh: introduce --[no-]autostash and pull.autostashRamkumar Ramachandra, Mar 22, 2013
  7. Junio C HamanoMar 22, 2013
  8. Ramkumar RamachandraMar 23, 2013
  9. Junio C HamanoMar 24, 2013
  10. Ramkumar RamachandraMar 24, 2013
  11. Ramkumar RamachandraMar 24, 2013

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.