diff --git a/doc/bugs/__96__git_add__96___adds_files_unlocked_instead_of_locked.mdwn b/doc/bugs/__96__git_add__96___adds_files_unlocked_instead_of_locked.mdwn new file mode 100644 index 0000000000..8d71015bf4 --- /dev/null +++ b/doc/bugs/__96__git_add__96___adds_files_unlocked_instead_of_locked.mdwn @@ -0,0 +1,53 @@ +### Please describe the problem. +If `.gitattributes` contains `* annex.largefiles=anything`, then `git add` will add files in an unlocked state. According to this page (https://git-annex.branchable.com/tips/unlocked_files/) though, git-annex should add files in a locked state by default: +> By default, git-annex commands will add files in locked mode, unless used on a filesystem that does not support symlinks, when unlocked mode is used. To make them always use unlocked mode, run: git config annex.addunlocked true + +### What steps will reproduce the problem? + +``` +cd $(mktemp -d) +git init +echo '* annex.largefiles=anything' > .gitattributes +git add . +git commit -m "Add gitattributes" +git annex init +cat >> annexed.txt < +Initialized empty Git repository in /tmp/tmp.XzlfX1juzC/.git/ +[main (root-commit) 7633536] Add gitattributes + 1 file changed, 1 insertion(+) + create mode 100644 .gitattributes +init ok +(recording state in git...) +(recording state in git...) +[main 60f1b44] Add annexed + 1 file changed, 1 insertion(+) + create mode 100644 annexed.txt +(git-annex) $ cd /tmp/tmp.XzlfX1juzC +(git-annex) /tmp/tmp.XzlfX1juzC$ ls -l +total 4 +-rw-rw-r-- 1 27 Okt 23 17:12 annexed.txt +(git-annex) /tmp/tmp.XzlfX1juzC$ git annex find --unlocked +annexed.txt +(git-annex) /tmp/tmp.XzlfX1juzC$ + +# End of transcript or log. +"""]]