author | Jonathan Nieder <jrnieder@gmail.com> | |
Mon, 9 Nov 2009 15:04:43 +0000 (09:04 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 10 Nov 2009 01:08:44 +0000 (17:08 -0800) | ||
commit | fef34270f209eb5d2cde01b8175b24d96d1cff21 | |
tree | 2ecd9598a8b49c3ca885608331295d61d3ddf2f8 | tree | snapshot |
parent | 9c855c31786b9e879ef4cd3b8b5aa97bc4bcf8ec | commit | diff |
Show usage string for 'git cherry -h'
Treat an "-h" option as a request for help, rather than an
"Unknown commit -h" error.
"cherry -h" could be asking to compare histories that leads to
our HEAD and a commit that can be named as "-h". Strictly
speaking, that may be a valid refname, but the user would have to
say something like "tags/-h" to name such a pathological ref
already, so it is not such a big deal.
The "-h" option keeps its meaning even if preceded by other
options or followed by other arguments. This keeps the
command-line syntax closer to what parse_options would give and
supports shell aliases like 'alias cherry="git cherry -v"' a
little better.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Treat an "-h" option as a request for help, rather than an
"Unknown commit -h" error.
"cherry -h" could be asking to compare histories that leads to
our HEAD and a commit that can be named as "-h". Strictly
speaking, that may be a valid refname, but the user would have to
say something like "tags/-h" to name such a pathological ref
already, so it is not such a big deal.
The "-h" option keeps its meaning even if preceded by other
options or followed by other arguments. This keeps the
command-line syntax closer to what parse_options would give and
supports shell aliases like 'alias cherry="git cherry -v"' a
little better.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-log.c | diff | blob | history |