This repository was archived by the owner on May 27, 2025. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Patch contents
Name
field next to theRepo url
field on the repo admin page. A script sets the text in theName
field to a default name based on the URL. TheName
field is updated every time the URL field value changes.base/test_git_repo
submodule in order to test this functionality.In other words, if
REPOS_ROOT = "/home/michael/barkeep_repos"
and I clone a repo namedmichaelstorm/barkeep
, then it will be cloned into/home/michael/barkeep_repos/michaelstorm/barkeep.
Rationale
As mentioned in #377, the proper name of a repo from a Barkeep user's point of view is not always the same as what the administrator hosting the repo thought it should be.
Additionally, namespacing repos in this way seems to be common practice today. GitHub and GitLab both do it, as do we at my company. (I don't speak for them, etc.) While changing the repo name from its origin is useful, so is fully preserving it, namespace and all.
Notes
base/test_git_repo
is a clone of michaelstorm/barkeep_compound_name_integration_tests. It's identical to ooyala/barkeep_integration_tests, but with the committer names and emails changed to refer to me. Therefore, the SHA commit hashes are different, and we get namespace collision testing for free.The command-line client handles compound repo names if specified, but still uses the basename of whatever git repo the user is in if not. This could get confusing, but I decided to leave it for now.
/api/add_repo
takes a new, optionalname
parameter. If it's not specified,name
will default to the repo name that Barkeep would have chosen previously. If we're okay with breaking script compatibility, this parameter can become required.