git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [Bug report] git cherry-pick silently ignores error whereas git apply fails for hunk apply

From
Bhavik Bavishi <bhavikdbavishi@gmail.com>
Date
Nov 7, 2025, 08:35 UTC
Message-ID
<CAEyHQXWd4kN=ehWh0Y7xNnPGk3ofXEc4=PvSYaZM91TFyLtnpg@mail.gmail.com>
In-Reply-To
<e1fede83-bed0-49e9-84a0-f026b9df6039@kdbg.org>

git apply --3way --verbose ../test.patch ; echo $? Checking patch mango/connectors/apple/ops/query_check_hierarchy_op.cc... Applied patch to 'mango/connectors/apple/ops/query_check_hierarchy_op.cc' cleanly. Checking patch mango/connectors/container/loc_base/util.cc... Applied patch to 'mango/connectors/container/loc_base/util.cc' cleanly. Checking patch mango/connectors/container/loc_base/util.h... Applied patch to 'mango/connectors/container/loc_base/util.h' cleanly. Checking patch mango/main/http_test_ops/new_entity_op.cc... Applied patch to 'mango/main/http_test_ops/new_entity_op.cc' cleanly. Checking patch mango/main/main.cc... Applied patch to 'mango/main/main.cc' cleanly. Checking patch mango/main/ops/refresh_apple_entity_hierarchy_op.cc... Applied patch to 'mango/main/ops/refresh_apple_entity_hierarchy_op.cc' cleanly. Checking patch mango/main/validation_util.cc... Applied patch to 'mango/main/validation_util.cc' cleanly. Checking patch mango/conn/ops/apple_box_storage_package_op.cc... Applied patch to 'mango/conn/ops/apple_box_storage_package_op.cc' cleanly. Checking patch mango/utils/apple_utils.cc... Applied patch to 'mango/utils/apple_utils.cc' cleanly. Checking patch mango/utils/apple_utils.h... Applied patch to 'mango/utils/apple_utils.h' cleanly. Applied patch mango/connectors/apple/ops/query_check_hierarchy_op.cc cleanly. Applied patch mango/connectors/container/loc_base/util.cc cleanly. Applied patch mango/connectors/container/loc_base/util.h cleanly. Applied patch mango/main/http_test_ops/new_entity_op.cc cleanly. Applied patch mango/main/main.cc cleanly. Applied patch mango/main/ops/refresh_apple_entity_hierarchy_op.cc cleanly. Applied patch mango/main/validation_util.cc cleanly. Applied patch mango/conn/ops/apple_box_storage_package_op.cc cleanly. Applied patch mango/utils/apple_utils.cc cleanly. Applied patch mango/utils/apple_utils.h cleanly. 0

I've compare the file content of `mango/utils/apple_utils.cc` for `git apply --3way` and `git cherry-pick` is same

On Fri, Nov 7, 2025 at 12:07 PM Johannes Sixt <j6t@kdbg.org> wrote:
Show 22 quoted lines
>
> Am 07.11.25 um 05:39 schrieb Bhavik Bavishi:
> > What did you do before the bug happened? (Steps to reproduce your issue)
> >> ran git cherry-pick command, which went fine without any error, but missed to apply change
> >> created patch with 'git fromat-patch' and applied with 'git apply --verbose', which error for the issue
> >
> > What did you expect to happen? (Expected behavior)
> >> git cherry-pick should fail, since it failed to apply hunk
> >
> > What happened instead? (Actual behavior)
> >> git cherry-pick completed successfully without any error
> >
> > What's different between what you expected and what actually happened?
> >> git apply --verbose, failed with error about the issue, whereas git cherry-pick didn't fail for the same
>
>
> If you use `git apply --3way`, does it still fail, or does it succeed
> and does it produce the same result as `git cherry-pick` or a different
> result?
>
> -- Hannes
>
Previous: Johannes SixtNext: Bhavik Bavishi
Message 3 of 7 in “[Bug report] git cherry-pick silently ignores error whereas git apply fails for hunk apply”
  1. Bhavik BavishiNov 7, 2025
  2. Johannes SixtNov 7, 2025
  3. Bhavik BavishiNov 7, 2025
  4. Bhavik BavishiNov 8, 2025
  5. Johannes SixtNov 8, 2025
  6. Chris TorekNov 8, 2025
  7. Bhavik BavishiNov 9, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.