hub
hub copied to clipboard
hub sync crashes if branch disappears during iteration
Running hub sync, I see
warning: `gssdp-0.14.15' seems to contain unpushed commits
Once hub sync completes, I kick it off again. Before it gets to gssdp-0.14.15, while it's listing other branches with unpushed commits, in another shell I delete gssdp-0.14.15:
$ git branch -D gssdp-0.14.15
Deleted branch gssdp-0.14.15 (was 265d3fc8da).
At that point, when hub sync reaches gssdp-0.14.5 in its iteration, it crashes:
...
warning: `googler-2.5.1' seems to contain unpushed commits
warning: `gosu-1.13.5' seems to contain unpushed commits
warning: `gpac-0.6.1' seems to contain unpushed commits
warning: `gputils-1.4.2-1' seems to contain unpushed commits
exit status 128
So it may benefit from sort of locking or at least shouldn't assume the branch will still exist when it gets to it.
Interesting; thanks for reporting this. Yes, I think hub should just ignore a branch that was removed since the sync operation was started.
+1 on this