Wanted to see, in my branch, the top level folders only (project structure) but because I have only 1 sub-folder in some of them (see example below), I see that "glue" effect :-( - how to fix that?
If there are more than one sub-folder in a folder then it looks Ok (as Top1 and Top3 below)
Top1
Top2/<single sub-folder name>
Top3
Top4/<single sub-folder name>
----------------------
Note. There is a solution for similar issue in IntelliJ - may be it will be helpful?
When I open same project in IntelliJ (where folders and sub-folders are "packages") I initially saw the same "bad looking" project structure, but then found the solution and now I have clean/normal project structure in IntelliJ:
"Create non-flat packages":
'In the project pane, click the gear in the top right corner, and un-select "compact empty middle packages".'
https://stackoverflow.com/questions/36323553/create-non-flat-java-packages-in-intellij/36334297#36334297
Hi @pgorodyansky,
This behavior is by design, as it is a feature of Bitbucket to 'collapse' directories which contain only a single subdirectory into a single composite directory.
For example, consider the following repository layout (which is very common for Java projects using Maven):
src/
main/
java/
com/
atlassian/
bitbucket/
comment/
CommentService.java
repository/
RepositoryService.java
test/
java/
com/
atlassian/
bitbucket/
SomeTest.java
When listing src, both main and test each contain only a single subdirectory, which itself contains only a single subdirectory. That repeats for several layers of nesting. Without collapsing, navigating the directory structure would require clicking through several layers, with each layer requiring a server roundtrip to load the next. Both of these, combined, would lead to a great deal of annoyance for the user as well as increased load on the server as it handles each individual call.
While there's no form of configuration value or toggle to prevent this functionality, it's unlikely that this would be implemented - as any use case for not completing this directory collapse is usually something better handled by alternative solutions such as using something like git submodules to split out multiple 'projects' within a currently monolithic repository.
Hope this helps!
Thanks,
Evan Slaughter
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.