@@ -5436,7 +5437,7 @@ sub git_patchset_body {
while ($patch_line) {
# parse "git diff" header line
- if ($patch_line =~ m/^diff --git (\"(?:[^\\\"]*(?:\\.[^\\\"]*)*)\"|[^ "]*) (.*)$/) {
+ if ($patch_line =~ m/^diff --git (\"(?:[^\\\"]*(?:\\.[^\\\"]*)*)\"|[^ "]*) (.*)$/) { #"
# $1 is from_name, which we do not use
$to_name = unquote($2);
$to_name =~ s!^b/!!;
@@ -7287,8 +7288,26 @@ sub git_tree {
print "</tr>\n";
}
+ # directories first
foreach my $line (@entries) {
my %t = parse_ls_tree_line($line, -z => 1, -l => $show_sizes);
+ next unless ($t{'type'} eq "tree");
+
+ if ($alternate) {
+ print "<tr class=\"dark\">\n";
+ } else {
+ print "<tr class=\"light\">\n";
+ }
+ $alternate ^= 1;
+
+ git_print_tree_entry(\%t, $basedir, $hash_base, $have_blame);
+
+ print "</tr>\n";
+ }
+ # then nōn-directories
+ foreach my $line (@entries) {
+ my %t = parse_ls_tree_line($line, -z => 1, -l => $show_sizes);
+ next if ($t{'type'} eq "tree");
if ($alternate) {
print "<tr class=\"dark\">\n";
@@ -7422,7 +7441,7 @@ sub git_snapshot {
$cmd .= ' | ' . quote_command(@{$known_snapshot_formats{$format}{'compressor'}});
}
- $filename =~ s/(["\\])/\\$1/g;
+ $filename =~ s/(["\\])/\\$1/g; #"
my %latest_date;
if (%co) {
%latest_date = parse_date($co{'committer_epoch'}, $co{'committer_tz'});