Commit 4d7cb1b2be2593d1acbdfbfbab1d9c642a0017ef
Special case push with no packfile
Avoid index-pack error on pushing just to delete a branchCharles Lehner committed on 8/1/2016, 6:04:27 AM
Parent: 8f41b2fb860658081bf79a1d8418d90a8ca11a70
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -397,8 +397,15 @@ | ||
397 | 397 | if (err) return cb(err) |
398 | 398 | if (updates.length === 0) return cb(true) |
399 | 399 | var progress = progressObjects(options) |
400 | 400 | |
401 | + var hasPack = !updates.every(function (update) { | |
402 | + return update.new === null | |
403 | + }) | |
404 | + if (!hasPack) { | |
405 | + return repo.update(pull.values(updates), pull.empty(), done()) | |
406 | + } | |
407 | + | |
401 | 408 | if (repo.uploadPack) { |
402 | 409 | var idxCb = done() |
403 | 410 | indexPack(lines.passthrough, function (err, idx, packfileFixed) { |
404 | 411 | if (err) return idxCb(err) |
Built with git-ssb-web