summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 690d882)
raw | patch | inline | side by side (parent: 690d882)
author | Andy Whitcroft <apw@shadowen.org> | |
Mon, 25 Sep 2006 11:08:13 +0000 (12:08 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 28 Sep 2006 16:12:57 +0000 (09:12 -0700) |
When commiting a non-signed off contribution you cannot just add
a Signed-off-by: from the author as they did not sign it off.
But if you then commit it, and necessarily sign it off yourself,
the change appears to be yours. In this case it is common to use
the following form:
Commentry
From: originator <email>
Signed-of-by: me <my email>
Now that we have support for parsing Signed-off-by: for author
information it makes sense to handle From: as well. This patch
adds a new -F which will handle From: lines in the comments. It
may be used in combination with -S.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
a Signed-off-by: from the author as they did not sign it off.
But if you then commit it, and necessarily sign it off yourself,
the change appears to be yours. In this case it is common to use
the following form:
Commentry
From: originator <email>
Signed-of-by: me <my email>
Now that we have support for parsing Signed-off-by: for author
information it makes sense to handle From: as well. This patch
adds a new -F which will handle From: lines in the comments. It
may be used in combination with -S.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-svnimport.perl | patch | blob | history |
diff --git a/git-svnimport.perl b/git-svnimport.perl
index ed628974d7d5ff356d05f0cc51a8cb42046a6c1b..988514e293fcde4c536cc18d5cd8c9fb77b890d3 100755 (executable)
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
$ENV{'TZ'}="UTC";
our($opt_h,$opt_o,$opt_v,$opt_u,$opt_C,$opt_i,$opt_m,$opt_M,$opt_t,$opt_T,
- $opt_b,$opt_r,$opt_I,$opt_A,$opt_s,$opt_l,$opt_d,$opt_D,$opt_S);
+ $opt_b,$opt_r,$opt_I,$opt_A,$opt_s,$opt_l,$opt_d,$opt_D,$opt_S,$opt_F);
sub usage() {
print STDERR <<END;
[-o branch-for-HEAD] [-h] [-v] [-l max_rev]
[-C GIT_repository] [-t tagname] [-T trunkname] [-b branchname]
[-d|-D] [-i] [-u] [-r] [-I ignorefilename] [-s start_chg]
- [-m] [-M regex] [-A author_file] [-S] [SVN_URL]
+ [-m] [-M regex] [-A author_file] [-S] [-F] [SVN_URL]
END
exit(1);
}
-getopts("A:b:C:dDhiI:l:mM:o:rs:t:T:Suv") or usage();
+getopts("A:b:C:dDFhiI:l:mM:o:rs:t:T:Suv") or usage();
usage if $opt_h;
my $tag_name = $opt_t || "tags";
$committer_name = $committer_email = $author;
}
- if ($opt_S && $message =~ /Signed-off-by:\s+(.*?)\s+<(.*)>\s*\n/) {
+ if ($opt_F && $message =~ /From:\s+(.*?)\s+<(.*)>\s*\n/) {
($author_name, $author_email) = ($1, $2);
+ print "Author from From: $1 <$2>\n" if ($opt_v);;
+ } elsif ($opt_S && $message =~ /Signed-off-by:\s+(.*?)\s+<(.*)>\s*\n/) {
+ ($author_name, $author_email) = ($1, $2);
+ print "Author from Signed-off-by: $1 <$2>\n" if ($opt_v);;
} else {
$author_name = $committer_name;
$author_email = $committer_email;