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

Check remote is bare when creating repo from path #41

Closed
wants to merge 2 commits into from

Conversation

jakobnissen
Copy link
Contributor

So this is not exactly elegant, but...

I can't figure out how to check if remote is bare. Instead, if the user specifies the remote URL as a path, it runs git rev-parse to check if the remote URL is bare.

@@ -199,6 +207,7 @@ function do_register(package, registry;
clean_registry = true

git = gitcmd(registry_path, gitconfig)

Copy link
Owner

Choose a reason for hiding this comment

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

This looks spurious.

@@ -421,6 +430,11 @@ function get_remote_repo(package_path, gitconfig)
return repos[1]
end

function is_bare_repo(registry_path, gitconfig)
git = gitcmd(registry_path, gitconfig)
parse(Bool, read(`$git rev-parse --is-bare-repository`, String))
Copy link
Owner

Choose a reason for hiding this comment

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

No need for the double space.

@codecov-commenter
Copy link

codecov-commenter commented Aug 18, 2021

Codecov Report

Merging #41 (b34ffe1) into master (50b6733) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #41      +/-   ##
==========================================
+ Coverage   98.31%   98.36%   +0.05%     
==========================================
  Files           1        1              
  Lines         178      184       +6     
==========================================
+ Hits          175      181       +6     
  Misses          3        3              
Impacted Files Coverage Δ
src/LocalRegistry.jl 98.36% <100.00%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 50b6733...b34ffe1. Read the comment docs.

@GunnarFarneback
Copy link
Owner

The CI failure is annoying. It's real to the extent that it happens in the new code but only for the combination of Windows and Julia 1.1.

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.

3 participants