From c23ac59e5feb1fc3ab4a6ac3d017872847023f44 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Thu, 20 Feb 2014 16:02:57 +1100 Subject: [PATCH] avoid leaving the old perldelta as a symlink In a built tree, the name we copy perldelta.pod to is a symlink to perldelta.pod, and if you blindly follow the git adds, you end up adding a symlink to the commit. unlink() the name we're about to overwrite before we overwrite it to prevent that. --- Porting/new-perldelta.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Porting/new-perldelta.pl b/Porting/new-perldelta.pl index 7aa605e..bc11e59 100644 --- a/Porting/new-perldelta.pl +++ b/Porting/new-perldelta.pl @@ -61,6 +61,9 @@ $olddelta =~ s{^(perl)(delta - what is new for perl v5.$old_major.$old_minor)$} or die "Can't find expected NAME contents in $olddelta"; my $olddeltaname = "pod/perl5$old_major${old_minor}delta.pod"; +# in a built tree, $olddeltaname is a symlink to perldelta.pod, make sure +# we don't write through it +unlink($olddeltaname); write_or_die($olddeltaname, $olddelta); git_add_new($olddeltaname); -- 2.7.4