remove duplicate includes
PATCH 1/1 remove duplicate includes
The following command reports that some header files are included twice:
$ git grep '#include' '*.c' | sort | uniq -cd
Remove the second #include line in each case, as it has no effect.
Signed-off-by René Scharfe <[email protected]>
---
Patch formatted with --function-context for easier review.
builtin/blame.c | 1 - builtin/log.c | 1 - builtin/pack-objects.c | 1 - commit.c | 1 - object-file-convert.c | 1 - protocol-caps.c | 1 - setup.c | 1 - 7 files changed, 7 deletions(-)
builtin/blame.c +0 -1
@@ -1,37 +1,36 @@/* * Blame * * Copyright (c) 2006, 2014 by its authors * See COPYING for licensing conditions */ #define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" #include "config.h" #include "color.h" -#include "builtin.h" #include "environment.h" #include "gettext.h" #include "hex.h" #include "commit.h" #include "diff.h" #include "revision.h" #include "quote.h" #include "string-list.h" #include "mailmap.h" #include "parse-options.h" #include "prio-queue.h" #include "utf8.h" #include "userdiff.h" #include "line-range.h" #include "line-log.h" #include "progress.h" #include "object-name.h" #include "odb.h" #include "pager.h" #include "blame.h" #include "refs.h" #include "setup.h" #include "tag.h" #include "write-or-die.h"
builtin/log.c +0 -1
@@ -1,52 +1,51 @@/* * Builtin "git log" and related commands (show, whatchanged) * * (C) Copyright 2006 Linus Torvalds * 2006 Junio Hamano */ #define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" #include "abspath.h" #include "config.h" #include "environment.h" #include "gettext.h" #include "hex.h" #include "refs.h" #include "object-name.h" #include "odb.h" #include "odb/streaming.h" #include "pager.h" #include "color.h" #include "commit.h" #include "diff.h" #include "diff-merges.h" #include "revision.h" #include "log-tree.h" -#include "builtin.h" #include "oid-array.h" #include "tag.h" #include "reflog-walk.h" #include "patch-ids.h" #include "path.h" #include "shortlog.h" #include "remote.h" #include "string-list.h" #include "parse-options.h" #include "line-log.h" #include "branch.h" #include "version.h" #include "mailmap.h" #include "progress.h" #include "commit-slab.h" #include "commit-reach.h" #include "range-diff.h" #include "tmp-objdir.h" #include "tree.h" #include "write-or-die.h" #define MAIL_DEFAULT_WRAP 72#define COVER_FROM_AUTO_MAX_SUBJECT_LEN 100#define FORMAT_PATCH_NAME_MAX_DEFAULT 64
builtin/pack-objects.c +0 -1
@@ -1,53 +1,52 @@#define USE_THE_REPOSITORY_VARIABLE #define DISABLE_SIGN_COMPARE_WARNINGS #include "builtin.h" #include "environment.h" #include "gettext.h" #include "hex.h" #include "config.h" #include "attr.h" #include "object.h" #include "commit.h" #include "tag.h" #include "delta.h" #include "pack.h" #include "pack-revindex.h" #include "csum-file.h" #include "tree-walk.h" #include "diff.h" #include "revision.h" #include "list-objects.h" #include "list-objects-filter-options.h" #include "pack-objects.h" #include "progress.h" #include "refs.h" #include "thread-utils.h" #include "pack-bitmap.h" #include "delta-islands.h" #include "reachable.h" #include "oid-array.h" #include "strvec.h" #include "list.h" #include "packfile.h" #include "object-file.h" #include "odb.h" #include "odb/streaming.h" #include "replace-object.h" #include "dir.h" #include "midx.h" #include "trace2.h" #include "shallow.h" #include "promisor-remote.h" #include "pack-mtimes.h" #include "parse-options.h" #include "blob.h" #include "tree.h" #include "path-walk.h" -#include "trace2.h" /* * Objects we are going to pack are collected in the `to_pack` structure. * It contains an array (dynamically expanded) of the object data, and a map * that can resolve SHA1s to their position in the array. */
commit.c +0 -1
@@ -1,37 +1,36 @@#define USE_THE_REPOSITORY_VARIABLE #include "git-compat-util.h" #include "tag.h" #include "commit.h" #include "commit-graph.h" #include "environment.h" #include "gettext.h" #include "hex.h" #include "repository.h" #include "object-name.h" #include "odb.h" #include "utf8.h" #include "diff.h" #include "revision.h" #include "notes.h" #include "alloc.h" #include "gpg-interface.h" #include "mergesort.h" #include "commit-slab.h" #include "prio-queue.h" #include "hash-lookup.h" #include "wt-status.h" #include "advice.h" #include "refs.h" #include "commit-reach.h" #include "setup.h" #include "shallow.h" #include "tree.h" #include "hook.h" #include "parse.h" #include "object-file.h" #include "object-file-convert.h" -#include "prio-queue.h" static struct commit_extra_header *read_commit_extra_header_lines (const char *buf,size_t len,const char **);
object-file-convert.c +0 -1
@@ -1,14 +1,13 @@#define DISABLE_SIGN_COMPARE_WARNINGS #include "git-compat-util.h" #include "gettext.h" #include "strbuf.h" #include "hex.h" #include "repository.h" #include "hash.h" -#include "hash.h" #include "object.h" #include "loose.h" #include "commit.h" #include "gpg-interface.h" #include "object-file-convert.h"
protocol-caps.c +0 -1
@@ -1,12 +1,11 @@#include "git-compat-util.h" #include "protocol-caps.h" #include "gettext.h" #include "hex.h" #include "pkt-line.h" #include "hash.h" -#include "hex.h" #include "object.h" #include "odb.h" #include "repository.h" #include "string-list.h" #include "strbuf.h"
setup.c +0 -1
@@ -1,31 +1,30 @@#define USE_THE_REPOSITORY_VARIABLE #define DISABLE_SIGN_COMPARE_WARNINGS #include "git-compat-util.h" #include "abspath.h" #include "copy.h" #include "environment.h" #include "exec-cmd.h" #include "gettext.h" #include "hex.h" #include "object-file.h" #include "object-name.h" #include "refs.h" #include "replace-object.h" #include "repository.h" #include "config.h" #include "dir.h" #include "setup.h" #include "shallow.h" #include "string-list.h" #include "strvec.h" #include "chdir-notify.h" #include "path.h" #include "quote.h" #include "trace.h" #include "trace2.h" #include "worktree.h" -#include "exec-cmd.h" static int inside_git_dir =-1 ;static int inside_work_tree =-1 ;
Signature · 1 line
2.52.0