Andy Koppe [off-list ref] writes:
quoted hunk ↗ jump to hunk
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index 4a2fc421db..6ff32e919c 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -48,7 +48,7 @@ int for_each_ref_core(int argc, const char **argv, const char *prefix, struct re
OPT_NO_CONTAINS(&filter.no_commit, N_("print only refs which don't contain the commit")),
OPT_BOOL(0, "ignore-case", &icase, N_("sorting and filtering are case insensitive")),
OPT_BOOL(0, "stdin", &from_stdin, N_("read reference patterns from stdin")),
- OPT_BOOL(0, "include-root-refs", &include_root_refs, N_("also include HEAD ref and pseudorefs")),
+ OPT_BOOL(0, "include-root-refs", &include_root_refs, N_("also include root refs")),
OPT_END(),
Correct. Not just HEAD, but all root refs are included, e.g., ORIG_HEAD.
- die(_("--merge requires one of the pseudorefs MERGE_HEAD, CHERRY_PICK_HEAD, REVERT_HEAD or REBASE_HEAD"));
+ die(_("--merge requires one of MERGE_HEAD, CHERRY_PICK_HEAD, REVERT_HEAD or REBASE_HEAD"));
If we do not want to think deeply only on this one, just stop after
replacing pseudoref with root ref, but do not drop pseudoref and be
content. Otherwise you would end up confusing users this way:
let's see the --merge option I read recently about.
$ git log --merge
fatal: --merge requires one of MERGE_HEAD, ...
oh, do I have to give one of these?
$ git log --merge MERGE_HEAD
fatal: ambiguous argument 'MERGE_HEAD': unknown revision or ...
puzzled. why doesn't it work?
It might work to say "one of root refs to exist (e.g., MERGE_HEAD,
...)", or give it a more operational message, like this:
--merge works only in the middle of a merge, rebase, etc.
THanks.