]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'tb/reset-shallow'
authorJunio C Hamano <gitster@pobox.com>
Fri, 1 May 2020 20:39:51 +0000 (13:39 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 1 May 2020 20:39:51 +0000 (13:39 -0700)
Fix in-core inconsistency after fetching into a shallow repository
that broke the code to write out commit-graph.

* tb/reset-shallow:
  shallow.c: use '{commit,rollback}_shallow_file'
  t5537: use test_write_lines and indented heredocs for readability

1  2 
builtin/receive-pack.c
fetch-pack.c
shallow.c
t/t5537-fetch-shallow.sh

Simple merge
diff --cc fetch-pack.c
Simple merge
diff --cc shallow.c
Simple merge
index b57209c84fcad43ce728dd8bfa24674caa64c37c,126654817d3186704024e09b5459f52809ec46f0..d427a2d7f7a1c40dd77ac3809af0a15187870e32
@@@ -131,16 -108,12 +108,12 @@@ test_expect_success 'fetch that require
        git init notshallow &&
        (
        cd notshallow &&
 -      git fetch ../shallow/.git refs/heads/*:refs/remotes/shallow/*&&
 +      git fetch ../shallow/.git refs/heads/*:refs/remotes/shallow/* &&
        git for-each-ref --format="%(refname)" >actual.refs &&
-       cat <<EOF >expect.refs &&
- refs/remotes/shallow/no-shallow
- EOF
+       echo refs/remotes/shallow/no-shallow >expect.refs &&
        test_cmp expect.refs actual.refs &&
        git log --format=%s shallow/no-shallow >actual &&
-       cat <<EOF >expect &&
- no-shallow
- EOF
+       echo no-shallow >expect &&
        test_cmp expect actual
        )
  '