File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 87
87
}
88
88
}
89
89
90
+ my $noparent = " 0000000000000000000000000000000000000000" ;
90
91
if ($parent ) {
91
92
my $found ;
92
93
# double check that it's a valid parent
100
101
} else { # we don't have a parent from the cmdline...
101
102
if (@parents == 1) { # it's safe to get it from the commit
102
103
$parent = $parents [0];
103
- } else { # or perhaps not!
104
- die " This commit has more than one parent -- please name the parent you want to use explicitly" ;
104
+ } elsif (@parents == 0) { # there is no parent
105
+ $parent = $noparent ;
106
+ } else { # cannot choose automatically from multiple parents
107
+ die " This commit has more than one parent -- please name the parent you want to use explicitly" ;
105
108
}
106
109
}
107
110
121
124
}
122
125
close MSG;
123
126
124
- ` git-diff-tree --binary -p $parent $commit >.cvsexportcommit.diff` ;# || die "Cannot diff";
127
+ if ($parent eq $noparent ) {
128
+ ` git-diff-tree --binary -p --root $commit >.cvsexportcommit.diff` ;# || die "Cannot diff";
129
+ } else {
130
+ ` git-diff-tree --binary -p $parent $commit >.cvsexportcommit.diff` ;# || die "Cannot diff";
131
+ }
125
132
126
133
# # apply non-binary changes
127
134
You can’t perform that action at this time.
0 commit comments