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
35560d6d
Commit
35560d6d
authored
Jan 03, 2013
by
Edward Thomson
Committed by
Vicent Marti
Jan 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
expose merge metadata cleanup
parent
b60b4562
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
3 deletions
+11
-3
include/git2/repository.h
+9
-0
src/merge.c
+1
-1
src/merge.h
+0
-1
src/reset.c
+1
-1
No files found.
include/git2/repository.h
View file @
35560d6d
...
...
@@ -490,6 +490,15 @@ GIT_EXTERN(int) git_repository_message(char *out, size_t len, git_repository *re
*/
GIT_EXTERN
(
int
)
git_repository_message_remove
(
git_repository
*
repo
);
/**
* Remove all the metadata associated with an ongoing git merge, including
* MERGE_HEAD, MERGE_MSG, etc.
*
* @param repo A repository object
* @return 0 on success, or error
*/
GIT_EXTERN
(
int
)
git_repository_merge_cleanup
(
git_repository
*
repo
);
typedef
int
(
*
git_repository_fetchhead_foreach_cb
)(
const
char
*
ref_name
,
const
char
*
remote_url
,
const
git_oid
*
oid
,
...
...
src/merge.c
View file @
35560d6d
...
...
@@ -15,7 +15,7 @@
#include "git2/reset.h"
#include "commit_list.h"
int
git_
merge_
_cleanup
(
git_repository
*
repo
)
int
git_
repository_merge
_cleanup
(
git_repository
*
repo
)
{
int
error
=
0
;
git_buf
merge_head_path
=
GIT_BUF_INIT
,
...
...
src/merge.h
View file @
35560d6d
...
...
@@ -16,7 +16,6 @@
#define MERGE_CONFIG_FILE_MODE 0666
int
git_merge__cleanup
(
git_repository
*
repo
);
int
git_merge__bases_many
(
git_commit_list
**
out
,
git_revwalk
*
walk
,
git_commit_list_node
*
one
,
git_vector
*
twos
);
#endif
src/reset.c
View file @
35560d6d
...
...
@@ -126,7 +126,7 @@ int git_reset(
goto
cleanup
;
}
if
((
error
=
git_
merge_
_cleanup
(
repo
))
<
0
)
{
if
((
error
=
git_
repository_merge
_cleanup
(
repo
))
<
0
)
{
giterr_set
(
GITERR_INDEX
,
"%s - Failed to clean up merge data."
,
ERROR_MSG
);
goto
cleanup
;
}
...
...
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