Don't yap about merge-subtree during make
[gitweb.git] / Documentation / cmd-list.perl
index f61c77aa7c360e12a3e11e9e5dd3ebecfad78d7e..0381590d383c4fffbf04895be4c47e407dd94e80 100755 (executable)
@@ -1,8 +1,11 @@
-#
+#!/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$/) {
@@ -55,7 +58,14 @@ sub format_one {
                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__
@@ -124,6 +134,7 @@ sub format_one {
 git-merge                               mainporcelain
 git-merge-one-file                      purehelpers
 git-merge-tree                          ancillaryinterrogators
+git-mergetool                           ancillarymanipulators
 git-mktag                               plumbingmanipulators
 git-mktree                              plumbingmanipulators
 git-mv                                  mainporcelain