summaryrefslogtreecommitdiff
path: root/Porting/bisect.pl
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2012-04-16 20:23:32 +0200
committerNicholas Clark <nick@ccl4.org>2013-05-28 09:19:28 +0200
commitb835daeb04122e4e7730a2afd5c5471b21071896 (patch)
tree192ddde72fd145c611bdbfb783ec798c5fc2ca33 /Porting/bisect.pl
parent54c7e1f075f1a6336d9b1930882c5d4acd750f18 (diff)
downloadperl-b835daeb04122e4e7730a2afd5c5471b21071896.tar.gz
Tweak to make it clearer what to do if your working space is dirty
If you try to biect in a directory with .gitignore'd files in it bisect will refuse to run. Since these files arent shown by status this can cause some head scratching. This patch makes it more obvious what is wrong by showing the listed files and suggesting git clean as a solution. I deliberately did not document the command to clean up untracked files, so people wouldn't knee jerk paste it somewhere and lose something important. And by people I mean me. :-) Thus it just shows the command to wipe ignored files, which I figure is safe.
Diffstat (limited to 'Porting/bisect.pl')
-rwxr-xr-xPorting/bisect.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/Porting/bisect.pl b/Porting/bisect.pl
index c52c740770..f5c401b443 100755
--- a/Porting/bisect.pl
+++ b/Porting/bisect.pl
@@ -82,9 +82,13 @@ foreach ($start, $end) {
chomp;
}
-my $modified = () = `git ls-files --modified --deleted --others`;
+my $modified = my @modified = `git ls-files --modified --deleted --others`;
-die "This checkout is not clean - $modified modified or untracked file(s)"
+die "This checkout is not clean, found file(s):\n",
+ join("\t","",@modified),
+ "$modified modified, untracked, or other file(s)\n",
+ "These files may not show in git status as they may be ignored.\n",
+ "You can use 'git clean -Xdf' to cleanup the ignored files.\n"
if $modified;
sub validate {