From de8126ab7229171b897b61bababb4bb0f9446695 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 2 Feb 2014 17:01:41 -0400 Subject: [PATCH] add a walkthrough section discussing git-annex's skipping of files on noop --- doc/walkthrough.mdwn | 1 + ...e:_When_git-annex_seems_to_skip_files.mdwn | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 doc/walkthrough/quiet_please:_When_git-annex_seems_to_skip_files.mdwn diff --git a/doc/walkthrough.mdwn b/doc/walkthrough.mdwn index f401524f51..94c31e4772 100644 --- a/doc/walkthrough.mdwn +++ b/doc/walkthrough.mdwn @@ -15,6 +15,7 @@ A walkthrough of the basic features of git-annex. walkthrough/modifying_annexed_files walkthrough/using_ssh_remotes walkthrough/moving_file_content_between_repositories + walkthrough/quiet_please:_When_git-annex_seems_to_skip_files walkthrough/using_tags_and_branches walkthrough/unused_data walkthrough/fsck:_verifying_your_data diff --git a/doc/walkthrough/quiet_please:_When_git-annex_seems_to_skip_files.mdwn b/doc/walkthrough/quiet_please:_When_git-annex_seems_to_skip_files.mdwn new file mode 100644 index 0000000000..188ca634ba --- /dev/null +++ b/doc/walkthrough/quiet_please:_When_git-annex_seems_to_skip_files.mdwn @@ -0,0 +1,27 @@ +One behavior of git-annex is sometimes confusing at first, but it turns out +to be useful once you get to know it. + + # git annex drop * + # + +Why didn't git-annex seem to do anything despite being asked to drop all the +files? Because it checked them all, and none of them are present. + +Most git-annex commands will behave this way when they're able to quickly +check that nothing needs to be done about a file. + +Running a git-annex command without specifying any file name will +make git-annex look for files in the current directory and its +subdirectories. So, we can add all new files to the annex easily: + + # echo hi > subdir/subsubdir/newfile + # git annex add + add subdir/subsubdir/newfile ok + +When doing this kind of thing, having nothing shown for files +that it doesn't need to act on is useful because it prevents swamping +you with output. You only see the files it finds it does need to act on. + +So remember: If git-annex seems to not do anything when you tell it to, it's +not being lazy -- It's checked that nothing needs to be done to get to the +state you asked for!