archimatetool / archi-modelrepository-plugin

coArchi - a plug-in to share and collaborate on Archi models.
152 stars 52 forks source link

allow branch names to include sub-folder structures #141

Closed ghost closed 4 years ago

ghost commented 4 years ago

when creating a new branch the collaboration UI does not allow for creating branchnames like features/abc or bugfix/def to represent hierarchical directory grouping. we follow the flow of branching from master and merging back using a pull-request similar to our code development. it would be great if the same restrictions were present on branchnames as are in GIT

Phillipus commented 4 years ago

The "\" character is not allowed in git branch names.

https://wincent.com/wiki/Legal_Git_branch_names

Phillipus commented 4 years ago

and merging back using a pull-request

Don't do that outside of Archi or you'll get problems.

ghost commented 4 years ago

thanks for the clarification on usage on PR's. i did a quick update of the original issue since GIT uses "/" to indicate hierarchical (directory) grouping. i hope that clarifies the usage of this request somewhat

Phillipus commented 4 years ago

~Unfortunately, we can't use the "/" character either. This is a limitation of JGit, the git library that we use. JGit checks the path name for "/":~

~I know that it is possible to add the forward slash in other git tools and the command line but JGit doesn't allow it.~

Phillipus commented 4 years ago

(Previous comment edited - I meant "/" character not backslash)

ghost commented 4 years ago

Thanks for clarifying, i think we can work with the limitation

Phillipus commented 4 years ago

Hold on - ignore what I said. You can use a "/" in the branch name, just not at the beginning or the end of the branch name. So, type in the name without the "/" character then move your cursor to where you want a "/" and type it.

I'll update the dialog box checking routine to allow you to type a "/" at the end of the branch name.

Phillipus commented 4 years ago

I've fixed the dialog box for entering a new branch name so that "." and "/" characters are allowed to be entered.

An error message is shown if these occur at the start or end of the branch name:

1

But you can still type in more characters to complete the name:

2

This will be in the next release.

ghost commented 4 years ago

awesome! can't wait to use it

Phillipus commented 4 years ago

can't wait to use it

As mentioned above, you already can:

Type in the name without the "/" character then move your cursor to where you want a "/" and type it.