chiark / gitweb /
check_tree.pl: chomp git rev-parse results.
authorSven Eden <yamakuzure@gmx.net>
Thu, 15 Mar 2018 05:12:03 +0000 (06:12 +0100)
committerSven Eden <yamakuzure@gmx.net>
Mon, 26 Mar 2018 16:26:00 +0000 (18:26 +0200)
pwx/check_tree.pl

index 2c5e9c6bde625c8cde16039bd90971cdfbd94a32..299ea6d2f5b88f0eec204d49fb00ed14560b1042 100755 (executable)
@@ -1120,6 +1120,7 @@ sub checkout_upstream {
                print "$previous_commit\n";
                return 0;
        }
+       chomp $previous_commit;
 
        # Get the shortened commit hash of $commit
        $new_commit = qx(cd $upstream_path ; git rev-parse --short "$commit" 2>&1);
@@ -1129,6 +1130,7 @@ sub checkout_upstream {
                print "$new_commit\n";
                return 0;
        }
+       chomp $new_commit;
 
        # Now check it out, unless we are already there:
        if ($previous_commit ne $new_commit) {