Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c0280bd

Browse files
committed
Merge pull request #3255 from libgit2/cmn/rename-unspecified
Rename FALLBACK to UNSPECIFIED
2 parents 552249f + c2418f4 commit c0280bd

File tree

13 files changed

+26
-26
lines changed

13 files changed

+26
-26
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ support for HTTPS connections insead of OpenSSL.
245245
to fetch options which determine the runtime configuration.
246246

247247
* The `git_remote_autotag_option_t` values have been changed. It has
248-
gained a `_FALLBACK` default value to specify no override for the
248+
gained a `_UNSPECIFIED` default value to specify no override for the
249249
configured setting.
250250

251251
* `git_remote_update_tips()` now takes a pointer to the callbacks as

examples/status.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static void print_short(git_repository *repo, git_status_list *status)
387387
unsigned int smstatus = 0;
388388

389389
if (!git_submodule_status(&smstatus, repo, s->index_to_workdir->new_file.path,
390-
GIT_SUBMODULE_IGNORE_FALLBACK)) {
390+
GIT_SUBMODULE_IGNORE_UNSPECIFIED)) {
391391
if (smstatus & GIT_SUBMODULE_STATUS_WD_MODIFIED)
392392
extra = " (new commits)";
393393
else if (smstatus & GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED)

include/git2/diff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ typedef struct {
399399
* `git_diff_options_init` programmatic initialization.
400400
*/
401401
#define GIT_DIFF_OPTIONS_INIT \
402-
{GIT_DIFF_OPTIONS_VERSION, 0, GIT_SUBMODULE_IGNORE_FALLBACK, {NULL,0}, NULL, NULL, 3}
402+
{GIT_DIFF_OPTIONS_VERSION, 0, GIT_SUBMODULE_IGNORE_UNSPECIFIED, {NULL,0}, NULL, NULL, 3}
403403

404404
/**
405405
* Initializes a `git_diff_options` with default values. Equivalent to

include/git2/remote.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ typedef enum {
475475
/**
476476
* Use the setting from the configuration
477477
*/
478-
GIT_FETCH_PRUNE_FALLBACK,
478+
GIT_FETCH_PRUNE_UNSPECIFIED,
479479
/**
480480
* Force pruning on
481481
*/
@@ -495,7 +495,7 @@ typedef enum {
495495
/**
496496
* Use the setting from the configuration.
497497
*/
498-
GIT_REMOTE_DOWNLOAD_TAGS_FALLBACK = 0,
498+
GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED = 0,
499499
/**
500500
* Ask the server for tags pointing to objects we're already
501501
* downloading.
@@ -541,7 +541,7 @@ typedef struct {
541541
} git_fetch_options;
542542

543543
#define GIT_FETCH_OPTIONS_VERSION 1
544-
#define GIT_FETCH_OPTIONS_INIT { GIT_FETCH_OPTIONS_VERSION, GIT_REMOTE_CALLBACKS_INIT, GIT_FETCH_PRUNE_FALLBACK, 1 }
544+
#define GIT_FETCH_OPTIONS_INIT { GIT_FETCH_OPTIONS_VERSION, GIT_REMOTE_CALLBACKS_INIT, GIT_FETCH_PRUNE_UNSPECIFIED, 1 }
545545

546546
/**
547547
* Initializes a `git_fetch_options` with default values. Equivalent to

include/git2/types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ typedef enum {
383383
*
384384
* The values are:
385385
*
386-
* - GIT_SUBMODULE_IGNORE_FALLBACK: use the submodule's configuration
386+
* - GIT_SUBMODULE_IGNORE_UNSPECIFIED: use the submodule's configuration
387387
* - GIT_SUBMODULE_IGNORE_NONE: don't ignore any change - i.e. even an
388388
* untracked file, will mark the submodule as dirty. Ignored files are
389389
* still ignored, of course.
@@ -397,7 +397,7 @@ typedef enum {
397397
* when we don't want any particular ignore rule to be specified.
398398
*/
399399
typedef enum {
400-
GIT_SUBMODULE_IGNORE_FALLBACK = -1, /**< use the submodule's configuration */
400+
GIT_SUBMODULE_IGNORE_UNSPECIFIED = -1, /**< use the submodule's configuration */
401401

402402
GIT_SUBMODULE_IGNORE_NONE = 1, /**< any change or untracked == dirty */
403403
GIT_SUBMODULE_IGNORE_UNTRACKED = 2, /**< dirty if tracked files change */

src/checkout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static bool checkout_is_workdir_modified(
180180
return true;
181181
}
182182

183-
if (git_submodule_status(&sm_status, data->repo, wditem->path, GIT_SUBMODULE_IGNORE_FALLBACK) < 0 ||
183+
if (git_submodule_status(&sm_status, data->repo, wditem->path, GIT_SUBMODULE_IGNORE_UNSPECIFIED) < 0 ||
184184
GIT_SUBMODULE_STATUS_IS_WD_DIRTY(sm_status))
185185
rval = true;
186186
else if ((sm_oid = git_submodule_wd_id(sm)) == NULL)

src/diff_file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static int diff_file_content_commit_to_str(
186186
return error;
187187
}
188188

189-
if ((error = git_submodule_status(&sm_status, fc->repo, fc->file->path, GIT_SUBMODULE_IGNORE_FALLBACK)) < 0) {
189+
if ((error = git_submodule_status(&sm_status, fc->repo, fc->file->path, GIT_SUBMODULE_IGNORE_UNSPECIFIED)) < 0) {
190190
git_submodule_free(sm);
191191
return error;
192192
}

src/fetch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static int filter_wants(git_remote *remote, const git_fetch_options *opts)
6060
size_t i, heads_len;
6161
git_remote_autotag_option_t tagopt = remote->download_tags;
6262

63-
if (opts && opts->download_tags != GIT_REMOTE_DOWNLOAD_TAGS_FALLBACK)
63+
if (opts && opts->download_tags != GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED)
6464
tagopt = opts->download_tags;
6565

6666
git_vector_clear(&remote->refs);

src/remote.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ int git_remote_fetch(
985985

986986
if (opts && opts->prune == GIT_FETCH_PRUNE)
987987
prune = true;
988-
else if (opts && opts->prune == GIT_FETCH_PRUNE_FALLBACK && remote->prune_refs)
988+
else if (opts && opts->prune == GIT_FETCH_PRUNE_UNSPECIFIED && remote->prune_refs)
989989
prune = true;
990990
else if (opts && opts->prune == GIT_FETCH_NO_PRUNE)
991991
prune = false;
@@ -1550,7 +1550,7 @@ int git_remote_update_tips(
15501550
if ((error = ls_to_vector(&refs, remote)) < 0)
15511551
goto out;
15521552

1553-
if (download_tags == GIT_REMOTE_DOWNLOAD_TAGS_FALLBACK)
1553+
if (download_tags == GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED)
15541554
tagopt = remote->download_tags;
15551555
else
15561556
tagopt = download_tags;

src/submodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ int git_submodule_update(git_submodule *sm, int init, git_submodule_update_optio
10301030
memcpy(&clone_options.fetch_opts, &update_options.fetch_opts, sizeof(git_fetch_options));
10311031

10321032
/* Get the status of the submodule to determine if it is already initialized */
1033-
if ((error = git_submodule_status(&submodule_status, sm->repo, sm->name, GIT_SUBMODULE_IGNORE_FALLBACK)) < 0)
1033+
if ((error = git_submodule_status(&submodule_status, sm->repo, sm->name, GIT_SUBMODULE_IGNORE_UNSPECIFIED)) < 0)
10341034
goto done;
10351035

10361036
/*
@@ -1425,7 +1425,7 @@ int git_submodule__status(
14251425
unsigned int status;
14261426
git_repository *smrepo = NULL;
14271427

1428-
if (ign == GIT_SUBMODULE_IGNORE_FALLBACK)
1428+
if (ign == GIT_SUBMODULE_IGNORE_UNSPECIFIED)
14291429
ign = sm->ignore;
14301430

14311431
/* only return location info if ignore == all */

0 commit comments

Comments
 (0)