Allow `LocalStorage` configuration in the creation of a `GoGitRepo`

Timeline

Steve Moyer (smoyer64) opened

As noted in https://github.com/MichaelMure/git-bug/issues/704#issuecomment-1134822739, GoGitRepo has been refactored to provide a reusable data structure. The repository's LocalStorage is hard-coded to the value "git-bug". This is probably appropriate for applications that extend git-bug such as distributed Kanban boards, distributed code review, etc. For applications that are not in any way related to git-bug, it's probably better to use a different location for LocalStorage. While most of the rationale for these changes helps avoid the confusion of several applications sharing one LocalStorage directory, accidental reuse of the Lamport clocks could result in data consistency issues.

It's therefore recommended that the three functions that return a GoGitRepo be altered to accept and additional applicationName parameter. Excluding test and example code, this change only requires that the environment setup in commands/env.go be changed to pass "git-bug" as the applicationName.

Steve Moyer (smoyer64) commented

Related to #803

Steve Moyer (smoyer64) commented

Closed in #803

Steve Moyer (smoyer64) closed the bug