login
Header Space

 
 

Re: [PATCH 2/2] cvsimport: cleanup commit function

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Morten Welinder <mwelinder@...>
Cc: Martin Langhoff <martin.langhoff@...>, Junio C Hamano <junkio@...>, Matthias Urlichs <smurf@...>, <git@...>
Date: Tuesday, May 23, 2006 - 4:59 pm

On Tue, May 23, 2006 at 01:47:01PM -0400, Morten Welinder wrote:


Oops, that's an obvious fork optimization that I should have caught.
Patch is below. Note that this will now affect the environment of all
sub-processes, but it shouldn't matter since we reset it right before
commit. However, if anyone is worried, we can stash the old %ENV in
another hash temporarily.

-Peff

PS What is the preferred format for throwing patches into replies like
this? Putting the patch at the end (as here) or throwing the reply
comments in the ignored section near the diffstat?

---
cvsimport: set up commit environment in perl instead of using env

---

44c4a9f67322302ca49146a7c143c07ea67da366
 git-cvsimport.perl |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

44c4a9f67322302ca49146a7c143c07ea67da366
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 41ee9a6..83d7d3c 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -618,14 +618,13 @@ sub commit {
 	}
 
 	my $commit_date = strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date));
+	$ENV{GIT_AUTHOR_NAME} = $author_name;
+	$ENV{GIT_AUTHOR_EMAIL} = $author_email;
+	$ENV{GIT_AUTHOR_DATE} = $commit_date;
+	$ENV{GIT_COMMITTER_NAME} = $author_name;
+	$ENV{GIT_COMMITTER_EMAIL} = $author_email;
+	$ENV{GIT_COMMITTER_DATE} = $commit_date;
 	my $pid = open2(my $commit_read, my $commit_write,
-		'env',
-		"GIT_AUTHOR_NAME=$author_name",
-		"GIT_AUTHOR_EMAIL=$author_email",
-		"GIT_AUTHOR_DATE=$commit_date",
-		"GIT_COMMITTER_NAME=$author_name",
-		"GIT_COMMITTER_EMAIL=$author_email",
-		"GIT_COMMITTER_DATE=$commit_date",
 		'git-commit-tree', $tree, @commit_args);
 
 	# compatibility with git2cvs
-- 
1.3.3.g40505-dirty


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
irc usage.., Linus Torvalds, (Sat May 20, 1:26 pm)
Re: irc usage.., Junio C Hamano, (Sat May 20, 1:50 pm)
Re: irc usage.., Yann Dirson, (Sat May 20, 4:39 pm)
Re: irc usage.., Linus Torvalds, (Sun May 21, 9:45 pm)
Re: irc usage.., Donnie Berkholz, (Sat May 20, 6:18 pm)
Re: irc usage.., Linus Torvalds, (Sat May 20, 6:45 pm)
Re: irc usage.., Donnie Berkholz, (Sat May 20, 7:12 pm)
Re: irc usage.., Linus Torvalds, (Sun May 21, 3:24 pm)
Re: irc usage.., Linus Torvalds, (Sun May 21, 11:59 pm)
Re: irc usage.., Donnie Berkholz, (Mon May 22, 12:19 am)
Re: irc usage.., Linus Torvalds, (Mon May 22, 12:50 am)
Re: irc usage.., Martin Langhoff, (Mon May 22, 3:42 am)
Re: irc usage.., Linus Torvalds, (Mon May 22, 5:13 am)
Re: irc usage.., Martin Langhoff, (Mon May 22, 8:54 am)
Re: irc usage.., Linus Torvalds, (Mon May 22, 1:27 pm)
Re: irc usage.., Martin Langhoff, (Mon May 22, 3:46 pm)
Re: irc usage.., Donnie Berkholz, (Mon May 22, 3:09 pm)
Re: irc usage.., Linus Torvalds, (Mon May 22, 3:38 pm)
Re: irc usage.., Donnie Berkholz, (Mon May 22, 3:49 pm)
Re: irc usage.., Linus Torvalds, (Mon May 22, 4:20 pm)
Re: irc usage.., Donnie Berkholz, (Mon May 22, 5:48 pm)
Re: irc usage.., Donnie Berkholz, (Mon May 29, 5:54 pm)
Re: irc usage.., Martin Langhoff, (Mon May 29, 6:21 pm)
Re: irc usage.., Donnie Berkholz, (Mon May 29, 6:32 pm)
Re: irc usage.., Martin Langhoff, (Tue May 30, 6:31 pm)
Re: irc usage.., Linus Torvalds, (Tue May 30, 7:07 pm)
Re: irc usage.., Martin Langhoff, (Tue May 30, 9:04 pm)
Re: irc usage.., Donnie Berkholz, (Tue May 30, 10:49 pm)
Re: irc usage.., Martin Langhoff, (Wed May 31, 2:05 am)
Re: irc usage.., Alec Warner, (Wed May 31, 9:54 am)
Re: irc usage.., Martin Langhoff, (Wed May 31, 6:03 pm)
Re: irc usage.., Alec Warner, (Wed May 31, 9:42 pm)
Re: irc usage.., Martin Langhoff, (Thu Jun 1, 3:47 am)
Re: irc usage.., Alec Warner, (Sun Jun 4, 8:33 pm)
Re: irc usage.., Martin Langhoff, (Sun Jun 4, 10:06 pm)
Re: irc usage.., Alec Warner, (Sun Jun 4, 10:36 pm)
Re: irc usage.., Sean, (Mon Jun 5, 12:07 pm)
Re: irc usage.., Martin Langhoff, (Sun Jun 4, 11:49 pm)
Re: irc usage.., Linus Torvalds, (Mon May 29, 8:43 pm)
Re: irc usage.., Martin Langhoff, (Mon May 29, 8:19 pm)
Re: irc usage.., Donnie Berkholz, (Tue May 30, 1:31 am)
Re: irc usage.., Martin Langhoff, (Tue May 30, 2:01 am)
Re: irc usage.., Martin Langhoff, (Mon May 22, 3:41 pm)
Re: irc usage.., Linus Torvalds, (Mon May 22, 4:11 pm)
Re: irc usage.., Linus Torvalds, (Mon May 22, 4:33 pm)
Re: irc usage.., Matthias Urlichs, (Mon May 22, 5:41 pm)
Re: irc usage.., Linus Torvalds, (Mon May 22, 6:18 pm)
Re: irc usage.., Martin Langhoff, (Mon May 22, 7:23 pm)
Re: irc usage.., Linus Torvalds, (Mon May 22, 7:33 pm)
Re: irc usage.., Martin Langhoff, (Mon May 22, 7:29 pm)
Re: irc usage.., Junio C Hamano, (Mon May 22, 6:39 pm)
Re: irc usage.., Martin Langhoff, (Mon May 22, 7:15 pm)
Re: irc usage.., Jeff King, (Tue May 23, 2:52 am)
[PATCH 2/2] cvsimport: cleanup commit function, Jeff King, (Tue May 23, 3:00 am)
Re: [PATCH 2/2] cvsimport: cleanup commit function, Morten Welinder, (Tue May 23, 1:47 pm)
Re: [PATCH 2/2] cvsimport: cleanup commit function, Jeff King, (Tue May 23, 4:59 pm)
Re: [PATCH 2/2] cvsimport: cleanup commit function, Junio C Hamano, (Tue May 23, 7:41 pm)
Re: [PATCH 2/2] cvsimport: cleanup commit function, Jeff King, (Wed May 24, 5:52 am)
Re: [PATCH 2/2] cvsimport: cleanup commit function, Martin Langhoff, (Tue May 23, 4:13 am)
Re: [PATCH 2/2] cvsimport: cleanup commit function, Linus Torvalds, (Tue May 23, 12:50 pm)
Re: [PATCH 2/2] cvsimport: cleanup commit function, Linus Torvalds, (Tue May 23, 3:36 pm)
Re: [PATCH 2/2] cvsimport: cleanup commit function, Martin Langhoff, (Tue May 23, 4:29 pm)
Re: [PATCH 2/2] cvsimport: cleanup commit function, Jeff King, (Tue May 23, 5:10 pm)
Re: [PATCH 2/2] cvsimport: cleanup commit function, Martin Langhoff, (Tue May 23, 5:13 pm)
Re: [PATCH 2/2] cvsimport: cleanup commit function, Junio C Hamano, (Tue May 23, 4:25 pm)
Re: [PATCH 2/2] cvsimport: cleanup commit function, Junio C Hamano, (Tue May 23, 4:24 am)
Re: [PATCH 2/2] cvsimport: cleanup commit function, Martin Langhoff, (Tue May 23, 4:32 pm)
[PATCH 2/2] cvsimport: cleanup commit function, Jeff King, (Tue May 23, 3:27 am)
Re: irc usage.., Jeff King, (Tue May 23, 2:58 am)
Re: irc usage.., Donnie Berkholz, (Mon May 22, 4:16 pm)
Re: irc usage.., Martin Langhoff, (Mon May 22, 1:04 am)
Re: irc usage.., Donnie Berkholz, (Mon May 22, 1:21 am)
Re: irc usage.., Thomas Glanzmann, (Sun May 21, 5:46 am)
Re: irc usage.., Donnie Berkholz, (Sat May 20, 9:14 pm)
speck-geostationary