diff --git a/doc/forum/short_exlusive_refspec_notation_for_git_annex_unused_/comment_1_0aeb5702e74fcf158f1e9aca16ca9e6b._comment b/doc/forum/short_exlusive_refspec_notation_for_git_annex_unused_/comment_1_0aeb5702e74fcf158f1e9aca16ca9e6b._comment new file mode 100644 index 0000000000..4184ccff89 --- /dev/null +++ b/doc/forum/short_exlusive_refspec_notation_for_git_annex_unused_/comment_1_0aeb5702e74fcf158f1e9aca16ca9e6b._comment @@ -0,0 +1,19 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2019-04-09T15:16:12Z" + content=""" + Each - is matched against the set of refs accu‐ + mulated so far. Any matching refs are removed + from the set. + +It matches against the literal text of the ref that was added, so if you + use "+*", it adds refs/heads/master, and then to remove that, you need + "-refs/heads/master" not "-master". On the other hand, "+master:-master" +results in "master" being added and then removed. + +Clarified to mention that it matches by name; I suppose perhaps you were +thinking it matches based on what sha1 the ref name resolves to. The reason it +doesn't do that is that it would be surprising for "+foo:-master" to not include +ref foo just because it happens to currently have the same sha1 as master does. +"""]] diff --git a/doc/git-annex-unused.mdwn b/doc/git-annex-unused.mdwn index 36bab69515..5dbb252479 100644 --- a/doc/git-annex-unused.mdwn +++ b/doc/git-annex-unused.mdwn @@ -64,7 +64,7 @@ Each + without a glob adds the literal value to the set. For example, "+HEAD^" adds "HEAD^". Each - is matched against the set of refs accumulated so far. -Any matching refs are removed from the set. +Any refs with names that match are removed from the set. "reflog" adds all the refs from the reflog. This will make past versions of files not be considered to be unused until the ref expires from the