git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Date
Dec 4, 2006, 16:51 UTC
Message-ID
<200612041751.49652.robin.rosenberg.lists@dewire.com>
In-Reply-To
<87ac24zrk0.fsf@rho.meyering.net>
söndag 03 december 2006 20:51 skrev Jim Meyering:
Show 5 quoted lines
> 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
+      )'
+
Previous: Jim Meyering
Message 5 of 5 in “Set permissions of each new file before "cvs add"ing it.”
  1. Jim MeyeringDec 3, 2006
  2. Junio C HamanoDec 4, 2006
  3. Junio C HamanoDec 4, 2006
  4. Jim MeyeringDec 4, 2006
  5. Robin RosenbergDec 4, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.