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

possible bug: bare git without packed-refs file wouldn't show up in the scan result #50

Closed
darkclip opened this issue Jan 9, 2024 · 5 comments

Comments

@darkclip
Copy link

darkclip commented Jan 9, 2024

if you init a bare repo in the scan path, it won't create "packed-refs" file by default, in this case, the program wouldn't recognize it as a repo. you have to use "git pack-refs --all" command to create the file for the repo to be recognized by rgit.

@stappersg
Copy link
Contributor

Nice.

I'm now testing

--- a/server_side/rgitsss
+++ b/server_side/rgitsss
@@ -111,6 +111,8 @@ rgitsss_init() {
     COMMAND="${COMMAND}git init --bare --initial-branch=main ${BASE}"
     su ${ACCOUNT} --shell=/usr/bin/bash \
         --command="${COMMAND}"
+    su ${ACCOUNT} --shell=/usr/bin/bash \
+        --command="cd ${DIR}/${BASE} && git pack-refs --all"
 }
 
 rgitsss_describe() {

@w4
Copy link
Owner

w4 commented Jan 10, 2024

Interesting @darkclip. I wonder if there's any other identifying file in the repo that can be used instead. Maybe git-daemon-export-ok which is the file that needs to be created to allows clones?

@stappersg
Copy link
Contributor

afbeelding

The git pack-refs --all does provide what rgit seams to need for displaying.

For "allow to be cloned" has script rgitsss subcommand publish, which does touch git-daemon-export-ok.

@stappersg stappersg mentioned this issue Jan 10, 2024
@darkclip
Copy link
Author

@w4 I think it doesn't matter that much what kind of identifier to be used, as long as you give it a proper documentation.

@stappersg
Copy link
Contributor

stappersg commented Jan 23, 2024 via email

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

3 participants