diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-09-23 10:35:09 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-23 10:35:09 -0700 |
| commit | b8e318ea58a0502ff99f37032ee8ac536df4e730 (patch) | |
| tree | b93a691c66d28b299794cd97e87d8cd6bf655587 /builtin/notes.c | |
| parent | 0f41fd28f9677c6fb700dbc9643ad7d7f3c78f52 (diff) | |
| parent | 836474560b653271a819c4de9fa60cb097df2067 (diff) | |
Merge branch 'jc/pass-repo-to-builtins'
The convention to calling into built-in command implementation has
been updated to pass the repository, if known, together with the
prefix value.
* jc/pass-repo-to-builtins:
add: pass in repo variable instead of global the_repository
builtin: remove USE_THE_REPOSITORY for those without the_repository
builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h
builtin: add a repository parameter for builtin functions
Diffstat (limited to 'builtin/notes.c')
| -rw-r--r-- | builtin/notes.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin/notes.c b/builtin/notes.c index 5d594a0724..8c26e45526 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -6,7 +6,7 @@ * Based on git-notes.sh by Johannes Schindelin, * and builtin/tag.c by Kristian Høgsberg and Carlos Rica. */ - +#define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" #include "config.h" #include "editor.h" @@ -17,7 +17,7 @@ #include "object-name.h" #include "object-store-ll.h" #include "path.h" -#include "repository.h" + #include "pretty.h" #include "refs.h" #include "exec-cmd.h" @@ -1102,7 +1102,10 @@ static int get_ref(int argc, const char **argv, const char *prefix) return 0; } -int cmd_notes(int argc, const char **argv, const char *prefix) +int cmd_notes(int argc, + const char **argv, + const char *prefix, + struct repository *repo UNUSED) { const char *override_notes_ref = NULL; parse_opt_subcommand_fn *fn = NULL; |
