[RFC PATCH 0/1] rebase --onto detection of already applied commits

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

 



Let's consider the following operation:

  git rebase --onto new-base upstream feature

where 'feature' contains a few commits on top of 'upstream' which need to be
rebased onto 'new-base'.

The problem is that some of those commits have been already applied to
'new-base' and we would like to skip them as in a regular rebase command that
doesn't use '--onto', i.e. expecting to see messages like:

  warning: skipped previously applied commit [...]

However, that doesn't happen and we either get

  dropping [...] -- patch contents already upstream

or a conflict if one of the rebased commits doesn't resolve to an empty patch
anymore, e.g. due to additional changes applied on the target branch. 

This seems to be similar to the behavior of '--reapply-cherry-picks' and cannot
be disabled via '--no-reapply-cherry-picks' or by any other means.

The proposed patch is just a quick workaround, as I'm not sure what would be the
proper or recommended approach to handle the scenario described. Any advice
would be highly appreciated!

Cristian Ciocaltea (1):
  rebase --onto: Skip previously applied commits

 builtin/rebase.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

-- 
2.38.1




[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