You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the latest git-remote-hg and Git 2.18.0.
If I make a commit on a hg repository cloned with git-remote-hg and push it back to remote,
the commit ID from Git would not be usable by other people using the same repository.
The following is how I can reproduced it:
$ git clone hg::/tmp/hg-git/testrepo/ testrepo-git
Cloning into 'testrepo-git'...
warning: You appear to have cloned an empty repository.
$ cd testrepo-git/
$ touch a && git add a && git commit -m "Add a"
[master (root-commit) a328f58] Add a
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a
$ git push
To hg::/tmp/hg-git/testrepo/
* [new branch] master -> master
$ git rev-parse HEAD
a328f582f9c0764814e48f4a957466fd86e7c4de
$ cd ..
$ git clone hg::/tmp/hg-git/testrepo/ testrepo-git-2
Cloning into 'testrepo-git-2'...
$ cd testrepo-git-2/ && git rev-parse HEAD
57508268690601d470e5aa29a0e6004508d8df73
The hash from the committing repository would not be updated even after pulling, and if another repository is using git-remote-hg for commit and push, it gets even more messier. I can reproduce it with 3 repositories and only 2 commits as below:
testrepo-git$ git log --oneline
3cff113 (HEAD -> master, origin/master, origin/branches/default, refs/hg/origin/branches/default, refs/hg/origin/bookmarks/master) Add b
a328f58 Add a
testrepo-git-2$ git log --oneline
a8ac55c (HEAD -> master, origin/master, origin/HEAD, refs/hg/origin/bookmarks/master) Add b
5750826 (origin/branches/default, refs/hg/origin/branches/default) Add a
testrepo-git-3$ git log --oneline
4b311a5 (HEAD -> master, origin/master, origin/branches/default, origin/HEAD, refs/hg/origin/branches/default, refs/hg/origin/bookmarks/master) Add b
5750826 Add a
This means referencing using the Git commit ID is almost impossible, and it also make the hg repository impossible to be used as submodule in the Git repository, due to how git is referencing the ID for the submodule version.
The text was updated successfully, but these errors were encountered:
I modified your steps a little bit, and I don't see the same problem. Maybe in your case HEAD is pointing to another ref?
I get:
warning: You appear to have cloned an empty repository.
3b3c1ee66e17361cf3e96156275b37dc3974c8a5
3b3c1ee66e17361cf3e96156275b37dc3974c8a5
Please try with the latest release (v0.4). Also, check that the output of git cat-file -p master is exactly the same in both repositories. The difference should give you a clue.
Hey,
I am using the latest git-remote-hg and Git 2.18.0.
If I make a commit on a hg repository cloned with git-remote-hg and push it back to remote,
the commit ID from Git would not be usable by other people using the same repository.
The following is how I can reproduced it:
The hash from the committing repository would not be updated even after pulling, and if another repository is using git-remote-hg for commit and push, it gets even more messier. I can reproduce it with 3 repositories and only 2 commits as below:
This means referencing using the Git commit ID is almost impossible, and it also make the hg repository impossible to be used as submodule in the Git repository, due to how git is referencing the ID for the submodule version.
The text was updated successfully, but these errors were encountered: