From: "Karl Hasselström" <kha@treskal.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Catalin Marinas <catalin.marinas@gmail.com>
Subject: [PATCH 2/2] Tests for branch names with slashes
Date: Thu, 18 May 2006 08:43:21 +0200 [thread overview]
Message-ID: <20060518064321.GA10400@backpacker.hemma.treskal.com> (raw)
In-Reply-To: <20060516074504.GA27234@diana.vm.bytemark.co.uk>
Test a number of operations on a repository that has branch names
containing slashes (that is, branches living in a subdirectory of
.git/refs/heads).
Signed-off-by: Karl Hasselström <kha@treskal.com>
---
t/t0001-subdir-branches.sh | 59 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 59 insertions(+), 0 deletions(-)
create mode 100644 t/t0001-subdir-branches.sh
d54c84917b40b1e8b05081f0c063fd99b2bbb1ad
diff --git a/t/t0001-subdir-branches.sh b/t/t0001-subdir-branches.sh
new file mode 100644
index 0000000..ddde238
--- /dev/null
+++ b/t/t0001-subdir-branches.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# Copyright (c) 2006 Karl Hasselström
+#
+
+test_description='Branch names containing slashes
+
+Test a number of operations on a repository that has branch names
+containing slashes (that is, branches living in a subdirectory of
+.git/refs/heads).'
+
+. ./test-lib.sh
+
+test_expect_success 'Create a patch' \
+ 'stg init &&
+ echo "foo" > foo.txt &&
+ stg add foo.txt &&
+ stg new foo -m "Add foo.txt" &&
+ stg refresh'
+
+test_expect_success 'Old and new id with non-slashy branch' \
+ 'stg id foo &&
+ stg id foo// &&
+ stg id foo/ &&
+ stg id foo//top &&
+ stg id foo/top &&
+ stg id foo@master &&
+ stg id foo@master//top &&
+ stg id foo@master/top'
+
+test_expect_success 'Clone branch to slashier name' \
+ 'stg branch --clone x/y/z'
+
+test_expect_success 'Try new form of id with slashy branch' \
+ 'stg id foo &&
+ stg id foo// &&
+ stg id foo//top &&
+ stg id foo@x/y/z &&
+ stg id foo@x/y/z//top'
+
+test_expect_failure 'Try old id with slashy branch' \
+ 'stg id foo/ ||
+ stg id foo/top ||
+ stg id foo@x/y/z/top'
+
+test_expect_success 'Create patch in slashy branch' \
+ 'echo "bar" >> foo.txt &&
+ stg new bar -m "Add another line" &&
+ stg refresh'
+
+test_expect_success 'Rename branches' \
+ 'stg branch --rename master goo/gaa &&
+ test ! -e .git/refs/heads/master &&
+ stg branch --rename goo/gaa x1/x2/x3/x4 &&
+ test ! -e .git/refs/heads/goo &&
+ stg branch --rename x1/x2/x3/x4 servant &&
+ test ! -e .git/refs/heads/x1'
+
+test_done
--
1.3.2.g639c
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle
next prev parent reply other threads:[~2006-05-18 6:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060510060040.GA3034@diana.vm.bytemark.co.uk>
2006-05-15 9:53 ` [PATCH 1/3] Don't die when there are no branches Karl Hasselström
2006-05-15 9:54 ` [PATCH 2/3] Handle branch names with slashes Karl Hasselström
2006-05-15 10:22 ` Catalin Marinas
2006-05-15 10:58 ` Karl Hasselström
2006-05-16 6:35 ` [PATCH 1/2] " Karl Hasselström
2006-05-16 6:48 ` Junio C Hamano
2006-05-16 7:45 ` Karl Hasselström
2006-05-17 15:18 ` Catalin Marinas
2006-05-18 6:42 ` Karl Hasselström
2006-05-18 6:50 ` [PATCH] " Karl Hasselström
2006-05-18 12:11 ` Catalin Marinas
2006-05-18 16:00 ` Karl Hasselström
2006-05-18 6:43 ` Karl Hasselström [this message]
2006-05-16 6:37 ` [PATCH 2/2] Tests for " Karl Hasselström
2006-05-15 9:55 ` [PATCH 3/3] " Karl Hasselström
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=20060518064321.GA10400@backpacker.hemma.treskal.com \
--to=kha@treskal.com \
--cc=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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