summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/branch.c2
-rw-r--r--src/checkout.c2
-rw-r--r--src/clone.c2
-rw-r--r--src/remote.c2
-rw-r--r--src/repository.c6
-rw-r--r--src/stash.c2
-rw-r--r--src/status.c2
-rw-r--r--src/submodule.c2
8 files changed, 10 insertions, 10 deletions
diff --git a/src/branch.c b/src/branch.c
index 7064fa7fc..3a745c127 100644
--- a/src/branch.c
+++ b/src/branch.c
@@ -585,7 +585,7 @@ int git_branch_is_head(
error = git_repository_head(&head, git_reference_owner(branch));
- if (error == GIT_EORPHANEDHEAD || error == GIT_ENOTFOUND)
+ if (error == GIT_EUNBORNBRANCH || error == GIT_ENOTFOUND)
return false;
if (error < 0)
diff --git a/src/checkout.c b/src/checkout.c
index aae354ca6..eb92e8fd6 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -1232,7 +1232,7 @@ static int checkout_data_init(
error = checkout_lookup_head_tree(&data->opts.baseline, repo);
- if (error == GIT_EORPHANEDHEAD) {
+ if (error == GIT_EUNBORNBRANCH) {
error = 0;
giterr_clear();
}
diff --git a/src/clone.c b/src/clone.c
index 9f47e07b6..ff251be1b 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -415,7 +415,7 @@ static bool should_checkout(
if (opts->checkout_strategy == GIT_CHECKOUT_NONE)
return false;
- return !git_repository_head_orphan(repo);
+ return !git_repository_head_unborn(repo);
}
static void normalize_options(git_clone_options *dst, const git_clone_options *src, git_repository_init_options *initOptions)
diff --git a/src/remote.c b/src/remote.c
index bdc8e0e67..bfcb3eb65 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -806,7 +806,7 @@ static int remote_head_for_ref(git_remote_head **out, git_refspec *spec, git_vec
(!git_reference_is_branch(resolved_ref)) ||
(error = git_branch_upstream(&tracking_ref, resolved_ref)) < 0 ||
(error = git_refspec_transform_l(&remote_name, spec, git_reference_name(tracking_ref))) < 0) {
- /* Not an error if HEAD is orphaned or no tracking branch */
+ /* Not an error if HEAD is unborn or no tracking branch */
if (error == GIT_ENOTFOUND)
error = 0;
diff --git a/src/repository.c b/src/repository.c
index eae22ce51..eead41201 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -1451,10 +1451,10 @@ int git_repository_head(git_reference **head_out, git_repository *repo)
error = git_reference_lookup_resolved(head_out, repo, git_reference_symbolic_target(head), -1);
git_reference_free(head);
- return error == GIT_ENOTFOUND ? GIT_EORPHANEDHEAD : error;
+ return error == GIT_ENOTFOUND ? GIT_EUNBORNBRANCH : error;
}
-int git_repository_head_orphan(git_repository *repo)
+int git_repository_head_unborn(git_repository *repo)
{
git_reference *ref = NULL;
int error;
@@ -1462,7 +1462,7 @@ int git_repository_head_orphan(git_repository *repo)
error = git_repository_head(&ref, repo);
git_reference_free(ref);
- if (error == GIT_EORPHANEDHEAD)
+ if (error == GIT_EUNBORNBRANCH)
return 1;
if (error < 0)
diff --git a/src/stash.c b/src/stash.c
index 48f19144d..ab4a68575 100644
--- a/src/stash.c
+++ b/src/stash.c
@@ -27,7 +27,7 @@ static int retrieve_head(git_reference **out, git_repository *repo)
{
int error = git_repository_head(out, repo);
- if (error == GIT_EORPHANEDHEAD)
+ if (error == GIT_EUNBORNBRANCH)
return create_error(error, "You do not have the initial commit yet.");
return error;
diff --git a/src/status.c b/src/status.c
index 4a0d65092..be40b9f83 100644
--- a/src/status.c
+++ b/src/status.c
@@ -252,7 +252,7 @@ int git_status_list_new(
/* if there is no HEAD, that's okay - we'll make an empty iterator */
if (((error = git_repository_head_tree(&head, repo)) < 0) &&
- error != GIT_ENOTFOUND && error != GIT_EORPHANEDHEAD) {
+ error != GIT_ENOTFOUND && error != GIT_EUNBORNBRANCH) {
git_index_free(index); /* release index */
return error;
}
diff --git a/src/submodule.c b/src/submodule.c
index 40bda9a41..121383b9c 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -1557,7 +1557,7 @@ static void submodule_get_wd_status(
if (ign == GIT_SUBMODULE_IGNORE_NONE)
opt.flags |= GIT_DIFF_INCLUDE_UNTRACKED;
- /* if we don't have an orphaned head, check diff with index */
+ /* if we don't have an unborn head, check diff with index */
if (git_repository_head_tree(&sm_head, sm_repo) < 0)
giterr_clear();
else {