Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Remove unnecessary usage of strncmp() in git-rev-list arg parsing.
author
Linus Torvalds
<torvalds@g5.osdl.org>
Tue, 5 Jul 2005 19:12:50 +0000
(12:12 -0700)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Tue, 5 Jul 2005 19:12:50 +0000
(12:12 -0700)
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.
rev-list.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
bbca20a
)
diff --git
a/rev-list.c
b/rev-list.c
index 825006374a0b028b9a1980a2aee494132f3a4145..0d3c7741a59254f62a135a3bd749e38e1b8dfe71 100644
(file)
--- a/
rev-list.c
+++ b/
rev-list.c
@@
-462,11
+462,11
@@
int main(int argc, char **argv)
limited = 1;
continue;
}
- if (!str
ncmp(arg, "--merge-order", 13
)) {
+ if (!str
cmp(arg, "--merge-order"
)) {
merge_order = 1;
continue;
}
- if (!str
ncmp(arg, "--show-breaks", 13
)) {
+ if (!str
cmp(arg, "--show-breaks"
)) {
show_breaks = 1;
continue;
}