Skip to content

Commit dc5e391

Browse files
committed
Whitespace fixes in git-force-mtimes
1 parent c7434fd commit dc5e391

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

Diff for: git-force-mtimes

100644100755
+10-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
#!/usr/bin/perl
22
# Sets mtimes of all files in the reprository their last change date
3-
# based on git's log. Useful to avoid too new dates after a
4-
# checkout.
3+
# based on git's log. Useful to avoid too new dates after a checkout.
54

65
my %seen;
76
my $date;
87
open(LOG, "git log --pretty=format:'date: %ct' --name-only |") || die "git log failed: $!";
98
while (<LOG>) {
10-
chomp;
11-
if (/^date: (\d+)$/) {
12-
$date=$1;
13-
}
14-
elsif (! /^$/ && ! $seen{$_}) {
15-
$seen{$_}=1;
16-
# git log can list deleted files, so error is ignored
17-
utime($date, $date, $_);
18-
}
9+
chomp;
10+
if (/^date: (\d+)$/) {
11+
$date=$1;
12+
}
13+
elsif (! /^$/ && ! $seen{$_}) {
14+
$seen{$_}=1;
15+
# git log can list deleted files, so error is ignored
16+
utime($date, $date, $_);
17+
}
1918
}
2019
close LOG || die "git log failed: $!";

0 commit comments

Comments
 (0)