File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -867,6 +867,7 @@ sub git_commit_info {
867
867
# echo "commit $(cut -c 1-12,41-)"
868
868
# done
869
869
} elsif ($lines [0] =~ / ^fatal: ambiguous argument '$commit ': unknown revision or path not in the working tree\. / ) {
870
+ $id = undef ;
870
871
} else {
871
872
$id = substr ($lines [0], 0, 12);
872
873
$desc = substr ($lines [0], 41);
@@ -2606,7 +2607,8 @@ sub process {
2606
2607
($id , $description ) = git_commit_info($orig_commit ,
2607
2608
$id , $orig_desc );
2608
2609
2609
- if ($short || $long || $space || $case || ($orig_desc ne $description ) || !$hasparens ) {
2610
+ if (defined ($id ) &&
2611
+ ($short || $long || $space || $case || ($orig_desc ne $description ) || !$hasparens )) {
2610
2612
ERROR(" GIT_COMMIT_ID" ,
2611
2613
" Please use git commit description style 'commit <12+ chars of sha1> (\" <title line>\" )' - ie: '${init_char} ommit $id (\" $description \" )'\n " . $herecurr );
2612
2614
}
You can’t perform that action at this time.
0 commit comments