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
7df49e9e
Commit
7df49e9e
authored
Apr 23, 2011
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merged pull request #139 from jpfender/merge-head-file.
refs: Allow MERGE_HEAD in normalize_name()
parents
f7a5058a
df30eac1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
src/refs.c
+3
-2
src/refs.h
+1
-0
No files found.
src/refs.c
View file @
7df49e9e
...
...
@@ -1692,8 +1692,9 @@ static int normalize_name(char *buffer_out, const char *name, int is_oid_ref)
}
/* Object id refname have to contain at least one slash, except
* for HEAD in a detached state */
if
(
is_oid_ref
&&
!
contains_a_slash
&&
strcmp
(
name
,
GIT_HEAD_FILE
))
* for HEAD in a detached state or MERGE_HEAD if we're in the
* middle of a merge */
if
(
is_oid_ref
&&
!
contains_a_slash
&&
(
strcmp
(
name
,
GIT_HEAD_FILE
)
&&
strcmp
(
name
,
GIT_MERGE_HEAD_FILE
)))
return
GIT_EINVALIDREFNAME
;
/* A refname can not end with ".lock" */
...
...
src/refs.h
View file @
7df49e9e
...
...
@@ -17,6 +17,7 @@
#define MAX_GITDIR_TREE_STRUCTURE_PATH_LENGTH 100
#define GIT_HEAD_FILE "HEAD"
#define GIT_MERGE_HEAD_FILE "MERGE_HEAD"
#define GIT_REFS_HEADS_MASTER_FILE GIT_REFS_HEADS_DIR "master"
struct
git_reference
{
...
...
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