Commit fc42c28e by Edward Thomson

util: don't include unnecessary system libraries

Remove some unnecessary includes from utility code.
parent ea62f546
......@@ -11,7 +11,6 @@
#endif
#include "util.h"
#include "cache.h"
#include "posix.h"
#include "date.h"
......
......@@ -14,8 +14,6 @@
#include "vector.h"
#include "utf8.h"
#include "git2/sys/path.h"
/**
* Path manipulation utils
*
......
......@@ -15,6 +15,8 @@
#include "win32/findfile.h"
#endif
#define GIT_FILEMODE_DEFAULT 0100666
int git_futils_mkpath2file(const char *file_path, const mode_t mode)
{
return git_futils_mkdir(
......@@ -269,7 +271,7 @@ int git_futils_writebuffer(
flags &= ~O_FSYNC;
if (!mode)
mode = GIT_FILEMODE_BLOB;
mode = GIT_FILEMODE_DEFAULT;
if ((fd = p_open(path, flags, mode)) < 0) {
git_error_set(GIT_ERROR_OS, "could not open '%s' for writing", path);
......
......@@ -10,7 +10,6 @@
#include "common.h"
#include "git2/oid.h"
#include "hash/sha1.h"
typedef struct {
......
......@@ -9,7 +9,6 @@
#include "netops.h"
#include <ctype.h>
#include "git2/errors.h"
#include "posix.h"
#include "str.h"
......
......@@ -7,8 +7,6 @@
#include "common.h"
#include "git2/common.h"
#if !defined(GIT_WIN32) && !defined(NO_MMAP)
#include "map.h"
......
......@@ -7,9 +7,7 @@
#ifndef INCLUDE_unix_posix_h__
#define INCLUDE_unix_posix_h__
#ifndef LIBGIT2_NO_FEATURES_H
# include "git2/sys/features.h"
#endif
#include "common.h"
#include <stdio.h>
#include <dirent.h>
......
......@@ -7,8 +7,6 @@
#include "common.h"
#include "git2/common.h"
#ifndef GIT_WIN32
#include <limits.h>
......
#include "clar_libgit2.h"
#include "futils.h"
#include "path.h"
#include "posix.h"
void test_core_copy__file(void)
......
#include "clar_libgit2.h"
#include "futils.h"
#include "sysdir.h"
#include "path.h"
#ifdef GIT_WIN32
#define NUM_VARS 5
......
#include "clar_libgit2.h"
#include "posix.h"
#include "path.h"
#ifdef GIT_WIN32
# include "win32/reparse.h"
......
#include "clar_libgit2.h"
#include "futils.h"
#include "path.h"
#include "posix.h"
static void cleanup_basic_dirs(void *ref)
......
#include "clar_libgit2.h"
#include "futils.h"
#include "path.h"
#include "posix.h"
void test_core_stat__initialize(void)
......
#include "clar_libgit2.h"
#include "path.h"
#ifdef GIT_WIN32
#include "win32/path_w32.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment