summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2015-04-04 09:17:59 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2015-04-04 09:17:59 -0500
commit47f37400253210f483d84fb9c2ecf44fb5986849 (patch)
treeb33ba038a80117d47dd0061748b0783261e08275
parent92a8194c444394b6b1d12fec8b7b26a848f3128e (diff)
parent807566d55403ee03a9870ca0102541bfd714b4d4 (diff)
downloadlibgit2-47f37400253210f483d84fb9c2ecf44fb5986849.tar.gz
Merge pull request #3031 from git-up/git_index_add
Entry argument passed to git_index_add_frombuffer() should be const
-rw-r--r--include/git2/index.h2
-rw-r--r--src/index.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/git2/index.h b/include/git2/index.h
index 1feeb6fb1..92636adeb 100644
--- a/include/git2/index.h
+++ b/include/git2/index.h
@@ -485,7 +485,7 @@ GIT_EXTERN(int) git_index_add_bypath(git_index *index, const char *path);
*/
GIT_EXTERN(int) git_index_add_frombuffer(
git_index *index,
- git_index_entry *entry,
+ const git_index_entry *entry,
const void *buffer, size_t len);
/**
diff --git a/src/index.c b/src/index.c
index 9880e8fe4..dbcc37a58 100644
--- a/src/index.c
+++ b/src/index.c
@@ -1091,7 +1091,7 @@ static bool valid_filemode(const int filemode)
}
int git_index_add_frombuffer(
- git_index *index, git_index_entry *source_entry,
+ git_index *index, const git_index_entry *source_entry,
const void *buffer, size_t len)
{
git_index_entry *entry = NULL;