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

Re: [PATCH v2 2/2] sh-setup: explicitly mark CR as a field separator

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Oct 26, 2015, 09:34 UTC
Message-ID
<vpqlhaqas8g.fsf@grenoble-inp.fr>
In-Reply-To
<2b089201404299257f23b3931499ea16202f0f65.1445782122.git.johannes.schindelin@gmx.de>
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> This is the correct thing to do, really: we already specify LF as
> field separator.

I'm almost convinced that this is the right thing to do in the long run ("almost" because I'm not sure, not because I have arguments against). I agree with Junio that the commit message should be more convincing, but indeed, accepting LF and not CR is strange.

However, is this the right thing to do in the maintainance branch? It does fix the issue, but does so in a rather intrusive way, so I'd need more arguments to be convinced that this is safe to merge in maint. Or have a local fix for rebase to be merged in maint, and apply this in master for the next feature release.

Sorry for being negative, and especially sorry since I'm partly guilty for the breakage. I just want to be sure that we don't break anything while repairing it (we already introduced this breakage while repairing another one...).

Show 7 quoted lines
>  # Similarly for IFS, but some shells (e.g. FreeBSD 7.2) are buggy and
>  # do not equate an unset IFS with IFS with the default, so here is
> -# an explicit SP HT LF.
> +# an explicit SP HT LF CR.
>  IFS=' 	
> -'
> +'"$(printf '\r')"

While we're there, it may be better to have a single "printf ' \t\n\r'" to avoid the whitespace magic in the source code.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Johannes SchindelinNext: Junio C Hamano
Message 9 of 31 in “Fix interactive rebase when the editor saves with CR/LF”
  1. 0/2 Fix interactive rebase when the editor saves with CR/LFJohannes Schindelin, Oct 25, 2015
  2. 1/2 Demonstrate rebase fails when the editor saves with CR/LFJohannes Schindelin, Oct 25, 2015
  3. 2/2 sh-setup: explicitly mark CR as a field separatorJohannes Schindelin, Oct 25, 2015
  4. Philip OakleyOct 25, 2015
  5. Johannes SchindelinOct 25, 2015
  6. 0/2 Fix interactive rebase when the editor saves with CR/LFJohannes Schindelin, Oct 25, 2015
  7. 1/2 Demonstrate rebase fails when the editor saves with CR/LFJohannes Schindelin, Oct 25, 2015
  8. 2/2 sh-setup: explicitly mark CR as a field separatorJohannes Schindelin, Oct 25, 2015
  9. Matthieu MoyOct 26, 2015
  10. Junio C HamanoOct 26, 2015
  11. Junio C HamanoOct 26, 2015
  12. Johannes SchindelinOct 27, 2015
  13. Johannes SchindelinOct 27, 2015
  14. Junio C HamanoOct 27, 2015
  15. Matthieu MoyOct 27, 2015
  16. Junio C HamanoOct 25, 2015
  17. Johannes SchindelinOct 26, 2015
  18. Junio C HamanoOct 26, 2015
  19. Johannes SchindelinOct 27, 2015
  20. 0/2 Fix interactive rebase when the editor saves with CR/LFJohannes Schindelin, Oct 27, 2015
  21. 1/2 Demonstrate rebase fails when the editor saves with CR/LFJohannes Schindelin, Oct 27, 2015
  22. 2/2 rebase-i: work around Windows CRLF line endingsJohannes Schindelin, Oct 27, 2015
  23. Johannes SchindelinOct 27, 2015
  24. Junio C HamanoOct 27, 2015
  25. Johannes SchindelinOct 28, 2015
  26. 0/2 Fix interactive rebase when the editor saves with CR/LFJohannes Schindelin, Oct 28, 2015
  27. 1/2 Demonstrate rebase fails when the editor saves with CR/LFJohannes Schindelin, Oct 28, 2015
  28. 2/2 rebase-i: work around Windows CRLF line endingsJohannes Schindelin, Oct 28, 2015
  29. Junio C HamanoOct 28, 2015
  30. Johannes SchindelinOct 25, 2015
  31. shell scripting woes, was Re: [PATCH 2/2] sh-setup: explicitly mark CR as a field separatorJohannes Schindelin, Oct 25, 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.