Skip to content

Conversation

@jcouball
Copy link
Member

Signed-off-by: James Couball jcouball@yahoo.com

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

  • Ensure all commits include DCO sign-off.
  • Ensure that your contributions pass unit testing.
  • Ensure that your contributions contain documentation if applicable.

Description

When opening a submodule or secondary working tree which exist in a directory different than the current directory, the command would fail.

The logic for how to set working tree, repository, and index directories is scattered all over the place. This PR tries to centralize that logic.

repo = Git.init(path, :bare => true)
assert(File.directory?(File.join(path, '.git')))
assert(File.exist?(File.join(path, '.git', 'config')))
assert(File.exist?(File.join(path, 'config')))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Git.init should create the new, bare repository in the directory given by path and not in the .git subdirectory of path. This was a bug.

Signed-off-by: James Couball <jcouball@yahoo.com>

dirs.each do |dir|
Git.bare("#{dir}/.git").ls_files
Git.bare(dir).ls_files
Copy link
Member Author

@jcouball jcouball Jan 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Git.init should create the new, bare repository in the directory given by dir and not in the .git subdirectory of dir. This was a bug.

@stale
Copy link

stale bot commented Jun 11, 2021

A friendly reminder that this issue had no activity for 60 days.

@stale stale bot added the stale label Jun 11, 2021
@jcouball
Copy link
Member Author

Replaced this PR with #544

@jcouball jcouball closed this Dec 20, 2021
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

Successfully merging this pull request may close these issues.

1 participant