Skip to content

.gitignore files outside of the git repository are taken in account. #254

@mefyl

Description

@mefyl

Description

I have a .gitignore file at the root of my home repository and tagref will erroneously apply its rules in any git repository in my account.

Instructions to reproduce the bug

$ mkdir repo
$ cd repo
$ git init
[...]
$ echo '(* some [tag:tag] *)' > source.ml
$ tagref
1 tag, 0 tag references, 0 file references, and 0 directory references validated in 1 file.
$ echo '*' > ../.gitignore
# tagref does not see the tag anymore.
$ tagref                  
0 tags, 0 tag references, 0 file references, and 0 directory references validated in 0 files.
# Yet this gitignore file does *not* apply here, see:
$ git status
On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        source.ml

nothing added to commit but untracked files present (use "git add" to track)
$ tagref --version
Tagref 1.10.0
$

Environment information:

  • Tagref version: [e.g. 1.10.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions