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

From:
Omar Polo <op@omarpolo.com>
Subject:
send tag of deleted branch is still broken
To:
gameoftrees@openbsd.org
Date:
Fri, 27 May 2022 00:30:05 +0200

Download raw body.

Thread
Unfortunately sending tags from deleted branches is still broken.  The
test passes because the parent of the commit pointed by the tag is
reachable from the main branch, but if you add another one (or more)
commit in between then there is a "gap" and got fails to produce a
correct pack file.

I poked around in pack_create.c but i'm not sure what's the best way to
handle this (assuming we care.)  ideally we should include all the
reachable commits from the selected tags.

diff d6a28ffe187127e3247254d7e242bb52d66eb26b /home/op/w/got
blob - f96b6f089a1474bc624180cf278501ffb7f16af7
file + regress/cmdline/send.sh
--- regress/cmdline/send.sh
+++ regress/cmdline/send.sh
@@ -845,11 +845,17 @@ remote "origin" {
 EOF
 	got branch -r $testroot/repo foo
 
-	# modify alpha on branch foo
+	# modify beta on branch foo
 	got checkout -b foo $testroot/repo $testroot/wt > /dev/null
 	echo boo >> $testroot/wt/beta
 	(cd $testroot/wt && got commit -m 'changed beta on branch foo' \
 		> /dev/null)
+	echo buu >> $testroot/wt/beta
+	(cd $testroot/wt && got commit -m 'changed again beta on branch foo' \
+		> /dev/null)
+	echo baa >> $testroot/wt/beta
+	(cd $testroot/wt && got commit -m 'changed again beta on branch foo' \
+		> /dev/null)
 	local commit_id2=`git_show_branch_head $testroot/repo foo`
 
 	# tag HEAD commit of branch foo