[PATCH v14 8/7] fixup! New capability "report-status-v2" for git-push

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jiang Xin <zhiyou.jx@xxxxxxxxxxxxxxx>

Fixup commit for patch v14 3/7.  Will queue this fix for reroll v15 with others.

Signed-off-by: Jiang Xin <zhiyou.jx@xxxxxxxxxxxxxxx>
---
 builtin/send-pack.c | 2 +-
 send-pack.c         | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index 4faee72640..4fff1c62d3 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -109,7 +109,7 @@ static void print_helper_status(struct ref *ref)
 				strbuf_addf(&buf, "option new-oid %s\n",
 						  oid_to_hex(options->new_oid));
 			if (options->forced_update)
-				strbuf_addf(&buf, "option forced-update\n");
+				strbuf_addstr(&buf, "option forced-update\n");
 		}
 		write_or_die(1, buf.buf, buf.len);
 	}
diff --git a/send-pack.c b/send-pack.c
index 9a9285755c..82b9760340 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -253,8 +253,7 @@ static int receive_status(struct packet_reader *reader, struct ref *refs)
 				hint->report.error_message = "failed";
 		} else {
 			hint->status = REF_STATUS_OK;
-			if (p)
-				hint->report.message = xstrdup(p);
+			hint->report.message = xstrdup_or_null(p);
 		}
 		new_options = 1;
 	}
-- 
2.26.1.120.g98702cf3e9




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux