summaryrefslogtreecommitdiff
path: root/t/t9100-git-svn-basic.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-06-27 20:09:04 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-06-27 20:09:04 -0700
commit4f2b15ce88b70dd9e269517a9903864393ca873b (patch)
tree58d092883f59f321ab61358417f87dcdf755dcfb /t/t9100-git-svn-basic.sh
parentMerge branch 'pb/send-email-cccmd-fix' (diff)
parentgit svn: Doc update for multiple branch and tag paths (diff)
downloadtgif-4f2b15ce88b70dd9e269517a9903864393ca873b.tar.xz
Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn: git svn: Doc update for multiple branch and tag paths git svn: cleanup t9138-multiple-branches git-svn: Canonicalize svn urls to prevent libsvn assertion t9138: remove stray dot in test which broke bash git-svn: convert globs to regexps for branch destinations git svn: Support multiple branch and tag paths in the svn repository. Add 'git svn reset' to unwind 'git svn fetch' git-svn: speed up find_rev_before Add 'git svn help [cmd]' which works outside a repo. git-svn: let 'dcommit $rev' work on $rev instead of HEAD
Diffstat (limited to 't/t9100-git-svn-basic.sh')
-rwxr-xr-xt/t9100-git-svn-basic.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
index 64aa7e2f10..570e0359e4 100755
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
@@ -231,6 +231,25 @@ test_expect_success \
"^:refs/${remotes_git_svn}$"
'
+test_expect_success 'dcommit $rev does not clobber current branch' '
+ git svn fetch -i bar &&
+ git checkout -b my-bar refs/remotes/bar &&
+ echo 1 > foo &&
+ git add foo &&
+ git commit -m "change 1" &&
+ echo 2 > foo &&
+ git add foo &&
+ git commit -m "change 2" &&
+ old_head=$(git rev-parse HEAD) &&
+ git svn dcommit -i bar HEAD^ &&
+ test $old_head = $(git rev-parse HEAD) &&
+ test refs/heads/my-bar = $(git symbolic-ref HEAD) &&
+ git log refs/remotes/bar | grep "change 1" &&
+ ! git log refs/remotes/bar | grep "change 2" &&
+ git checkout master &&
+ git branch -D my-bar
+ '
+
test_expect_success 'able to dcommit to a subdirectory' "
git svn fetch -i bar &&
git checkout -b my-bar refs/remotes/bar &&