mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
7d346e6bc2
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
46 lines
684 B
Raku
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
|