aspiers/stow

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

Open

#131 创建于 2025年8月30日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Perl (1,013 star) (51 fork)batch import
bughelp wanted

描述

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.

贡献者指南

Ignore Only Works Correctly in every scenario with --no-folding · aspiers/stow#131 | Good First Issue