Subtree Split Includes Commits Outside Prefix Directory

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

 



I attempt a subtree push to a sub-project which I knew not to have had
any local modification since the last subtree push it had received,
but it failed.

To subproject
 ! [rejected]        5a9ad640651d3d54387afa5b7eaf89ed0b392a01 ->
master (non-fast-forward)
error: failed to push some refs to 'subproject'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.


The first step I took to understand the cause was to do a subtree
split and inspect the commit history of the resulting branch.  I found
that it contained commits that did not touch any files in the
subproject.  Doing a git show on these commits revealed that they were
not empty commits, but contained diff information for paths in the
main project, and in some cases, other subprojects that exist in the
main project.


I then reviewed the commit history of contrib/subtree/git-subtree.sh
and determined that the last successful subtree push was performed
prior to the integration of this change:
https://git.kernel.org/cgit/git/git.git/commit/contrib/subtree/git-subtree.sh?id=933cfeb90b5d03b4096db6d60494a6eedea25d03

As a next step, I reversed that patch on my local install of git
subtree, and the result was a successful subtree push.


Unfortunately, I have not yet reproduced this with a test main project
and subprojects, and I cannot make the project I observed it in
public.


- Harpreet "Eli" Sangha
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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]