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

git-bugreport-2025-02-21-1642

From
YKYurii Kartsev <jpro.wrk@gmail.com>
Date
Feb 21, 2025, 22:03 UTC
Message-ID
<6799803c-f782-414a-9599-5baf6cb879ff@gmail.com>
Dear Git Team!

My name is Yury. Please find a bug report attached. Basically, "git diff" hides one of the differences during merge. Everything, including a sample repository is there in order to reproduce.

I'm using git version 2.39.5 (Apple Git-154), as part of XCode in the latest macOS. Could not test in the latest version because could not build it locally (due to some gettext issues that I could not overcome, because building gettext locally also failed).

Adding contents of the "git-bugreport-2025-02-21-1642.txt" below. Thank you in advance!

------ git-bugreport-2025-02-21-1642.txt:

Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
1. Merge branch 'branch' into 'main' by being in branch 'main' and 
typing 'git merge branch'.
2. Run 'git diff'.
3. Observe 2 diffs, both related to the conflict, but one diff is 
missing (changes from commit "Version update").
4. Run 'git add pom.xml'
5. Run 'git diff --cached'
6. Observe changes from commit "Version update" being shown now.
What did you expect to happen? (Expected behavior)

Changes from commit "Version update" should have been displayed in the first 'git diff'.

What happened instead? (Actual behavior)

Changes from commit "Version update" were not displayed in the first 'git diff', but only after staging pom.xml and typing 'git diff --cached'

What's different between what you expected and what actually happened?
Changes from commit "Version update" are missing in first "git diff" output.
Anything else you want to add:

Please see attached history.txt for observing terminal output. Also attaching an example repository in folder "git-bug-merge" which you can use to reproduce the issue. Just follow the steps to reproduce from above.

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info] git version: git version 2.39.5 (Apple Git-154) cpu: arm64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh feature: fsmonitor--daemon uname: Darwin 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan  2 20:24:16 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6000 arm64 compiler info: clang: 16.0.0 (clang-1600.0.26.6) libc info: no libc information available $SHELL (typically, interactive shell): /bin/bash

[Enabled Hooks]
Message 1 of 1 in “git-bugreport-2025-02-21-1642”
  1. Yurii KartsevFeb 21, 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.