Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
log --pretty: do not accept bogus "--prettyshort"
author
Junio C Hamano
<gitster@pobox.com>
Mon, 26 May 2008 03:19:30 +0000
(20:19 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 26 May 2008 03:29:07 +0000
(20:29 -0700)
... nor bogus "format.pretty = '=short'". Both are syntax errors.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pretty.c
patch
|
blob
|
history
revision.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
37869f4
)
diff --git
a/pretty.c
b/pretty.c
index 687293224c3bca20da413d132e17a436e2c79990..8eb39e915e730ff5039247695adc1e25c14773f4 100644
(file)
--- a/
pretty.c
+++ b/
pretty.c
@@
-28,8
+28,6
@@
void get_commit_format(const char *arg, struct rev_info *rev)
rev->commit_format = CMIT_FMT_DEFAULT;
return;
}
rev->commit_format = CMIT_FMT_DEFAULT;
return;
}
- if (*arg == '=')
- arg++;
if (!prefixcmp(arg, "format:") || !prefixcmp(arg, "tformat:")) {
const char *cp = strchr(arg, ':') + 1;
free(user_format);
if (!prefixcmp(arg, "format:") || !prefixcmp(arg, "tformat:")) {
const char *cp = strchr(arg, ':') + 1;
free(user_format);
diff --git
a/revision.c
b/revision.c
index ac057e1e65528786a479ec9b2cc02336786244c9..fc667552592daa3c894d0df4e97469d1809dbf27 100644
(file)
--- a/
revision.c
+++ b/
revision.c
@@
-1197,11
+1197,16
@@
int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
revs->verbose_header = 1;
continue;
}
revs->verbose_header = 1;
continue;
}
- if (!
prefix
cmp(arg, "--pretty")) {
+ if (!
str
cmp(arg, "--pretty")) {
revs->verbose_header = 1;
get_commit_format(arg+8, revs);
continue;
}
revs->verbose_header = 1;
get_commit_format(arg+8, revs);
continue;
}
+ if (!prefixcmp(arg, "--pretty=")) {
+ revs->verbose_header = 1;
+ get_commit_format(arg+9, revs);
+ continue;
+ }
if (!strcmp(arg, "--graph")) {
revs->topo_order = 1;
revs->rewrite_parents = 1;
if (!strcmp(arg, "--graph")) {
revs->topo_order = 1;
revs->rewrite_parents = 1;