why "git rebase" searching the duplicate patches in <upstream branch> rather than in <new base branch>?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



why "git rebase" searching the duplicate patches in <upstream branch>
rather than in <new base branch>?

hi, all:

 I am reading the help of "git rebase", it says:
    "If the upstream branch already contains a change you have made
(e.g., because you mailed a patch which was applied upstream), then
that commit will be skipped. "

 But, because we are applying commits to <new base branch> rather than
to <upstream branch>, I really don't understand why we are searching
the duplicate patches in <upstream branch> rather than in <new base
branch>?

 In the following example, the git command is as:
   git rebase --onto master next topic

 I think it should be reasonable to search the duplicate patches in
<new base branch>(i.e, master) instead of <next branch>.

 If possible, an improvement may be an option for enabling searching
in <new base branch> as well?

  Thank you in advance for any enlightenment you can provide!


Jintao Zhu

//----
example:

Old tree is:

o---o---o---o---o  master
    \
     o---o---o---o---o  next
                      \
                       o---o---o  topic


We want our tree to look like this:
o---o---o---o---o  master
   |            \
   |             o'--o'--o'  topic
    \
     o---o---o---o---o  next

We can get this using the following command:

  git rebase --onto master next topic

//----



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux