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
12149a20
Commit
12149a20
authored
Apr 20, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stash apply: default to at least GIT_CHECKOUT_SAFE
parent
f78bb2af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
include/git2/stash.h
+3
-1
src/stash.c
+3
-2
No files found.
include/git2/stash.h
View file @
12149a20
...
...
@@ -96,7 +96,9 @@ typedef enum {
* @param repo The owning repository.
* @param index The position within the stash list. 0 points to the
* most recent stashed state.
* @param checkout_options Options to control how files are checked out
* @param checkout_options Options to control how files are checked out.
* A minimum strategy of `GIT_CHECKOUT_SAFE` is
* implied.
* @param flags Flags to control the applying process. (see GIT_APPLY_* above)
*
* @return 0 on success, GIT_ENOTFOUND if there's no stashed state for the
...
...
src/stash.c
View file @
12149a20
...
...
@@ -681,11 +681,12 @@ static void normalize_checkout_options(
memcpy
(
checkout_opts
,
given_checkout_opts
,
sizeof
(
git_checkout_options
));
}
else
{
git_checkout_options
default_checkout_opts
=
GIT_CHECKOUT_OPTIONS_INIT
;
default_checkout_opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE
;
memcpy
(
checkout_opts
,
&
default_checkout_opts
,
sizeof
(
git_checkout_options
));
}
if
((
checkout_opts
->
checkout_strategy
&
(
GIT_CHECKOUT_SAFE
|
GIT_CHECKOUT_FORCE
))
==
0
)
checkout_opts
->
checkout_strategy
=
GIT_CHECKOUT_SAFE
;
if
(
!
checkout_opts
->
our_label
)
checkout_opts
->
our_label
=
"Updated upstream"
;
...
...
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