commit ce2bf7b7c9058374563c6db8608dbab9df2bba7d from: Stefan Sperling date: Sun May 29 17:51:33 2022 UTC fix a bug in findwixt() which caused pack files with missing parent commits The 'nskip' variable is supposed to reflect commits which are waiting on the queue and have the 'skip' color. Only increment 'nskip' when adding such commits to the queue. Problem observed with got send -T and a tag pointing to a deleted branch. Test to reproduce the bug written by op@. commit - d6a28ffe187127e3247254d7e242bb52d66eb26b commit + ce2bf7b7c9058374563c6db8608dbab9df2bba7d blob - bb8a404c064277aaedb6f0a5bd168e7765442df7 blob + 16709d206a932e5931f9b6441439d71eace4473d --- lib/pack_create.c +++ lib/pack_create.c @@ -1292,7 +1292,6 @@ paint_commits(int *ncolored, struct got_object_id_queu err = paint_commit(qid, COLOR_SKIP); if (err) goto done; - nskip++; } else (*ncolored)++; err = got_object_idset_add(keep, &qid->id, NULL); @@ -1308,7 +1307,6 @@ paint_commits(int *ncolored, struct got_object_id_queu err = paint_commit(qid, COLOR_SKIP); if (err) goto done; - nskip++; } else (*ncolored)++; err = got_object_idset_add(drop, &qid->id, NULL); blob - f96b6f089a1474bc624180cf278501ffb7f16af7 blob + 1b07381441f738fff178f9bd80e3043f168dc0cb --- 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 beta again on branch foo' \ > /dev/null) + echo baa >> $testroot/wt/beta + (cd $testroot/wt && got commit -m 'changed beta again on branch foo' \ + > /dev/null) local commit_id2=`git_show_branch_head $testroot/repo foo` # tag HEAD commit of branch foo