Re: Pushing a single tag (ref + object)?
- From
Junio C Hamano <junkio@cox.net>
- Date
- Oct 19, 2005, 16:58 UTC
- Message-ID
- <7vvezt8mvv.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.64.0510190702360.3369@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> It does all this magic to set "x", but then it never uses it, and uses > "$@" instead after all. Which it has shifted all away.
Your /bin/sh scripting is rotting ;-) That is not a variable. If you saw the script actually used the value 'x' then you have spotted a bug.
That 'x' is not a magic but an old idiom to protect 'set' from getting confused by "$1" that happens to begin with a '-'. Setting random things is done by "set x random things" immediately followed by shifting that x away.