git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 31/83] builtin/apply: move 'p_value' global into 'struct apply_state'

From
Christian Couder <christian.couder@gmail.com>
Date
Apr 24, 2016, 13:33 UTC
Message-ID
<1461504863-15946-32-git-send-email-chriscool@tuxfamily.org>
In-Reply-To
<1461504863-15946-1-git-send-email-chriscool@tuxfamily.org>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 builtin/apply.c | 151 +++++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 99 insertions(+), 52 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index 0717cd2..979849c 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -65,6 +65,7 @@ struct apply_state {
 
 	int line_termination;
 
+	int p_value;
 	unsigned int p_context;
 
 	const char *patch_input_file;
@@ -75,7 +76,6 @@ struct apply_state {
 
 static int newfd = -1;
 
-static int state_p_value = 1;
 static int p_value_known;
 
 static const char * const apply_usage[] = {
@@ -896,24 +896,24 @@ static void parse_traditional_patch(struct apply_state *state,
 		q = guess_p_value(state, second);
 		if (p < 0) p = q;
 		if (0 <= p && p == q) {
-			state_p_value = p;
+			state->p_value = p;
 			p_value_known = 1;
 		}
 	}
 	if (is_dev_null(first)) {
 		patch->is_new = 1;
 		patch->is_delete = 0;
-		name = find_name_traditional(second, NULL, state_p_value);
+		name = find_name_traditional(second, NULL, state->p_value);
 		patch->new_name = name;
 	} else if (is_dev_null(second)) {
 		patch->is_new = 0;
 		patch->is_delete = 1;
-		name = find_name_traditional(first, NULL, state_p_value);
+		name = find_name_traditional(first, NULL, state->p_value);
 		patch->old_name = name;
 	} else {
 		char *first_name;
-		first_name = find_name_traditional(first, NULL, state_p_value);
-		name = find_name_traditional(second, first_name, state_p_value);
+		first_name = find_name_traditional(first, NULL, state->p_value);
+		name = find_name_traditional(second, first_name, state->p_value);
 		free(first_name);
 		if (has_epoch_timestamp(first)) {
 			patch->is_new = 1;
@@ -932,7 +932,9 @@ static void parse_traditional_patch(struct apply_state *state,
 		die(_("unable to find filename in patch at line %d"), linenr);
 }
 
-static int gitdiff_hdrend(const char *line, struct patch *patch)
+static int gitdiff_hdrend(struct apply_state *state,
+			  const char *line,
+			  struct patch *patch)
 {
 	return -1;
 }
@@ -949,10 +951,14 @@ static int gitdiff_hdrend(const char *line, struct patch *patch)
 #define DIFF_OLD_NAME 0
 #define DIFF_NEW_NAME 1
 
-static void gitdiff_verify_name(const char *line, int isnull, char **name, int side)
+static void gitdiff_verify_name(struct apply_state *state,
+				const char *line,
+				int isnull,
+				char **name,
+				int side)
 {
 	if (!*name && !isnull) {
-		*name = find_name(line, NULL, state_p_value, TERM_TAB);
+		*name = find_name(line, NULL, state->p_value, TERM_TAB);
 		return;
 	}
 
@@ -962,7 +968,7 @@ static void gitdiff_verify_name(const char *line, int isnull, char **name, int s
 		if (isnull)
 			die(_("git apply: bad git-diff - expected /dev/null, got %s on line %d"),
 			    *name, linenr);
-		another = find_name(line, NULL, state_p_value, TERM_TAB);
+		another = find_name(line, NULL, state->p_value, TERM_TAB);
 		if (!another || memcmp(another, *name, len + 1))
 			die((side == DIFF_NEW_NAME) ?
 			    _("git apply: bad git-diff - inconsistent new filename on line %d") :
@@ -975,81 +981,105 @@ static void gitdiff_verify_name(const char *line, int isnull, char **name, int s
 	}
 }
 
-static int gitdiff_oldname(const char *line, struct patch *patch)
+static int gitdiff_oldname(struct apply_state *state,
+			   const char *line,
+			   struct patch *patch)
 {
-	gitdiff_verify_name(line, patch->is_new, &patch->old_name,
+	gitdiff_verify_name(state, line,
+			    patch->is_new, &patch->old_name,
 			    DIFF_OLD_NAME);
 	return 0;
 }
 
-static int gitdiff_newname(const char *line, struct patch *patch)
+static int gitdiff_newname(struct apply_state *state,
+			   const char *line,
+			   struct patch *patch)
 {
-	gitdiff_verify_name(line, patch->is_delete, &patch->new_name,
+	gitdiff_verify_name(state, line,
+			    patch->is_delete, &patch->new_name,
 			    DIFF_NEW_NAME);
 	return 0;
 }
 
-static int gitdiff_oldmode(const char *line, struct patch *patch)
+static int gitdiff_oldmode(struct apply_state *state,
+			   const char *line,
+			   struct patch *patch)
 {
 	patch->old_mode = strtoul(line, NULL, 8);
 	return 0;
 }
 
-static int gitdiff_newmode(const char *line, struct patch *patch)
+static int gitdiff_newmode(struct apply_state *state,
+			   const char *line,
+			   struct patch *patch)
 {
 	patch->new_mode = strtoul(line, NULL, 8);
 	return 0;
 }
 
-static int gitdiff_delete(const char *line, struct patch *patch)
+static int gitdiff_delete(struct apply_state *state,
+			  const char *line,
+			  struct patch *patch)
 {
 	patch->is_delete = 1;
 	free(patch->old_name);
 	patch->old_name = xstrdup_or_null(patch->def_name);
-	return gitdiff_oldmode(line, patch);
+	return gitdiff_oldmode(state, line, patch);
 }
 
-static int gitdiff_newfile(const char *line, struct patch *patch)
+static int gitdiff_newfile(struct apply_state *state,
+			   const char *line,
+			   struct patch *patch)
 {
 	patch->is_new = 1;
 	free(patch->new_name);
 	patch->new_name = xstrdup_or_null(patch->def_name);
-	return gitdiff_newmode(line, patch);
+	return gitdiff_newmode(state, line, patch);
 }
 
-static int gitdiff_copysrc(const char *line, struct patch *patch)
+static int gitdiff_copysrc(struct apply_state *state,
+			   const char *line,
+			   struct patch *patch)
 {
 	patch->is_copy = 1;
 	free(patch->old_name);
-	patch->old_name = find_name(line, NULL, state_p_value ? state_p_value - 1 : 0, 0);
+	patch->old_name = find_name(line, NULL, state->p_value ? state->p_value - 1 : 0, 0);
 	return 0;
 }
 
-static int gitdiff_copydst(const char *line, struct patch *patch)
+static int gitdiff_copydst(struct apply_state *state,
+			   const char *line,
+			   struct patch *patch)
 {
 	patch->is_copy = 1;
 	free(patch->new_name);
-	patch->new_name = find_name(line, NULL, state_p_value ? state_p_value - 1 : 0, 0);
+	patch->new_name = find_name(line, NULL, state->p_value ? state->p_value - 1 : 0, 0);
 	return 0;
 }
 
-static int gitdiff_renamesrc(const char *line, struct patch *patch)
+static int gitdiff_renamesrc(struct apply_state *state,
+			     const char *line,
+			     struct patch *patch)
 {
 	patch->is_rename = 1;
 	free(patch->old_name);
-	patch->old_name = find_name(line, NULL, state_p_value ? state_p_value - 1 : 0, 0);
+	patch->old_name = find_name(line, NULL, state->p_value ? state->p_value - 1 : 0, 0);
 	return 0;
 }
 
-static int gitdiff_renamedst(const char *line, struct patch *patch)
+static int gitdiff_renamedst(struct apply_state *state,
+			     const char *line,
+			     struct patch *patch)
 {
 	patch->is_rename = 1;
 	free(patch->new_name);
-	patch->new_name = find_name(line, NULL, state_p_value ? state_p_value - 1 : 0, 0);
+	patch->new_name = find_name(line, NULL, state->p_value ? state->p_value - 1 : 0, 0);
 	return 0;
 }
 
-static int gitdiff_similarity(const char *line, struct patch *patch)
+static int gitdiff_similarity(struct apply_state *state,
+			      const char *line,
+			      struct patch *patch)
 {
 	unsigned long val = strtoul(line, NULL, 10);
 	if (val <= 100)
@@ -1057,7 +1087,9 @@ static int gitdiff_similarity(const char *line, struct patch *patch)
 	return 0;
 }
 
-static int gitdiff_dissimilarity(const char *line, struct patch *patch)
+static int gitdiff_dissimilarity(struct apply_state *state,
+				 const char *line,
+				 struct patch *patch)
 {
 	unsigned long val = strtoul(line, NULL, 10);
 	if (val <= 100)
@@ -1065,7 +1097,9 @@ static int gitdiff_dissimilarity(const char *line, struct patch *patch)
 	return 0;
 }
 
-static int gitdiff_index(const char *line, struct patch *patch)
+static int gitdiff_index(struct apply_state *state,
+			 const char *line,
+			 struct patch *patch)
 {
 	/*
 	 * index line is N hexadecimal, "..", N hexadecimal,
@@ -1102,7 +1136,9 @@ static int gitdiff_index(const char *line, struct patch *patch)
  * This is normal for a diff that doesn't change anything: we'll fall through
  * into the next diff. Tell the parser to break out.
  */
-static int gitdiff_unrecognized(const char *line, struct patch *patch)
+static int gitdiff_unrecognized(struct apply_state *state,
+				const char *line,
+				struct patch *patch)
 {
 	return -1;
 }
@@ -1111,15 +1147,17 @@ static int gitdiff_unrecognized(const char *line, struct patch *patch)
  * Skip p_value leading components from "line"; as we do not accept
  * absolute paths, return NULL in that case.
  */
-static const char *skip_tree_prefix(const char *line, int llen)
+static const char *skip_tree_prefix(struct apply_state *state,
+				    const char *line,
+				    int llen)
 {
 	int nslash;
 	int i;
 
-	if (!state_p_value)
+	if (!state->p_value)
 		return (llen && line[0] == '/') ? NULL : line;
 
-	nslash = state_p_value;
+	nslash = state->p_value;
 	for (i = 0; i < llen; i++) {
 		int ch = line[i];
 		if (ch == '/' && --nslash <= 0)
@@ -1136,7 +1174,9 @@ static const char *skip_tree_prefix(const char *line, int llen)
  * creation or deletion of an empty file.  In any of these cases,
  * both sides are the same name under a/ and b/ respectively.
  */
-static char *git_header_name(const char *line, int llen)
+static char *git_header_name(struct apply_state *state,
+			     const char *line,
+			     int llen)
 {
 	const char *name;
 	const char *second = NULL;
@@ -1154,7 +1194,7 @@ static char *git_header_name(const char *line, int llen)
 			goto free_and_fail1;
 
 		/* strip the a/b prefix including trailing slash */
-		cp = skip_tree_prefix(first.buf, first.len);
+		cp = skip_tree_prefix(state, first.buf, first.len);
 		if (!cp)
 			goto free_and_fail1;
 		strbuf_remove(&first, 0, cp - first.buf);
@@ -1171,7 +1211,7 @@ static char *git_header_name(const char *line, int llen)
 		if (*second == '"') {
 			if (unquote_c_style(&sp, second, NULL))
 				goto free_and_fail1;
-			cp = skip_tree_prefix(sp.buf, sp.len);
+			cp = skip_tree_prefix(state, sp.buf, sp.len);
 			if (!cp)
 				goto free_and_fail1;
 			/* They must match, otherwise ignore */
@@ -1182,7 +1222,7 @@ static char *git_header_name(const char *line, int llen)
 		}
 
 		/* unquoted second */
-		cp = skip_tree_prefix(second, line + llen - second);
+		cp = skip_tree_prefix(state, second, line + llen - second);
 		if (!cp)
 			goto free_and_fail1;
 		if (line + llen - cp != first.len ||
@@ -1197,7 +1237,7 @@ static char *git_header_name(const char *line, int llen)
 	}
 
 	/* unquoted first name */
-	name = skip_tree_prefix(line, llen);
+	name = skip_tree_prefix(state, line, llen);
 	if (!name)
 		return NULL;
 
@@ -1213,7 +1253,7 @@ static char *git_header_name(const char *line, int llen)
 			if (unquote_c_style(&sp, second, NULL))
 				goto free_and_fail2;
 
-			np = skip_tree_prefix(sp.buf, sp.len);
+			np = skip_tree_prefix(state, sp.buf, sp.len);
 			if (!np)
 				goto free_and_fail2;
 
@@ -1257,7 +1297,7 @@ static char *git_header_name(const char *line, int llen)
 			 */
 			if (!name[len + 1])
 				return NULL; /* no postimage name */
-			second = skip_tree_prefix(name + len + 1,
+			second = skip_tree_prefix(state, name + len + 1,
 						  line_len - (len + 1));
 			if (!second)
 				return NULL;
@@ -1273,7 +1313,11 @@ static char *git_header_name(const char *line, int llen)
 }
 
 /* Verify that we recognize the lines following a git header */
-static int parse_git_header(const char *line, int len, unsigned int size, struct patch *patch)
+static int parse_git_header(struct apply_state *state,
+			    const char *line,
+			    int len,
+			    unsigned int size,
+			    struct patch *patch)
 {
 	unsigned long offset;
 
@@ -1287,7 +1331,7 @@ static int parse_git_header(const char *line, int len, unsigned int size, struct
 	 * or removing or adding empty files), so we get
 	 * the default name from the header.
 	 */
-	patch->def_name = git_header_name(line, len);
+	patch->def_name = git_header_name(state, line, len);
 	if (patch->def_name && root.len) {
 		char *s = xstrfmt("%s%s", root.buf, patch->def_name);
 		free(patch->def_name);
@@ -1300,7 +1344,7 @@ static int parse_git_header(const char *line, int len, unsigned int size, struct
 	for (offset = len ; size > 0 ; offset += len, size -= len, line += len, linenr++) {
 		static const struct opentry {
 			const char *str;
-			int (*fn)(const char *, struct patch *);
+			int (*fn)(struct apply_state *, const char *, struct patch *);
 		} optable[] = {
 			{ "@@ -", gitdiff_hdrend },
 			{ "--- ", gitdiff_oldname },
@@ -1330,7 +1374,7 @@ static int parse_git_header(const char *line, int len, unsigned int size, struct
 			int oplen = strlen(p->str);
 			if (len < oplen || memcmp(p->str, line, oplen))
 				continue;
-			if (p->fn(line + oplen, patch) < 0)
+			if (p->fn(state, line + oplen, patch) < 0)
 				return offset;
 			break;
 		}
@@ -1500,7 +1544,7 @@ static int find_header(struct apply_state *state,
 		 * or mode change, so we handle that specially
 		 */
 		if (!memcmp("diff --git ", line, 11)) {
-			int git_hdr_len = parse_git_header(line, len, size, patch);
+			int git_hdr_len = parse_git_header(state, line, len, size, patch);
 			if (git_hdr_len <= len)
 				continue;
 			if (!patch->old_name && !patch->new_name) {
@@ -1509,8 +1553,8 @@ static int find_header(struct apply_state *state,
 					       "%d leading pathname component (line %d)",
 					       "git diff header lacks filename information when removing "
 					       "%d leading pathname components (line %d)",
-					       state_p_value),
-					    state_p_value, linenr);
+					       state->p_value),
+					    state->p_value, linenr);
 				patch->old_name = xstrdup(patch->def_name);
 				patch->new_name = xstrdup(patch->def_name);
 			}
@@ -4555,9 +4599,11 @@ static int option_parse_include(const struct option *opt,
 }
 
 static int option_parse_p(const struct option *opt,
-			  const char *arg, int unset)
+			  const char *arg,
+			  int unset)
 {
-	state_p_value = atoi(arg);
+	struct apply_state *state = opt->value;
+	state->p_value = atoi(arg);
 	p_value_known = 1;
 	return 0;
 }
@@ -4610,7 +4656,7 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)
 		{ OPTION_CALLBACK, 0, "include", &state, N_("path"),
 			N_("apply changes matching the given path"),
 			0, option_parse_include },
-		{ OPTION_CALLBACK, 'p', NULL, NULL, N_("num"),
+		{ OPTION_CALLBACK, 'p', NULL, &state, N_("num"),
 			N_("remove <num> leading slashes from traditional diff paths"),
 			0, option_parse_p },
 		OPT_BOOL(0, "no-add", &state.no_add,
@@ -4677,6 +4723,7 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)
 	state.prefix_length = state.prefix ? strlen(state.prefix) : 0;
 	state.apply = 1;
 	state.line_termination = '\n';
+	state.p_value = 1;
 	state.p_context = UINT_MAX;
 
 	git_apply_config();
-- 
2.8.1.300.g5fed0c0
Previous: Christian CouderNext: Christian Couder
Message 49 of 156 in “libify apply and use lib in am”
  1. 00/83 libify apply and use lib in amChristian Couder, Apr 24, 2016
  2. 01/83 builtin/apply: make gitdiff_verify_name() return voidChristian Couder, Apr 24, 2016
  3. 02/83 builtin/apply: avoid parameter shadowing 'p_value' globalChristian Couder, Apr 24, 2016
  4. 03/83 builtin/apply: avoid parameter shadowing 'linenr' globalChristian Couder, Apr 24, 2016
  5. Junio C HamanoApr 27, 2016
  6. Christian CouderApr 27, 2016
  7. 04/83 builtin/apply: avoid local variable shadowing 'len' parameterChristian Couder, Apr 24, 2016
  8. 05/83 builtin/apply: extract line_by_line_fuzzy_match() from match_fragment()Christian Couder, Apr 24, 2016
  9. Stefan BellerApr 25, 2016
  10. Christian CouderApr 26, 2016
  11. Junio C HamanoApr 26, 2016
  12. Christian CouderApr 27, 2016
  13. 06/83 builtin/apply: move 'options' variable into cmd_apply()Christian Couder, Apr 24, 2016
  14. 07/83 builtin/apply: introduce 'struct apply_state' to start libifyingChristian Couder, Apr 24, 2016
  15. 08/83 builtin/apply: move 'unidiff_zero' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  16. 09/83 builtin/apply: move 'check' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  17. Stefan BellerApr 25, 2016
  18. Christian CouderApr 26, 2016
  19. Stefan BellerApr 26, 2016
  20. 10/83 builtin/apply: move 'check_index' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  21. Junio C HamanoApr 26, 2016
  22. 11/83 builtin/apply: move 'apply_in_reverse' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  23. 12/83 builtin/apply: move 'apply_with_reject' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  24. 13/83 builtin/apply: move 'apply_verbosely' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  25. 14/83 builtin/apply: move 'update_index' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  26. 15/83 builtin/apply: move 'allow_overlap' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  27. 16/83 builtin/apply: move 'cached' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  28. 17/83 builtin/apply: move 'diffstat' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  29. 18/83 builtin/apply: move 'numstat' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  30. Stefan BellerApr 25, 2016
  31. Christian CouderApr 26, 2016
  32. 19/83 builtin/apply: move 'summary' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  33. 20/83 builtin/apply: move 'threeway' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  34. 21/83 builtin/apply: move 'no-add' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  35. 22/83 builtin/apply: move 'unsafe_paths' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  36. Junio C HamanoApr 26, 2016
  37. Christian CouderApr 27, 2016
  38. Junio C HamanoApr 27, 2016
  39. 23/83 builtin/apply: move 'line_termination' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  40. 24/83 builtin/apply: move 'fake_ancestor' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  41. 25/83 builtin/apply: move 'p_context' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  42. 26/83 builtin/apply: move 'apply' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  43. 27/83 builtin/apply: move 'read_stdin' global into cmd_apply()Christian Couder, Apr 24, 2016
  44. Junio C HamanoApr 26, 2016
  45. Christian CouderApr 27, 2016
  46. 28/83 builtin/apply: move 'patch_input_file' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  47. 29/83 builtin/apply: move 'limit_by_name' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  48. 30/83 builtin/apply: move 'has_include' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  49. 31/83 builtin/apply: move 'p_value' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  50. 32/83 builtin/apply: move 'p_value_known' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  51. 33/83 builtin/apply: move 'root' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  52. Stefan BellerApr 25, 2016
  53. Stefan BellerApr 25, 2016
  54. Christian CouderApr 26, 2016
  55. 34/83 builtin/apply: move 'whitespace_error' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  56. 35/83 builtin/apply: move 'whitespace_option' into 'struct apply_state'Christian Couder, Apr 24, 2016
  57. 36/83 builtin/apply: remove whitespace_option arg from set_default_whitespace_mode()Christian Couder, Apr 24, 2016
  58. 37/83 builtin/apply: move 'squelch_whitespace_errors' into 'struct apply_state'Christian Couder, Apr 24, 2016
  59. 38/83 builtin/apply: move 'applied_after_fixing_ws' into 'struct apply_state'Christian Couder, Apr 24, 2016
  60. 39/83 builtin/apply: move 'ws_error_action' into 'struct apply_state'Christian Couder, Apr 24, 2016
  61. Junio C HamanoApr 26, 2016
  62. Junio C HamanoApr 26, 2016
  63. Christian CouderApr 27, 2016
  64. 40/83 builtin/apply: move 'ws_ignore_action' into 'struct apply_state'Christian Couder, Apr 24, 2016
  65. 41/83 builtin/apply: move 'max_change' and 'max_len' into 'struct apply_state'Christian Couder, Apr 24, 2016
  66. 42/83 builtin/apply: move 'linenr' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  67. 43/83 builtin/apply: move 'fn_table' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  68. 44/83 builtin/apply: move 'symlink_changes' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  69. 45/83 builtin/apply: move 'state' init into init_apply_state()Christian Couder, Apr 24, 2016
  70. Eric SunshineApr 25, 2016
  71. Christian CouderApr 27, 2016
  72. 46/83 builtin/apply: move 'state' check into check_apply_state()Christian Couder, Apr 24, 2016
  73. 47/83 builtin/apply: move applying patches into apply_all_patches()Christian Couder, Apr 24, 2016
  74. Stefan BellerApr 25, 2016
  75. Christian CouderApr 27, 2016
  76. 48/83 builtin/apply: rename 'prefix_' parameter to 'prefix'Christian Couder, Apr 24, 2016
  77. 49/83 builtin/apply: move 'lock_file' global into 'struct apply_state'Christian Couder, Apr 24, 2016
  78. Eric SunshineApr 25, 2016
  79. Junio C HamanoApr 25, 2016
  80. Christian CouderApr 28, 2016
  81. Junio C HamanoApr 28, 2016
  82. Christian CouderApr 30, 2016
  83. 50/83 builtin/apply: get rid of the 'newfd' globalChristian Couder, Apr 24, 2016
  84. 51/83 builtin/apply: make apply_patch() return -1 instead of die()ingChristian Couder, Apr 24, 2016
  85. Eric SunshineApr 26, 2016
  86. Christian CouderApr 30, 2016
  87. 52/83 builtin/apply: read_patch_file() return -1 instead of die()ingChristian Couder, Apr 24, 2016
  88. 53/83 builtin/apply: make find_header() return -1 instead of die()ingChristian Couder, Apr 24, 2016
  89. Duy NguyenApr 25, 2016
  90. Eric SunshineApr 27, 2016
  91. Christian CouderMay 1, 2016
  92. Eric SunshineApr 27, 2016
  93. Christian CouderMay 1, 2016
  94. 54/83 builtin/apply: make parse_chunk() return a negative integer on errorChristian Couder, Apr 24, 2016
  95. Eric SunshineMay 1, 2016
  96. Christian CouderMay 1, 2016
  97. 55/83 builtin/apply: make parse_single_patch() return -1 on errorChristian Couder, Apr 24, 2016
  98. Eric SunshineMay 1, 2016
  99. 56/83 apply: move 'struct apply_state' to apply.hChristian Couder, Apr 24, 2016
  100. 57/83 builtin/apply: libify parse_whitespace_option()Christian Couder, Apr 24, 2016
  101. 58/83 builtin/apply: libify parse_ignorewhitespace_option()Christian Couder, Apr 24, 2016
  102. 59/83 builtin/apply: move init_apply_state() to apply.cChristian Couder, Apr 24, 2016
  103. Eric SunshineMay 1, 2016
  104. Christian CouderMay 1, 2016
  105. 60/83 apply: libify init_apply_state()Christian Couder, Apr 24, 2016
  106. 61/83 builtin/apply: libify check_apply_state()Christian Couder, Apr 24, 2016
  107. Duy NguyenApr 25, 2016
  108. Christian CouderMay 1, 2016
  109. 62/83 builtin/apply: move check_apply_state() to apply.cChristian Couder, Apr 24, 2016
  110. 63/83 builtin/apply: make apply_all_patches() return -1 on errorChristian Couder, Apr 24, 2016
  111. Duy NguyenApr 25, 2016
  112. Christian CouderMay 1, 2016
  113. Eric SunshineMay 1, 2016
  114. Johannes SchindelinMay 2, 2016
  115. Christian CouderMay 3, 2016
  116. 64/83 builtin/apply: make parse_traditional_patch() return -1 on errorChristian Couder, Apr 24, 2016
  117. 65/83 builtin/apply: make gitdiff_verify_name() return -1 on errorChristian Couder, Apr 24, 2016
  118. Duy NguyenApr 25, 2016
  119. Christian CouderMay 1, 2016
  120. 66/83 builtin/apply: change die_on_unsafe_path() to check_unsafe_path()Christian Couder, Apr 24, 2016
  121. 67/83 builtin/apply: make build_fake_ancestor() return -1 on errorChristian Couder, Apr 24, 2016
  122. Eric SunshineMay 2, 2016
  123. Christian CouderMay 3, 2016
  124. 68/83 builtin/apply: make remove_file() return -1 on errorChristian Couder, Apr 24, 2016
  125. 69/83 builtin/apply: make add_conflicted_stages_file() return -1 on errorChristian Couder, Apr 24, 2016
  126. Eric SunshineMay 2, 2016
  127. Christian CouderMay 3, 2016
  128. 70/83 builtin/apply: make add_index_file() return -1 on errorChristian Couder, Apr 24, 2016
  129. 71/83 builtin/apply: make create_file() return -1 on errorChristian Couder, Apr 24, 2016
  130. 72/83 builtin/apply: make write_out_one_result() return -1 on errorChristian Couder, Apr 24, 2016
  131. 73/83 builtin/apply: make write_out_results() return -1 on errorChristian Couder, Apr 24, 2016
  132. Eric SunshineMay 2, 2016
  133. Christian CouderMay 3, 2016
  134. 74/83 builtin/apply: make try_create_file() return -1 on errorChristian Couder, Apr 24, 2016
  135. Eric SunshineMay 2, 2016
  136. Christian CouderMay 3, 2016
  137. 75/83 builtin/apply: make create_one_file() return -1 on errorChristian Couder, Apr 24, 2016
  138. 76/83 builtin/apply: rename option parsing functionsChristian Couder, Apr 24, 2016
  139. 77/83 apply: rename and move opt constants to apply.hChristian Couder, Apr 24, 2016
  140. Ramsay JonesApr 24, 2016
  141. Christian CouderApr 24, 2016
  142. Christian CouderApr 24, 2016
  143. Ramsay JonesApr 24, 2016
  144. Duy NguyenApr 25, 2016
  145. Christian CouderApr 25, 2016
  146. Johannes SchindelinApr 25, 2016
  147. Duy NguyenApr 25, 2016
  148. Christian CouderApr 25, 2016
  149. Duy NguyenApr 25, 2016
  150. Duy NguyenApr 25, 2016
  151. Christian CouderMay 4, 2016
  152. Duy NguyenMay 4, 2016
  153. Christian CouderMay 5, 2016
  154. Christian CouderMay 6, 2016
  155. Junio C HamanoMay 6, 2016
  156. Christian CouderMay 8, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.