aspiers/stow

Ignore Only Works Correctly in every scenario with --no-folding

Open

#131 geöffnet am 30. Aug. 2025

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Perl (51 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (1.013 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Description

Any method to exclude specific files in Stow is only respected if --no-folding is also used. Without --no-folding, Stow may create a symlink for the whole package folder, ignoring the file-level exclusions.

Steps to Reproduce

  1. Create a package folder with some files such that stowing would normally create a folder link (folding).

  2. Create a test file in your package folder, e.g., something.ignore.

  3. Run:

    stow -R --ignore='\.ignore$' mypackage
    
  4. Observe that something.ignore is still linked.

  5. Now run:

    stow --no-folding --ignore='\.ignore$' mypackage
    
  6. Observe that something.ignore is correctly ignored.

Expected Behavior

The --ignore flag should work regardless of the --no-folding option. Stow should automatically detect that folding isn't possible due to ignored files.

Actual Behavior

Files matching the --ignore pattern are only ignored if --no-folding is used, or if the file layout naturally prevents folding.

Environment

  • GNU Stow version: 2.4.1
  • OS: Arch Linux

Notes

This behavior is reproducible with .stow-local-ignore and .stow-global-ignore as well—--no-folding is required for file-level ignores to be respected. This appears to be a bug in how Stow handles folding versus individual file ignores.

Contributor Guide