[sword-devel] Using Git for Sword development?

Jaak Ristioja jaak at ristioja.ee
Sun Feb 9 12:12:48 EST 2020


Hi,

I believe using submodules for the purpose of protecting parts of a git
repository from certain contributors is not a good option. Git
submodules seem like a nice concept when observed at a distance, but in
my experience submodules have proven to be not versatile at all, working
well only in a few use cases.

Btw there are solutions which do have the functionality Troy wants (for
example, VREFs in gitolite, https://gitolite.com/gitolite/vref.html) but
this might be difficult to set up if use of GitLab is also required. It
seems that most Git-based workflows simply use pull requests instead.

Fwiw, I still host a git-svn mirror of the crosswire SVN on GitHub which
is automatically updated:

  https://github.com/bibletime/crosswire-sword-mirror


Best regards,
J


On 09.02.20 09:13, Tobias Klein wrote:
> Hi,
> 
> I understand the reasoning about easily managing commit permissions.
> 
> A way to achieve that flexibility with git (and the typical functions in
> web-based Git repo browsers) is the following:
> - Put the more highly protected parts of the source tree in separate Git
> repositories and link them in the master repo as "sub modules" (see
> https://git-scm.com/book/en/v2/Git-Tools-Submodules). You can still
> clone the whole source tree easily using "git clone --recurse-submodules".
> - Only give people developer access to the master repo, but not the
> "protected" sub modules.
> - Generally: Protect the master branch(es) (then all contributions are
> subject of review / merge request) and only give selected people
> maintainer rights (the right to merge or push to master).
> 
> This is how we do it at work. It works well! :)
> 
> Best regards,
> Tobias
> 
> On 2/9/20 5:08 AM, Greg Hellings wrote:
>>
>>
>> On Sat, Feb 8, 2020 at 1:49 PM Tobias Klein <contact at tklein.info
>> <mailto:contact at tklein.info>> wrote:
>>
>>     Hi,
>>
>>     Have you guys been thinking about migrating the Sword sources to Git?
>>
>>
>> We have this discussion every year.
>>
>>     I think this would be an enabler for better collaboration,
>>     considering
>>     the merge capabilities of Git and for example the nice merge/pull
>>     request based review functionalities in GitLab (or GitHub).
>>
>>
>> Every time, this gets lots of people voting "yes"!
>>
>> Every time the short answer is the same:
>> Troy doesn't want it moved. So it is not going to get moved.
>>
>> The longer answer also remains the same:
>> Git has no simple method, in a similar vein to SVN, to allow Troy to
>> easily manage commit rights to particular portions of the repository.
>> He wants to keep tight control over who can commit where (e.g. I can
>> commit anywhere under the "bindings" or "cmake" directories or to any
>> file named "CMakeLists.txt", but nowhere else in the repo) and does
>> not believe the code review process in git front-ends is sufficient
>> for this. Writing a git hook to ensure this is not difficult, but also
>> not completely trivial. In SVN it's a very simple matter. It's not a
>> lack of familiarity with git (Troy develops Bishop within a git
>> repository and seems a relatively intelligent software developer
>> overall). It's literally this one missing feature, at least that's the
>> one impediment he's spoken about in the past.
>>
>> So:
>> * Would git greatly increase the ability of people to contribute to
>> Sword? Yes
>> * Would Troy host Sword's canonical repository somewhere like Github?
>> Probably not
>> * Is Sword going to move to git without, at the very least, a solution
>> to this directory write problem? Nope
>> * Is that problem surmountable? Yes, but no one has stepped up and
>> implemented it in a githook, and SVN is working fine in Troy's view to
>> not encourage him to write it himself.
>>
>> --Greg
>>
>>
>>     Best regards,
>>     Tobias
>>
>>
>>     _______________________________________________
>>     sword-devel mailing list: sword-devel at crosswire.org
>>     <mailto:sword-devel at crosswire.org>
>>     http://www.crosswire.org/mailman/listinfo/sword-devel
>>     Instructions to unsubscribe/change your settings at above page
>>
>>
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
> 
> 
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
> 




More information about the sword-devel mailing list