diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2013-03-30 03:39:19 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-03-30 15:45:57 +0100 |
| commit | a258d8e3574c4e993bf16e0c136d1a5fbc356728 (patch) | |
| tree | 25f4fc5e103024fc592cfb568691f24a86d356b5 /src | |
| parent | 81b8c9df4642328a7d0dc0920f1489748371d275 (diff) | |
| download | libgit2-a258d8e3574c4e993bf16e0c136d1a5fbc356728.tar.gz | |
branch: rename 'tracking' to 'upstream'
The term 'tracking' is overloaded. Help distinguish what we mean by
using 'upstream' for this part of the library.
Diffstat (limited to 'src')
| -rw-r--r-- | src/branch.c | 16 | ||||
| -rw-r--r-- | src/branch.h | 2 | ||||
| -rw-r--r-- | src/remote.c | 2 | ||||
| -rw-r--r-- | src/revparse.c | 2 | ||||
| -rw-r--r-- | src/submodule.c | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/src/branch.c b/src/branch.c index 45ecca751..56c63a82a 100644 --- a/src/branch.c +++ b/src/branch.c @@ -228,7 +228,7 @@ int git_branch_name(const char **out, git_reference *ref) return 0; } -static int retrieve_tracking_configuration( +static int retrieve_upstream_configuration( const char **out, git_repository *repo, const char *canonical_branch_name, @@ -250,7 +250,7 @@ static int retrieve_tracking_configuration( return error; } -int git_branch_tracking__name( +int git_branch_upstream__name( git_buf *tracking_name, git_repository *repo, const char *canonical_branch_name) @@ -266,11 +266,11 @@ int git_branch_tracking__name( if (!git_reference__is_branch(canonical_branch_name)) return not_a_local_branch(canonical_branch_name); - if ((error = retrieve_tracking_configuration( + if ((error = retrieve_upstream_configuration( &remote_name, repo, canonical_branch_name, "branch.%s.remote")) < 0) goto cleanup; - if ((error = retrieve_tracking_configuration( + if ((error = retrieve_upstream_configuration( &merge_name, repo, canonical_branch_name, "branch.%s.merge")) < 0) goto cleanup; @@ -386,7 +386,7 @@ cleanup: return error; } -int git_branch_tracking_name( +int git_branch_upstream_name( char *tracking_branch_name_out, size_t buffer_size, git_repository *repo, @@ -400,7 +400,7 @@ int git_branch_tracking_name( if (tracking_branch_name_out && buffer_size) *tracking_branch_name_out = '\0'; - if ((error = git_branch_tracking__name( + if ((error = git_branch_upstream__name( &buf, repo, canonical_branch_name)) < 0) goto cleanup; @@ -422,14 +422,14 @@ cleanup: return (int)error; } -int git_branch_tracking( +int git_branch_upstream( git_reference **tracking_out, git_reference *branch) { int error; git_buf tracking_name = GIT_BUF_INIT; - if ((error = git_branch_tracking__name(&tracking_name, + if ((error = git_branch_upstream__name(&tracking_name, git_reference_owner(branch), git_reference_name(branch))) < 0) return error; diff --git a/src/branch.h b/src/branch.h index 8a26c4fea..d02f2af0d 100644 --- a/src/branch.h +++ b/src/branch.h @@ -9,7 +9,7 @@ #include "buffer.h" -int git_branch_tracking__name( +int git_branch_upstream__name( git_buf *tracking_name, git_repository *repo, const char *canonical_branch_name); diff --git a/src/remote.c b/src/remote.c index a6f62d6a5..896361e30 100644 --- a/src/remote.c +++ b/src/remote.c @@ -705,7 +705,7 @@ static int remote_head_for_ref(git_remote_head **out, git_remote *remote, git_ve if ((error = git_reference_resolve(&resolved_ref, ref)) < 0 || (!git_reference_is_branch(resolved_ref)) || - (error = git_branch_tracking(&tracking_ref, resolved_ref)) < 0 || + (error = git_branch_upstream(&tracking_ref, resolved_ref)) < 0 || (error = git_refspec_transform_l(&remote_name, &remote->fetch, git_reference_name(tracking_ref))) < 0) { /* Not an error if HEAD is orphaned or no tracking branch */ if (error == GIT_ENOTFOUND) diff --git a/src/revparse.c b/src/revparse.c index 1518a7c3c..2fd636135 100644 --- a/src/revparse.c +++ b/src/revparse.c @@ -356,7 +356,7 @@ static int retrieve_remote_tracking_reference(git_reference **base_ref, const ch goto cleanup; } - if ((error = git_branch_tracking(&tracking, ref)) < 0) + if ((error = git_branch_upstream(&tracking, ref)) < 0) goto cleanup; *base_ref = tracking; diff --git a/src/submodule.c b/src/submodule.c index 066a881cb..2fdaf2f77 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -1327,7 +1327,7 @@ static int lookup_head_remote(git_buf *url, git_repository *repo) goto cleanup; } - if ((error = git_branch_tracking(&remote, head)) < 0) + if ((error = git_branch_upstream(&remote, head)) < 0) goto cleanup; /* remote should refer to something like refs/remotes/ORIGIN/BRANCH */ |
