"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: got send failure
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Sat, 28 Aug 2021 19:37:00 +0200

Download raw body.

Thread
On Sat, Aug 28, 2021 at 06:48:08PM +0200, Christian Weisgerber wrote:
> Stefan Sperling:
> 
> > Can you repeat this with the following patch applied?
> > Does it print anything regarding the missing blob or tree objects
> > that this blob depends on being included?
> > 
> > Any object to be included in the pack should pass through add_meta()
> > with a non-NULL v pointer.
> 
> add_meta: v=0x7f7ffffe70b0 id=7de2767444a19ea67be04143f1677a1e6e9a08d7 type=3 path=histedit.sh
> 
> So that looks fine, I guess.
> 
> I'm attaching the whole typescript.

Can you run it once again with this path and send me the pack file please?

I suppose either the object is indeed missing from the pack file or
we are doing something in the pack which Git's parser does not expect.

diff 27b75514d9b1c8e9f188ef9c483760647a8c1b72 /home/stsp/src/got
blob - 110f62e7d18931540ea150d0169e082cd0227e48
file + lib/send.c
--- lib/send.c
+++ lib/send.c
@@ -458,6 +458,7 @@ got_send_pack(const char *remote_name, struct got_path
 	struct pack_progress_arg ppa;
 	uint8_t packsha1[SHA1_DIGEST_LENGTH];
 	FILE *packfile = NULL;
+	char *path_packfile = NULL;
 
 	TAILQ_INIT(&refs);
 	TAILQ_INIT(&have_refs);
@@ -548,11 +549,10 @@ got_send_pack(const char *remote_name, struct got_path
 		}
 	}
 
-	packfile = got_opentemp();
-	if (packfile == NULL) {
-		err = got_error_from_errno("got_opentemp");
+	err  = got_opentemp_named(&path_packfile, &packfile, "/tmp/got-send-pack");
+	if (err)
 		goto done;
-	}
+	fprintf(stderr, "%s: pack file %s\n", __func__, path_packfile);
 
 	err = realloc_ids(&our_ids, &nalloc_ours, 0);
 	if (err)
@@ -850,5 +850,6 @@ done:
 		free(their_ids[i]);
 	free(their_ids);
 	free(my_id);
+	free(path_packfile);
 	return err;
 }