summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-04-15 23:46:36 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-04-15 23:46:36 -0700
commit6b9c58f4669b3832ed2830f0cb1a307ea6bc6063 (patch)
treec245781ec9db1307e82a6b5a7cbc0e4f4c89c6fc /revision.c
parentFix up rev-list option parsing. (diff)
downloadtgif-6b9c58f4669b3832ed2830f0cb1a307ea6bc6063.tar.xz
Split init_revisions() out of setup_revisions()
Merging all three option parsers related to whatchanged is unarguably the right thing, but the fallout was too big to scare me away. Let's try it once again, but once step at time. This splits out init_revisions() call from setup_revisions(), so that the callers can set different defaults to match the traditional benaviour. The rev-list command is still broken in a big way, which is the topic of next step. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/revision.c b/revision.c
index bdf8005aec..9693b6e4c7 100644
--- a/revision.c
+++ b/revision.c
@@ -475,11 +475,9 @@ static void handle_all(struct rev_info *revs, unsigned flags)
void init_revisions(struct rev_info *revs)
{
- unsigned abbrev = revs->abbrev;
-
memset(revs, 0, sizeof(*revs));
- revs->abbrev = abbrev;
+ revs->abbrev = DEFAULT_ABBREV;
revs->ignore_merges = 1;
revs->pruning.recursive = 1;
revs->pruning.add_remove = file_add_remove;
@@ -516,8 +514,6 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
const char **unrecognized = argv + 1;
int left = 1;
- init_revisions(revs);
-
/* First, search for "--" */
seen_dashdash = 0;
for (i = 1; i < argc; i++) {