Download raw body.
got ignore some .{cvs,git}ignore files
Hi, I have a buggy behaviour (or an unexpected feature) with .cvsignore files. I slightly modified the regress for test_status_cvsignore to expose it. In the (modified) regress test, the files in worktree are (for what I want to expose): /.cvsignore /foo /epsilon/foo The .cvsignore contains "foo" as ignored. "/foo" and "/epsilon/foo" are unversionned. if `got status' is fine, running `got status epsilon' is wrong ("/epsilon/foo" is showed as unversionned instead being ignored). For what I see from the behaviour, in the first command, "/" directory is walked, so "/.cvsignore" is read (and "foo" pattern considered for ignorelist), whereas in the second command, the "/" directory is not walked so "/.cvsignore" isn't considered, resulting "/epsilon/foo" to be reported as unversionned. Regress run: $ cd regress/cmdline && make status ./status.sh test_status_basic ok test_status_subdir_no_mods ok test_status_subdir_no_mods2 ok test_status_obstructed ok test_status_shows_local_mods_after_update ok test_status_unversioned_subdirs ok test_status_ignores_symlink ok test_status_shows_no_mods_after_complete_merge ok test_status_shows_conflict ok test_status_empty_dir ok test_status_empty_dir_unversioned_file ok test_status_many_paths ok test_status_cvsignore --- /tmp/got-test-status_cvsignore-t9lqQcrr/stdout.expected Tue Jun 23 08:42:30 2020 +++ /tmp/got-test-status_cvsignore-t9lqQcrr/stdout Tue Jun 23 08:42:30 2020 @@ -1,4 +1,5 @@ ? .cvsignore ? epsilon/.cvsignore ? epsilon/boo +? epsilon/foo ? foop test failed; leaving test data in /tmp/got-test-status_cvsignore-t9lqQcrr test_status_gitignore ok Please note that it could be also exposed with got repository itself: $ cd got $ cat .gitignore **/obj $ got st M regress/cmdline/status.sh $ got st libexec/got-fetch-pack ? libexec/got-fetch-pack/obj/error.d ? libexec/got-fetch-pack/obj/error.o ? libexec/got-fetch-pack/obj/got-fetch-pack ? libexec/got-fetch-pack/obj/got-fetch-pack.d ? libexec/got-fetch-pack/obj/got-fetch-pack.o ? libexec/got-fetch-pack/obj/inflate.d ? libexec/got-fetch-pack/obj/inflate.o ? libexec/got-fetch-pack/obj/object_parse.d ? libexec/got-fetch-pack/obj/object_parse.o ? libexec/got-fetch-pack/obj/path.d ? libexec/got-fetch-pack/obj/path.o ? libexec/got-fetch-pack/obj/privsep.d ? libexec/got-fetch-pack/obj/privsep.o ? libexec/got-fetch-pack/obj/sha1.d ? libexec/got-fetch-pack/obj/sha1.o the "obj" directory is shown whereas present in .gitignore Thanks. -- Sebastien Marie diff c34ec41754978e41240e8aedd4e5d3a9e6362635 /home/semarie/repos/openbsd/got blob - 5abbce9475bb8bd2f1cbb3e33113883173026f03 file + regress/cmdline/status.sh --- regress/cmdline/status.sh +++ regress/cmdline/status.sh @@ -496,6 +496,7 @@ function test_status_cvsignore { echo "unversioned file" > $testroot/wt/foo echo "unversioned file" > $testroot/wt/foop + echo "unversioned file" > $testroot/wt/epsilon/foo echo "unversioned file" > $testroot/wt/epsilon/bar echo "unversioned file" > $testroot/wt/epsilon/boo echo "unversioned file" > $testroot/wt/epsilon/moo
got ignore some .{cvs,git}ignore files