summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/revision.c b/revision.c
index da53b6ce35..47e9ee7a14 100644
--- a/revision.c
+++ b/revision.c
@@ -1415,7 +1415,7 @@ void init_revisions(struct rev_info *revs, const char *prefix)
revs->expand_tabs_in_log = -1;
revs->commit_format = CMIT_FMT_DEFAULT;
- revs->expand_tabs_in_log_default = 1;
+ revs->expand_tabs_in_log_default = 8;
init_grep_defaults();
grep_init(&revs->grep_filter, prefix);
@@ -1918,9 +1918,14 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
revs->pretty_given = 1;
get_commit_format(arg+9, revs);
} else if (!strcmp(arg, "--expand-tabs")) {
- revs->expand_tabs_in_log = 1;
+ revs->expand_tabs_in_log = 8;
} else if (!strcmp(arg, "--no-expand-tabs")) {
revs->expand_tabs_in_log = 0;
+ } else if (skip_prefix(arg, "--expand-tabs=", &arg)) {
+ int val;
+ if (strtol_i(arg, 10, &val) < 0 || val < 0)
+ die("'%s': not a non-negative integer", arg);
+ revs->expand_tabs_in_log = val;
} else if (!strcmp(arg, "--show-notes") || !strcmp(arg, "--notes")) {
revs->show_notes = 1;
revs->show_notes_given = 1;