Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
When I do e.g.
git diff master --name-status
I see some lines with the
R100
prefix on them.
What does
R100
exactly mean?
I would assume
R
means "moved". I am posting below
what I found in the documentation
, but nothing in this text says anything about
100
or numbers per se.
--name-status
Show only names and status of changed files. See the description of the --diff-filter option on what the status letters mean.
and then
--diff-filter=[(A|C|D|M|R|T|U|X|B)…[*]]
Select only files that are Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), have their type (i.e. regular file, symlink, submodule, …) changed (T), are Unmerged (U), are Unknown (X), or have had their pairing Broken (B). Any combination of the filter characters (including none) can be used. When * (All-or-none) is added to the combination, all paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected.
Also, these upper-case letters can be downcased to exclude. E.g. --diff-filter=ad excludes added and deleted paths.
Note that not all diffs can feature all types. For instance, diffs from the index to the working tree can never have Added entries (because the set of paths included in the diff is limited by what is in the index). Similarly, copied and renamed entries cannot appear if detection for those types is disabled.
The
documentation
for
git status
under "Changed Tracked Entries" appears to explain what
R100
means:
<X><score>
The rename or copy score (denoting the percentage
of similarity between the source and target of the
move or copy). For example "R100" or "C75".
So, putting this together with what you cited above, the files you are seeing with
R100
status mean that they were moved, and that Git found a 100% match between that file and some other previously named file.
Here is a link
to a good @torek answer, which described the physics of how Git tracks content.
–
Thanks for contributing an answer to Stack Overflow!
-
Please be sure to
answer the question
. Provide details and share your research!
But
avoid
…
-
Asking for help, clarification, or responding to other answers.
-
Making statements based on opinion; back them up with references or personal experience.
To learn more, see our
tips on writing great answers
.