git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] report lock error in write_index
@ 2025-05-21  8:35 Han Young
  2025-05-21  8:35 ` [PATCH 1/2] read-cache: report lock error when refreshing index Han Young
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Han Young @ 2025-05-21  8:35 UTC (permalink / raw)
  To: git; +Cc: Han Young

In the repo_refresh_and_write_index of read-cache.c, we return -1 to
indicate that writing the index to disk failed.
However, callers do not use this information. Commands such as stash print
  "could not write index"
and then exit, which does not help to discover the exact problem.

We can let repo_hold_locked_index print the error message if the locking
failed.

The second commit is to provide a more consistent error message in various
commands when writing index failed. Currently, there are 10 uses of
"could not write index", two uses of "unable to write index file" and
"Unable to write index.". Change them to the most used "could not write index".

Han Young (2):
  read-cache: report lock error when refreshing index
  read-cache: unify write index error message

 builtin/am.c         | 2 +-
 builtin/commit.c     | 2 +-
 builtin/merge.c      | 2 +-
 merge-ort-wrappers.c | 2 +-
 read-cache.c         | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-21  9:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21  8:35 [PATCH 0/2] report lock error in write_index Han Young
2025-05-21  8:35 ` [PATCH 1/2] read-cache: report lock error when refreshing index Han Young
2025-05-21  8:35 ` [PATCH 2/2] read-cache: unify write index error message Han Young
2025-05-21  9:18 ` [PATCH 0/2] report lock error in write_index Han Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).