Re: [PATCH guilt] Handles slashes in branch names
- From
- Josef 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.