From 4344943d64c5397f9d5aeeb35c262b6a4f31c7e5 Mon Sep 17 00:00:00 2001 From: yarikoptic Date: Wed, 24 Aug 2022 15:25:33 +0000 Subject: [PATCH] added "reproducer" --- ...e_add_--batch_add_directories_content.mdwn | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/doc/todo/make_add_--batch_add_directories_content.mdwn b/doc/todo/make_add_--batch_add_directories_content.mdwn index d014c93c33..7993223216 100644 --- a/doc/todo/make_add_--batch_add_directories_content.mdwn +++ b/doc/todo/make_add_--batch_add_directories_content.mdwn @@ -2,5 +2,43 @@ For that reason I think it would be great if `add --batch` would gain the "super-power" to be able to handle directories as well. +edit: I forgot to add my lovely reproducer to show inconsistency "just in case": + +``` +$> bash annex-add-batch-dir.sh +> set -eu +>> mktemp -d /home/yoh/.tmp/dl-XXXXXXX +> cd /home/yoh/.tmp/dl-zmItF0C +> git init +Initialized empty Git repository in /home/yoh/.tmp/dl-zmItF0C/.git/ +> git annex init +init ok +(recording state in git...) +> mkdir d-cmd d-batch +> touch d-cmd/file d-batch/file +> git annex add d-cmd +add d-cmd/file +ok +(recording state in git...) +> echo d-batch +> git annex add --batch + +> git status +On branch master + +No commits yet + +Changes to be committed: + (use "git rm --cached ..." to unstage) + new file: d-cmd/file + +Untracked files: + (use "git add ..." to include in what will be committed) + d-batch/ + +``` + +so `annex add` and `annex add --batch` behave differently on folder paths. + [[!meta author=yoh]] [[!tag projects/datalad]]