svn import: Do not create empty tags
If a tag is "clean", do not create a commit for it. Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
This commit is contained in:
@ -407,6 +407,10 @@ sub commit {
|
|||||||
$last_rev = $rev;
|
$last_rev = $rev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $cid;
|
||||||
|
if($tag and not %$changed_paths) {
|
||||||
|
$cid = $rev;
|
||||||
|
} else {
|
||||||
while(my($path,$action) = each %$changed_paths) {
|
while(my($path,$action) = each %$changed_paths) {
|
||||||
if ($action->[0] eq "A") {
|
if ($action->[0] eq "A") {
|
||||||
my $f = get_file($revision,$branch,$path);
|
my $f = get_file($revision,$branch,$path);
|
||||||
@ -534,7 +538,7 @@ sub commit {
|
|||||||
$pw->close();
|
$pw->close();
|
||||||
|
|
||||||
print "Committed change $revision:$branch ".strftime("%Y-%m-%d %H:%M:%S",gmtime($date)).")\n" if $opt_v;
|
print "Committed change $revision:$branch ".strftime("%Y-%m-%d %H:%M:%S",gmtime($date)).")\n" if $opt_v;
|
||||||
chomp(my $cid = <$pr>);
|
chomp($cid = <$pr>);
|
||||||
length($cid) == 40
|
length($cid) == 40
|
||||||
or die "Cannot get commit id ($cid): $!\n";
|
or die "Cannot get commit id ($cid): $!\n";
|
||||||
print "Commit ID $cid\n" if $opt_v;
|
print "Commit ID $cid\n" if $opt_v;
|
||||||
@ -542,6 +546,7 @@ sub commit {
|
|||||||
|
|
||||||
waitpid($pid,0);
|
waitpid($pid,0);
|
||||||
die "Error running git-commit-tree: $?\n" if $?;
|
die "Error running git-commit-tree: $?\n" if $?;
|
||||||
|
}
|
||||||
|
|
||||||
if(not defined $dest) {
|
if(not defined $dest) {
|
||||||
print "... no known parent\n" if $opt_v;
|
print "... no known parent\n" if $opt_v;
|
||||||
|
|||||||
Reference in New Issue
Block a user