Git development
 help / color / mirror / Atom feed
From: Sven Verdoolaege <Sven.Verdoolaege@cs.kuleuven.ac.be>
To: Git Mailing List <git@vger.kernel.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: cvs2git and file permissions
Date: Sat, 18 Jun 2005 22:52:08 +0200	[thread overview]
Message-ID: <20050618205208.GA4917@billie.cs.kuleuven.ac.be> (raw)

cvs2git currently drops mode information.
I've been bitten by this behaviour twice already.
The patch below fixes that, though not very cleanly.

skimo
--
git-cvs2git: propagate mode information

Let cvs checkout in a temporary directory rather than
using the pipe option to avoid loss of mode information.

Signed-off-by: Sven Verdoolaege <skimo@liacs.nl>

---
commit df97fd9b709bd927f15adbc1a90ddfcfa79c7895
tree 0f223f52fdf7d61d7d1df0da1137a542811d27f9
parent fdf95bf8d4d1182db579bd25fe5e25811084eaa6
author Sven Verdoolaege <skimo@kotnet.org> Sat, 18 Jun 2005 22:41:46 +0200
committer Sven Verdoolaege <skimo@kotnet.org> Sat, 18 Jun 2005 22:41:46 +0200

 cvs2git.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/cvs2git.c b/cvs2git.c
--- a/cvs2git.c
+++ b/cvs2git.c
@@ -196,10 +196,15 @@ static void update_file(char *line)
 	}
 
 	dir = strrchr(name, '/');
-	if (dir)
+	if (dir) {
 		printf("mkdir -p %.*s\n", (int)(dir - name), name);
+		printf("mkdir -p .git-tmp/%.*s\n", (int)(dir - name), name);
+	}
 
-	printf("cvs -q -d %s checkout -r%s -p '%s/%s' > '%s'\n", cvsroot, version, cvsmodule, name, name);
+	printf("cvs -q -d %s checkout -N -d .git-tmp -r%s '%s/%s'\n", 
+		cvsroot, version, cvsmodule, name);
+	printf("mv -f .git-tmp/%s/%s %s\n", cvsmodule, name, name);
+	printf("rm -rf .git-tmp\n");
 	printf("git-update-cache --add -- '%s'\n", name);
 }
 

             reply	other threads:[~2005-06-18 20:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-18 20:52 Sven Verdoolaege [this message]
2005-06-18 21:23 ` cvs2git and file permissions Linus Torvalds
2005-06-18 22:31   ` Sven Verdoolaege

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050618205208.GA4917@billie.cs.kuleuven.ac.be \
    --to=sven.verdoolaege@cs.kuleuven.ac.be \
    --cc=git@vger.kernel.org \
    --cc=skimo@liacs.nl \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox