X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-format-patch.sh;h=8a16eadfbd391c957c5e297a3511bbfe4c5ef89d;hb=6d96ac18e52aca19ff1087ffa64e2d616cc75c6f;hp=2ebf7e8596eaf9253cf302a01d9f9fb8c08041cf;hpb=f0c979f4dbbb7d6d9565d945c540f0a5748f1b80;p=git.git diff --git a/git-format-patch.sh b/git-format-patch.sh index 2ebf7e85..8a16eadf 100755 --- a/git-format-patch.sh +++ b/git-format-patch.sh @@ -126,8 +126,8 @@ for revpair do case "$revpair" in ?*..?*) - rev1=`expr "$revpair" : '\(.*\)\.\.'` - rev2=`expr "$revpair" : '.*\.\.\(.*\)'` + rev1=`expr "z$revpair" : 'z\(.*\)\.\.'` + rev2=`expr "z$revpair" : 'z.*\.\.\(.*\)'` ;; *) rev1="$revpair^" @@ -205,11 +205,10 @@ sub show_date { } my $t = $time + $minutes * 60; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime($t); - return sprintf("%s %s %d %02d:%02d:%02d %d %+05d", - $weekday_names[$wday], - $month_names[$mon], - $mday, $hour, $min, $sec, - $year+1900, $tz); + return sprintf("%s, %d %s %d %02d:%02d:%02d %+05d", + $weekday_names[$wday], $mday, + $month_names[$mon], $year+1900, + $hour, $min, $sec, $tz); } print "From nobody Mon Sep 17 00:00:00 2001\n"; @@ -275,7 +274,7 @@ print "\n---\n\n"; close FH or die "close $commsg pipe"; ' "$keep_subject" "$num" "$signoff" "$headers" "$mimemagic" $commsg - git-diff-tree -p $diff_opts "$commit" | git-apply --stat --summary + git-diff-tree -p --stat --summary $diff_opts "$commit" echo case "$mimemagic" in '');;