OSDN Git Service

verify_refname_available(): adjust constness in declaration
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 25 Apr 2016 09:20:08 +0000 (11:20 +0200)
committerMichael Haggerty <mhagger@alum.mit.edu>
Mon, 13 Jun 2016 09:23:49 +0000 (11:23 +0200)
The two string_list arguments can be const.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
refs/files-backend.c
refs/refs-internal.h

index 15ba456..1d1b72d 100644 (file)
@@ -2299,8 +2299,8 @@ out:
 }
 
 int verify_refname_available(const char *newname,
-                            struct string_list *extras,
-                            struct string_list *skip,
+                            const struct string_list *extras,
+                            const struct string_list *skip,
                             struct strbuf *err)
 {
        struct ref_dir *packed_refs = get_packed_refs(&ref_cache);
index 85f4650..9686e60 100644 (file)
@@ -116,8 +116,8 @@ enum peel_status peel_object(const unsigned char *name, unsigned char *sha1);
  * extras and skip must be sorted.
  */
 int verify_refname_available(const char *newname,
-                            struct string_list *extras,
-                            struct string_list *skip,
+                            const struct string_list *extras,
+                            const struct string_list *skip,
                             struct strbuf *err);
 
 /*