Skip to content

Commit

Permalink
Merge branch 'km/git-svn-workaround-older-getopt-long'
Browse files Browse the repository at this point in the history
* km/git-svn-workaround-older-getopt-long:
  t9117: use --prefix "" instead of --prefix=""
  • Loading branch information
Junio C Hamano committed May 2, 2014
2 parents f7003da + 7bbc458 commit 06229a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Documentation/git-svn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ COMMANDS
NOTE: Before Git v2.0, the default prefix was "" (no prefix). This
meant that SVN-tracking refs were put at "refs/remotes/*", which is
incompatible with how Git's own remote-tracking refs are organized.
If you still want the old default, you can get it by passing
`--prefix ""` on the command line (`--prefix=""` may not work if
your Perl's Getopt::Long is < v2.37).

--ignore-paths=<regex>;;
When passed to 'init' or 'clone' this regular expression will
Expand Down
8 changes: 4 additions & 4 deletions t/t9117-git-svn-init-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,18 @@ test_expect_success 'clone with -s/-T/-b/-t assumes --prefix=origin/' '
rm -f warning
'

test_expect_success 'init with -s/-T/-b/-t and --prefix="" still works' '
test_expect_success 'init with -s/-T/-b/-t and --prefix "" still works' '
test ! -d project &&
git svn init -s "$svnrepo"/project project --prefix="" 2>warning &&
git svn init -s "$svnrepo"/project project --prefix "" 2>warning &&
test_must_fail grep -q prefix warning &&
test_svn_configured_prefix "" &&
rm -rf project &&
rm -f warning
'

test_expect_success 'clone with -s/-T/-b/-t and --prefix="" still works' '
test_expect_success 'clone with -s/-T/-b/-t and --prefix "" still works' '
test ! -d project &&
git svn clone -s "$svnrepo"/project --prefix="" 2>warning &&
git svn clone -s "$svnrepo"/project --prefix "" 2>warning &&
test_must_fail grep -q prefix warning &&
test_svn_configured_prefix "" &&
rm -rf project &&
Expand Down

0 comments on commit 06229a6

Please sign in to comment.