[libgit2-glib] Do not stat index entry if setting content from blob id
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Do not stat index entry if setting content from blob id
- Date: Tue, 6 Sep 2016 20:56:23 +0000 (UTC)
commit 7577ce3b71cb88c3d44b25245298229a59810f39
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Tue Sep 6 22:55:27 2016 +0200
Do not stat index entry if setting content from blob id
https://bugzilla.gnome.org/show_bug.cgi?id=770956
libgit2-glib/ggit-repository.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgit2-glib/ggit-repository.c b/libgit2-glib/ggit-repository.c
index d6fe385..90ded1a 100644
--- a/libgit2-glib/ggit-repository.c
+++ b/libgit2-glib/ggit-repository.c
@@ -3063,7 +3063,7 @@ ggit_repository_create_index_entry_for_file (GgitRepository *repository,
ret = _ggit_index_entry_new (path, id);
g_free (path);
- if (file)
+ if (file && !id)
{
ggit_index_entry_stat (ret, file, NULL);
}
@@ -3079,7 +3079,7 @@ ggit_repository_create_index_entry_for_file (GgitRepository *repository,
* @error: a #GError for error reporting, or %NULL.
*
* Create a new index entry. When @path is not %NULL, the path of the returned
- * entry (#ggit_index_entry_get_path) is set @path. The specified path can be
+ * entry (#ggit_index_entry_get_path) is set to @path. The specified path can be
* either absolute or relative. In the case of
* an absolute path, the path must reside within the working directory of
* @repository. The file related fields of the returned entry are also queried
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]