Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5939465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:49:56+00:00 2026-05-22T15:49:56+00:00

Some options in git diff , for instance –name-status , cause the output of

  • 0

Some options in git diff, for instance --name-status, cause the output of a status letter next to a file name. They are:

A, C, D, M, R, T, U, X, B

… and they mean

Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R),
type (i.e. regular file, symlink, submodule, …) changed (T),
Unmerged (U), Unknown (X), or pairing Broken (B).

Question: how should the X and B statuses be interpreted, and which circumstances lead to their appearance? Can you provide a series of steps leading to such statuses appearing in the output of git-diff, and possibly ways to fix them?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T15:49:57+00:00Added an answer on May 22, 2026 at 3:49 pm

    The B “broken pair” status never appears directly in --name-status output, it is only useful as an argument to the option --diff-filter when also using the option -B (--break-rewrites). Using it as a filter selects files that have had at least a certain percentage of their content deleted or changed.

    This “breaking” is not be terribly useful with --name-status since the point of “breaking” is mostly to change how the diff text is generated: it eliminates context lines (unchanged lines) from the diff output instead of generating the add and remove lines that would be required around whatever “random” common subsequences the diff algorithm happened to find.

    git init broken-pairs
    cd broken-pairs
    nums() { seq "$1" "$2" 2>/dev/null || jot $(($2 - $1 + 1)) "$1"; }
    nums   0  99 > a
    nums 100 199 > b
    git add a b
    git commit -ma=0-99,b=100-199
    nums 200 299 > a
    { nums 100 149; nums 350 399; } > b
    git diff --name-status --diff-filter=B             # selects nothing
    git diff --name-status --diff-filter=B -B          #         M100    a
    git diff --name-status --diff-filter=B -B/50       #         M100    a M050    b
    

    The X “unknown” status should never actually appear. If it does appear, it means a pathname that is neither unmerged, added, deleted, modified or had its type changed (effectively: unchanged) unexpectedly made it to the core of the internal diff machinery; the error feeding unmodified <pathname> to diffcore will also be generated.

    It appears to be left over from some old mode of operation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can see some options available: 1) Use PEAR's POP3 class --> tried it,
What are some options for getting really fast 'Find in Files' searching in VIM?
What are some options to avoid the latency of pointing local django development servers
I have some options for pricing using radio buttons. When a user selects the
Need to call a filter function on some options based on a radio selected
I have a working UITableView filled with some options for my app, and i
I am using a Drop Down List for selecting some options. Everything works fine,
Can anyone suggest some best options to include charting feature in my ASP.NET pages
I'm looking into some possible options for unit testing C++ classes. So, short and
I have to add some enum options to a database table. The problem being,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.