[PATCH guilt] Handles slashes in branch names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
Josef Sipek <jsipek@xxxxxxxxxxxxxxxxx> 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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux