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

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.

Previous: Linus TorvaldsNext: Linus Torvalds
Message 3 of 4 in “Pushing a single tag (ref + object)?”
  1. Martin LanghoffOct 19, 2005
  2. Linus TorvaldsOct 19, 2005
  3. Junio C HamanoOct 19, 2005
  4. Linus TorvaldsOct 19, 2005

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.