commit - 7b9e559456eea8c3e5f6906fda555e0b9eb18ef299643e294fbf9482c1b9768a
commit + 8ffaaa7349471fab7aa615df5febf6f3d1a868ac10dc3ec62e8157642619bd50
blob - 66a76497a4866830081bf2bad7c7be6c53d7c8181304b0f3cd4e806656199dbe
blob + 12193888cf5f46ed8f21c9ea2c6a4d95d4765de78a342cb49ee187b323cff008
--- lib/worktree.c
+++ lib/worktree.c
size_t len = pattern_len;
/*
- * For gitignore(7) compatibility, ignore leading slashes
+ * For gitignore(5) compatibility, ignore leading slashes.
*/
- if (len > 0 && pat[0] == '/') {
+ while (len > 0 && pat[0] == '/') {
pat++;
len--;
}
blob - b7a4dfc043a346d11b91e0aad900c506330af9b2cafd9841bc15dda285c18b9e
blob + 62e96cdd44a4f3da491a3ac9c686ac7d9e3c85191e2c27a17ce78456f3d43650
--- regress/cmdline/status.sh
+++ regress/cmdline/status.sh
echo "unversioned file" > $testroot/wt/epsilon/nu/baz
echo "/foo" > $testroot/wt/.gitignore
- echo "/nu" >> $testroot/wt/.gitignore
+ echo "//////////////////////////nu" >> $testroot/wt/.gitignore
echo '? .gitignore' > $testroot/stdout.expected
echo '? epsilon/bar' >> $testroot/stdout.expected