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

help understanding git diff output

From
ESEugene Sajine <euguess@gmail.com>
Date
Jan 27, 2011, 22:11 UTC
Message-ID
<AANLkTi=H1LuGfQC8+u83So+6XyOqJxHJ3zsdgs4JTdkc@mail.gmail.com>
Hi,
Could you please  help understanding the output of git diff.
I have two branches with this type or relationship:

0-a-b-c-d-e-f-g (branch1) \a1-a2-a3-b-c-d1-d2-e-f1-f2-g (branch2)

Where commits a1,a2 and a3 as well as other numbered commits in branch2 are the split version of their counterparts in branch1. The the branch2 was created by creating the branch2 from branch one and rebased on 0 with few commits being cplit up during the rebase.

I.e. the resulting state is the same for both branches.
I get empty diff when i execute:
$git diff branch1..branch2
and i also get empty diff when running
$git diff branch2..branch1

What i cannot wrap my mind around is why the command below with symmetric difference range gives me non-empty diff

$git diff branch1...branch2
Please, advise

Thanks a lot, Eugene

Next: Junio C Hamano
Message 1 of 3 in “help understanding git diff output”
  1. Eugene SajineJan 27, 2011
  2. Junio C HamanoJan 27, 2011
  3. Eugene SajineJan 27, 2011

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.