git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Elijah Newren <newren@gmail.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: Is fetch.writeCommitGraph (and thus features.experimental) meant to work in the presence of shallow clones?
Date: Tue, 14 Apr 2020 16:31:19 -0400	[thread overview]
Message-ID: <aca12331-f8e3-28a2-acb6-df9d7e2e70e1@gmail.com> (raw)
In-Reply-To: <CABPp-BHGubUX5o9KsQaoh_UFjFh2PaMkkJhCao+5LGnFc0dQNg@mail.gmail.com>

On 4/14/2020 4:22 PM, Elijah Newren wrote:
> Hi,
> 
> I was building a version of git for internal use, and thought I'd try
> turning on features.experimental to get more testing of it.  The
> following test error in the testsuite scared me, though:
> 
> t5537.9 (fetch --update-shallow):
> 
> ...
> + git fetch --update-shallow ../shallow/.git refs/heads/*:refs/remotes/shallow/*
> remote: Enumerating objects: 18, done.
> remote: Counting objects: 100% (18/18), done.
> remote: Compressing objects: 100% (6/6), done.
> remote: Total 16 (delta 0), reused 6 (delta 0), pack-reused 0
> Unpacking objects: 100% (16/16), 1.16 KiB | 1.17 MiB/s, done.
> From ../shallow/
>  * [new branch]      master     -> shallow/master
>  * [new tag]         heavy-tag  -> heavy-tag
>  * [new tag]         light-tag  -> light-tag
> error: Could not read ac67d3021b4319951fb176469d7732e6914530c5
> error: Could not read ac67d3021b4319951fb176469d7732e6914530c5
> error: Could not read ac67d3021b4319951fb176469d7732e6914530c5
> fatal: unable to parse commit ac67d3021b4319951fb176469d7732e6914530c5
> 
> Passing -c fetch.writeCommitGraph=false to the fetch command in that
> test makes it pass.
> 
> There were also a couple other tests that failed with
> features.experimental=true (in t5500), but those weren't scary -- they
> were just checking exact want/have lines and features.experimental is
> intended to change those.  This test from t5537 was the only one that
> showed some unexpected fatal error.

Well, commit-graphs are not supposed to do anything if we have
shallow clones. We definitely don't load a commit-graph in that
case. Seems like we need an extra check in write_commit_graph()
to stop writing in the presence of shallow commits.

-Stolee

  parent reply	other threads:[~2020-04-14 20:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 20:22 Is fetch.writeCommitGraph (and thus features.experimental) meant to work in the presence of shallow clones? Elijah Newren
2020-04-14 20:31 ` Taylor Blau
2020-04-14 20:31 ` Derrick Stolee [this message]
2020-04-14 23:50   ` Taylor Blau
2020-04-15  0:07     ` Taylor Blau
2020-04-15 11:55     ` Derrick Stolee
2020-04-15 15:55       ` Taylor Blau
2020-04-15 18:07       ` Elijah Newren
2020-04-16  2:05     ` Jonathan Tan
2020-04-15 20:54 ` Jonathan Nieder
2020-04-15 22:54   ` Elijah Newren
2020-04-16  0:47     ` Taylor Blau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aca12331-f8e3-28a2-acb6-df9d7e2e70e1@gmail.com \
    --to=stolee@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).