Skip to content

Commit

Permalink
Item12994: Don't create duplicates in .gitignore
Browse files Browse the repository at this point in the history
Developers.  Your .gitignore files are probably huge after repeated runs
of pseusdo-install.  This won't fix existing duplicates, so best to
delete the existing .gitignore.
  • Loading branch information
gac410 committed Aug 24, 2014
1 parent a493338 commit 2cbfeb7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/pseudo-install.pl
Expand Up @@ -1544,8 +1544,10 @@ sub merge_gitignore {

# we're installing, so keep all the old rules, or
# we're uninstalling, so keep files not being uninstalled
if ( $installing || ( !exists $input_files->{$old_rule} ) ) {
push( @merged_rules, $old_rule );
if ($installing) {
if ( !exists $input_files->{$old_rule} ) {
push( @merged_rules, $old_rule );
}
}
else {
$dropped_rules{$old_rule} = 1;
Expand All @@ -1557,6 +1559,7 @@ sub merge_gitignore {
# Append new files not matching an existing wildcard
if ($installing) {
foreach my $file ( keys %{$input_files} ) {
next if ( $file =~ m#/.git/# ); # git hooks files don't get ignored.
if ( $file && $file =~ /[^\s]/ && !$dropped_rules{$file} ) {
my $nmatch_rules = scalar(@match_rules);
my $matched;
Expand Down

0 comments on commit 2cbfeb7

Please sign in to comment.