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
c0280bdd
Commit
c0280bdd
authored
Jun 25, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3255 from libgit2/cmn/rename-unspecified
Rename FALLBACK to UNSPECIFIED
parents
552249f9
c2418f46
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
26 additions
and
26 deletions
+26
-26
CHANGELOG.md
+1
-1
examples/status.c
+1
-1
include/git2/diff.h
+1
-1
include/git2/remote.h
+3
-3
include/git2/types.h
+2
-2
src/checkout.c
+1
-1
src/diff_file.c
+1
-1
src/fetch.c
+1
-1
src/remote.c
+2
-2
src/submodule.c
+2
-2
tests/diff/tree.c
+1
-1
tests/submodule/submodule_helpers.c
+1
-1
tests/submodule/update.c
+9
-9
No files found.
CHANGELOG.md
View file @
c0280bdd
...
...
@@ -245,7 +245,7 @@ support for HTTPS connections insead of OpenSSL.
to fetch options which determine the runtime configuration.
*
The
`git_remote_autotag_option_t`
values have been changed. It has
gained a
`_
FALLBACK
`
default value to specify no override for the
gained a
`_
UNSPECIFIED
`
default value to specify no override for the
configured setting.
*
`git_remote_update_tips()`
now takes a pointer to the callbacks as
...
...
examples/status.c
View file @
c0280bdd
...
...
@@ -387,7 +387,7 @@ static void print_short(git_repository *repo, git_status_list *status)
unsigned
int
smstatus
=
0
;
if
(
!
git_submodule_status
(
&
smstatus
,
repo
,
s
->
index_to_workdir
->
new_file
.
path
,
GIT_SUBMODULE_IGNORE_
FALLBACK
))
{
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
))
{
if
(
smstatus
&
GIT_SUBMODULE_STATUS_WD_MODIFIED
)
extra
=
" (new commits)"
;
else
if
(
smstatus
&
GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED
)
...
...
include/git2/diff.h
View file @
c0280bdd
...
...
@@ -399,7 +399,7 @@ typedef struct {
* `git_diff_options_init` programmatic initialization.
*/
#define GIT_DIFF_OPTIONS_INIT \
{GIT_DIFF_OPTIONS_VERSION, 0, GIT_SUBMODULE_IGNORE_
FALLBACK
, {NULL,0}, NULL, NULL, 3}
{GIT_DIFF_OPTIONS_VERSION, 0, GIT_SUBMODULE_IGNORE_
UNSPECIFIED
, {NULL,0}, NULL, NULL, 3}
/**
* Initializes a `git_diff_options` with default values. Equivalent to
...
...
include/git2/remote.h
View file @
c0280bdd
...
...
@@ -475,7 +475,7 @@ typedef enum {
/**
* Use the setting from the configuration
*/
GIT_FETCH_PRUNE_
FALLBACK
,
GIT_FETCH_PRUNE_
UNSPECIFIED
,
/**
* Force pruning on
*/
...
...
@@ -495,7 +495,7 @@ typedef enum {
/**
* Use the setting from the configuration.
*/
GIT_REMOTE_DOWNLOAD_TAGS_
FALLBACK
=
0
,
GIT_REMOTE_DOWNLOAD_TAGS_
UNSPECIFIED
=
0
,
/**
* Ask the server for tags pointing to objects we're already
* downloading.
...
...
@@ -541,7 +541,7 @@ typedef struct {
}
git_fetch_options
;
#define GIT_FETCH_OPTIONS_VERSION 1
#define GIT_FETCH_OPTIONS_INIT { GIT_FETCH_OPTIONS_VERSION, GIT_REMOTE_CALLBACKS_INIT, GIT_FETCH_PRUNE_
FALLBACK
, 1 }
#define GIT_FETCH_OPTIONS_INIT { GIT_FETCH_OPTIONS_VERSION, GIT_REMOTE_CALLBACKS_INIT, GIT_FETCH_PRUNE_
UNSPECIFIED
, 1 }
/**
* Initializes a `git_fetch_options` with default values. Equivalent to
...
...
include/git2/types.h
View file @
c0280bdd
...
...
@@ -383,7 +383,7 @@ typedef enum {
*
* The values are:
*
* - GIT_SUBMODULE_IGNORE_
FALLBACK
: use the submodule's configuration
* - GIT_SUBMODULE_IGNORE_
UNSPECIFIED
: use the submodule's configuration
* - GIT_SUBMODULE_IGNORE_NONE: don't ignore any change - i.e. even an
* untracked file, will mark the submodule as dirty. Ignored files are
* still ignored, of course.
...
...
@@ -397,7 +397,7 @@ typedef enum {
* when we don't want any particular ignore rule to be specified.
*/
typedef
enum
{
GIT_SUBMODULE_IGNORE_
FALLBACK
=
-
1
,
/**< use the submodule's configuration */
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
=
-
1
,
/**< use the submodule's configuration */
GIT_SUBMODULE_IGNORE_NONE
=
1
,
/**< any change or untracked == dirty */
GIT_SUBMODULE_IGNORE_UNTRACKED
=
2
,
/**< dirty if tracked files change */
...
...
src/checkout.c
View file @
c0280bdd
...
...
@@ -180,7 +180,7 @@ static bool checkout_is_workdir_modified(
return
true
;
}
if
(
git_submodule_status
(
&
sm_status
,
data
->
repo
,
wditem
->
path
,
GIT_SUBMODULE_IGNORE_
FALLBACK
)
<
0
||
if
(
git_submodule_status
(
&
sm_status
,
data
->
repo
,
wditem
->
path
,
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
)
<
0
||
GIT_SUBMODULE_STATUS_IS_WD_DIRTY
(
sm_status
))
rval
=
true
;
else
if
((
sm_oid
=
git_submodule_wd_id
(
sm
))
==
NULL
)
...
...
src/diff_file.c
View file @
c0280bdd
...
...
@@ -186,7 +186,7 @@ static int diff_file_content_commit_to_str(
return
error
;
}
if
((
error
=
git_submodule_status
(
&
sm_status
,
fc
->
repo
,
fc
->
file
->
path
,
GIT_SUBMODULE_IGNORE_
FALLBACK
))
<
0
)
{
if
((
error
=
git_submodule_status
(
&
sm_status
,
fc
->
repo
,
fc
->
file
->
path
,
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
))
<
0
)
{
git_submodule_free
(
sm
);
return
error
;
}
...
...
src/fetch.c
View file @
c0280bdd
...
...
@@ -60,7 +60,7 @@ static int filter_wants(git_remote *remote, const git_fetch_options *opts)
size_t
i
,
heads_len
;
git_remote_autotag_option_t
tagopt
=
remote
->
download_tags
;
if
(
opts
&&
opts
->
download_tags
!=
GIT_REMOTE_DOWNLOAD_TAGS_
FALLBACK
)
if
(
opts
&&
opts
->
download_tags
!=
GIT_REMOTE_DOWNLOAD_TAGS_
UNSPECIFIED
)
tagopt
=
opts
->
download_tags
;
git_vector_clear
(
&
remote
->
refs
);
...
...
src/remote.c
View file @
c0280bdd
...
...
@@ -985,7 +985,7 @@ int git_remote_fetch(
if
(
opts
&&
opts
->
prune
==
GIT_FETCH_PRUNE
)
prune
=
true
;
else
if
(
opts
&&
opts
->
prune
==
GIT_FETCH_PRUNE_
FALLBACK
&&
remote
->
prune_refs
)
else
if
(
opts
&&
opts
->
prune
==
GIT_FETCH_PRUNE_
UNSPECIFIED
&&
remote
->
prune_refs
)
prune
=
true
;
else
if
(
opts
&&
opts
->
prune
==
GIT_FETCH_NO_PRUNE
)
prune
=
false
;
...
...
@@ -1550,7 +1550,7 @@ int git_remote_update_tips(
if
((
error
=
ls_to_vector
(
&
refs
,
remote
))
<
0
)
goto
out
;
if
(
download_tags
==
GIT_REMOTE_DOWNLOAD_TAGS_
FALLBACK
)
if
(
download_tags
==
GIT_REMOTE_DOWNLOAD_TAGS_
UNSPECIFIED
)
tagopt
=
remote
->
download_tags
;
else
tagopt
=
download_tags
;
...
...
src/submodule.c
View file @
c0280bdd
...
...
@@ -1030,7 +1030,7 @@ int git_submodule_update(git_submodule *sm, int init, git_submodule_update_optio
memcpy
(
&
clone_options
.
fetch_opts
,
&
update_options
.
fetch_opts
,
sizeof
(
git_fetch_options
));
/* Get the status of the submodule to determine if it is already initialized */
if
((
error
=
git_submodule_status
(
&
submodule_status
,
sm
->
repo
,
sm
->
name
,
GIT_SUBMODULE_IGNORE_
FALLBACK
))
<
0
)
if
((
error
=
git_submodule_status
(
&
submodule_status
,
sm
->
repo
,
sm
->
name
,
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
))
<
0
)
goto
done
;
/*
...
...
@@ -1425,7 +1425,7 @@ int git_submodule__status(
unsigned
int
status
;
git_repository
*
smrepo
=
NULL
;
if
(
ign
==
GIT_SUBMODULE_IGNORE_
FALLBACK
)
if
(
ign
==
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
)
ign
=
sm
->
ignore
;
/* only return location info if ignore == all */
...
...
tests/diff/tree.c
View file @
c0280bdd
...
...
@@ -89,7 +89,7 @@ void test_diff_tree__0(void)
}
#define DIFF_OPTS(FLAGS, CTXT) \
{GIT_DIFF_OPTIONS_VERSION, (FLAGS), GIT_SUBMODULE_IGNORE_
FALLBACK
, \
{GIT_DIFF_OPTIONS_VERSION, (FLAGS), GIT_SUBMODULE_IGNORE_
UNSPECIFIED
, \
{NULL,0}, NULL, NULL, (CTXT), 1}
void
test_diff_tree__options
(
void
)
...
...
tests/submodule/submodule_helpers.c
View file @
c0280bdd
...
...
@@ -167,7 +167,7 @@ unsigned int get_submodule_status(git_repository *repo, const char *name)
assert
(
repo
&&
name
);
cl_git_pass
(
git_submodule_status
(
&
status
,
repo
,
name
,
GIT_SUBMODULE_IGNORE_
FALLBACK
));
cl_git_pass
(
git_submodule_status
(
&
status
,
repo
,
name
,
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
));
return
status
;
}
...
...
tests/submodule/update.c
View file @
c0280bdd
...
...
@@ -103,7 +103,7 @@ void test_submodule_update__update_submodule(void)
cl_git_pass
(
git_submodule_lookup
(
&
sm
,
g_repo
,
"testrepo"
));
/* verify the initial state of the submodule */
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
FALLBACK
));
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
));
cl_assert_equal_i
(
submodule_status
,
GIT_SUBMODULE_STATUS_IN_HEAD
|
GIT_SUBMODULE_STATUS_IN_INDEX
|
GIT_SUBMODULE_STATUS_IN_CONFIG
|
...
...
@@ -114,7 +114,7 @@ void test_submodule_update__update_submodule(void)
cl_git_pass
(
git_submodule_update
(
sm
,
0
,
&
update_options
));
/* verify state */
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
FALLBACK
));
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
));
cl_assert_equal_i
(
submodule_status
,
GIT_SUBMODULE_STATUS_IN_HEAD
|
GIT_SUBMODULE_STATUS_IN_INDEX
|
GIT_SUBMODULE_STATUS_IN_CONFIG
|
...
...
@@ -142,7 +142,7 @@ void test_submodule_update__update_and_init_submodule(void)
/* get the submodule */
cl_git_pass
(
git_submodule_lookup
(
&
sm
,
g_repo
,
"testrepo"
));
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
FALLBACK
));
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
));
cl_assert_equal_i
(
submodule_status
,
GIT_SUBMODULE_STATUS_IN_HEAD
|
GIT_SUBMODULE_STATUS_IN_INDEX
|
GIT_SUBMODULE_STATUS_IN_CONFIG
|
...
...
@@ -177,7 +177,7 @@ void test_submodule_update__update_already_checked_out_submodule(void)
/* Initialize and update the sub repository */
cl_git_pass
(
git_submodule_lookup
(
&
sm
,
g_repo
,
"testrepo"
));
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
FALLBACK
));
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
));
cl_assert_equal_i
(
submodule_status
,
GIT_SUBMODULE_STATUS_IN_HEAD
|
GIT_SUBMODULE_STATUS_IN_INDEX
|
GIT_SUBMODULE_STATUS_IN_CONFIG
|
...
...
@@ -203,7 +203,7 @@ void test_submodule_update__update_already_checked_out_submodule(void)
* HEAD commit and index should be updated, but not the workdir.
*/
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
FALLBACK
));
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
));
git_submodule_free
(
sm
);
cl_git_pass
(
git_submodule_lookup
(
&
sm
,
g_repo
,
"testrepo"
));
...
...
@@ -255,7 +255,7 @@ void test_submodule_update__update_blocks_on_dirty_wd(void)
/* Initialize and update the sub repository */
cl_git_pass
(
git_submodule_lookup
(
&
sm
,
g_repo
,
"testrepo"
));
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
FALLBACK
));
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
));
cl_assert_equal_i
(
submodule_status
,
GIT_SUBMODULE_STATUS_IN_HEAD
|
GIT_SUBMODULE_STATUS_IN_INDEX
|
GIT_SUBMODULE_STATUS_IN_CONFIG
|
...
...
@@ -281,7 +281,7 @@ void test_submodule_update__update_blocks_on_dirty_wd(void)
* HEAD commit and index should be updated, but not the workdir.
*/
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
FALLBACK
));
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
));
git_submodule_free
(
sm
);
cl_git_pass
(
git_submodule_lookup
(
&
sm
,
g_repo
,
"testrepo"
));
...
...
@@ -332,7 +332,7 @@ void test_submodule_update__can_force_update(void)
/* Initialize and update the sub repository */
cl_git_pass
(
git_submodule_lookup
(
&
sm
,
g_repo
,
"testrepo"
));
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
FALLBACK
));
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
));
cl_assert_equal_i
(
submodule_status
,
GIT_SUBMODULE_STATUS_IN_HEAD
|
GIT_SUBMODULE_STATUS_IN_INDEX
|
GIT_SUBMODULE_STATUS_IN_CONFIG
|
...
...
@@ -357,7 +357,7 @@ void test_submodule_update__can_force_update(void)
* Verify state after checkout of parent repository. The submodule ID in the
* HEAD commit and index should be updated, but not the workdir.
*/
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
FALLBACK
));
cl_git_pass
(
git_submodule_status
(
&
submodule_status
,
g_repo
,
"testrepo"
,
GIT_SUBMODULE_IGNORE_
UNSPECIFIED
));
git_submodule_free
(
sm
);
cl_git_pass
(
git_submodule_lookup
(
&
sm
,
g_repo
,
"testrepo"
));
...
...
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