[PATCH 1/8] apply: reformat comment

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

 



With the "--reject" option, apply_fragments() can return 0, while marking
the fragment that was rejected as such, and there was a comment for that,
but it was stated rather poorly.

Update the comment and enclose it in a block, as this part will be getting
new code in later patches.

Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
---
 builtin/apply.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/builtin/apply.c b/builtin/apply.c
index 725712d..fc7f07b 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -3066,8 +3066,10 @@ static int apply_data(struct patch *patch, struct stat *st, struct cache_entry *
 	img = strbuf_detach(&buf, &len);
 	prepare_image(&image, img, len, !patch->is_binary);
 
-	if (apply_fragments(&image, patch) < 0)
-		return -1; /* note with --reject this succeeds. */
+	if (apply_fragments(&image, patch) < 0) {
+		/* Note: with --reject, the above call succeeds. */
+		return -1;
+	}
 	patch->result = image.buf;
 	patch->resultsize = image.len;
 	add_to_fn_table(patch);
-- 
1.7.10.1.562.gfc79b1c

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


[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]