-#
+#!/usr/bin/perl -w
+
+use File::Compare qw(compare);
sub format_one {
my ($out, $name) = @_;
my ($state, $description);
+ $state = 0;
open I, '<', "$name.txt" or die "No such file $name.txt";
while (<I>) {
if (/^NAME$/) {
format_one(\*O, $_);
}
close O;
- rename "$out+", "$out";
+
+ if (-f "$out" && compare("$out", "$out+") == 0) {
+ unlink "$out+";
+ }
+ else {
+ print STDERR "$out\n";
+ rename "$out+", "$out";
+ }
}
__DATA__
git-bisect mainporcelain
git-blame ancillaryinterrogators
git-branch mainporcelain
+git-bundle mainporcelain
git-cat-file plumbinginterrogators
git-checkout-index plumbingmanipulators
git-checkout mainporcelain
+git-check-attr purehelpers
git-check-ref-format purehelpers
git-cherry ancillaryinterrogators
git-cherry-pick mainporcelain
git-diff-files plumbinginterrogators
git-diff-index plumbinginterrogators
git-diff mainporcelain
-git-diff-stages plumbinginterrogators
git-diff-tree plumbinginterrogators
+git-fast-import ancillarymanipulators
git-fetch mainporcelain
git-fetch-pack synchingrepositories
git-fmt-merge-msg purehelpers
git-for-each-ref plumbinginterrogators
git-format-patch mainporcelain
-git-fsck-objects ancillaryinterrogators
+git-fsck ancillaryinterrogators
git-gc mainporcelain
git-get-tar-commit-id ancillaryinterrogators
git-grep mainporcelain
git-merge mainporcelain
git-merge-one-file purehelpers
git-merge-tree ancillaryinterrogators
+git-mergetool ancillarymanipulators
git-mktag plumbingmanipulators
git-mktree plumbingmanipulators
git-mv mainporcelain
git-relink ancillarymanipulators
git-repack ancillarymanipulators
git-config ancillarymanipulators
+git-remote ancillarymanipulators
git-request-pull foreignscminterface
git-rerere ancillaryinterrogators
git-reset mainporcelain
-git-resolve mainporcelain
git-revert mainporcelain
git-rev-list plumbinginterrogators
git-rev-parse ancillaryinterrogators