gitblit-org / gitblit

pure java git solution
http://gitblit.com
Apache License 2.0
2.28k stars 670 forks source link

"include" option in "gitblit.properties" is missleading. #1388

Closed TomaszSzt closed 2 years ago

TomaszSzt commented 2 years ago

Just for Your information.

The "gitblit.properties" allows to "include" other, assumed default, properties. The usual understanding of "include" is to "take file and put it right there". This is NOT implemented like that. This is just a java property, and is processed as a java property. During loading of "gitblit.properties" last occurrence in file overrides previous one. The location of "include" in file does not matter - it is always interpreted as if it was located at the beginning.

This operation may be however recursive and allows more than one file in "include" command, so to achieve C like would-be effect:

gitblit.properties:

inlude //defaults

... some properties //some data

include //final overrides

one should rather use:

gitblit.properties: include = file_with_defaults, file_with_some_data ... //final overrides

Since this is not obvious to end user without deep Java experience I decided to put it here and then close issue immediately.

TomaszSzt commented 2 years ago

Closing.