From 80c2ec386cc847ac134518e15b6938bdbeec3460 Mon Sep 17 00:00:00 2001 From: "dirtminer@d11db62478fa082f843be60f2c5a6e1dcf5b3566" Date: Sat, 15 Apr 2023 01:04:46 +0000 Subject: [PATCH] --- ...9___in_mixed_content_repository__63__.mdwn | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 doc/forum/Using___39__git_add__39___in_mixed_content_repository__63__.mdwn diff --git a/doc/forum/Using___39__git_add__39___in_mixed_content_repository__63__.mdwn b/doc/forum/Using___39__git_add__39___in_mixed_content_repository__63__.mdwn new file mode 100644 index 0000000000..45f6f73e65 --- /dev/null +++ b/doc/forum/Using___39__git_add__39___in_mixed_content_repository__63__.mdwn @@ -0,0 +1,46 @@ +I am attempting to follow the instructions at [[tips/largefiles]] "Configuring mixed content repositories" + +After following these instructions, I expect that `git add` will make a decision whether a file goes to 'git-annex' or 'git`. + +However, what I observe is: + +* `git-annex add *` will honor the largefiles setting + +* `git add *` will NOT honor the largefiles setting + +Is there some additional configuration that I need for newer repository versions? + + +I used the following test: + + + #!/bin/bash + curl -Lo https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-amd64.tar.gz | tar -xvzf - + export PATH=./git-annex.linux/:$PATH + # Follow steps from https://git-annex.branchable.com/forum/exclude_files_from_annex/ + git init + git annex init + git config annex.largefiles "largerthan=100kb and not (include=*.c or include=*.h)" + dd if=/dev/urandom of=bigfile1 bs=1M count=1 + dd if=/dev/urandom of=bigfile2 bs=1M count=1 + echo 'main() { printf("hello, world!\n") }' > hello.c + git annex add bigfile1 + if [ ! -L bigfile1 ] ; then + echo bigfile1 is not a symlink after git annex add + ls -algd ./bigfile1 + fi + git add bigfile2 + if [ ! -L bigfile2 ] ; then + echo bigfile2 is not a symlink after git add + ls -algd ./bigfile2 + fi + git commit -m "Commit!" + if [ ! -L bigfile2 ] ; then + echo bigfile2 is not a symlink after git commit + ls -algd ./bigfile2 + fi + +'bigfile1' is a symlink as expected. +'bigfile2' never becomes a symlink and is checked into the git repository + + -- 2.30.2