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

Re: [PATCH 0/2] Reinstate the helpful message when `git pull --rebase` fails

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 12, 2015, 10:45 UTC
Message-ID
<c9dd5858532f402e24c05b630a517ce9@dscho.org>
In-Reply-To
<56193760.5010307@web.de>
Hi Torsten,
On 2015-10-10 18:05, Torsten Bögershausen wrote:
Show 32 quoted lines
> On 09.10.15 12:11, Johannes Schindelin wrote:
>> Me again,
>>
>> On 2015-10-09 11:50, Johannes Schindelin wrote:
>>>
>>> On 2015-10-09 03:40, Paul Tan wrote:
>>>> On Fri, Oct 9, 2015 at 8:52 AM, Junio C Hamano <gitster@pobox.com> wrote:
>>>>> Johannes Schindelin <johannes.schindelin@gmx.de> writes:
>>>>>
>>>>>> Brendan Forster noticed that we no longer see the helpful message after
>>>>>> a failed `git pull --rebase`. It turns out that the builtin `am` calls
>>>>>> the recursive merge function directly, not via a separate process.
>>
>> [... cut lots of unnecessary text ...]
>>
>> +test_expect_success 'failed --rebase shows advice' '
>> +	git checkout -b diverging &&
>> +	test_commit attributes .gitattributes "* text=auto" attrs &&
>> +	sha1="$(printf "1\\r\\n" | git hash-object -w --stdin)" &&
>> +	git update-index --cacheinfo 0644 $sha1 file &&
>> +	git commit -m v1-with-cr &&
>> +	git checkout -f -b fails-to-rebase HEAD^ &&
>> +	test_commit v2-without-cr file "2" file2-lf &&
>> +	test_must_fail git pull --rebase . diverging 2>err >out &&
>> +	grep "When you have resolved this problem" out
>> +'
>> +
> 
> One other question:
> Is it good to mix 2 different things in one test case ?
> "shows the helpful advice when failing" is one thing,
> and the problematic CRLF handling another.
I do not necessarily test things that work, and have been working for a long time, so no, I do not want to split that into two.
I could trigger the regression only via CR/LF, that is the only reason why CR/LF are used here. I do *not* want to test for anything CR/LF specific.

Ciao, Dscho

Previous: Torsten BögershausenNext: Junio C Hamano
Message 14 of 22 in “Reinstate the helpful message when `git pull --rebase` fails”
  1. 0/2 Reinstate the helpful message when `git pull --rebase` failsJohannes Schindelin, Oct 8, 2015
  2. 1/2 merge_recursive_options: introduce the "gentle" flagJohannes Schindelin, Oct 8, 2015
  3. 2/2 pull --rebase: reinstate helpful message on abortJohannes Schindelin, Oct 8, 2015
  4. Junio C HamanoOct 9, 2015
  5. Johannes SchindelinOct 12, 2015
  6. Junio C HamanoOct 12, 2015
  7. Junio C HamanoOct 9, 2015
  8. Paul TanOct 9, 2015
  9. Johannes SchindelinOct 9, 2015
  10. Johannes SchindelinOct 9, 2015
  11. Junio C HamanoOct 9, 2015
  12. Torsten BögershausenOct 10, 2015
  13. Torsten BögershausenOct 10, 2015
  14. Johannes SchindelinOct 12, 2015
  15. Junio C HamanoOct 9, 2015
  16. Junio C HamanoOct 9, 2015
  17. Junio C HamanoOct 9, 2015
  18. Johannes SchindelinOct 12, 2015
  19. Junio C HamanoOct 9, 2015
  20. Johannes SchindelinOct 12, 2015
  21. Junio C HamanoOct 12, 2015
  22. Johannes SchindelinOct 13, 2015

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.