Thread (134 messages) flat view 134 messages, 4 authors, 2016-06-15

Re: [PATCH v8 28/44] refs.c: make write_ref_sha1 static

From: Jonathan Nieder <hidden>
Date: 2016-06-15 23:01:16

Ronnie Sahlberg wrote:
No external users call write_ref_sha1 any more so lets declare it static.
Yay!

[...]
quoted hunk ↗ jump to hunk
+++ b/refs.c
@@ -251,6 +251,8 @@ struct ref_entry {
[...]
 static void read_loose_refs(const char *dirname, struct ref_dir *dir);
+static int write_ref_sha1(struct ref_lock *lock,
+			  const unsigned char *sha1, const char *logmsg);
Is this forward declaration needed?

[...]
quoted hunk ↗ jump to hunk
--- a/refs.h
+++ b/refs.h
@@ -150,9 +150,6 @@ extern int commit_ref(struct ref_lock *lock);
 /** Release any lock taken but not written. **/
 extern void unlock_ref(struct ref_lock *lock);
 
-/** Writes sha1 into the ref specified by the lock. **/
-extern int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1, const char *msg);
(nit) Would be nice to keep the documentation comment.

Thanks,
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help