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
50a1f637
Unverified
Commit
50a1f637
authored
Jul 07, 2022
by
Edward Thomson
Committed by
GitHub
Jul 07, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6334 from i-tengfei/fix-rebase-interactive
fix interactive rebase detect.
parents
b34b831c
cdcf5b9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
+11
-1
src/libgit2/rebase.c
+11
-1
No files found.
src/libgit2/rebase.c
View file @
50a1f637
...
...
@@ -35,6 +35,7 @@
#define ONTO_FILE "onto"
#define ONTO_NAME_FILE "onto_name"
#define QUIET_FILE "quiet"
#define INTERACTIVE_FILE "interactive"
#define MSGNUM_FILE "msgnum"
#define END_FILE "end"
...
...
@@ -92,6 +93,7 @@ static int rebase_state_type(
git_repository
*
repo
)
{
git_str
path
=
GIT_STR_INIT
;
git_str
interactive_path
=
GIT_STR_INIT
;
git_rebase_t
type
=
GIT_REBASE_NONE
;
if
(
git_str_joinpath
(
&
path
,
repo
->
gitdir
,
REBASE_APPLY_DIR
)
<
0
)
...
...
@@ -107,7 +109,14 @@ static int rebase_state_type(
return
-
1
;
if
(
git_fs_path_isdir
(
git_str_cstr
(
&
path
)))
{
type
=
GIT_REBASE_MERGE
;
if
(
git_str_joinpath
(
&
interactive_path
,
path
.
ptr
,
INTERACTIVE_FILE
)
<
0
)
return
-
1
;
if
(
git_fs_path_isfile
(
interactive_path
.
ptr
))
type
=
GIT_REBASE_INTERACTIVE
;
else
type
=
GIT_REBASE_MERGE
;
goto
done
;
}
...
...
@@ -118,6 +127,7 @@ done:
*
path_out
=
git_str_detach
(
&
path
);
git_str_dispose
(
&
path
);
git_str_dispose
(
&
interactive_path
);
return
0
;
}
...
...
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