Skip to content

Commit dbb4102

Browse files
committed
Merge branch 'sg/parse-options-h-users'
Code clean-up to include and/or uninclude parse-options.h file as needed. * sg/parse-options-h-users: treewide: remove unnecessary inclusions of parse-options.h from headers treewide: include parse-options.h in source files
2 parents 8d90352 + c4d9c79 commit dbb4102

15 files changed

+18
-5
lines changed

builtin/ls-remote.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "ref-filter.h"
66
#include "remote.h"
77
#include "refs.h"
8+
#include "parse-options.h"
89

910
static const char * const ls_remote_usage[] = {
1011
N_("git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"

builtin/pack-objects.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "shallow.h"
4040
#include "promisor-remote.h"
4141
#include "pack-mtimes.h"
42+
#include "parse-options.h"
4243

4344
/*
4445
* Objects we are going to pack are collected in the `to_pack` structure.

builtin/receive-pack.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "commit-reach.h"
3232
#include "worktree.h"
3333
#include "shallow.h"
34+
#include "parse-options.h"
3435

3536
static const char * const receive_pack_usage[] = {
3637
N_("git receive-pack <git-dir>"),

builtin/reflog.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "reachable.h"
55
#include "worktree.h"
66
#include "reflog.h"
7+
#include "parse-options.h"
78

89
#define BUILTIN_REFLOG_SHOW_USAGE \
910
N_("git reflog [show] [<log-options>] [<ref>]")

builtin/send-pack.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "gpg-interface.h"
1717
#include "gettext.h"
1818
#include "protocol.h"
19+
#include "parse-options.h"
1920

2021
static const char * const send_pack_usage[] = {
2122
N_("git send-pack [--mirror] [--dry-run] [--force]\n"

diagnose.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "strvec.h"
99
#include "object-store.h"
1010
#include "packfile.h"
11+
#include "parse-options.h"
1112

1213
struct archive_dir {
1314
const char *path;

diagnose.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
#define DIAGNOSE_H
33

44
#include "strbuf.h"
5-
#include "parse-options.h"
5+
6+
struct option;
67

78
enum diagnose_mode {
89
DIAGNOSE_NONE,

list-objects-filter-options.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "promisor-remote.h"
1212
#include "trace.h"
1313
#include "url.h"
14+
#include "parse-options.h"
1415

1516
static int parse_combine_filter(
1617
struct list_objects_filter_options *filter_options,

list-objects-filter-options.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
#define LIST_OBJECTS_FILTER_OPTIONS_H
33

44
#include "object.h"
5-
#include "parse-options.h"
65
#include "string-list.h"
76
#include "strbuf.h"
87

8+
struct option;
9+
910
/*
1011
* The list of defined filters for list-objects.
1112
*/

ref-filter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "oid-array.h"
55
#include "refs.h"
66
#include "commit.h"
7-
#include "parse-options.h"
87

98
/* Quoting styles */
109
#define QUOTE_NONE 0
@@ -24,6 +23,7 @@
2423

2524
struct atom_value;
2625
struct ref_sorting;
26+
struct option;
2727

2828
enum ref_sorting_order {
2929
REF_SORTING_REVERSE = 1<<0,

0 commit comments

Comments
 (0)