receive-pack.c: shorten the execute_commands loop over all commands
[gitweb.git] / refs.c
diff --git a/refs.c b/refs.c
index 55a79429bd0ec69e8245e515d353a15234377b1d..14e52caea5aadb44a9b1b84f25019437159dd460 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -6,6 +6,15 @@
 #include "dir.h"
 #include "string-list.h"
 
+struct ref_lock {
+       char *ref_name;
+       char *orig_ref_name;
+       struct lock_file *lk;
+       unsigned char old_sha1[20];
+       int lock_fd;
+       int force_write;
+};
+
 /*
  * How to handle various characters in refnames:
  * 0: An acceptable character for refs
@@ -3963,12 +3972,9 @@ static int expire_reflog_ent(unsigned char *osha1, unsigned char *nsha1,
                        printf("prune %s", message);
        } else {
                if (cb->newlog) {
-                       char sign = (tz < 0) ? '-' : '+';
-                       int zone = (tz < 0) ? (-tz) : tz;
-                       fprintf(cb->newlog, "%s %s %s %lu %c%04d\t%s",
+                       fprintf(cb->newlog, "%s %s %s %lu %+05d\t%s",
                                sha1_to_hex(osha1), sha1_to_hex(nsha1),
-                               email, timestamp, sign, zone,
-                               message);
+                               email, timestamp, tz, message);
                        hashcpy(cb->last_kept_sha1, nsha1);
                }
                if (cb->flags & EXPIRE_REFLOGS_VERBOSE)