5

我需要使用git bundle. 这工作了一段时间,现在开始失败并出现奇怪的错误。

我试图在本地环境中重现这种情况: ~/git 包含源存储库, ~/git2 包含应该更新的目标存储库。

$ cd git
$ git bundle create b-all --all --since=20.days
$ cd ../git2
$ git bundle verify ../git/b-all
[...]
The bundle requires these 18 refs:
[...]
../git/b-all is okay
$ git bundle unbundle ../git/b-all
fatal: pack has 35 unresolved deltas
error: index-pack died
$ git fetch ../git/b-all refs/*:refs/foo/*
[same error]

我试图用以下奇怪的结果最小化这个例子:

$ git bundle create b-all --all                  --since=20.days   #error
$ git bundle create b-to --tags --remotes=origin --since=20.days   #error
$ git bundle create b-t  --tags                  --since=20.days   #works
$ git bundle create b-o         --remotes=origin --since=20.days   #works

在所有情况下都git bundle create可以正常工作并且git bundle verify很高兴,但在错误情况下,git bundle unpack由于未解决的增量而死亡。

知道如何进一步调试吗?


评论:

$ git rev-list --no-walk --remotes=origin|tee l-o|wc -l
354
$ git rev-list --no-walk --tags|tee l-t|wc -l
1120 #our CI server is pretty active here.
$ git rev-list --no-walk --remotes=origin --tags|tee l-ot|wc -l
1417 
$ echo $((354+1120))
1474 # some commits do have both a tag and a branch
$ diff <(sort -u l-ot) <(sort -u l-o l-t)
$ # no difference
4

0 回答 0