diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2023-02-22 18:40:47 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2023-02-23 09:43:47 -0700 |
commit | dc249e80847adfdc9d0c00eaa44963af390ca279 (patch) | |
tree | 89ffafceed2c2c7799f2e30418fc3dc947c198d7 /lib-src | |
parent | e0d5a0f66d75f3350ecb3cd673ddb7346f8cf3e2 (diff) | |
download | dotfiles-dc249e80847adfdc9d0c00eaa44963af390ca279.tar.gz |
return to using 'git update-index' over 'git annex add'
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/mr/config | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib-src/mr/config b/lib-src/mr/config index d099a32e..ab16c88b 100644 --- a/lib-src/mr/config +++ b/lib-src/mr/config @@ -193,7 +193,14 @@ pre_update = on athena || git annex sync origin athenah pre_push = on athena || git annex sync --content origin athenah post_update = hstow restow ~/src/athpriv post_checkout = hstow stow ~/src/athpriv -pre_status = git annex add News/*.ADAPT News/*.SCORE +# Deal with phantom modifications because git-annex couldn't update the index. +# Avoid calling git-update-index(1) on other score files (including those +# we've already called it on since the last commit) so as to avoid continually +# annexing intermediate versions of score files. +pre_status = git status -s -- News/*.SCORE News/*.ADAPT \ + | perl -MGit=unquote_path,command \ + -wlne'/^ M / and push @up, unquote_path $'"'"'; + END { @up and command qw(update-index -q --refresh), @up }' skip = ! mine post_checkout = |