{"action":"created","issue":{"url":"https://api.github.com/repos/ingydotnet/git-subrepo/issues/69","labels_url":"https://api.github.com/repos/ingydotnet/git-subrepo/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/ingydotnet/git-subrepo/issues/69/comments","events_url":"https://api.github.com/repos/ingydotnet/git-subrepo/issues/69/events","html_url":"https://github.com/ingydotnet/git-subrepo/issues/69","id":60128395,"number":69,"title":"Various problems with push","user":{"login":"jrosdahl","id":146927,"avatar_url":"https://avatars.githubusercontent.com/u/146927?v=3","gravatar_id":"","url":"https://api.github.com/users/jrosdahl","html_url":"https://github.com/jrosdahl","followers_url":"https://api.github.com/users/jrosdahl/followers","following_url":"https://api.github.com/users/jrosdahl/following{/other_user}","gists_url":"https://api.github.com/users/jrosdahl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrosdahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrosdahl/subscriptions","organizations_url":"https://api.github.com/users/jrosdahl/orgs","repos_url":"https://api.github.com/users/jrosdahl/repos","events_url":"https://api.github.com/users/jrosdahl/events{/privacy}","received_events_url":"https://api.github.com/users/jrosdahl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-03-06T16:57:46Z","updated_at":"2015-11-19T10:29:56Z","closed_at":null,"body":"From documentation I get the impression that it should work to run `git subrepo push <subdir>` without specifying a subrepo branch, but I can't get it to work.\r\n\r\nTo reproduce what I'm trying to do, change\r\n\r\n    git subrepo push bar subrepo/bar\r\n\r\nto\r\n\r\n    git subrepo push bar\r\n\r\nin `test/subrepo-push.t`. The test case then fails like this:\r\n\r\n```\r\ntest/subrepo-push.t .. 1/? #   Failed test 'push message is correct'\r\n#   at test/subrepo-push.t line 45.\r\n#     got: 'Subrepo 'bar' has no new commits to push.'\r\n#   expected: 'Subrepo 'bar' pushed to '../../../tmp/upstream/bar' (master).'\r\ntest/subrepo-push.t .. 2/? #   Failed test 'File 'tmp/owner/bar/FooBar' exists'\r\n#   at test/setup line 81.\r\ntest/subrepo-push.t .. Failed 2/6 subtests \r\n```\r\n\r\nI guess it's supposed to work? If not, perhaps documentation could be improved?\r\n\r\nDon't know if it's related, but another bug, I think, is that it doesn't work to push immediately after clone. This can be reproduced by removing the\r\n\r\n```\r\n(\r\n  cd $OWNER/bar\r\n  add-new-files bargy\r\n  git push\r\n)\r\n```\r\n\r\npart of `test/subrepo-push.t`. The test case then fails with\r\n\r\n```\r\ntest/subrepo-push.t .. git-subrepo: 'subrepo/bar' is not a valid commit.\r\ntest/subrepo-push.t .. No subtests run \r\n```\r\n\r\ninstead of the expected\r\n\r\n```\r\ntest/subrepo-push.t .. 1/? #   Failed test 'File 'tmp/owner/bar/bargy' exists'\r\n```\r\n\r\nI tried to make my own little standalone testcase, but it unfortunately only made me more confused. Here it is:\r\n\r\n```\r\ngit init subproject\r\n(\r\n    cd subproject\r\n\r\n    echo foo >foo\r\n    git add foo\r\n    git commit -m foo\r\n)\r\n\r\ngit init superproject\r\n(\r\n    cd superproject\r\n\r\n    # echo bar >bar\r\n    # git add bar\r\n    # git commit -m bar\r\n\r\n    git subrepo clone ../subproject\r\n    echo foo >>subproject/foo\r\n    git commit -am foo\r\n\r\n    git subrepo push subproject\r\n)\r\n```\r\n\r\nThe last command fails like this:\r\n\r\n```\r\nfatal: ambiguous argument 'none..HEAD': unknown revision or path not in the working tree.\r\nUse '--' to separate paths from revisions, like this:\r\n'git <command> [<revision>...] -- [<file>...]'\r\nSubrepo 'subproject' has no new commits to push.\r\n```\r\n\r\nWhen uncommenting the three commented lines, the failure is\r\n\r\n```\r\nThe 'git rebase' command failed during your push.\r\nYou will need to finish the push by hand. Follow these steps:\r\n\r\n  # Resolve the rebase conflicts\r\n  git checkout master\r\n  git subrepo push subproject subrepo-push/subproject\r\n\r\nTo abort the push and reset back to where you started:\r\n\r\n  git rebase --abort\r\n  git checkout ORIG_HEAD\r\n  git subrepo clean subproject\r\n\r\nSee 'git help subrepo' for more help.\r\n```\r\n\r\nbut unless I'm missing something, there should be no conflicts.\r\n\r\nI'm using Git version 2.1.0 and git-subrepo 5c38bbc8b48ef73d5a56f603b77436be79a5ed12."},"comment":{"url":"https://api.github.com/repos/ingydotnet/git-subrepo/issues/comments/158017026","html_url":"https://github.com/ingydotnet/git-subrepo/issues/69#issuecomment-158017026","issue_url":"https://api.github.com/repos/ingydotnet/git-subrepo/issues/69","id":158017026,"user":{"login":"grimmySwe","id":6480514,"avatar_url":"https://avatars.githubusercontent.com/u/6480514?v=3","gravatar_id":"","url":"https://api.github.com/users/grimmySwe","html_url":"https://github.com/grimmySwe","followers_url":"https://api.github.com/users/grimmySwe/followers","following_url":"https://api.github.com/users/grimmySwe/following{/other_user}","gists_url":"https://api.github.com/users/grimmySwe/gists{/gist_id}","starred_url":"https://api.github.com/users/grimmySwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grimmySwe/subscriptions","organizations_url":"https://api.github.com/users/grimmySwe/orgs","repos_url":"https://api.github.com/users/grimmySwe/repos","events_url":"https://api.github.com/users/grimmySwe/events{/privacy}","received_events_url":"https://api.github.com/users/grimmySwe/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T10:29:55Z","updated_at":"2015-11-19T10:29:55Z","body":"With the new solution proposed in branch issue/98 from #98 I think the push issue is solved. Branch parameter for the push is now only there if you want to perform special operations on a branch before pushing it. Using push without branch should suffice in most regular cases.\r\n\r\n@AndrewSmart Your fix https://github.com/AndrewSmart/git-subrepo/commit/1da1289714d6bc9763d953145c706dc1bc66eb8f is solved as well?"}}