git show --name-status letters: when can more than one letter appear? -


Quick questions about git, especially letters, as they appear when using < P> git show & lt; Revenue & gt; --name-status --online .

I think in some files, I get results:

AM contrib / platform / src / com / sun / jna / platform / win32 / winUser.java

How is it possible that both of these files were added and modified? I also get results such as:

MM Change. MD

Could this be due to a humiliating commitment? Are there any other possible reasons?

Thanks

with GIT show command merge Only non-merge commits can show that you are showing a merge.

When you ask git show to show a merge commitment, it uses "joint difference" by default, for example, here (part of) git One is committed to the source. I have used the HEAD ^ because due to this special merge low, there are correct types of changes to generate an interesting result. I will give the example first, and then explain what is happening.

  $ Git show HEAD ^ Committed 4109c28e055dba27d73cefb956bea5e611f66ec0 Insert: a3d54f9 e09867f Author:. Junio ​​Humano & LT; Gitster@pobox.com> Date: Tuesday August 26 11:16:26 2014 -0700 Merge Arm 'jk / diff-tree-t-fix'   

Let's add - name-status --oneline < / Code>:

  $ git show - name-status - oocral head ^ 4109c 28 merge branch 'jk / dfred-tree-t-fix' mm alliance- diff.c MM t / t4038-diff-combined.sh   

It looks like you, though we have m instead of M .

Now we add -m (it gets too long, so I will take it down):

  $ git show - M --name-status --oneline HEAD ^ 4109c28 (from a3d54f9) branch merge 'j / diff-tree-t fix' m alliance- diff.cmt / t4038-diff-combined.sh 4109c28 (from e09867f) branch Merge 'j / diff -t-t-fix' m. Gittagnor M. Mailmap [...] M-column CMM-combine-diff.c M-order-list. Output from Txt [...]   

-m A merge commute is committed to two or more parents, and -m , the git show command shows the difference against each parent's sequence:

  ... - A - M / ... - B   

Join M ( 4109c28 here in the case of GIT sources, here) of your first parent The form has been sent to a ( a3d54f9 ) and b ( e09867f) ) By comparing the contents of M with A as the second one, we find that the files combine-diff.c and Comparing with t / t4038-diff-combined sh modified B to M , we find that many Files are modified, in which combined-diff.c (and, in the output I also snap away, also as the t / t4038-diff-combined.sh ).

When git shows "joint difference", it first removes all such files which are both parents (or "3 or more for original merge" All parents "). That is, it is not considered "interesting" because column.c was modified from B to M because it Was not modified from A to M . But both combined-diff.c was changed to different diffs, so it has been put in a joint difference.

If you add -

In any case, the "condition" of the combined difference is shown as a series of part-position, A sequence for the father AM means that the file was added between the merge and the first-parent, while the file was modified between merge and second-root. You can get MM (as outlined above), MA (first modified from parent, linked to second), MT and TM , and so on I am quite, but not entirely, you will definitely not see names and copies (the documentation says there is no score number and only one way is shown, which will be the problem of renaming and copying). In each case, each letter has a general meaning. What you will not see here is in the form of one of the revised-status-characters, because it means "no change" and as "no change from some parents" is omitted by the combined difference .

To learn more about the combined defects, see the "COMBINED DIFF FORMAT" section, e.g.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -