sapling/tests/test-gitignore.t
Jun Wu 7d346e6bc2 ignore: support global gitignore configs
Summary:
Change the Rust ignore matcher to accept an extra list of gitignore files.
Parse "git:" entries of "ui.ignore" to be git ignore files.

Reviewed By: DurhamG

Differential Revision: D8863905

fbshipit-source-id: 0cd5e29e01f01496ff61c81b89f7876202f18a98
2018-08-02 20:22:47 -07:00

46 lines
684 B
Raku

$ newrepo
$ setconfig ui.gitignore=1 ui.hgignore=0
$ cat > .gitignore << EOF
> *.tmp
> build/
> EOF
$ mkdir build exp
$ cat > build/.gitignore << EOF
> !*
> EOF
$ cat > exp/.gitignore << EOF
> !i.tmp
> EOF
$ touch build/libfoo.so t.tmp Makefile exp/x.tmp exp/i.tmp
$ hg status
? .gitignore
? Makefile
? exp/.gitignore
? exp/i.tmp
Test global ignore files
$ cat > $TESTTMP/globalignore << EOF
> *.pyc
> EOF
$ touch x.pyc
$ hg status
? .gitignore
? Makefile
? exp/.gitignore
? exp/i.tmp
? x.pyc
$ hg status --config ui.ignore.global=$TESTTMP/globalignore
? .gitignore
? Makefile
? exp/.gitignore
? exp/i.tmp