diff options
| author | Edward Thomson <ethomson@microsoft.com> | 2015-05-28 15:26:13 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@microsoft.com> | 2015-05-29 09:55:09 -0400 |
| commit | 885b94aac06f17c55bd6f8df318e0cffb0104efa (patch) | |
| tree | d5e0713a5868f230242db3a614eb08fd11ddbd95 /src/checkout.c | |
| parent | ff8d635adbf1208927c7319178d29b0ed973a107 (diff) | |
| download | libgit2-885b94aac06f17c55bd6f8df318e0cffb0104efa.tar.gz | |
Rename GIT_EMERGECONFLICT to GIT_ECONFLICT
We do not error on "merge conflicts"; on the contrary, merge conflicts
are a normal part of merging. We only error on "checkout conflicts",
where a change exists in the index or the working directory that would
otherwise be overwritten by performing the checkout.
This *may* happen during merge (after the production of the new index
that we're going to checkout) but it could happen during any checkout.
Diffstat (limited to 'src/checkout.c')
| -rw-r--r-- | src/checkout.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/checkout.c b/src/checkout.c index 6a1d28136..cc73e483f 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -1292,7 +1292,7 @@ static int checkout_get_actions( (int)counts[CHECKOUT_ACTION__CONFLICT], counts[CHECKOUT_ACTION__CONFLICT] == 1 ? "conflict prevents" : "conflicts prevent"); - error = GIT_EMERGECONFLICT; + error = GIT_ECONFLICT; goto fail; } @@ -2062,7 +2062,7 @@ static int checkout_write_merge( if (result.path == NULL || result.mode == 0) { giterr_set(GITERR_CHECKOUT, "Could not merge contents of file"); - error = GIT_EMERGECONFLICT; + error = GIT_ECONFLICT; goto done; } @@ -2357,7 +2357,7 @@ static int checkout_data_init( /* cannot checkout if unresolved conflicts exist */ if ((data->opts.checkout_strategy & GIT_CHECKOUT_FORCE) == 0 && git_index_has_conflicts(data->index)) { - error = GIT_EMERGECONFLICT; + error = GIT_ECONFLICT; giterr_set(GITERR_CHECKOUT, "unresolved conflicts exist in the index"); goto cleanup; |
