Skip to content
Commit caeaa986 authored by martin f. krafft's avatar martin f. krafft
Browse files

Anchor ignore lines



The lines written to the gitignore file by write-gitignore were not
anchored. This means that a line like

  !.zsh

might cause not only ~/.zsh to be ignored, but also ~/TODO/.zsh, which
is potentially a problem.

This patch simply prepends a '/' to each entry in the gitignore file,
thereby anchoring the entry to the repository root.

Note that the initial '*' must not be anchored, else files in
subdirectories wouldn't be ignored.

Signed-off-by: default avatarmartin f. krafft <madduck@madduck.net>
parent 3c5922ad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment