Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

stash repository names

Martin Konkol September 20, 2015

Is there a way how to add slash characters into the repository names? Currently Stash repository naming is very limited and opinionated.

Repository names are limited to 128 characters. They must start with a 
letter or number and may contain spaces, hyphens, underscores and 
periods

What is so bad about other characters, like above mentioned slash character? Other tools permit this and it is very useful. Consider this Maven example - a project, which has multiple groups of artifacts:

project
|- org.domain.group1
|        |- artifact1
|        \  artifact2
\  org.domain.group2
         |- artifact3
         \  artifact4

I would like to have the final repository URL formatted like this:

/{project}/{groupId}/{artifactId}

However, since Stash only recognizes the top-level as the project and the repository naming is so limited, I am unable to do this. The only thing I can think of is to drop the project part and treat the groupID as a project. But that means I'd have to configure access rights for every group of artifacts, which is not very helpful.

7 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Felix
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 23, 2015

Thanks for clarifying that! I believe the following suggestions are what you were asking about: https://jira.atlassian.com/browse/BSERV-2468 - Add paths to project/repo structure https://jira.atlassian.com/browse/BSERV-2727 - Allow projects to be categorised

0 votes
Martin Konkol September 23, 2015

Yes, folders or groups should be useful.

0 votes
Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2015

A slash in the repo "URL" is different than a slash in the repo name. It seems like what you're requesting is fodlers within projects. Which I agree could be organizationally useful .

0 votes
Martin Konkol September 22, 2015

Thanks for the reply Felix. However, in a Maven environment, you should always keep a repository-per-artifact relation. With multiple artifacts in one repository, as you suggest, you can't branch any of them separately. Each branch would contain the whole set of artifacts, completely ignoring the modularity benefits of Maven and Git. Of course there are special use cases, e.g. where a set of artifacts is always released together. But that should be handled by submodules. About the slash chars in Git repo URLs, it is allowed. It is even mentioned in the examples from the official Git documentation, like: "/path/to/repo.git" and many other. Just because Stash or Bitbucket do not allow it, doesn't mean Git itself does not allow it. Gerrit or GitBlit for example, are perfectly fine with slashes in the repo URLs. Try it. Anyway, I decided to go with GitBlit after fighting with Stash for a week in the trial. Tools should enable, not enforce.

0 votes
Felix
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 22, 2015

I'm trying to understand your use-case, but can't really get my head around what you are trying to do. The maven example you mention makes sense, however the thing you refer to as a "project" in the example, would in all likelihood be a repository. (Right?) As Tim already mentioned, Bitbucket Server does not allow repository names to contain slashes, because git does not support it. When you create a repo locally and push it, there is no way to have the repo name contain a slash. Perhaps I'm missing something important?

0 votes
Martin Konkol September 21, 2015

There is no problem with slashes in Git repository URLs, according to official documentation. Only the last part of the URL is used for the directory name, unless you specify otherwise ( http://www.git-scm.com/docs/git-clone ) . "<directory> The name of a new directory to clone into. The "humanish" part of the source repository is used if no directory is explicitly given (repo for /path/to/repo.git and foo for host.xz:foo/.git). Cloning into an existing directory is only allowed if the directory is empty. "

0 votes
Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2015

I agree that it would be helpful to be able to have 'folders' within Projects - which is I think maybe what you're really asking for - but putting slashes into repo names would be a horrible idea. A repo when cloned becomes a directory - and those really should not/cannot have slashes in their names.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events