Giter VIP home page Giter VIP logo

Comments (15)

eggbean avatar eggbean commented on May 31, 2024 1

I still cannot figure out what is going on. There seems to be two issues:

  • From looking at the verbose log, when there's a .stow-global-ignore, ~/.stow-global-ignore seems to be ignored.

  • When I have .*\.env in both files, it still does not get ignored.

...
  Using ignore file: ../../.dotfiles/.bin/scripts/.stow-local-ignore
    Using memoized regexps from ../../.dotfiles/.bin/scripts/.stow-local-ignore
    Ignore list regexp for paths:    /(?^:(^|/)(^/\.stow\-local\-ignore$)(/|$))/
    Ignore list regexp for segments: /(?^:^(src|.*\.env|dir_colors)$)/
  Not ignoring dynu.sh
Stowing ../../.dotfiles/.bin / scripts / dynu.sh
  => ../../.dotfiles/.bin/scripts/dynu.sh
  is_a_link(dynu.sh)
  link_task_action(dynu.sh): link task exists with action remove
  is_a_link(dynu.sh): returning 0 (remove action found)
  is_a_node(dynu.sh)
  link_task_action(dynu.sh): link task exists with action remove
  dir_task_action(dynu.sh): no task
LINK: dynu.sh => ../../.dotfiles/.bin/scripts/dynu.sh (reverts previous action)

from stow.

gutierri avatar gutierri commented on May 31, 2024 1

I confirm the problem.

The .stow-local-ignore rules override the .stow-global-ignore rules. The ideal would be a mix of the two files.

version: from source (4ef5eca)

from stow.

gutierri avatar gutierri commented on May 31, 2024 1

from stow.

gutierri avatar gutierri commented on May 31, 2024 1

from stow.

eggbean avatar eggbean commented on May 31, 2024

Can anybody else confirm that ~/.stow-global-ignore doesn't work? Does anybody know if it worked in any previous versions? I could consider downgrading to an earlier version if it doesn't have the issues of the current version and if that version doesn't lack any features that I use.

from stow.

eggbean avatar eggbean commented on May 31, 2024

Thanks for confirming this. I use this program heavily, so I'm really looking forward to someone fixing the little bugs present in the current version.

from stow.

eggbean avatar eggbean commented on May 31, 2024

Me trying to be helpful:

https://metacpan.org/pod/File::Cmp

?

from stow.

gutierri avatar gutierri commented on May 31, 2024

The root of the problem is apparently here (line 1290). It returns the first rule it finds. the ideal would be to end the file checking loop while concatenating what exists.

What prevents this from being quickly fixed by me is time and experience with perl. I'm just a perl hobbyist. And I happen to use stow extensively as well. I hope to fix it soon or maybe some collaborator will help with this too.

stow/lib/Stow.pm.in

Lines 1273 to 1299 in 4ef5eca

sub get_ignore_regexps {
my $self = shift;
my ($dir) = @_;
# N.B. the local and global stow ignore files have to have different
# names so that:
# 1. the global one can be a symlink to within a stow
# package, managed by stow itself, and
# 2. the local ones can be ignored via hardcoded logic in
# GlobsToRegexp(), so that they always stay within their stow packages.
my $local_stow_ignore = join_paths($dir, $LOCAL_IGNORE_FILE);
my $global_stow_ignore = join_paths($ENV{HOME}, $GLOBAL_IGNORE_FILE);
for my $file ($local_stow_ignore, $global_stow_ignore) {
if (-e $file) {
debug(5, " Using ignore file: $file");
return $self->get_ignore_regexps_from_file($file);
}
else {
debug(5, " $file didn't exist");
}
}
debug(4, " Using built-in ignore list");
return @default_global_ignore_regexps;
}

from stow.

eggbean avatar eggbean commented on May 31, 2024

Ask on StackOverflow?

from stow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.