From: Eric Lesh <eclesh@ucla.edu>
To: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
Cc: Git mailing list <git@vger.kernel.org>
Subject: [PATCH guilt] Handles slashes in branch names
Date: Thu, 19 Jul 2007 12:17:01 -0700 [thread overview]
Message-ID: <87r6n4td8y.fsf@hubert.paunchy.net> (raw)
In-Reply-To: <20070719184418.GA22463@filer.fsl.cs.sunysb.edu> (Josef Sipek's message of "Thu\, 19 Jul 2007 14\:44\:18 -0400")
When a branch name has a slash and autotagging is enabled, guilt barfs
when updating the stack tags. Make these branch names work.
Also allow guilt to create the patches directory for these branches.
Signed-off-by: Eric Lesh <eclesh@ucla.edu>
---
Josef Sipek <jsipek@fsl.cs.sunysb.edu> writes:
>
> 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?
>
Yours is a lot less ugly than mine was.
guilt | 1 +
guilt-init | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/guilt b/guilt
index 214def4..c913bd6 100755
--- a/guilt
+++ b/guilt
@@ -338,6 +338,7 @@ update_stack_tags()
# there are patches applied, therefore we must get the top,
# bottom and base hashes, and update the tags
+ mkdir -p `dirname $GIT_DIR/refs/tags/${branch}_top`
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"
diff --git a/guilt-init b/guilt-init
index ffe2434..9136f89 100755
--- a/guilt-init
+++ b/guilt-init
@@ -24,7 +24,7 @@ if [ -d "$GUILT_DIR/$branch" ]; then
fi
[ ! -d "$GUILT_DIR" ] && mkdir $GUILT_DIR
-mkdir $GUILT_DIR/$branch
+mkdir -p $GUILT_DIR/$branch
touch $GUILT_DIR/$branch/series
touch $GUILT_DIR/$branch/status
--
1.5.2
next prev parent reply other threads:[~2007-07-19 19:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-19 18:35 [PATCH guilt] Handles slashes in branch names Eric Lesh
2007-07-19 18:44 ` Josef Sipek
2007-07-19 19:17 ` Eric Lesh [this message]
2007-07-19 19:35 ` Josef Sipek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r6n4td8y.fsf@hubert.paunchy.net \
--to=eclesh@ucla.edu \
--cc=git@vger.kernel.org \
--cc=jsipek@fsl.cs.sunysb.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).