#include "shallow.h"
#include "promisor-remote.h"
#include "pack-mtimes.h"
+#include "parse-options.h"
+ #include "wrapper.h"
/*
* Objects we are going to pack are collected in the `to_pack` structure.
#include "commit-reach.h"
#include "worktree.h"
#include "shallow.h"
+#include "parse-options.h"
+ #include "wrapper.h"
static const char * const receive_pack_usage[] = {
N_("git receive-pack <git-dir>"),
#include "gpg-interface.h"
#include "gettext.h"
#include "protocol.h"
+#include "parse-options.h"
+ #include "write-or-die.h"
static const char * const send_pack_usage[] = {
N_("git send-pack [--mirror] [--dry-run] [--force]\n"
* reentrant, as it calls into other non-reentrant git code.
*/
const char *repo_find_unique_abbrev(struct repository *r, const struct object_id *oid, int len);
-#define find_unique_abbrev(oid, len) repo_find_unique_abbrev(the_repository, oid, len)
int repo_find_unique_abbrev_r(struct repository *r, char *hex, const struct object_id *oid, int len);
-#define find_unique_abbrev_r(hex, oid, len) repo_find_unique_abbrev_r(the_repository, hex, oid, len)
- /* set default permissions by passing mode arguments to open(2) */
- int git_mkstemps_mode(char *pattern, int suffix_len, int mode);
- int git_mkstemp_mode(char *pattern, int mode);
-
- /*
- * NOTE NOTE NOTE!!
- *
- * PERM_UMASK, OLD_PERM_GROUP and OLD_PERM_EVERYBODY enumerations must
- * not be changed. Old repositories have core.sharedrepository written in
- * numeric format, and therefore these values are preserved for compatibility
- * reasons.
- */
- enum sharedrepo {
- PERM_UMASK = 0,
- OLD_PERM_GROUP = 1,
- OLD_PERM_EVERYBODY = 2,
- PERM_GROUP = 0660,
- PERM_EVERYBODY = 0664
- };
- int git_config_perm(const char *var, const char *value);
- int adjust_shared_perm(const char *path);
-
/*
* Create the directory containing the named path, using care to be
* somewhat safe against races. Return one of the scld_error values to
const char *str, int len,
struct strbuf *buf,
const struct interpret_branch_name_options *options);
-#define interpret_branch_name(str, len, buf, options) \
- repo_interpret_branch_name(the_repository, str, len, buf, options)
- int validate_headref(const char *ref);
-
int base_name_compare(const char *name1, size_t len1, int mode1,
const char *name2, size_t len2, int mode2);
int df_name_compare(const char *name1, size_t len1, int mode1,
#include "strvec.h"
#include "object-store.h"
#include "packfile.h"
+#include "parse-options.h"
+ #include "write-or-die.h"
struct archive_dir {
const char *path;
#ifndef LIST_OBJECTS_FILTER_OPTIONS_H
#define LIST_OBJECTS_FILTER_OPTIONS_H
+ #include "gettext.h"
#include "object.h"
-#include "parse-options.h"
#include "string-list.h"
#include "strbuf.h"
#include "string-list.h"
#include "mailmap.h"
#include "object-store.h"
+ #include "setup.h"
-#define DEBUG_MAILMAP 0
-#if DEBUG_MAILMAP
-#define debug_mm(...) fprintf(stderr, __VA_ARGS__)
-#define debug_str(X) ((X) ? (X) : "(none)")
-#else
-__attribute__((format (printf, 1, 2)))
-static inline void debug_mm(const char *format, ...) {}
-static inline const char *debug_str(const char *s) { return s; }
-#endif
-
const char *git_mailmap_file;
const char *git_mailmap_blob;
#include "version.h"
#include "oid-array.h"
#include "gpg-interface.h"
- #include "cache.h"
#include "shallow.h"
+#include "parse-options.h"
+ #include "trace2.h"
+ #include "write-or-die.h"
int option_parse_push_signed(const struct option *opt,
const char *arg, int unset)
#include "test-tool.h"
#include "cache.h"
+ #include "setup.h"
-int cmd__dump_fsmonitor(int ac, const char **av)
+int cmd__dump_fsmonitor(int ac UNUSED, const char **av UNUSED)
{
struct index_state *istate = the_repository->index;
int i;
#include "cache.h"
#include "parse-options.h"
#include "fsmonitor-ipc.h"
+ #include "setup.h"
#include "thread-utils.h"
#include "trace2.h"
+ #include "wrapper.h"
#ifndef HAVE_FSMONITOR_DAEMON_BACKEND
-int cmd__fsmonitor_client(int argc, const char **argv)
+int cmd__fsmonitor_client(int argc UNUSED, const char **argv UNUSED)
{
die("fsmonitor--daemon not available on this platform");
}
#include "test-tool.h"
#include "cache.h"
#include "hex.h"
+ #include "setup.h"
#include "tree.h"
-int cmd__match_trees(int ac, const char **av)
+int cmd__match_trees(int ac UNUSED, const char **av)
{
struct object_id hash1, hash2, shifted;
struct tree *one, *two;
#include "cache.h"
#include "hex.h"
#include "oidtree.h"
+ #include "setup.h"
-static enum cb_next print_oid(const struct object_id *oid, void *data)
+static enum cb_next print_oid(const struct object_id *oid, void *data UNUSED)
{
puts(oid_to_hex(oid));
return CB_CONTINUE;
#include "repository.h"
#include "object-store.h"
#include "bloom.h"
+ #include "setup.h"
-int cmd__read_graph(int argc, const char **argv)
+int cmd__read_graph(int argc UNUSED, const char **argv UNUSED)
{
struct commit_graph *graph = NULL;
struct object_directory *odb;