abhinav / abhinav/git-spice

'gs repo sync' left repo in broken state with concurrent write

オープン
#659 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Go
スター
762
フォーク
72
平均マージ
18時間 24分
マージ済み PR(30日)
28

説明

A user reported the following:

```
$ gs repo sync
INF master: pulled 19 new commit(s)
INF feat1: #330613 was merged
FTL gs: delete merged branches: rebase: exit status 1
stderr:
error: update_ref failed for ref 'HEAD': cannot lock ref 'HEAD': Unable to create '[..]/.git/HEAD.lock': File exists.

Another git process [..]
error: could not detach HEAD
```

It looks like the rebase operation performed as part of deleting merged branches ran afoul of another process messing with the Git branch.

After the error, the user was left with a working tree at the state of the master branch, but HEAD pointing to the branch we failed to delete.

I don't think we can guard against HEAD.lock/index.lock conflicts, but perhaps there should be more recovery here.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。