Skip to content
Snippets Groups Projects
Commit 141a42701566 authored by Dan Villiom Podlaski Christiansen's avatar Dan Villiom Podlaski Christiansen
Browse files

test-gitignore: verify that absense of .hg/git suppresses gitignore

...and while at it, don't rely on an implementation detail; rather
than just creating the directory, do a proper export
parent 626b0fa380a5
No related branches found
No related tags found
1 merge request!84Fix ignore with Rust & share
......@@ -6,6 +6,12 @@
$ hg init repo
$ cd repo
Create a commit that we can export later on
$ touch thefile
$ hg commit -A -m "initial commit"
adding thefile
We should only read .gitignore files in a hg-git repo (i.e. one with .hg/git
directory) otherwise, a rogue .gitignore could slow down a hg-only repo
......@@ -9,8 +15,6 @@
We should only read .gitignore files in a hg-git repo (i.e. one with .hg/git
directory) otherwise, a rogue .gitignore could slow down a hg-only repo
$ mkdir .hg/git
$ touch foo
$ touch foobar
$ touch bar
......@@ -18,6 +22,16 @@
$ hg status
? .gitignore
? bar
? foo
? foobar
Notice that foo appears above. Now export the commit to git and verify
it's gone:
$ hg gexport
$ hg status
? .gitignore
? bar
$ echo '*bar' > .gitignore
$ hg status
......
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