git-annex assist

assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.

(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)

See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.

Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.

Sponsored-by: k0ld on Patreon
This commit is contained in:
Joey Hess 2023-05-18 14:37:29 -04:00
parent 80e9a655f8
commit e955912ad0
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
16 changed files with 224 additions and 47 deletions

View file

@ -86,7 +86,10 @@ checkGitIgnoreSwitch = CheckGitIgnore <$>
(help "Do not check .gitignore when adding files")
seek :: AddOptions -> CommandSeek
seek o = startConcurrency commandStages $ do
seek o = startConcurrency commandStages (seek' o)
seek' :: AddOptions -> CommandSeek
seek' o = do
largematcher <- largeFilesMatcher
addunlockedmatcher <- addUnlockedMatcher
annexdotfiles <- getGitConfigVal annexDotFiles