From ad6f647124993f102b18f1390c89df3f0db5e3d5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 7 Apr 2017 15:55:34 -0400 Subject: git annex add -u now supported, analagous to git add -u Unlike git add -u, git annex add -u does not update the index for files removed from the working tree. But then, "git add ." stages removals, and "git annex add ." does not, so that's an existing divergence. Seems that --update --batch would need to run git ls-files once per line of batch input, which would surely be too slow, so just throw an error for that. This commit was supported by the NSF-funded DataLad project. --- doc/git-annex-add.mdwn | 5 +++++ doc/todo/annex_add___40__-u__124__--update__41___mode.mdwn | 2 ++ .../comment_1_bde2b1e2c45e110d56ce98b43dd77743._comment | 7 +++++++ 3 files changed, 14 insertions(+) create mode 100644 doc/todo/annex_add___40__-u__124__--update__41___mode/comment_1_bde2b1e2c45e110d56ce98b43dd77743._comment (limited to 'doc') diff --git a/doc/git-annex-add.mdwn b/doc/git-annex-add.mdwn index 15bb8a6a0..2ebbbac06 100644 --- a/doc/git-annex-add.mdwn +++ b/doc/git-annex-add.mdwn @@ -56,6 +56,11 @@ annexed content, and other symlinks. Adds multiple files in parallel. This may be faster. For example: `-J4` +* `--update` `-u` + + Like `git add --update`, this does not add new files, but any updates + to tracked files will be added to the index. + * `--json` Enable JSON output. This is intended to be parsed by programs that use diff --git a/doc/todo/annex_add___40__-u__124__--update__41___mode.mdwn b/doc/todo/annex_add___40__-u__124__--update__41___mode.mdwn index 833117652..ab0eac108 100644 --- a/doc/todo/annex_add___40__-u__124__--update__41___mode.mdwn +++ b/doc/todo/annex_add___40__-u__124__--update__41___mode.mdwn @@ -1,3 +1,5 @@ to supplement 'git add -u' behavior -- to add only updated (tracked only, no untracked) files to be committed. ATM all files would be added, including untracked. [[!meta author=yoh]] + +> [[done]] diff --git a/doc/todo/annex_add___40__-u__124__--update__41___mode/comment_1_bde2b1e2c45e110d56ce98b43dd77743._comment b/doc/todo/annex_add___40__-u__124__--update__41___mode/comment_1_bde2b1e2c45e110d56ce98b43dd77743._comment new file mode 100644 index 000000000..e6a632902 --- /dev/null +++ b/doc/todo/annex_add___40__-u__124__--update__41___mode/comment_1_bde2b1e2c45e110d56ce98b43dd77743._comment @@ -0,0 +1,7 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2017-04-07T19:41:02Z" + content=""" +Good idea, adding. +"""]] -- cgit v1.2.3