On 9/7/2018 2:29 PM, Ævar Arnfjörð Bjarmason wrote:
-void write_commit_graph_reachable(const char *obj_dir, int append);
+void write_commit_graph_reachable(const char *obj_dir, int append,
+                                 int report_progress);
  void write_commit_graph(const char *obj_dir,
                        struct string_list *pack_indexes,
                        struct string_list *commit_hex,
-                       int append);
+                       int append, int report_progress);
int verify_commit_graph(struct repository *r, struct commit_graph *g);

Junio,

The above prototype change seems to have created a semantic conflict with ds/commit-graph-tests (859fdc "commit-graph: define GIT_TEST_COMMIT_GRAPH") because when GIT_TEST_COMMIT_GRAPH is set, we call write_commit_graph_reachable() but the final parameter was resolved to be "1" instead of "0".

This causes t3420-rebase-autostash.sh to fail, as that test watches the full output of the rebase command, including commit runs. The following patch fixes the problem, but could probably be squashed into a merge or other commit.

Thanks,

-Stolee

-->8--

From: Derrick Stolee <dsto...@microsoft.com>
Date: Fri, 21 Sep 2018 19:57:36 +0000
Subject: [PATCH] commit: quietly write commit-graph in tests

The GIT_TEST_COMMIT_GRAPH environment variable causes git-commit to
write a commit-graph file on every execution. Recently, we added
progress output when writing the commit-graph. This conflicts with
some expected output during some tests, so avoid writing progress
if writing a commit-graph this way.

Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
 builtin/commit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/commit.c b/builtin/commit.c
index 2a49ab4917..764664d832 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1660,7 +1660,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)                       "not exceeded, and then \"git reset HEAD\" to recover."));

        if (git_env_bool(GIT_TEST_COMMIT_GRAPH, 0))
- write_commit_graph_reachable(get_object_directory(), 0, 1);
+ write_commit_graph_reachable(get_object_directory(), 0, 0);

        rerere(0);
        run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
--
2.19.0

Reply via email to