Skip to content

Commit

Permalink
repository: remove unnecessary include of path.h
Browse files Browse the repository at this point in the history
This also made it clear that several .c files that depended upon path.h
were missing a #include for it; add the missing includes while at it.

Signed-off-by: Elijah Newren <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
newren authored and gitster committed Jun 21, 2023
1 parent 0fd2e21 commit c339932
Show file tree
Hide file tree
Showing 71 changed files with 70 additions and 2 deletions.
1 change: 1 addition & 0 deletions apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "object-name.h"
#include "object-file.h"
#include "parse-options.h"
#include "path.h"
#include "quote.h"
#include "read-cache.h"
#include "rerere.h"
Expand Down
1 change: 1 addition & 0 deletions archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "path.h"
#include "pretty.h"
#include "setup.h"
#include "refs.h"
Expand Down
1 change: 1 addition & 0 deletions attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "attr.h"
#include "dir.h"
#include "gettext.h"
#include "path.h"
#include "utf8.h"
#include "quote.h"
#include "read-cache-ll.h"
Expand Down
1 change: 1 addition & 0 deletions bisect.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "commit-reach.h"
#include "object-name.h"
#include "object-store.h"
#include "path.h"
#include "dir.h"

static struct oid_array good_revs;
Expand Down
1 change: 1 addition & 0 deletions blame.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "diffcore.h"
#include "gettext.h"
#include "hex.h"
#include "path.h"
#include "read-cache.h"
#include "setup.h"
#include "tag.h"
Expand Down
1 change: 1 addition & 0 deletions branch.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "gettext.h"
#include "hex.h"
#include "object-name.h"
#include "path.h"
#include "refs.h"
#include "refspec.h"
#include "remote.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/add.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "cache-tree.h"
#include "run-command.h"
#include "parse-options.h"
#include "path.h"
#include "preload-index.h"
#include "diff.h"
#include "diffcore.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/am.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "string-list.h"
#include "packfile.h"
#include "pager.h"
#include "path.h"
#include "repository.h"
#include "pretty.h"
#include "wrapper.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/bisect.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "strvec.h"
#include "run-command.h"
#include "oid-array.h"
#include "path.h"
#include "prompt.h"
#include "quote.h"
#include "revision.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/branch.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "parse-options.h"
#include "branch.h"
#include "diff.h"
#include "path.h"
#include "revision.h"
#include "string-list.h"
#include "column.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/checkout.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "object-name.h"
#include "object-store.h"
#include "parse-options.h"
#include "path.h"
#include "preload-index.h"
#include "read-cache.h"
#include "refs.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/clean.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "dir.h"
#include "gettext.h"
#include "parse-options.h"
#include "path.h"
#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/clone.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "setup.h"
#include "connected.h"
#include "packfile.h"
#include "path.h"
#include "pkt-line.h"
#include "list-objects-filter-options.h"
#include "hook.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "utf8.h"
#include "object-name.h"
#include "parse-options.h"
#include "path.h"
#include "preload-index.h"
#include "read-cache.h"
#include "string-list.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/count-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "dir.h"
#include "environment.h"
#include "gettext.h"
#include "path.h"
#include "repository.h"
#include "parse-options.h"
#include "quote.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/fast-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "commit.h"
#include "delta.h"
#include "pack.h"
#include "path.h"
#include "refs.h"
#include "csum-file.h"
#include "quote.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "utf8.h"
#include "packfile.h"
#include "pager.h"
#include "path.h"
#include "pkt-line.h"
#include "list-objects-filter-options.h"
#include "commit-reach.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/fsck.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "object-file.h"
#include "object-name.h"
#include "object-store.h"
#include "path.h"
#include "read-cache-ll.h"
#include "replace-object.h"
#include "resolve-undo.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "object-store.h"
#include "pack.h"
#include "pack-objects.h"
#include "path.h"
#include "blob.h"
#include "tree.h"
#include "promisor-remote.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/grep.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "object-store.h"
#include "packfile.h"
#include "pager.h"
#include "path.h"
#include "read-cache-ll.h"
#include "write-or-die.h"

Expand Down
1 change: 1 addition & 0 deletions builtin/ls-files.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "parse-options.h"
#include "resolve-undo.h"
#include "string-list.h"
#include "path.h"
#include "pathspec.h"
#include "read-cache.h"
#include "run-command.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/ls-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "blob.h"
#include "tree.h"
#include "commit.h"
#include "path.h"
#include "quote.h"
#include "parse-options.h"
#include "pathspec.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "refspec.h"
#include "commit.h"
#include "diffcore.h"
#include "path.h"
#include "revision.h"
#include "unpack-trees.h"
#include "cache-tree.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/notes.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "notes.h"
#include "object-name.h"
#include "object-store.h"
#include "path.h"
#include "repository.h"
#include "blob.h"
#include "pretty.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/prune.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "revision.h"
#include "reachable.h"
#include "parse-options.h"
#include "path.h"
#include "progress.h"
#include "prune-packed.h"
#include "replace-object.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/pull.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "oid-array.h"
#include "remote.h"
#include "dir.h"
#include "path.h"
#include "read-cache-ll.h"
#include "rebase.h"
#include "refs.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/rebase.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "object-file.h"
#include "object-name.h"
#include "parse-options.h"
#include "path.h"
#include "commit.h"
#include "diff.h"
#include "wt-status.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/receive-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "packfile.h"
#include "object-name.h"
#include "object-store.h"
#include "path.h"
#include "protocol.h"
#include "commit-reach.h"
#include "server-info.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "config.h"
#include "gettext.h"
#include "parse-options.h"
#include "path.h"
#include "transport.h"
#include "remote.h"
#include "string-list.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/repack.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
#include "path.h"
#include "run-command.h"
#include "server-info.h"
#include "sigchain.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/replace.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "hex.h"
#include "refs.h"
#include "parse-options.h"
#include "path.h"
#include "run-command.h"
#include "object-file.h"
#include "object-name.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "branch.h"
#include "object-name.h"
#include "parse-options.h"
#include "path.h"
#include "unpack-trees.h"
#include "cache-tree.h"
#include "setup.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/rev-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "quote.h"
#include "object-name.h"
#include "parse-options.h"
#include "path.h"
#include "diff.h"
#include "read-cache-ll.h"
#include "revision.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/submodule--helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "config.h"
#include "parse-options.h"
#include "quote.h"
#include "path.h"
#include "pathspec.h"
#include "preload-index.h"
#include "dir.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "refs.h"
#include "object-name.h"
#include "object-store.h"
#include "path.h"
#include "tag.h"
#include "run-command.h"
#include "parse-options.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/upload-archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
#include "builtin.h"
#include "archive.h"
#include "path.h"
#include "pkt-line.h"
#include "sideband.h"
#include "repository.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/upload-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "gettext.h"
#include "pkt-line.h"
#include "parse-options.h"
#include "path.h"
#include "protocol.h"
#include "replace-object.h"
#include "upload-pack.h"
Expand Down
1 change: 1 addition & 0 deletions builtin/worktree.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "object-file.h"
#include "object-name.h"
#include "parse-options.h"
#include "path.h"
#include "strvec.h"
#include "branch.h"
#include "read-cache-ll.h"
Expand Down
1 change: 1 addition & 0 deletions commit-graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "object-file.h"
#include "object-store.h"
#include "oid-array.h"
#include "path.h"
#include "alloc.h"
#include "hashmap.h"
#include "replace-object.h"
Expand Down
1 change: 1 addition & 0 deletions compat/fsmonitor/fsm-ipc-darwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "config.h"
#include "gettext.h"
#include "hex.h"
#include "path.h"
#include "repository.h"
#include "strbuf.h"
#include "fsmonitor.h"
Expand Down
1 change: 1 addition & 0 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "object-name.h"
#include "object-store.h"
#include "pager.h"
#include "path.h"
#include "utf8.h"
#include "dir.h"
#include "color.h"
Expand Down
1 change: 1 addition & 0 deletions connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "url.h"
#include "string-list.h"
#include "oid-array.h"
#include "path.h"
#include "transport.h"
#include "trace2.h"
#include "strbuf.h"
Expand Down
1 change: 1 addition & 0 deletions dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "name-hash.h"
#include "object-file.h"
#include "object-store.h"
#include "path.h"
#include "attr.h"
#include "refs.h"
#include "wildmatch.h"
Expand Down
1 change: 1 addition & 0 deletions environment.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "strvec.h"
#include "object-file.h"
#include "object-store.h"
#include "path.h"
#include "replace-object.h"
#include "tmp-objdir.h"
#include "chdir-notify.h"
Expand Down
1 change: 1 addition & 0 deletions fetch-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "oidset.h"
#include "packfile.h"
#include "object-store.h"
#include "path.h"
#include "connected.h"
#include "fetch-negotiator.h"
#include "fsck.h"
Expand Down
1 change: 1 addition & 0 deletions fsck.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "date.h"
#include "hex.h"
#include "object-store.h"
#include "path.h"
#include "repository.h"
#include "object.h"
#include "attr.h"
Expand Down
1 change: 1 addition & 0 deletions http-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "environment.h"
#include "git-zlib.h"
#include "hex.h"
#include "path.h"
#include "repository.h"
#include "refs.h"
#include "pkt-line.h"
Expand Down
1 change: 1 addition & 0 deletions merge-ort.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "object-name.h"
#include "object-store.h"
#include "oid-array.h"
#include "path.h"
#include "promisor-remote.h"
#include "read-cache-ll.h"
#include "revision.h"
Expand Down
1 change: 1 addition & 0 deletions merge-recursive.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "object-file.h"
#include "object-name.h"
#include "object-store.h"
#include "path.h"
#include "repository.h"
#include "revision.h"
#include "sparse-index.h"
Expand Down
1 change: 1 addition & 0 deletions notes-merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "object-file.h"
#include "object-name.h"
#include "object-store.h"
#include "path.h"
#include "repository.h"
#include "diff.h"
#include "diffcore.h"
Expand Down
Loading

0 comments on commit c339932

Please sign in to comment.