Robbie Iannucci reported that "git merge" that fast-forwards fails silently when a competing or stale index.lock is present in recent Git: $ git merge --ff-only master; echo $? Updating 454cb6bd52..8d7a455ed5 1 $ exit Did the update happen? We used to give "fatal: Unable to create ..." followed by "Another git process seems to be running..." advice, and that would have helped the user from the confusion. This was because there were only two choices available to the callers of the lockfile API--they can either ask it to die with message when the lock cannot be acquired, or ask it to silently return -1 to signal an error. The recent "libify sequencer" topic turned many existing "please die" calls to "just silently return -1", and while it added new "unable to lock" error messages to most of them, one spot didn't get any and now is allowed to just die silently. This series should fix it: - 1/3 is something I noticed while reading the existing callers of the lockfile API, and is not a new issue with "libify sequencer" topic. - 2/3 gives a new third option to callers of the lockfile API; they can now say "please emit the usual error message upon failing to acquire the lock, but give control back to me". - 3/3 uses the new option to resurrect the message. Junio C Hamano (3): wt-status: implement opportunisitc index update correctly hold_locked_index(): align error handling with hold_lockfile_for_update() lockfile: LOCK_REPORT_ON_ERROR apply.c | 2 +- builtin/add.c | 2 +- builtin/am.c | 6 +++--- builtin/checkout-index.c | 2 +- builtin/checkout.c | 4 ++-- builtin/clone.c | 2 +- builtin/commit.c | 8 ++++---- builtin/merge.c | 6 +++--- builtin/mv.c | 2 +- builtin/read-tree.c | 2 +- builtin/reset.c | 2 +- builtin/rm.c | 2 +- builtin/update-index.c | 1 + lockfile.c | 12 ++++++++++-- lockfile.h | 8 +++++++- merge-recursive.c | 2 +- merge.c | 2 +- read-cache.c | 7 ++----- rerere.c | 2 +- sequencer.c | 2 +- t/helper/test-scrap-cache-tree.c | 2 +- wt-status.c | 7 ++++--- 22 files changed, 49 insertions(+), 36 deletions(-) -- 2.11.0-274-g0631465056