Git fork

builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h

Instead of including USE_THE_REPOSITORY_VARIABLE by default on every
builtin, remove it from builtin.h and add it to all the builtins that
include builtin.h (by definition, that means all builtins/*.c).

Also, remove the include statement for repository.h since it gets
brought in through builtin.h.

The next step will be to migrate each builtin
from having to use the_repository.

Signed-off-by: John Cai <johncai86@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

John Cai and committed by
Junio C Hamano
03eae9af 9b1cb507

+147 -92
-8
builtin.h
··· 1 1 #ifndef BUILTIN_H 2 2 #define BUILTIN_H 3 3 4 - /* 5 - * TODO: Almost all of our builtins access `the_repository` by necessity 6 - * because they do not get passed a pointer to it. We should adapt the function 7 - * signature of those main functions to accept a `struct repository *` and then 8 - * remove the macro here. 9 - */ 10 - #define USE_THE_REPOSITORY_VARIABLE 11 - 12 4 #include "git-compat-util.h" 13 5 #include "repository.h" 14 6
+1 -2
builtin/add.c
··· 3 3 * 4 4 * Copyright (C) 2006 Linus Torvalds 5 5 */ 6 - 6 + #define USE_THE_REPOSITORY_VARIABLE 7 7 #include "builtin.h" 8 8 #include "advice.h" 9 9 #include "config.h" ··· 18 18 #include "preload-index.h" 19 19 #include "diff.h" 20 20 #include "read-cache.h" 21 - #include "repository.h" 22 21 #include "revision.h" 23 22 #include "bulk-checkin.h" 24 23 #include "strvec.h"
+1 -1
builtin/am.c
··· 4 4 * Based on git-am.sh by Junio C Hamano. 5 5 */ 6 6 7 + #define USE_THE_REPOSITORY_VARIABLE 7 8 #include "builtin.h" 8 9 #include "abspath.h" 9 10 #include "advice.h" ··· 38 39 #include "string-list.h" 39 40 #include "pager.h" 40 41 #include "path.h" 41 - #include "repository.h" 42 42 #include "pretty.h" 43 43 44 44 /**
+2
builtin/annotate.c
··· 3 3 * 4 4 * Copyright (C) 2006 Ryan Anderson 5 5 */ 6 + 7 + #define USE_THE_REPOSITORY_VARIABLE 6 8 #include "git-compat-util.h" 7 9 #include "builtin.h" 8 10 #include "strvec.h"
+1 -1
builtin/apply.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "gettext.h" 3 - #include "repository.h" 4 4 #include "hash.h" 5 5 #include "apply.h" 6 6
+1 -1
builtin/archive.c
··· 2 2 * Copyright (c) 2006 Franck Bui-Huu 3 3 * Copyright (c) 2006 Rene Scharfe 4 4 */ 5 + #define USE_THE_REPOSITORY_VARIABLE 5 6 #include "builtin.h" 6 7 #include "archive.h" 7 8 #include "gettext.h" 8 9 #include "transport.h" 9 10 #include "parse-options.h" 10 11 #include "pkt-line.h" 11 - #include "repository.h" 12 12 13 13 static void create_output_file(const char *output_file) 14 14 {
+1
builtin/bisect.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "copy.h" 3 4 #include "environment.h"
+1 -2
builtin/blame.c
··· 4 4 * Copyright (c) 2006, 2014 by its authors 5 5 * See COPYING for licensing conditions 6 6 */ 7 - 7 + #define USE_THE_REPOSITORY_VARIABLE 8 8 #include "builtin.h" 9 9 #include "config.h" 10 10 #include "color.h" ··· 12 12 #include "environment.h" 13 13 #include "gettext.h" 14 14 #include "hex.h" 15 - #include "repository.h" 16 15 #include "commit.h" 17 16 #include "diff.h" 18 17 #include "revision.h"
+1 -1
builtin/branch.c
··· 4 4 * Copyright (c) 2006 Kristian Høgsberg <krh@redhat.com> 5 5 * Based on git-branch.sh by Junio C Hamano. 6 6 */ 7 - 7 + #define USE_THE_REPOSITORY_VARIABLE 8 8 #include "builtin.h" 9 9 #include "config.h" 10 10 #include "color.h"
+1
builtin/bugreport.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "abspath.h" 3 4 #include "editor.h"
+1 -1
builtin/bundle.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "abspath.h" 3 4 #include "gettext.h" ··· 5 6 #include "strvec.h" 6 7 #include "parse-options.h" 7 8 #include "pkt-line.h" 8 - #include "repository.h" 9 9 #include "bundle.h" 10 10 11 11 /*
+1 -1
builtin/cat-file.c
··· 3 3 * 4 4 * Copyright (C) Linus Torvalds, 2005 5 5 */ 6 - 6 + #define USE_THE_REPOSITORY_VARIABLE 7 7 #include "builtin.h" 8 8 #include "config.h" 9 9 #include "convert.h"
+1 -1
builtin/check-attr.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "attr.h" ··· 5 6 #include "gettext.h" 6 7 #include "object-name.h" 7 8 #include "quote.h" 8 - #include "repository.h" 9 9 #include "setup.h" 10 10 #include "parse-options.h" 11 11 #include "write-or-die.h"
+1 -1
builtin/check-ignore.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "dir.h" ··· 5 6 #include "quote.h" 6 7 #include "pathspec.h" 7 8 #include "parse-options.h" 8 - #include "repository.h" 9 9 #include "submodule.h" 10 10 #include "write-or-die.h" 11 11
+1
builtin/check-mailmap.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "gettext.h"
+1 -1
builtin/check-ref-format.c
··· 1 1 /* 2 2 * GIT - The information manager from hell 3 3 */ 4 - 4 + #define USE_THE_REPOSITORY_VARIABLE 5 5 #include "builtin.h" 6 6 #include "refs.h" 7 7 #include "setup.h"
+1
builtin/checkout--worker.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "entry.h"
+1 -2
builtin/checkout-index.c
··· 4 4 * Copyright (C) 2005 Linus Torvalds 5 5 * 6 6 */ 7 - 7 + #define USE_THE_REPOSITORY_VARIABLE 8 8 #include "builtin.h" 9 9 #include "config.h" 10 10 #include "gettext.h" 11 11 #include "lockfile.h" 12 12 #include "quote.h" 13 - #include "repository.h" 14 13 #include "cache-tree.h" 15 14 #include "parse-options.h" 16 15 #include "entry.h"
+1
builtin/checkout.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "advice.h" 3 4 #include "branch.h"
+1 -2
builtin/clean.c
··· 5 5 * 6 6 * Based on git-clean.sh by Pavel Roskin 7 7 */ 8 - 8 + #define USE_THE_REPOSITORY_VARIABLE 9 9 #include "builtin.h" 10 10 #include "abspath.h" 11 11 #include "config.h" ··· 14 14 #include "parse-options.h" 15 15 #include "path.h" 16 16 #include "read-cache-ll.h" 17 - #include "repository.h" 18 17 #include "setup.h" 19 18 #include "string-list.h" 20 19 #include "quote.h"
+2 -1
builtin/clone.c
··· 7 7 * 8 8 * Clone a repository into a different directory that does not yet exist. 9 9 */ 10 + #define USE_THE_REPOSITORY_VARIABLE 11 + #include "builtin.h" 10 12 11 - #include "builtin.h" 12 13 #include "abspath.h" 13 14 #include "advice.h" 14 15 #include "config.h"
+1
builtin/column.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "gettext.h"
+1 -1
builtin/commit-graph.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "commit.h" 3 4 #include "config.h" ··· 5 6 #include "gettext.h" 6 7 #include "hex.h" 7 8 #include "parse-options.h" 8 - #include "repository.h" 9 9 #include "commit-graph.h" 10 10 #include "object-store-ll.h" 11 11 #include "progress.h"
+2 -1
builtin/commit-tree.c
··· 3 3 * 4 4 * Copyright (C) Linus Torvalds, 2005 5 5 */ 6 + #define USE_THE_REPOSITORY_VARIABLE 6 7 #include "builtin.h" 7 8 #include "config.h" 8 9 #include "gettext.h" 9 10 #include "hex.h" 10 11 #include "object-name.h" 11 12 #include "object-store-ll.h" 12 - #include "repository.h" 13 + 13 14 #include "commit.h" 14 15 #include "parse-options.h" 15 16
+1 -1
builtin/commit.c
··· 4 4 * Copyright (c) 2007 Kristian Høgsberg <krh@redhat.com> 5 5 * Based on git-commit.sh by Junio C Hamano and Linus Torvalds 6 6 */ 7 - 7 + #define USE_THE_REPOSITORY_VARIABLE 8 8 #include "builtin.h" 9 9 #include "advice.h" 10 10 #include "config.h"
+1 -1
builtin/config.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "abspath.h" 3 4 #include "config.h" 4 5 #include "color.h" 5 6 #include "editor.h" 6 7 #include "environment.h" 7 - #include "repository.h" 8 8 #include "gettext.h" 9 9 #include "ident.h" 10 10 #include "parse-options.h"
+1 -2
builtin/count-objects.c
··· 3 3 * 4 4 * Copyright (c) 2006 Junio C Hamano 5 5 */ 6 - 6 + #define USE_THE_REPOSITORY_VARIABLE 7 7 #include "builtin.h" 8 8 #include "config.h" 9 9 #include "dir.h" 10 10 #include "environment.h" 11 11 #include "gettext.h" 12 12 #include "path.h" 13 - #include "repository.h" 14 13 #include "parse-options.h" 15 14 #include "quote.h" 16 15 #include "packfile.h"
+1
builtin/credential-cache--daemon.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "abspath.h" 3 4 #include "gettext.h"
+1
builtin/credential-cache.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "credential.h" 3 4 #include "gettext.h"
+1
builtin/credential-store.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "gettext.h"
+2
builtin/credential.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 2 + 1 3 #include "git-compat-util.h" 2 4 #include "credential.h" 3 5 #include "builtin.h"
+1
builtin/describe.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "environment.h"
+1
builtin/diagnose.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "abspath.h" 3 4 #include "gettext.h"
+1 -1
builtin/diff-files.c
··· 3 3 * 4 4 * Copyright (C) Linus Torvalds, 2005 5 5 */ 6 + #define USE_THE_REPOSITORY_VARIABLE 6 7 #include "builtin.h" 7 8 #include "config.h" 8 9 #include "diff.h" 9 10 #include "diff-merges.h" 10 11 #include "commit.h" 11 12 #include "preload-index.h" 12 - #include "repository.h" 13 13 #include "revision.h" 14 14 15 15 static const char diff_files_usage[] =
+1 -1
builtin/diff-index.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "diff.h" 4 5 #include "diff-merges.h" 5 6 #include "commit.h" 6 7 #include "preload-index.h" 7 - #include "repository.h" 8 8 #include "revision.h" 9 9 #include "setup.h" 10 10
+1 -1
builtin/diff-tree.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "diff.h" ··· 6 7 #include "hex.h" 7 8 #include "log-tree.h" 8 9 #include "read-cache-ll.h" 9 - #include "repository.h" 10 10 #include "revision.h" 11 11 #include "tmp-objdir.h" 12 12 #include "tree.h"
+1 -1
builtin/diff.c
··· 3 3 * 4 4 * Copyright (c) 2006 Junio C Hamano 5 5 */ 6 - 6 + #define USE_THE_REPOSITORY_VARIABLE 7 7 #include "builtin.h" 8 8 #include "config.h" 9 9 #include "ewah/ewok.h"
+2 -1
builtin/difftool.c
··· 11 11 * 12 12 * Copyright (C) 2016 Johannes Schindelin 13 13 */ 14 + #define USE_THE_REPOSITORY_VARIABLE 15 + #include "builtin.h" 14 16 15 - #include "builtin.h" 16 17 #include "abspath.h" 17 18 #include "config.h" 18 19 #include "copy.h"
+1
builtin/fast-export.c
··· 3 3 * 4 4 * Copyright (C) 2007 Johannes E. Schindelin 5 5 */ 6 + #define USE_THE_REPOSITORY_VARIABLE 6 7 #include "builtin.h" 7 8 #include "config.h" 8 9 #include "gettext.h"
+1 -1
builtin/fast-import.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "abspath.h" 3 4 #include "environment.h" 4 5 #include "gettext.h" 5 6 #include "hex.h" 6 - #include "repository.h" 7 7 #include "config.h" 8 8 #include "lockfile.h" 9 9 #include "object.h"
+1
builtin/fetch-pack.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "gettext.h" 3 4 #include "hex.h"
+1 -1
builtin/fetch.c
··· 1 1 /* 2 2 * "git fetch" 3 3 */ 4 + #define USE_THE_REPOSITORY_VARIABLE 4 5 #include "builtin.h" 5 6 #include "advice.h" 6 7 #include "config.h" 7 8 #include "gettext.h" 8 9 #include "environment.h" 9 10 #include "hex.h" 10 - #include "repository.h" 11 11 #include "refs.h" 12 12 #include "refspec.h" 13 13 #include "object-name.h"
+1
builtin/fmt-merge-msg.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "fmt-merge-msg.h"
+1
builtin/for-each-ref.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "commit.h" 3 4 #include "config.h"
+1 -1
builtin/for-each-repo.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "gettext.h" 4 5 #include "parse-options.h" 5 6 #include "path.h" 6 - #include "repository.h" 7 7 #include "run-command.h" 8 8 #include "string-list.h" 9 9
+1 -1
builtin/fsck.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "gettext.h" 3 4 #include "hex.h" 4 - #include "repository.h" 5 5 #include "config.h" 6 6 #include "commit.h" 7 7 #include "tree.h"
+2 -1
builtin/fsmonitor--daemon.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "abspath.h" 3 4 #include "config.h" ··· 11 12 #include "compat/fsmonitor/fsm-health.h" 12 13 #include "compat/fsmonitor/fsm-listen.h" 13 14 #include "fsmonitor--daemon.h" 14 - #include "repository.h" 15 + 15 16 #include "simple-ipc.h" 16 17 #include "khash.h" 17 18 #include "run-command.h"
+1 -2
builtin/gc.c
··· 9 9 * 10 10 * Copyright (c) 2006 Shawn O. Pearce 11 11 */ 12 - 12 + #define USE_THE_REPOSITORY_VARIABLE 13 13 #include "builtin.h" 14 14 #include "abspath.h" 15 15 #include "date.h" 16 16 #include "environment.h" 17 17 #include "hex.h" 18 - #include "repository.h" 19 18 #include "config.h" 20 19 #include "tempfile.h" 21 20 #include "lockfile.h"
+1
builtin/get-tar-commit-id.c
··· 1 1 /* 2 2 * Copyright (c) 2005, 2006 Rene Scharfe 3 3 */ 4 + #define USE_THE_REPOSITORY_VARIABLE 4 5 #include "builtin.h" 5 6 #include "commit.h" 6 7 #include "tar.h"
+1 -1
builtin/grep.c
··· 3 3 * 4 4 * Copyright (c) 2006 Junio C Hamano 5 5 */ 6 + #define USE_THE_REPOSITORY_VARIABLE 6 7 #include "builtin.h" 7 8 #include "abspath.h" 8 9 #include "gettext.h" 9 10 #include "hex.h" 10 - #include "repository.h" 11 11 #include "config.h" 12 12 #include "tag.h" 13 13 #include "tree-walk.h"
+1
builtin/hash-object.c
··· 4 4 * Copyright (C) Linus Torvalds, 2005 5 5 * Copyright (C) Junio C Hamano, 2005 6 6 */ 7 + #define USE_THE_REPOSITORY_VARIABLE 7 8 #include "builtin.h" 8 9 #include "abspath.h" 9 10 #include "config.h"
+2
builtin/help.c
··· 1 + 1 2 /* 2 3 * Builtin help command 3 4 */ 5 + #define USE_THE_REPOSITORY_VARIABLE 4 6 #include "builtin.h" 5 7 #include "config.h" 6 8 #include "exec-cmd.h"
+1
builtin/hook.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "gettext.h"
+1
builtin/index-pack.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "delta.h"
+1 -1
builtin/init-db.c
··· 3 3 * 4 4 * Copyright (C) Linus Torvalds, 2005 5 5 */ 6 + #define USE_THE_REPOSITORY_VARIABLE 6 7 #include "builtin.h" 7 8 #include "abspath.h" 8 9 #include "environment.h" ··· 11 12 #include "parse-options.h" 12 13 #include "path.h" 13 14 #include "refs.h" 14 - #include "repository.h" 15 15 #include "setup.h" 16 16 #include "strbuf.h" 17 17
+1 -1
builtin/interpret-trailers.c
··· 4 4 * Copyright (c) 2013, 2014 Christian Couder <chriscool@tuxfamily.org> 5 5 * 6 6 */ 7 - 7 + #define USE_THE_REPOSITORY_VARIABLE 8 8 #include "builtin.h" 9 9 #include "gettext.h" 10 10 #include "parse-options.h"
+2 -1
builtin/log.c
··· 4 4 * (C) Copyright 2006 Linus Torvalds 5 5 * 2006 Junio Hamano 6 6 */ 7 + #define USE_THE_REPOSITORY_VARIABLE 7 8 #include "builtin.h" 8 9 #include "abspath.h" 9 10 #include "config.h" ··· 37 38 #include "mailmap.h" 38 39 #include "progress.h" 39 40 #include "commit-slab.h" 40 - #include "repository.h" 41 + 41 42 #include "commit-reach.h" 42 43 #include "range-diff.h" 43 44 #include "tmp-objdir.h"
+1 -1
builtin/ls-files.c
··· 5 5 * 6 6 * Copyright (C) Linus Torvalds, 2005 7 7 */ 8 + #define USE_THE_REPOSITORY_VARIABLE 8 9 #include "builtin.h" 9 - #include "repository.h" 10 10 #include "config.h" 11 11 #include "convert.h" 12 12 #include "quote.h"
+1
builtin/ls-remote.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "gettext.h" 3 4 #include "hex.h"
+2
builtin/ls-tree.c
··· 3 3 * 4 4 * Copyright (C) Linus Torvalds, 2005 5 5 */ 6 + #define USE_THE_REPOSITORY_VARIABLE 6 7 #include "builtin.h" 8 + 7 9 #include "config.h" 8 10 #include "gettext.h" 9 11 #include "hex.h"
+1
builtin/mailinfo.c
··· 2 2 * Another stupid program, this one parsing the headers of an 3 3 * email to figure out authorship and subject 4 4 */ 5 + #define USE_THE_REPOSITORY_VARIABLE 5 6 #include "builtin.h" 6 7 #include "abspath.h" 7 8 #include "environment.h"
+1
builtin/mailsplit.c
··· 4 4 * It just splits a mbox into a list of files: "0001" "0002" .. 5 5 * so you can process them further from there. 6 6 */ 7 + #define USE_THE_REPOSITORY_VARIABLE 7 8 #include "builtin.h" 8 9 #include "gettext.h" 9 10 #include "string-list.h"
+1 -1
builtin/merge-base.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "commit.h" ··· 5 6 #include "hex.h" 6 7 #include "object-name.h" 7 8 #include "parse-options.h" 8 - #include "repository.h" 9 9 #include "commit-reach.h" 10 10 11 11 static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
+1
builtin/merge-file.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "abspath.h" 3 4 #include "diff.h"
+1 -1
builtin/merge-index.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "hex.h" 3 4 #include "read-cache-ll.h" 4 - #include "repository.h" 5 5 #include "run-command.h" 6 6 #include "sparse-index.h" 7 7
+2 -1
builtin/merge-ours.c
··· 7 7 * 8 8 * Pretend we resolved the heads, but declare our tree trumps everybody else. 9 9 */ 10 + #define USE_THE_REPOSITORY_VARIABLE 10 11 #include "git-compat-util.h" 11 12 #include "builtin.h" 12 13 #include "diff.h" 13 - #include "repository.h" 14 + 14 15 15 16 static const char builtin_merge_ours_usage[] = 16 17 "git merge-ours <base>... -- HEAD <remote>...";
+1 -1
builtin/merge-recursive.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "advice.h" 3 4 #include "gettext.h" 4 5 #include "hash.h" 5 6 #include "merge-recursive.h" 6 7 #include "object-name.h" 7 - #include "repository.h" 8 8 9 9 static const char builtin_merge_recursive_usage[] = 10 10 "git %s <base>... -- <head> <remote> ...";
+1 -1
builtin/merge-tree.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "tree-walk.h" 3 4 #include "xdiff-interface.h" ··· 10 11 #include "object-name.h" 11 12 #include "object-store-ll.h" 12 13 #include "parse-options.h" 13 - #include "repository.h" 14 14 #include "blob.h" 15 15 #include "merge-blobs.h" 16 16 #include "quote.h"
+2 -1
builtin/merge.c
··· 5 5 * 6 6 * Based on git-merge.sh by Junio C Hamano. 7 7 */ 8 + #define USE_THE_REPOSITORY_VARIABLE 9 + #include "builtin.h" 8 10 9 - #include "builtin.h" 10 11 #include "abspath.h" 11 12 #include "advice.h" 12 13 #include "config.h"
+1
builtin/mktag.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "gettext.h" 3 4 #include "hex.h"
+1
builtin/mktree.c
··· 3 3 * 4 4 * Copyright (c) Junio C Hamano, 2006, 2009 5 5 */ 6 + #define USE_THE_REPOSITORY_VARIABLE 6 7 #include "builtin.h" 7 8 #include "gettext.h" 8 9 #include "hex.h"
+1
builtin/multi-pack-index.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "abspath.h" 3 4 #include "config.h"
+2 -1
builtin/mv.c
··· 3 3 * 4 4 * Copyright (C) 2006 Johannes Schindelin 5 5 */ 6 + #define USE_THE_REPOSITORY_VARIABLE 6 7 7 8 #include "builtin.h" 8 9 #include "abspath.h" ··· 18 19 #include "string-list.h" 19 20 #include "parse-options.h" 20 21 #include "read-cache-ll.h" 21 - #include "repository.h" 22 + 22 23 #include "setup.h" 23 24 #include "strvec.h" 24 25 #include "submodule.h"
+1 -1
builtin/name-rev.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "environment.h" 3 4 #include "gettext.h" 4 5 #include "hex.h" 5 - #include "repository.h" 6 6 #include "config.h" 7 7 #include "commit.h" 8 8 #include "tag.h"
+2 -2
builtin/notes.c
··· 6 6 * Based on git-notes.sh by Johannes Schindelin, 7 7 * and builtin/tag.c by Kristian Høgsberg and Carlos Rica. 8 8 */ 9 - 9 + #define USE_THE_REPOSITORY_VARIABLE 10 10 #include "builtin.h" 11 11 #include "config.h" 12 12 #include "editor.h" ··· 17 17 #include "object-name.h" 18 18 #include "object-store-ll.h" 19 19 #include "path.h" 20 - #include "repository.h" 20 + 21 21 #include "pretty.h" 22 22 #include "refs.h" 23 23 #include "exec-cmd.h"
+1 -1
builtin/pack-objects.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "environment.h" 3 4 #include "gettext.h" 4 5 #include "hex.h" 5 - #include "repository.h" 6 6 #include "config.h" 7 7 #include "attr.h" 8 8 #include "object.h"
+2 -1
builtin/pack-redundant.c
··· 5 5 * This file is licensed under the GPL v2. 6 6 * 7 7 */ 8 + #define USE_THE_REPOSITORY_VARIABLE 8 9 9 10 #include "builtin.h" 10 11 #include "gettext.h" 11 12 #include "hex.h" 12 - #include "repository.h" 13 + 13 14 #include "packfile.h" 14 15 #include "object-store-ll.h" 15 16
+1 -1
builtin/pack-refs.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "gettext.h" 4 5 #include "parse-options.h" 5 6 #include "refs.h" 6 - #include "repository.h" 7 7 #include "revision.h" 8 8 9 9 static char const * const pack_refs_usage[] = {
+1
builtin/patch-id.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "diff.h"
+1
builtin/prune-packed.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "gettext.h" 3 4 #include "parse-options.h"
+1
builtin/prune.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "commit.h" 3 4 #include "diff.h"
+1
builtin/pull.c
··· 6 6 * Fetch one or more remote refs and merge it/them into the current HEAD. 7 7 */ 8 8 9 + #define USE_THE_REPOSITORY_VARIABLE 9 10 #include "builtin.h" 10 11 #include "advice.h" 11 12 #include "config.h"
+1 -1
builtin/push.c
··· 1 1 /* 2 2 * "git push" 3 3 */ 4 + #define USE_THE_REPOSITORY_VARIABLE 4 5 #include "builtin.h" 5 6 #include "advice.h" 6 7 #include "branch.h" ··· 13 14 #include "transport.h" 14 15 #include "parse-options.h" 15 16 #include "pkt-line.h" 16 - #include "repository.h" 17 17 #include "submodule.h" 18 18 #include "submodule-config.h" 19 19 #include "send-pack.h"
+2 -1
builtin/range-diff.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "gettext.h" 3 4 #include "object-name.h" 4 5 #include "parse-options.h" 5 6 #include "range-diff.h" 6 7 #include "config.h" 7 - #include "repository.h" 8 + 8 9 9 10 static const char * const builtin_range_diff_usage[] = { 10 11 N_("git range-diff [<options>] <old-base>..<old-tip> <new-base>..<new-tip>"),
+1 -2
builtin/read-tree.c
··· 3 3 * 4 4 * Copyright (C) Linus Torvalds, 2005 5 5 */ 6 - 6 + #define USE_THE_REPOSITORY_VARIABLE 7 7 #include "builtin.h" 8 8 #include "config.h" 9 9 #include "gettext.h" ··· 16 16 #include "cache-tree.h" 17 17 #include "unpack-trees.h" 18 18 #include "parse-options.h" 19 - #include "repository.h" 20 19 #include "resolve-undo.h" 21 20 #include "setup.h" 22 21 #include "sparse-index.h"
+2 -1
builtin/rebase.c
··· 3 3 * 4 4 * Copyright (c) 2018 Pratik Karki 5 5 */ 6 + #define USE_THE_REPOSITORY_VARIABLE 7 + #include "builtin.h" 6 8 7 - #include "builtin.h" 8 9 #include "abspath.h" 9 10 #include "environment.h" 10 11 #include "gettext.h"
+2 -1
builtin/receive-pack.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "abspath.h" 3 - #include "repository.h" 4 + 4 5 #include "config.h" 5 6 #include "environment.h" 6 7 #include "gettext.h"
+1 -1
builtin/reflog.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "gettext.h" 4 - #include "repository.h" 5 5 #include "revision.h" 6 6 #include "reachable.h" 7 7 #include "wildmatch.h"
+1 -1
builtin/refs.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "fsck.h" 4 5 #include "parse-options.h" 5 6 #include "refs.h" 6 - #include "repository.h" 7 7 #include "strbuf.h" 8 8 9 9 #define REFS_MIGRATE_USAGE \
+1
builtin/remote-ext.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "transport.h" 3 4 #include "run-command.h"
+1
builtin/remote-fd.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "transport.h" 3 4
+1
builtin/remote.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "gettext.h"
+1
builtin/repack.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "dir.h"
+1 -2
builtin/replace.c
··· 7 7 * and Carlos Rica <jasampler@gmail.com> that was itself based on 8 8 * git-tag.sh and mktag.c by Linus Torvalds. 9 9 */ 10 - 10 + #define USE_THE_REPOSITORY_VARIABLE 11 11 #include "builtin.h" 12 12 #include "config.h" 13 13 #include "editor.h" ··· 22 22 #include "object-name.h" 23 23 #include "object-store-ll.h" 24 24 #include "replace-object.h" 25 - #include "repository.h" 26 25 #include "tag.h" 27 26 #include "wildmatch.h" 28 27
+1
builtin/replay.c
··· 4 4 5 5 #include "git-compat-util.h" 6 6 7 + #define USE_THE_REPOSITORY_VARIABLE 7 8 #include "builtin.h" 8 9 #include "environment.h" 9 10 #include "hex.h"
+2 -1
builtin/rerere.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "gettext.h" 4 5 #include "parse-options.h" 5 - #include "repository.h" 6 + 6 7 #include "string-list.h" 7 8 #include "rerere.h" 8 9 #include "xdiff/xdiff.h"
+1 -1
builtin/reset.c
··· 7 7 * 8 8 * Copyright (c) 2005, 2006 Linus Torvalds and Junio C Hamano 9 9 */ 10 - 10 + #define USE_THE_REPOSITORY_VARIABLE 11 11 #include "builtin.h" 12 12 #include "advice.h" 13 13 #include "config.h"
+1
builtin/rev-list.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "commit.h"
+2 -1
builtin/rev-parse.c
··· 3 3 * 4 4 * Copyright (C) Linus Torvalds, 2005 5 5 */ 6 + #define USE_THE_REPOSITORY_VARIABLE 7 + #include "builtin.h" 6 8 7 - #include "builtin.h" 8 9 #include "abspath.h" 9 10 #include "config.h" 10 11 #include "commit.h"
+1 -1
builtin/revert.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "git-compat-util.h" 2 3 #include "builtin.h" 3 4 #include "parse-options.h" 4 5 #include "diff.h" 5 6 #include "gettext.h" 6 - #include "repository.h" 7 7 #include "revision.h" 8 8 #include "rerere.h" 9 9 #include "sequencer.h"
+2 -2
builtin/rm.c
··· 3 3 * 4 4 * Copyright (C) Linus Torvalds 2006 5 5 */ 6 - 6 + #define USE_THE_REPOSITORY_VARIABLE 7 7 #include "builtin.h" 8 8 #include "advice.h" 9 9 #include "config.h" ··· 15 15 #include "object-name.h" 16 16 #include "parse-options.h" 17 17 #include "read-cache.h" 18 - #include "repository.h" 18 + 19 19 #include "string-list.h" 20 20 #include "setup.h" 21 21 #include "sparse-index.h"
+1
builtin/send-pack.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "hex.h"
+1 -1
builtin/shortlog.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "commit.h" ··· 5 6 #include "environment.h" 6 7 #include "gettext.h" 7 8 #include "string-list.h" 8 - #include "repository.h" 9 9 #include "revision.h" 10 10 #include "utf8.h" 11 11 #include "mailmap.h"
+2 -1
builtin/show-branch.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "environment.h" ··· 10 11 #include "strvec.h" 11 12 #include "object-name.h" 12 13 #include "parse-options.h" 13 - #include "repository.h" 14 + 14 15 #include "dir.h" 15 16 #include "commit-slab.h" 16 17 #include "date.h"
+1 -1
builtin/show-index.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "gettext.h" 3 4 #include "hash.h" 4 5 #include "hex.h" 5 6 #include "pack.h" 6 7 #include "parse-options.h" 7 - #include "repository.h" 8 8 9 9 static const char *const show_index_usage[] = { 10 10 "git show-index [--object-format=<hash-algorithm>]",
+1
builtin/show-ref.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "gettext.h"
+1 -1
builtin/sparse-checkout.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "dir.h" ··· 7 8 #include "object-name.h" 8 9 #include "parse-options.h" 9 10 #include "pathspec.h" 10 - #include "repository.h" 11 11 #include "strbuf.h" 12 12 #include "string-list.h" 13 13 #include "lockfile.h"
+1
builtin/stash.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "abspath.h" 3 4 #include "config.h"
+1
builtin/stripspace.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "environment.h"
+2 -1
builtin/submodule--helper.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "abspath.h" 3 4 #include "environment.h" 4 5 #include "gettext.h" 5 6 #include "hex.h" 6 - #include "repository.h" 7 + 7 8 #include "config.h" 8 9 #include "parse-options.h" 9 10 #include "quote.h"
+1
builtin/symbolic-ref.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "gettext.h"
+1 -1
builtin/tag.c
··· 5 5 * Carlos Rica <jasampler@gmail.com> 6 6 * Based on git-tag.sh and mktag.c by Linus Torvalds. 7 7 */ 8 - 8 + #define USE_THE_REPOSITORY_VARIABLE 9 9 #include "builtin.h" 10 10 #include "advice.h" 11 11 #include "config.h"
+1
builtin/unpack-file.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "hex.h"
+1
builtin/unpack-objects.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "bulk-checkin.h" 3 4 #include "config.h"
+1 -2
builtin/update-index.c
··· 3 3 * 4 4 * Copyright (C) Linus Torvalds, 2005 5 5 */ 6 - 6 + #define USE_THE_REPOSITORY_VARIABLE 7 7 #include "builtin.h" 8 8 #include "bulk-checkin.h" 9 9 #include "config.h" ··· 22 22 #include "pathspec.h" 23 23 #include "dir.h" 24 24 #include "read-cache.h" 25 - #include "repository.h" 26 25 #include "setup.h" 27 26 #include "sparse-index.h" 28 27 #include "split-index.h"
+1 -1
builtin/update-ref.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "gettext.h" ··· 6 7 #include "object-name.h" 7 8 #include "parse-options.h" 8 9 #include "quote.h" 9 - #include "repository.h" 10 10 11 11 static const char * const git_update_ref_usage[] = { 12 12 N_("git update-ref [<options>] -d <refname> [<old-oid>]"),
+1
builtin/update-server-info.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "gettext.h"
+1 -1
builtin/upload-archive.c
··· 1 1 /* 2 2 * Copyright (c) 2006 Franck Bui-Huu 3 3 */ 4 + #define USE_THE_REPOSITORY_VARIABLE 4 5 #include "builtin.h" 5 6 #include "archive.h" 6 7 #include "path.h" 7 8 #include "pkt-line.h" 8 9 #include "sideband.h" 9 - #include "repository.h" 10 10 #include "run-command.h" 11 11 #include "strvec.h" 12 12
+1
builtin/upload-pack.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "exec-cmd.h" 3 4 #include "gettext.h"
+2
builtin/var.c
··· 3 3 * 4 4 * Copyright (C) Eric Biederman, 2005 5 5 */ 6 + #define USE_THE_REPOSITORY_VARIABLE 6 7 #include "builtin.h" 8 + 7 9 #include "attr.h" 8 10 #include "config.h" 9 11 #include "editor.h"
+1 -1
builtin/verify-commit.c
··· 5 5 * 6 6 * Based on git-verify-tag 7 7 */ 8 + #define USE_THE_REPOSITORY_VARIABLE 8 9 #include "builtin.h" 9 10 #include "config.h" 10 11 #include "gettext.h" 11 12 #include "object-name.h" 12 - #include "repository.h" 13 13 #include "commit.h" 14 14 #include "parse-options.h" 15 15 #include "gpg-interface.h"
+1
builtin/verify-pack.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "config.h" 3 4 #include "gettext.h"
+1
builtin/verify-tag.c
··· 5 5 * 6 6 * Based on git-verify-tag.sh 7 7 */ 8 + #define USE_THE_REPOSITORY_VARIABLE 8 9 #include "builtin.h" 9 10 #include "config.h" 10 11 #include "gettext.h"
+1 -1
builtin/worktree.c
··· 1 + #define USE_THE_REPOSITORY_VARIABLE 1 2 #include "builtin.h" 2 3 #include "abspath.h" 3 4 #include "advice.h" ··· 17 18 #include "read-cache-ll.h" 18 19 #include "refs.h" 19 20 #include "remote.h" 20 - #include "repository.h" 21 21 #include "run-command.h" 22 22 #include "hook.h" 23 23 #include "sigchain.h"
+1 -2
builtin/write-tree.c
··· 3 3 * 4 4 * Copyright (C) Linus Torvalds, 2005 5 5 */ 6 - 6 + #define USE_THE_REPOSITORY_VARIABLE 7 7 #include "builtin.h" 8 8 #include "config.h" 9 9 #include "environment.h" ··· 12 12 #include "tree.h" 13 13 #include "cache-tree.h" 14 14 #include "parse-options.h" 15 - #include "repository.h" 16 15 17 16 static const char * const write_tree_usage[] = { 18 17 N_("git write-tree [--missing-ok] [--prefix=<prefix>/]"),