Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-12-09 16:10:41 +0300
committerJunio C Hamano <gitster@pobox.com>2019-12-10 00:36:44 +0300
commite6e230eeae0f3cb46c4c356e6cd0a0f1119a2a83 (patch)
tree0234ae345c7d5255f6d3fc5b41d79c485de100f2 /revision.c
parent1e6ed5441a61b5085978e0429691e2e2425f6846 (diff)
notes: create init_display_notes() helper
We currently open code the initialization for revs->notes_opt. Abstract this away into a helper function so that the logic can be reused in a future commit. This is slightly wasteful as we memset the struct twice but this is only run once so it shouldn't have any major effect. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index d4aaf0ef25..24ad974590 100644
--- a/revision.c
+++ b/revision.c
@@ -1637,7 +1637,7 @@ void repo_init_revisions(struct repository *r,
revs->diffopt.prefix_length = strlen(prefix);
}
- revs->notes_opt.use_default_notes = -1;
+ init_display_notes(&revs->notes_opt);
}
static void add_pending_commit_list(struct rev_info *revs,