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
217add94
Unverified
Commit
217add94
authored
Mar 27, 2018
by
Edward Thomson
Committed by
GitHub
Mar 27, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4531 from tiennou/fix/checkout-default-safe
checkout: change default strategy to SAFE
parents
7bd129e4
cdd0bc2f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
8 deletions
+4
-8
CHANGELOG.md
+2
-0
include/git2/checkout.h
+2
-2
src/rebase.c
+0
-3
src/stash.c
+0
-3
No files found.
CHANGELOG.md
View file @
217add94
...
...
@@ -9,6 +9,8 @@ v0.27 + 1
### Breaking API changes
*
The default checkout strategy changed from
`DRY_RUN`
to
`SAFE`
(#4531).
v0.27
---------
...
...
include/git2/checkout.h
View file @
217add94
...
...
@@ -251,7 +251,7 @@ typedef void (*git_checkout_perfdata_cb)(
typedef
struct
git_checkout_options
{
unsigned
int
version
;
unsigned
int
checkout_strategy
;
/**< default will be a
dry run
*/
unsigned
int
checkout_strategy
;
/**< default will be a
safe checkout
*/
int
disable_filters
;
/**< don't apply filters like CRLF conversion */
unsigned
int
dir_mode
;
/**< default is 0755 */
...
...
@@ -295,7 +295,7 @@ typedef struct git_checkout_options {
}
git_checkout_options
;
#define GIT_CHECKOUT_OPTIONS_VERSION 1
#define GIT_CHECKOUT_OPTIONS_INIT {GIT_CHECKOUT_OPTIONS_VERSION}
#define GIT_CHECKOUT_OPTIONS_INIT {GIT_CHECKOUT_OPTIONS_VERSION
, GIT_CHECKOUT_SAFE
}
/**
* Initializes a `git_checkout_options` with default values. Equivalent to
...
...
src/rebase.c
View file @
217add94
...
...
@@ -275,9 +275,6 @@ static int rebase_alloc(git_rebase **out, const git_rebase_options *rebase_opts)
GITERR_CHECK_ALLOC
(
rebase
->
options
.
rewrite_notes_ref
);
}
if
((
rebase
->
options
.
checkout_options
.
checkout_strategy
&
(
GIT_CHECKOUT_SAFE
|
GIT_CHECKOUT_FORCE
))
==
0
)
rebase
->
options
.
checkout_options
.
checkout_strategy
=
GIT_CHECKOUT_SAFE
;
*
out
=
rebase
;
return
0
;
...
...
src/stash.c
View file @
217add94
...
...
@@ -738,9 +738,6 @@ static void normalize_apply_options(
memcpy
(
opts
,
&
default_apply_opts
,
sizeof
(
git_stash_apply_options
));
}
if
((
opts
->
checkout_options
.
checkout_strategy
&
(
GIT_CHECKOUT_SAFE
|
GIT_CHECKOUT_FORCE
))
==
0
)
opts
->
checkout_options
.
checkout_strategy
=
GIT_CHECKOUT_SAFE
;
if
(
!
opts
->
checkout_options
.
our_label
)
opts
->
checkout_options
.
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