git-svn: set auto_props when renaming files

Patch-by: Paul Talacko <gnuruandstuff@yahoo.co.uk>:
<http://article.gmane.org/gmane.comp.version-control.git/95006>
> Hello,
>
> There's an issue in git-svn as autoprops are not applied to
> renamed files, only to added files.
>
> This patch fixes the bug.

[ew: added test case]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
This commit is contained in:
Paul Talacko
2008-09-06 18:50:38 -07:00
committed by Eric Wong
parent a786091b4a
commit 7c4d0219cf
2 changed files with 18 additions and 0 deletions

View File

@ -81,4 +81,21 @@ test_expect_success 'check resulting svn repository' '
)
'
test_expect_success 'check renamed file' '
test -d user &&
generate_auto_props yes > user/config &&
git mv foo foo.sh &&
git commit -m "foo => foo.sh" &&
git svn dcommit --config-dir=user &&
(
cd work/svnrepo &&
svn up &&
test ! -e foo &&
test -e foo.sh &&
test "x$(svn propget svn:mime-type foo.sh)" = \
"xapplication/x-shellscript" &&
test "x$(svn propget svn:eol-style foo.sh)" = "xLF"
)
'
test_done