schacon / hg-git

mercurial to git bridge, pushed to directly from the hg-git plugin in Hg
GNU General Public License v2.0
620 stars 71 forks source link

some git commands won't run: This operation must be run in a work tree #238

Closed zhangsen closed 12 years ago

zhangsen commented 12 years ago

I'm using git to manage a hg repo. After setting it up with hg gexport, I find there are some commands that won't run.

$ git status
fatal: This operation must be run in a work tree

$ git blame ./conary/build/recipe.py
fatal: This operation must be run in a work tree

Is this expected behavior?

I'm using hg_git-0.3.1 and git 1.7.7.

durin42 commented 12 years ago

This is expected behavior. Look for information on "bare repositories" for git.

I'm not sure what you mean by "using git to manage an hg repo". I really only provide support for using hg to work on git projects here.

zhangsen commented 12 years ago

Hi Augie... hg-git has the gexport and gimport commands, and the git.intree config. Did I file against a wrong project? Isn't here the hg-git project under schacon? Sorry a bit confused.

durin42 commented 12 years ago

Yeah, but I don't have any experience using hg-git "backwards," so I'm unable to help your use case in the slightest. If you try the hg-git Google Group you may have more luck, I don't know how many people watch this issue tracker (heck, I don't always watch it and I'm the maintainer!).

zhangsen commented 12 years ago

Ok... I read on the web (http://stackoverflow.com/questions/883452/git-interoperability-with-a-mercurial-repository) that hg-git can work as a two-way gate. Apparently there are some bugs.

Anyway, let's just keep this issue closed. I'll have another look around.

durin42 commented 12 years ago

On Nov 30, 2011, at 8:47 PM, Jesse Zhang wrote:

Ok... I read on the web (http://stackoverflow.com/questions/883452/git-interoperability-with-a-mercurial-repository) that hg-git can work as a two-way gate. Apparently there are some bugs.

Anyway, let's just keep this issue closed. I'll have another look around.

That's a couple of years old, and it wouldn't surprise me to learn that there have been regressions in that area, as I don't even attempt to maintain that side of things (as I never understood its utility).


Reply to this email directly or view it on GitHub: https://github.com/schacon/hg-git/issues/238#issuecomment-2970129