git subtree push could not rev-parse split hash...bug?

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

 



Hi,

We have a parentRepo with a subtreeRepo. When multiple people git
subtree push from the parentRepo to the subtreeRepo origin if you
weren't the last to do the push you get the following error:

git subtree push --prefix=subtreeRepo
git@xxxxxxxxxx:projectname/subtreeRepo.git master
git push using:  git@xxxxxxxxxx:projectname/subtreeRepo.git master
fatal: ambiguous argument
'f7e47b631c71ccf50c46f8e762dc043bcde4e7c1^0': unknown revision or path
not in the working tree.
Use '--' to separate paths from revisions, like this:
'git command [revision...] -- [file...]'
could not rev-parse split hash
f7e47b631c71ccf50c46f8e762dc043bcde4e7c1 from commit
1ce2d3f972571df5e52e97391e0f799b6140ee5b
To github.com:projectname/subtreeRepo.git
 ! [rejected]        7411fe6059e0f7af62df52e38e647b77bcfec151 ->
master (fetch first)
error: failed to push some refs to 'git@xxxxxxxxxx:projectname/subtreeRepo.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first 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.
Makefile:675: recipe for target 'git-subtree-push-subtreeRepo' failed

The command run to do the push is:

git subtree push --prefix=subtreeRepo
git@xxxxxxxxxx:projectName/subtreeRepo.git master

git version 2.17.1

A workaround seems to be to do a
git subtree pull --prefix=subtreeRepo
git@xxxxxxxxxx:projectname/subtreeRepo.git master --squash
and then abort the results of the subtree pull with git reset --hard
origin/master.
The the git subtree push works fine.

The message doesn't seem to make sense since the split hash f7e47b631
and commit 1ce2d3f9 are there and it all seems like it should work.

I see that there's a ^0 at the end of the split hash in the error
message. Is that supposed to be there? fatal: ambiguous argument
'f7e47b631c71ccf50c46f8e762dc043bcde4e7c1^0'.

Regards,

Vang



[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