Re: Set permissions of each new file before "cvs add"ing it.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



söndag 03 december 2006 20:51 skrev Jim Meyering:
> Without the following patch, git-cvsexportcommit would fail to propagate
> permissions of files added in git to the CVS repository.  I.e., when I
> added an executable script in coreutils' git repo, then tried to propagate
> that addition to the mirroring CVS repository, the script ended up added
> not executable there.

The patch to cvsexportcommit I sent a couple of weeks ago fixes the execution 
bit, along with most other flaws. Jounio had some objections that I haven't 
fixed yet. Hacking the Eclipse plugin was much more fun :)

I added this test case just to verify it on top of my previous patch. 

-- robin

diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index 75b9f38..63eafc8 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -195,4 +195,19 @@ test_expect_success \
       ! git-cvsexportcommit -c $id
       )'

+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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]