Re: [PATCH 12/20] log_ref_write_1(): inline function

2016-02-18 Thread Junio C Hamano
Michael Haggerty  writes:

> Now log_ref_write_1() doesn't do anything, so inline it.

Nice.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 12/20] log_ref_write_1(): inline function

2016-02-16 Thread Michael Haggerty
Now log_ref_write_1() doesn't do anything, so inline it.

Signed-off-by: Michael Haggerty 
---
 refs/files-backend.c | 29 +++--
 1 file changed, 11 insertions(+), 18 deletions(-)

diff --git a/refs/files-backend.c b/refs/files-backend.c
index 120189c..9c13653 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2681,9 +2681,17 @@ static int log_ref_write_fd(int fd, const unsigned char 
*old_sha1,
return 0;
 }
 
-static int log_ref_write_1(const char *refname, const unsigned char *old_sha1,
-  const unsigned char *new_sha1, const char *msg,
-  int flags, struct strbuf *err)
+static int log_ref_write(const char *refname, const unsigned char *old_sha1,
+const unsigned char *new_sha1, const char *msg,
+int flags, struct strbuf *err)
+{
+   return files_log_ref_write(refname, old_sha1, new_sha1, msg, flags,
+  err);
+}
+
+int files_log_ref_write(const char *refname, const unsigned char *old_sha1,
+   const unsigned char *new_sha1, const char *msg,
+   int flags, struct strbuf *err)
 {
int logfd, result;
 
@@ -2714,21 +2722,6 @@ static int log_ref_write_1(const char *refname, const 
unsigned char *old_sha1,
return 0;
 }
 
-static int log_ref_write(const char *refname, const unsigned char *old_sha1,
-const unsigned char *new_sha1, const char *msg,
-int flags, struct strbuf *err)
-{
-   return files_log_ref_write(refname, old_sha1, new_sha1, msg, flags,
-  err);
-}
-
-int files_log_ref_write(const char *refname, const unsigned char *old_sha1,
-   const unsigned char *new_sha1, const char *msg,
-   int flags, struct strbuf *err)
-{
-   return log_ref_write_1(refname, old_sha1, new_sha1, msg, flags, err);
-}
-
 /*
  * Write sha1 into the open lockfile, then close the lockfile. On
  * errors, rollback the lockfile, fill in *err and
-- 
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html