Skip to content

fix error handling in checkout-index

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2checkout-index: drop error message from empty --stage=allbuiltin/checkout-index.c t/t2004-checkout-cache-temp.sh+17 -10 replies
2/2checkout-index: propagate errors to exit codebuiltin/checkout-index.c t/t2004-checkout-cache-temp.sh t/t2006-checkout-index-basic.sh+18 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] fix error handling in checkout-index

While working on another topic, I noticed that "git checkout-index -- path" does not propagate errors through its exit code. It has been that way for so long that I almost wondered if it is intentional, but I'm pretty sure it's not. A bit scary, though. :)

[1/2]: checkout-index: drop error message from empty --stage=all [2/2]: checkout-index: propagate errors to exit code

 builtin/checkout-index.c        | 16 ++++++++++++++--
 t/t2004-checkout-cache-temp.sh  | 10 +++++++++-
 t/t2006-checkout-index-basic.sh | 11 +++++++++++
 3 files changed, 34 insertions(+), 3 deletions(-)

-Peff