diff options
author | Jim Meyering <jim@meyering.net> | 2006-12-04 08:44:08 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-04 13:34:45 -0800 |
commit | 7c0f7028ee04f135c7481671f05ca4a66072c78f (patch) | |
tree | be5e8bfc824491a1e50a37ecc75773e18503b0d7 /t | |
parent | Merge branch 'maint' (diff) | |
download | tgif-7c0f7028ee04f135c7481671f05ca4a66072c78f.tar.xz |
Set permissions of each new file before "cvs add"ing it.
Otherwise, an executable script in git would end up being
checked into the CVS repository without the execute bit.
[jc: with an additional test script from Robin Rosenberg.]
Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-rwxr-xr-x | t/t9200-git-cvsexportcommit.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh index 6e566d4409..c1024790e4 100755 --- a/t/t9200-git-cvsexportcommit.sh +++ b/t/t9200-git-cvsexportcommit.sh @@ -142,4 +142,20 @@ test_expect_success \ diff F/newfile6.png ../F/newfile6.png )' +test_expect_success 'Retain execute bit' ' + mkdir G && + echo executeon >G/on && + chmod +x G/on && + echo executeoff >G/off && + git add G/on && + git add G/off && + git commit -a -m "Execute test" && + ( + cd "$CVSWORK" && + git-cvsexportcommit -c HEAD + test -x G/on && + ! test -x G/off + ) +' + test_done |