Thread (2 messages) flat view 2 messages, 2 authors, 2016-08-11

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

From: Robin Rosenberg <hidden>
Date: 2016-08-11 19:21:59
Subsystem: the rest · Maintainer: Linus Torvalds

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
+      )'
+
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help