Open CheukLeung opened 6 years ago
did you ever resolve/find a work around for this issue?
The following is how I can reproduced it:
hg init /tmp/hg-git/testrepo &&
git clone -q hg::/tmp/hg-git/testrepo testrepo-git-1 &&
(cd testrepo-git-1 &&
touch a && git add a && git commit -q -m "Add a" &&
git push -q
) &&
git clone -q hg::/tmp/hg-git/testrepo testrepo-git-2 &&
git --git-dir=testrepo-git-1/.git/ rev-parse master &&
git --git-dir=testrepo-git-2/.git/ rev-parse master
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.