Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git.init() with gitdir set behaves differently to git init --separate-git-dir=foo #1916

Open
AtkinsSJ opened this issue May 16, 2024 · 0 comments

Comments

@AtkinsSJ
Copy link

I'm developing a browser-based git client using isomorphic-git, and noticed a couple of differences here against the official git client:

  • With the official git CLI, git init --separate-git-dir=foo creates a .git text file containing gitdir: /repo/foo/. isomorphic-git does not do this.
  • If this git init is run inside an existing repo directory, the git CLI moves the contents of the gitdir to the new location, whereas isomorphic-git does not do so.

For the second one, it's possible that isomorphic-git just doesn't handle git init in an existing repo at all, but I'm not far enough with my client to know if that's the case. 😅

Neither of these is a big issue (because who even uses a different git dir?) but I thought it was worth reporting anyway. 🙂

I'm using isomorphic-git in the browser, bundled using rollup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant