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
8507bf81
Commit
8507bf81
authored
Sep 26, 2021
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trace: always enabled
There's no need to make tracing opt-in; it should always be included.
parent
780faa41
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
38 deletions
+0
-38
CMakeLists.txt
+0
-1
src/CMakeLists.txt
+0
-6
src/features.h.in
+0
-1
src/trace.c
+0
-13
src/trace.h
+0
-17
No files found.
CMakeLists.txt
View file @
8507bf81
...
...
@@ -41,7 +41,6 @@ OPTION(THREADSAFE "Build libgit2 as threadsafe" ON)
OPTION
(
BUILD_TESTS
"Build Tests using the Clar suite"
ON
)
OPTION
(
BUILD_EXAMPLES
"Build library usage example apps"
OFF
)
OPTION
(
BUILD_FUZZERS
"Build the fuzz targets"
OFF
)
OPTION
(
ENABLE_TRACE
"Enables tracing support"
ON
)
OPTION
(
LIBGIT2_FILENAME
"Name of the produced binary"
OFF
)
OPTION
(
USE_SSH
"Link with libssh2 to enable SSH support"
ON
)
OPTION
(
USE_HTTPS
"Enable HTTPS support. Can be set to a specific backend"
ON
)
...
...
src/CMakeLists.txt
View file @
8507bf81
...
...
@@ -37,12 +37,6 @@ SET(LIBGIT2_LIBS "")
enable_warnings
(
missing-declarations
)
# Enable tracing
IF
(
ENABLE_TRACE
)
SET
(
GIT_TRACE 1
)
ENDIF
()
ADD_FEATURE_INFO
(
tracing GIT_TRACE
"tracing support"
)
IF
(
HAVE_FUTIMENS
)
SET
(
GIT_USE_FUTIMENS 1
)
ENDIF
()
...
...
src/features.h.in
View file @
8507bf81
...
...
@@ -5,7 +5,6 @@
#cmakedefine GIT_DEBUG_STRICT_ALLOC 1
#cmakedefine GIT_DEBUG_STRICT_OPEN 1
#cmakedefine GIT_TRACE 1
#cmakedefine GIT_THREADS 1
#cmakedefine GIT_WIN32_LEAKCHECK 1
...
...
src/trace.c
View file @
8507bf81
...
...
@@ -11,15 +11,10 @@
#include "runtime.h"
#include "git2/trace.h"
#ifdef GIT_TRACE
struct
git_trace_data
git_trace__data
=
{
0
};
#endif
int
git_trace_set
(
git_trace_level_t
level
,
git_trace_cb
callback
)
{
#ifdef GIT_TRACE
GIT_ASSERT_ARG
(
level
==
0
||
callback
!=
NULL
);
git_trace__data
.
level
=
level
;
...
...
@@ -27,12 +22,4 @@ int git_trace_set(git_trace_level_t level, git_trace_cb callback)
GIT_MEMORY_BARRIER
;
return
0
;
#else
GIT_UNUSED
(
level
);
GIT_UNUSED
(
callback
);
git_error_set
(
GIT_ERROR_INVALID
,
"this version of libgit2 was not built with tracing."
);
return
-
1
;
#endif
}
src/trace.h
View file @
8507bf81
...
...
@@ -12,8 +12,6 @@
#include <git2/trace.h>
#include "str.h"
#ifdef GIT_TRACE
struct
git_trace_data
{
git_trace_level_t
level
;
git_trace_cb
callback
;
...
...
@@ -50,19 +48,4 @@ GIT_INLINE(void) git_trace(git_trace_level_t level, const char *fmt, ...)
}
}
#else
GIT_INLINE
(
void
)
git_trace__null
(
git_trace_level_t
level
,
const
char
*
fmt
,
...)
{
GIT_UNUSED
(
level
);
GIT_UNUSED
(
fmt
);
}
#define git_trace_level() ((git_trace_level_t)0)
#define git_trace git_trace__null
#endif
#endif
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