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

Re: [PATCH] sh-setup: work around "unset IFS" bug in some shells

From
Andreas Schwab <schwab@linux-m68k.org>
Date
Dec 8, 2012, 09:25 UTC
Message-ID
<m2vcccc2vd.fsf@linux-m68k.org>
In-Reply-To
<7v624dfp1e.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 14 quoted lines
> Andreas Schwab <schwab@linux-m68k.org> writes:
>
>> Junio C Hamano <gitster@pobox.com> writes:
>>
>>> +# 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.
>>> +IFS=' 	
>>> +'
>>
>> Trailing whitespace can easily get lost
>
> The comment above the assingment spell the character names out for
> that exact reason.  Honestly, I think

That won't help if you don't look for it. The loss can easily happen while you are in a different part of the file.

Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Previous: Junio C HamanoNext: Stefano Lattarini
Message 13 of 19 in “Weird problem with git-submodule.sh”
  1. Marc BranchaudDec 7, 2012
  2. Junio C HamanoDec 7, 2012
  3. Marc BranchaudDec 7, 2012
  4. Junio C HamanoDec 7, 2012
  5. Marc BranchaudDec 7, 2012
  6. Junio C HamanoDec 7, 2012
  7. Marc BranchaudDec 7, 2012
  8. Junio C HamanoDec 7, 2012
  9. sh-setup: work around "unset IFS" bug in some shellsJunio C Hamano, Dec 7, 2012
  10. Marc BranchaudDec 7, 2012
  11. Andreas SchwabDec 7, 2012
  12. Junio C HamanoDec 7, 2012
  13. Andreas SchwabDec 8, 2012
  14. Stefano LattariniDec 9, 2012
  15. Phil HordDec 12, 2012
  16. Junio C HamanoDec 12, 2012
  17. Phil HordDec 12, 2012
  18. Marc BranchaudDec 7, 2012
  19. sh-setup: Explicitly set IFS to its default, instead of unsetting it.marcnarc@xiplink.com, Dec 7, 2012

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.