summaryrefslogtreecommitdiff
path: root/pkg/git/patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/git/patch')
-rw-r--r--pkg/git/patch/0001-Enable-add.interactive.usebuiltin-by-default.patch24
-rw-r--r--pkg/git/patch/0001-revision-use-repository-from-rev_info-when-parsing-c.patch114
-rw-r--r--pkg/git/patch/0002-submodule-use-submodule-repository-when-preparing-su.patch45
-rw-r--r--pkg/git/patch/0003-Enable-add.interactive.usebuiltin-by-default.patch29
4 files changed, 24 insertions, 188 deletions
diff --git a/pkg/git/patch/0001-Enable-add.interactive.usebuiltin-by-default.patch b/pkg/git/patch/0001-Enable-add.interactive.usebuiltin-by-default.patch
new file mode 100644
index 00000000..b81b5135
--- /dev/null
+++ b/pkg/git/patch/0001-Enable-add.interactive.usebuiltin-by-default.patch
@@ -0,0 +1,24 @@
+From 998329082e2fa9452c817fe6be6bcc908c13e8a7 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Sat, 27 Jun 2020 01:09:58 -0700
+Subject: [PATCH] Enable add.interactive.usebuiltin by default
+
+---
+ builtin/add.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/builtin/add.c b/builtin/add.c
+index a825887c50..737ef23492 100644
+--- a/builtin/add.c
++++ b/builtin/add.c
+@@ -194,6 +194,7 @@ int run_add_interactive(const char *revision, const char *patch_mode,
+
+ if (use_builtin_add_i < 0) {
+ int experimental;
++ use_builtin_add_i = 1;
+ if (!git_config_get_bool("add.interactive.usebuiltin",
+ &use_builtin_add_i))
+ ; /* ok */
+--
+2.28.0
+
diff --git a/pkg/git/patch/0001-revision-use-repository-from-rev_info-when-parsing-c.patch b/pkg/git/patch/0001-revision-use-repository-from-rev_info-when-parsing-c.patch
deleted file mode 100644
index 0b7b448f..00000000
--- a/pkg/git/patch/0001-revision-use-repository-from-rev_info-when-parsing-c.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 212f02aeb196de20d91519e31af40b4170124143 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Sun, 21 Jun 2020 14:29:38 -0700
-Subject: [PATCH] revision: use repository from rev_info when parsing commits
-
-Since revision.c was the only user of the parse_commit_gently
-compatibility define, remove it from commit.h.
-
-Signed-off-by: Michael Forney <mforney@mforney.org>
----
- commit.h | 1 -
- revision.c | 18 +++++++++---------
- 2 files changed, 9 insertions(+), 10 deletions(-)
-
-diff --git a/commit.h b/commit.h
-index e901538909..a740e0461c 100644
---- a/commit.h
-+++ b/commit.h
-@@ -95,7 +95,6 @@ static inline int parse_commit_no_graph(struct commit *commit)
-
- #ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS
- #define parse_commit_internal(item, quiet, use) repo_parse_commit_internal(the_repository, item, quiet, use)
--#define parse_commit_gently(item, quiet) repo_parse_commit_gently(the_repository, item, quiet)
- #define parse_commit(item) repo_parse_commit(the_repository, item)
- #endif
-
-diff --git a/revision.c b/revision.c
-index 6aa7f4f567..74f66f79a0 100644
---- a/revision.c
-+++ b/revision.c
-@@ -439,7 +439,7 @@ static struct commit *handle_commit(struct rev_info *revs,
- if (object->type == OBJ_COMMIT) {
- struct commit *commit = (struct commit *)object;
-
-- if (parse_commit(commit) < 0)
-+ if (repo_parse_commit(revs->repo, commit) < 0)
- die("unable to parse commit %s", name);
- if (flags & UNINTERESTING) {
- mark_parents_uninteresting(commit);
-@@ -992,7 +992,7 @@ static void try_to_simplify_commit(struct rev_info *revs, struct commit *commit)
- ts->treesame[0] = 1;
- }
- }
-- if (parse_commit(p) < 0)
-+ if (repo_parse_commit(revs->repo, p) < 0)
- die("cannot simplify commit %s (because of %s)",
- oid_to_hex(&commit->object.oid),
- oid_to_hex(&p->object.oid));
-@@ -1037,7 +1037,7 @@ static void try_to_simplify_commit(struct rev_info *revs, struct commit *commit)
- * IOW, we pretend this parent is a
- * "root" commit.
- */
-- if (parse_commit(p) < 0)
-+ if (repo_parse_commit(revs->repo, p) < 0)
- die("cannot simplify commit %s (invalid %s)",
- oid_to_hex(&commit->object.oid),
- oid_to_hex(&p->object.oid));
-@@ -1105,7 +1105,7 @@ static int process_parents(struct rev_info *revs, struct commit *commit,
- parent = parent->next;
- if (p)
- p->object.flags |= UNINTERESTING;
-- if (parse_commit_gently(p, 1) < 0)
-+ if (repo_parse_commit_gently(revs->repo, p, 1) < 0)
- continue;
- if (p->parents)
- mark_parents_uninteresting(p);
-@@ -1136,7 +1136,7 @@ static int process_parents(struct rev_info *revs, struct commit *commit,
- struct commit *p = parent->item;
- int gently = revs->ignore_missing_links ||
- revs->exclude_promisor_objects;
-- if (parse_commit_gently(p, gently) < 0) {
-+ if (repo_parse_commit_gently(revs->repo, p, gently) < 0) {
- if (revs->exclude_promisor_objects &&
- is_promisor_object(&p->object.oid)) {
- if (revs->first_parent_only)
-@@ -3296,7 +3296,7 @@ static void explore_walk_step(struct rev_info *revs)
- if (!c)
- return;
-
-- if (parse_commit_gently(c, 1) < 0)
-+ if (repo_parse_commit_gently(revs->repo, c, 1) < 0)
- return;
-
- if (revs->sort_order == REV_SORT_BY_AUTHOR_DATE)
-@@ -3334,7 +3334,7 @@ static void indegree_walk_step(struct rev_info *revs)
- if (!c)
- return;
-
-- if (parse_commit_gently(c, 1) < 0)
-+ if (repo_parse_commit_gently(revs->repo, c, 1) < 0)
- return;
-
- explore_to_depth(revs, commit_graph_generation(c));
-@@ -3416,7 +3416,7 @@ static void init_topo_walk(struct rev_info *revs)
- struct commit *c = list->item;
- uint32_t generation;
-
-- if (parse_commit_gently(c, 1))
-+ if (repo_parse_commit_gently(revs->repo, c, 1))
- continue;
-
- test_flag_and_insert(&info->explore_queue, c, TOPO_WALK_EXPLORED);
-@@ -3480,7 +3480,7 @@ static void expand_topo_walk(struct rev_info *revs, struct commit *commit)
- if (parent->object.flags & UNINTERESTING)
- continue;
-
-- if (parse_commit_gently(parent, 1) < 0)
-+ if (repo_parse_commit_gently(revs->repo, parent, 1) < 0)
- continue;
-
- generation = commit_graph_generation(parent);
---
-2.27.0
-
diff --git a/pkg/git/patch/0002-submodule-use-submodule-repository-when-preparing-su.patch b/pkg/git/patch/0002-submodule-use-submodule-repository-when-preparing-su.patch
deleted file mode 100644
index 5a168d13..00000000
--- a/pkg/git/patch/0002-submodule-use-submodule-repository-when-preparing-su.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From a6b653527f20282c3eeff86551d4ca49b81861e3 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Sun, 21 Jun 2020 14:31:53 -0700
-Subject: [PATCH] submodule: use submodule repository when preparing summary
-
-This prevents looking up a submodule commit in the outer repository's
-commit graph, causing a fatal error.
-
-Signed-off-by: Michael Forney <mforney@mforney.org>
----
- submodule.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/submodule.c b/submodule.c
-index e2ef5698c8..937c4f4fdc 100644
---- a/submodule.c
-+++ b/submodule.c
-@@ -438,13 +438,13 @@ void handle_ignore_submodules_arg(struct diff_options *diffopt,
- */
- }
-
--static int prepare_submodule_summary(struct rev_info *rev, const char *path,
-+static int prepare_submodule_summary(struct repository *r, struct rev_info *rev, const char *path,
- struct commit *left, struct commit *right,
- struct commit_list *merge_bases)
- {
- struct commit_list *list;
-
-- repo_init_revisions(the_repository, rev, NULL);
-+ repo_init_revisions(r, rev, NULL);
- setup_revisions(0, NULL, rev, NULL);
- rev->left_right = 1;
- rev->first_parent_only = 1;
-@@ -632,7 +632,7 @@ void show_submodule_summary(struct diff_options *o, const char *path,
- goto out;
-
- /* Treat revision walker failure the same as missing commits */
-- if (prepare_submodule_summary(&rev, path, left, right, merge_bases)) {
-+ if (prepare_submodule_summary(sub, &rev, path, left, right, merge_bases)) {
- diff_emit_submodule_error(o, "(revision walker failed)\n");
- goto out;
- }
---
-2.27.0
-
diff --git a/pkg/git/patch/0003-Enable-add.interactive.usebuiltin-by-default.patch b/pkg/git/patch/0003-Enable-add.interactive.usebuiltin-by-default.patch
deleted file mode 100644
index 8fcec6a5..00000000
--- a/pkg/git/patch/0003-Enable-add.interactive.usebuiltin-by-default.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From e85b8d3ae6b808e48a1ffd530cf51fee083c0766 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Sat, 27 Jun 2020 01:09:58 -0700
-Subject: [PATCH] Enable add.interactive.usebuiltin by default
-
----
- builtin/add.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/builtin/add.c b/builtin/add.c
-index 298e0114f9..565fdab636 100644
---- a/builtin/add.c
-+++ b/builtin/add.c
-@@ -192,9 +192,11 @@ int run_add_interactive(const char *revision, const char *patch_mode,
- int use_builtin_add_i =
- git_env_bool("GIT_TEST_ADD_I_USE_BUILTIN", -1);
-
-- if (use_builtin_add_i < 0)
-+ if (use_builtin_add_i < 0) {
-+ use_builtin_add_i = 1;
- git_config_get_bool("add.interactive.usebuiltin",
- &use_builtin_add_i);
-+ }
-
- if (use_builtin_add_i == 1) {
- enum add_p_mode mode;
---
-2.27.0
-