mirror of
https://github.com/git/git.git
synced 2024-12-15 12:53:36 +08:00
6f5748e14c
It may be convenient for some users to store svn remote tracking branches outside of the refs/remotes/ heirarchy. To accomplish this feat, this patch includes the entire path to the ref in $r->{'refname'} in &read_all_remotes and tries to change references to this entry so the new value makes sense. [ew: fixed backwards compatibility, long lines] Signed-off-by: Adam Brewster <adambrewster@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
32 lines
687 B
Bash
Executable File
32 lines
687 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Copyright (c) 2009 Eric Wong
|
|
|
|
test_description='git svn old rev_map preservd'
|
|
. ./lib-git-svn.sh
|
|
|
|
test_expect_success 'setup test repository with old layout' '
|
|
mkdir i &&
|
|
(cd i && > a) &&
|
|
svn_cmd import -m- i "$svnrepo" &&
|
|
git svn init "$svnrepo" &&
|
|
git svn fetch &&
|
|
test -d .git/svn/refs/remotes/git-svn/ &&
|
|
! test -e .git/svn/git-svn/ &&
|
|
mv .git/svn/refs/remotes/git-svn .git/svn/ &&
|
|
rm -r .git/svn/refs
|
|
'
|
|
|
|
test_expect_success 'old layout continues to work' '
|
|
svn_cmd import -m- i "$svnrepo/b" &&
|
|
git svn rebase &&
|
|
echo a >> b/a &&
|
|
git add b/a &&
|
|
git commit -m- -a &&
|
|
git svn dcommit &&
|
|
! test -d .git/svn/refs/ &&
|
|
test -e .git/svn/git-svn/
|
|
'
|
|
|
|
test_done
|