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

diff --diff-filter on modified but locally deleted files

From
RDRobert Dailey <rcdailey.lists@gmail.com>
Date
Aug 17, 2016, 18:04 UTC
Message-ID
<CAHd499D50TLMYtAovTF80ev0=2u=9yyMNcq6-he3Ba2kXzqW9g@mail.gmail.com>

My use case is that I do a merge from branch A to branch B. Branch A modified a file which is already deleted on B some time before the merge.

When I do a `git status -sb`, these locally deleted but remotely modified files show up as "DU".

I want to invoke git status or diff (or something else) to get a list of these specific conflicts (locally deleted, remotely modified). I tried this:

$ git diff --diff-filter=D --name-status

This gave me no results. I also tried adding --cached, didn't make a difference. If I just do this:

$ git diff --name-status

This lists those files as just U instead of DU. So I'm not sure where the "D" is coming from in this case.

Is there a way I can get a list of these specific conflicts? I'd like to rely on working/index status for this if possible, since as I resolve these conflicts I want the list to shorten and only show unresolved conflicts of this type. Which rules out a diff range between B...A that I could do.

Next: Junio C Hamano
Message 1 of 3 in “diff --diff-filter on modified but locally deleted files”
  1. Robert DaileyAug 17, 2016
  2. Junio C HamanoAug 17, 2016
  3. Robert DaileyAug 17, 2016

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.