summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ab60294)
raw | patch | inline | side by side (parent: ab60294)
author | Carlos Rica <jasampler@gmail.com> | |
Wed, 18 Apr 2007 03:34:34 +0000 (05:34 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 18 Apr 2007 05:00:18 +0000 (22:00 -0700) |
delete_ref function does not change the 'sha1' parameter. Non-const pointer
causes a compiler warning if you call to the function using a const argument.
Signed-off-by: Carlos Rica <jasampler@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
causes a compiler warning if you call to the function using a const argument.
Signed-off-by: Carlos Rica <jasampler@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
cache.h | patch | blob | history | |
refs.c | patch | blob | history |
index 1904131f27c2b41609c505fb8f73143619c133fa..7cedda684f81e5b7bc111c2322ef1f4b2fc97d90 100644 (file)
--- a/cache.h
+++ b/cache.h
extern int hold_lock_file_for_update(struct lock_file *, const char *path, int);
extern int commit_lock_file(struct lock_file *);
extern void rollback_lock_file(struct lock_file *);
-extern int delete_ref(const char *, unsigned char *sha1);
+extern int delete_ref(const char *, const unsigned char *sha1);
/* Environment bits from configuration mechanism */
extern int use_legacy_headers;
index d2b7b7fb56f76294bb48526496429968d86e49b2..d7be2841c5f2a5fbee8964051b86356af7bf9905 100644 (file)
--- a/refs.c
+++ b/refs.c
return commit_lock_file(&packlock);
}
-int delete_ref(const char *refname, unsigned char *sha1)
+int delete_ref(const char *refname, const unsigned char *sha1)
{
struct ref_lock *lock;
int err, i, ret = 0, flag = 0;