[libgit2-glib] Rename get_tracking to get_upstream and remove not needed method from ref
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Rename get_tracking to get_upstream and remove not needed method from ref
- Date: Sat, 13 Apr 2013 10:18:16 +0000 (UTC)
commit c3f00b37a727a9e77079674575088b16c8edcc37
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sat Apr 13 12:17:53 2013 +0200
Rename get_tracking to get_upstream and remove not needed method from ref
libgit2-glib/ggit-branch.c | 10 +++++-----
libgit2-glib/ggit-branch.h | 2 +-
libgit2-glib/ggit-ref.c | 34 ----------------------------------
libgit2-glib/ggit-ref.h | 4 ----
4 files changed, 6 insertions(+), 44 deletions(-)
---
diff --git a/libgit2-glib/ggit-branch.c b/libgit2-glib/ggit-branch.c
index 82c48cd..e16bdd1 100644
--- a/libgit2-glib/ggit-branch.c
+++ b/libgit2-glib/ggit-branch.c
@@ -145,7 +145,7 @@ ggit_branch_get_name (GgitBranch *branch,
}
/**
- * ggit_branch_get_tracking:
+ * ggit_branch_get_upstream:
* @branch: a #GgitBranch.
* @error: a #GError for error reporting, or %NULL.
*
@@ -155,16 +155,16 @@ ggit_branch_get_name (GgitBranch *branch,
* Returns: (transfer full) (allow-none): the reference supporting the remote tracking branch.
*/
GgitBranch *
-ggit_branch_get_tracking (GgitBranch *branch,
+ggit_branch_get_upstream (GgitBranch *branch,
GError **error)
{
gint ret;
- git_reference *tracking;
+ git_reference *upstream;
g_return_val_if_fail (GGIT_IS_BRANCH (branch), NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
- ret = git_branch_tracking (&tracking,
+ ret = git_branch_upstream (&upstream,
_ggit_native_get (branch));
if (ret != GIT_OK)
@@ -173,7 +173,7 @@ ggit_branch_get_tracking (GgitBranch *branch,
return NULL;
}
- return _ggit_branch_wrap (tracking);
+ return _ggit_branch_wrap (upstream);
}
/**
diff --git a/libgit2-glib/ggit-branch.h b/libgit2-glib/ggit-branch.h
index 61c6bf0..033bc1f 100644
--- a/libgit2-glib/ggit-branch.h
+++ b/libgit2-glib/ggit-branch.h
@@ -64,7 +64,7 @@ GgitBranch *ggit_branch_move (GgitBranch *branch,
const gchar *ggit_branch_get_name (GgitBranch *branch,
GError **error);
-GgitBranch *ggit_branch_get_tracking (GgitBranch *branch,
+GgitBranch *ggit_branch_get_upstream (GgitBranch *branch,
GError **error);
gboolean ggit_branch_is_head (GgitBranch *branch,
diff --git a/libgit2-glib/ggit-ref.c b/libgit2-glib/ggit-ref.c
index 86d0965..cfeacde 100644
--- a/libgit2-glib/ggit-ref.c
+++ b/libgit2-glib/ggit-ref.c
@@ -528,38 +528,4 @@ ggit_ref_delete_reflog (GgitRef *ref,
}
}
-/**
- * ggit_ref_get_remote_tracking_from_branch:
- * @ref: a #GgitRef.
- * @error: a #GError for error reporting, or %NULL.
- *
- * Gets the reference supporting the remote tracking branch,
- * given a reference branch. The input reference has to be located
- * in the `refs/heads` namespace. If the remote tracking reference does not
- * exits the error will be set to %GGIT_ERROR_NOTFOUND.
- *
- * Returns: (transfer full): the reference supporting the remote tracking branch,
- * given a reference branch or %NULL on error.
- */
-GgitRef *
-ggit_ref_get_remote_tracking_from_branch (GgitRef *ref,
- GError **error)
-{
- git_reference *reference;
- gint ret;
-
- g_return_val_if_fail (GGIT_IS_REF (ref), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, NULL);
-
- ret = git_branch_tracking (&reference, _ggit_native_get (ref));
-
- if (ret != GIT_OK)
- {
- _ggit_error_set (error, ret);
- return NULL;
- }
-
- return _ggit_ref_wrap (reference);
-}
-
/* ex:set ts=8 noet: */
diff --git a/libgit2-glib/ggit-ref.h b/libgit2-glib/ggit-ref.h
index 4a4d829..fc429ac 100644
--- a/libgit2-glib/ggit-ref.h
+++ b/libgit2-glib/ggit-ref.h
@@ -108,10 +108,6 @@ void ggit_ref_rename_reflog (GgitRef *ref,
void ggit_ref_delete_reflog (GgitRef *ref,
GError **error);
-GgitRef *ggit_ref_get_remote_tracking_from_branch
- (GgitRef *ref,
- GError **error);
-
G_END_DECLS
#endif /* __GGIT_REF_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]