aboutsummaryrefslogtreecommitdiff
path: root/rev-list.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-05 12:12:50 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-05 12:12:50 -0700
commit12ba7eaf1d8188ff85439abb98c5ce64cc81b319 (patch)
tree7618abdec582a9360eab44580b87f37d658b0e9f /rev-list.c
parentbbca20accefe8329f976371d0d8c111c965cdf1a (diff)
downloadgit-12ba7eaf1d8188ff85439abb98c5ce64cc81b319.tar.gz
git-12ba7eaf1d8188ff85439abb98c5ce64cc81b319.tar.xz
Remove unnecessary usage of strncmp() in git-rev-list arg parsing.
Not only is it unnecessary, it incorrectly allows extraneous characters at the end of the argument. Junio noticed the --merge-order thing, and Jon points out that if we fix that one, we should fix --show-breaks too.
Diffstat (limited to 'rev-list.c')
-rw-r--r--rev-list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rev-list.c b/rev-list.c
index 825006374..0d3c7741a 100644
--- a/rev-list.c
+++ b/rev-list.c
@@ -462,11 +462,11 @@ int main(int argc, char **argv)
limited = 1;
continue;
}
- if (!strncmp(arg, "--merge-order", 13)) {
+ if (!strcmp(arg, "--merge-order")) {
merge_order = 1;
continue;
}
- if (!strncmp(arg, "--show-breaks", 13)) {
+ if (!strcmp(arg, "--show-breaks")) {
show_breaks = 1;
continue;
}