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

Re: [PATCH guilt] Handles slashes in branch names

From
JSJosef Sipek <jsipek@fsl.cs.sunysb.edu>
Date
Jul 19, 2007, 18:44 UTC
Message-ID
<20070719184418.GA22463@filer.fsl.cs.sunysb.edu>
In-Reply-To
<87y7hctf6o.fsf@hubert.paunchy.net>
On Thu, Jul 19, 2007 at 11:35:11AM -0700, Eric Lesh wrote:
> When a branch name has a slash and autotagging is enabled, guilt barfs
> when updating the stack tags.  Escape the branch name in the tags to
> allow this to work.
...
Show 6 quoted lines
> -		git-rev-parse HEAD > "$GIT_DIR/refs/tags/${branch}_top"
> -		head -1 < $applied | cut -d: -f1 > "$GIT_DIR/refs/tags/${branch}_bottom"
> -		git-rev-parse $(head -1 < $applied | cut -d: -f1)^ > "$GIT_DIR/refs/tags/${branch}_base"
> +		git-rev-parse HEAD > "$GIT_DIR/refs/tags/${newbranch}_top"
> +		head -1 < $applied | cut -d: -f1 > "$GIT_DIR/refs/tags/${newbranch}_bottom"
> +		git-rev-parse $(head -1 < $applied | cut -d: -f1)^ > "$GIT_DIR/refs/tags/${newbranch}_base"
Why mangle the branch name when we can do:

mkdir -p `basename $GIT_DIR/refs/tags/${branch}_top` git-rev-parse ....

Sure, it is ugly, but it preserves the branch name. Am I missing something?
Josef 'Jeff' Sipek.
-- 
A computer without Microsoft is like chocolate cake without mustard.
Previous: Eric LeshNext: Eric Lesh
Message 2 of 4 in “Handles slashes in branch names”
  1. Handles slashes in branch namesEric Lesh, Jul 19, 2007
  2. Josef SipekJul 19, 2007
  3. Handles slashes in branch namesEric Lesh, Jul 19, 2007
  4. Josef SipekJul 19, 2007

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.