do not simplify the history by first-parent
authorHiltjo Posthuma <hiltjo@codemadness.org>
Wed, 5 May 2021 17:15:58 +0000 (19:15 +0200)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Wed, 5 May 2021 17:15:58 +0000 (19:15 +0200)
Reference:
https://libgit2.org/libgit2/#HEAD/group/revwalk/git_revwalk_simplify_first_parent

Noticed on merge commits on:
https://git.simple-cc.org/scc/

Reported by quinq, thanks!

stagit-index.c
stagit.c

index 11a6017f4f86a2e1e74814548c09ec894d909398..84785a9e8395e37aaae68df36908bef26e73a8d5 100644 (file)
@@ -101,7 +101,6 @@ writelog(FILE *fp)
 
        git_revwalk_new(&w, repo);
        git_revwalk_push_head(w);
-       git_revwalk_simplify_first_parent(w);
 
        if (git_revwalk_next(&id, w) ||
            git_commit_lookup(&commit, repo, &id)) {
index 488b653176bf134837063bd7533fbe486523cc6c..d8fbc642c166b06f33e0ec014647a2b363d6804a 100644 (file)
--- a/stagit.c
+++ b/stagit.c
@@ -743,7 +743,6 @@ writelog(FILE *fp, const git_oid *oid)
 
        git_revwalk_new(&w, repo);
        git_revwalk_push(w, oid);
-       git_revwalk_simplify_first_parent(w);
 
        while (!git_revwalk_next(&id, w)) {
                relpath = "";
@@ -881,7 +880,6 @@ writeatom(FILE *fp, int all)
        if (all) {
                git_revwalk_new(&w, repo);
                git_revwalk_push_head(w);
-               git_revwalk_simplify_first_parent(w);
                for (i = 0; i < m && !git_revwalk_next(&id, w); i++) {
                        if (!(ci = commitinfo_getbyoid(&id)))
                                break;