Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
fc42c28e
Commit
fc42c28e
authored
Nov 19, 2021
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util: don't include unnecessary system libraries
Remove some unnecessary includes from utility code.
parent
ea62f546
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
4 additions
and
19 deletions
+4
-19
src/date.c
+0
-1
src/fs_path.h
+0
-2
src/futils.c
+3
-1
src/hash.h
+0
-1
src/net.c
+0
-1
src/unix/map.c
+0
-2
src/unix/posix.h
+1
-3
src/unix/realpath.c
+0
-2
tests/core/copy.c
+0
-1
tests/core/env.c
+0
-1
tests/core/link.c
+0
-1
tests/core/mkdir.c
+0
-1
tests/core/stat.c
+0
-1
tests/path/win32.c
+0
-1
No files found.
src/date.c
View file @
fc42c28e
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
#endif
#endif
#include "util.h"
#include "util.h"
#include "cache.h"
#include "posix.h"
#include "posix.h"
#include "date.h"
#include "date.h"
...
...
src/fs_path.h
View file @
fc42c28e
...
@@ -14,8 +14,6 @@
...
@@ -14,8 +14,6 @@
#include "vector.h"
#include "vector.h"
#include "utf8.h"
#include "utf8.h"
#include "git2/sys/path.h"
/**
/**
* Path manipulation utils
* Path manipulation utils
*
*
...
...
src/futils.c
View file @
fc42c28e
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
#include "win32/findfile.h"
#include "win32/findfile.h"
#endif
#endif
#define GIT_FILEMODE_DEFAULT 0100666
int
git_futils_mkpath2file
(
const
char
*
file_path
,
const
mode_t
mode
)
int
git_futils_mkpath2file
(
const
char
*
file_path
,
const
mode_t
mode
)
{
{
return
git_futils_mkdir
(
return
git_futils_mkdir
(
...
@@ -269,7 +271,7 @@ int git_futils_writebuffer(
...
@@ -269,7 +271,7 @@ int git_futils_writebuffer(
flags
&=
~
O_FSYNC
;
flags
&=
~
O_FSYNC
;
if
(
!
mode
)
if
(
!
mode
)
mode
=
GIT_FILEMODE_
BLOB
;
mode
=
GIT_FILEMODE_
DEFAULT
;
if
((
fd
=
p_open
(
path
,
flags
,
mode
))
<
0
)
{
if
((
fd
=
p_open
(
path
,
flags
,
mode
))
<
0
)
{
git_error_set
(
GIT_ERROR_OS
,
"could not open '%s' for writing"
,
path
);
git_error_set
(
GIT_ERROR_OS
,
"could not open '%s' for writing"
,
path
);
...
...
src/hash.h
View file @
fc42c28e
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
#include "common.h"
#include "common.h"
#include "git2/oid.h"
#include "hash/sha1.h"
#include "hash/sha1.h"
typedef
struct
{
typedef
struct
{
...
...
src/net.c
View file @
fc42c28e
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
#include "netops.h"
#include "netops.h"
#include <ctype.h>
#include <ctype.h>
#include "git2/errors.h"
#include "posix.h"
#include "posix.h"
#include "str.h"
#include "str.h"
...
...
src/unix/map.c
View file @
fc42c28e
...
@@ -7,8 +7,6 @@
...
@@ -7,8 +7,6 @@
#include "common.h"
#include "common.h"
#include "git2/common.h"
#if !defined(GIT_WIN32) && !defined(NO_MMAP)
#if !defined(GIT_WIN32) && !defined(NO_MMAP)
#include "map.h"
#include "map.h"
...
...
src/unix/posix.h
View file @
fc42c28e
...
@@ -7,9 +7,7 @@
...
@@ -7,9 +7,7 @@
#ifndef INCLUDE_unix_posix_h__
#ifndef INCLUDE_unix_posix_h__
#define INCLUDE_unix_posix_h__
#define INCLUDE_unix_posix_h__
#ifndef LIBGIT2_NO_FEATURES_H
#include "common.h"
# include "git2/sys/features.h"
#endif
#include <stdio.h>
#include <stdio.h>
#include <dirent.h>
#include <dirent.h>
...
...
src/unix/realpath.c
View file @
fc42c28e
...
@@ -7,8 +7,6 @@
...
@@ -7,8 +7,6 @@
#include "common.h"
#include "common.h"
#include "git2/common.h"
#ifndef GIT_WIN32
#ifndef GIT_WIN32
#include <limits.h>
#include <limits.h>
...
...
tests/core/copy.c
View file @
fc42c28e
#include "clar_libgit2.h"
#include "clar_libgit2.h"
#include "futils.h"
#include "futils.h"
#include "path.h"
#include "posix.h"
#include "posix.h"
void
test_core_copy__file
(
void
)
void
test_core_copy__file
(
void
)
...
...
tests/core/env.c
View file @
fc42c28e
#include "clar_libgit2.h"
#include "clar_libgit2.h"
#include "futils.h"
#include "futils.h"
#include "sysdir.h"
#include "sysdir.h"
#include "path.h"
#ifdef GIT_WIN32
#ifdef GIT_WIN32
#define NUM_VARS 5
#define NUM_VARS 5
...
...
tests/core/link.c
View file @
fc42c28e
#include "clar_libgit2.h"
#include "clar_libgit2.h"
#include "posix.h"
#include "posix.h"
#include "path.h"
#ifdef GIT_WIN32
#ifdef GIT_WIN32
# include "win32/reparse.h"
# include "win32/reparse.h"
...
...
tests/core/mkdir.c
View file @
fc42c28e
#include "clar_libgit2.h"
#include "clar_libgit2.h"
#include "futils.h"
#include "futils.h"
#include "path.h"
#include "posix.h"
#include "posix.h"
static
void
cleanup_basic_dirs
(
void
*
ref
)
static
void
cleanup_basic_dirs
(
void
*
ref
)
...
...
tests/core/stat.c
View file @
fc42c28e
#include "clar_libgit2.h"
#include "clar_libgit2.h"
#include "futils.h"
#include "futils.h"
#include "path.h"
#include "posix.h"
#include "posix.h"
void
test_core_stat__initialize
(
void
)
void
test_core_stat__initialize
(
void
)
...
...
tests/path/win32.c
View file @
fc42c28e
#include "clar_libgit2.h"
#include "clar_libgit2.h"
#include "path.h"
#ifdef GIT_WIN32
#ifdef GIT_WIN32
#include "win32/path_w32.h"
#include "win32/path_w32.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment