* [PATCH] clone: fix options '-o' and '--origin' to be recognised again
@ 2007-12-19 9:15 Marco Roeland
2007-12-19 9:45 ` Junio C Hamano
2007-12-19 15:43 ` Jeff King
0 siblings, 2 replies; 3+ messages in thread
From: Marco Roeland @ 2007-12-19 9:15 UTC (permalink / raw
To: git; +Cc: Junio C Hamano, Pierre Habouzit, Kristian Høgsberg
Due to a subtle typo in a shell case pattern neither alternative worked.
Signed-off-by: Marco Roeland <marco.roeland@xs4all.nl>
---
This is a regression in 'next', introduced on Nov 4th by commit 94362599
"Migrate git-clone to use git-rev-parse --parseopt". Added Kristian as
he works on the builtin version; perhaps nice for a test case (!).
git-clone.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-clone.sh b/git-clone.sh
index 9a160ee..b4e858c 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -152,7 +152,7 @@ do
die "clones are always made with separate-remote layout" ;;
--reference)
shift; reference="$1" ;;
- -o,--origin)
+ -o|--origin)
shift;
case "$1" in
'')
--
1.5.4.rc0.1162.g3bfea
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clone: fix options '-o' and '--origin' to be recognised again
2007-12-19 9:15 [PATCH] clone: fix options '-o' and '--origin' to be recognised again Marco Roeland
@ 2007-12-19 9:45 ` Junio C Hamano
2007-12-19 15:43 ` Jeff King
1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2007-12-19 9:45 UTC (permalink / raw
To: Marco Roeland; +Cc: git, Pierre Habouzit, Kristian Høgsberg
Thanks. That indeed was embarrassing.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clone: fix options '-o' and '--origin' to be recognised again
2007-12-19 9:15 [PATCH] clone: fix options '-o' and '--origin' to be recognised again Marco Roeland
2007-12-19 9:45 ` Junio C Hamano
@ 2007-12-19 15:43 ` Jeff King
1 sibling, 0 replies; 3+ messages in thread
From: Jeff King @ 2007-12-19 15:43 UTC (permalink / raw
To: Junio C Hamano
Cc: Marco Roeland, git, Pierre Habouzit, Kristian Høgsberg
On Wed, Dec 19, 2007 at 10:15:15AM +0100, Marco Roeland wrote:
> This is a regression in 'next', introduced on Nov 4th by commit 94362599
> "Migrate git-clone to use git-rev-parse --parseopt". Added Kristian as
> he works on the builtin version; perhaps nice for a test case (!).
Here is a test case that catches this regression. It can perhaps be
expanded by Kristian to test other options, but is probably worth adding
now as a basic sanity check.
I put the test in 5702. There seems to be a '5600' clone test, as well,
which perhaps should be in the 57?? series.
-- >8 --
test "git clone -o"
This tests a recently fixed regression in which "git clone
-o" didn't work at all.
Signed-off-by: Jeff King <peff@peff.net>
---
t/t5702-clone-options.sh | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
create mode 100755 t/t5702-clone-options.sh
diff --git a/t/t5702-clone-options.sh b/t/t5702-clone-options.sh
new file mode 100755
index 0000000..328e4d9
--- /dev/null
+++ b/t/t5702-clone-options.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+test_description='basic clone options'
+. ./test-lib.sh
+
+test_expect_success 'setup' '
+
+ mkdir parent &&
+ (cd parent && git init &&
+ echo one >file && git add file &&
+ git commit -m one)
+
+'
+
+test_expect_success 'clone -o' '
+
+ git clone -o foo parent clone-o &&
+ (cd clone-o && git rev-parse --verify refs/remotes/foo/master)
+
+'
+
+test_done
--
1.5.4.rc0.1162.gaa83ae
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-19 15:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-19 9:15 [PATCH] clone: fix options '-o' and '--origin' to be recognised again Marco Roeland
2007-12-19 9:45 ` Junio C Hamano
2007-12-19 15:43 ` Jeff King
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).