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
58c2b1c4
Commit
58c2b1c4
authored
Mar 20, 2014
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UNBORN implies FAST_FORWARD
parent
ac584fcf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
include/git2/merge.h
+2
-2
src/merge.c
+1
-1
tests/merge/workdir/analysis.c
+2
-1
No files found.
include/git2/merge.h
View file @
58c2b1c4
...
...
@@ -248,8 +248,8 @@ typedef enum {
GIT_MERGE_ANALYSIS_NORMAL
=
(
1
<<
0
),
/**
*
The repository is already up-to-date and no merge needs to b
e
*
performed. The given merge input already exists as a parent of HEAD
.
*
All given merge inputs are reachable from HEAD, meaning th
e
*
repository is up-to-date and no merge needs to be performed
.
*/
GIT_MERGE_ANALYSIS_UP_TO_DATE
=
(
1
<<
1
),
...
...
src/merge.c
View file @
58c2b1c4
...
...
@@ -2531,7 +2531,7 @@ int git_merge_analysis(
*
out
=
GIT_MERGE_ANALYSIS_NONE
;
if
(
git_repository_head_unborn
(
repo
))
{
*
out
=
GIT_MERGE_ANALYSIS_UNBORN
;
*
out
=
GIT_MERGE_ANALYSIS_
FASTFORWARD
|
GIT_MERGE_ANALYSIS_
UNBORN
;
goto
done
;
}
...
...
tests/merge/workdir/analysis.c
View file @
58c2b1c4
...
...
@@ -99,7 +99,8 @@ void test_merge_workdir_analysis__unborn(void)
p_unlink
(
git_buf_cstr
(
&
master
));
analysis
=
analysis_from_branch
(
NOFASTFORWARD_BRANCH
);
cl_assert_equal_i
(
GIT_MERGE_ANALYSIS_UNBORN
,
analysis
);
cl_assert_equal_i
(
GIT_MERGE_ANALYSIS_FASTFORWARD
,
(
analysis
&
GIT_MERGE_ANALYSIS_FASTFORWARD
));
cl_assert_equal_i
(
GIT_MERGE_ANALYSIS_UNBORN
,
(
analysis
&
GIT_MERGE_ANALYSIS_UNBORN
));
git_buf_free
(
&
master
);
}
...
...
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