| author | Samuel Tardieu <sam@rfc1149.net> | |
| Tue, 4 Nov 2008 23:20:31 +0000 (00:20 +0100) | ||
| committer | Junio C Hamano <gitster@pobox.com> | |
| Tue, 4 Nov 2008 23:46:39 +0000 (15:46 -0800) | ||
| commit | 6fa8342b12aeb3e3895d3b3d8d34d45fa872ac45 | |
| tree | 687dff37ad49d990c735dbb6e901766fe251e5c6 | tree | snapshot |
| parent | a5a323f33cd25829e0dde3939b196cf743d7d9d8 | commit | diff |
tag: Check that options are only allowed in the appropriate mode
If "git tag -d -l -v ..." is called, only "-l" is honored, which is
arbitrary and wrong. Also, unrecognized options are accepted in the
wrong modes, causing for example "git tag -n 100" to create a tag
named "100" while the user may have wanted to type "git tag -n100".
This patch checks that "git tag" knows in what mode it operates before
performing any operation and accepts only the related options.
Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If "git tag -d -l -v ..." is called, only "-l" is honored, which is
arbitrary and wrong. Also, unrecognized options are accepted in the
wrong modes, causing for example "git tag -n 100" to create a tag
named "100" while the user may have wanted to type "git tag -n100".
This patch checks that "git tag" knows in what mode it operates before
performing any operation and accepts only the related options.
Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
| builtin-tag.c | diff | blob | history |