Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 5/9] update-index: add --checkout/--no-checkout to update CE_NO_CHECKOUT bit

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:40

"Nguyen Thai Ngoc Duy" [off-list ref] writes:
quoted
Yes, I also dislike the subtlety, but my "obvious" idea was something
 like:

  for i in 1 2 sub/1 sub/2; do
    touch $i
  done

 which just seemed clunky. But:


 > -     touch 1 2 sub/1 sub/2 &&
 > +     touch ./1 ./2 sub/1 sub/2 &&


this is less clunky, and I have confirmed that it solves the problem. I
 just wasn't clever enough to think of it in the first place. ;)
Thanks for catching. The last half also has the same problem. Another
way is maybe just stay away for those numbers, naming the files by
... Just wonder if we could have some ways to automatically
catch this kind of bug in the future.
A tool to do so essentially amounts to coming up with a set of POSIX
command line tools that know and flag all the known bugs broken platform
tools have, at the same time producing a reasonable end result so that it
can continue running and detecting more portability issues in the scripts.

Using dash as the shell helps to catch use of constructs outside POSIX,
running various GNU tools with POSIXLY_CORRECT=YesPlease may have similar
effects, but quirks specific to particular platforms like the above is
fundamentally hard to check.  Running autobuilder farms like Jeff does is
probably the best thing we can do.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help