Commit Graph

79 Commits

Author SHA1 Message Date
vince
e442ed36b3 Add more function implementations 2020-09-29 20:42:21 +02:00
Michael Muré
2bda70316d repository: more go-git implementation 2020-09-29 20:42:21 +02:00
Michael Muré
9c1087e18d repository: fix a todo in the gogit repo 2020-09-29 20:42:21 +02:00
Michael Muré
30d1640bf4 repository: some light shuffling of code 2020-09-29 20:42:21 +02:00
Michael Muré
3ecbf8db28 bridge: store credentials in the Keyring instead of the git config 2020-09-29 20:42:21 +02:00
Michael Muré
b127481364 repository: add access to the system keyring, with fallback on a file 2020-09-29 20:42:21 +02:00
Michael Muré
d171e11028 repository: partial impl of a go-git backed Repo 2020-09-29 20:42:20 +02:00
Vincent Tiu
f3304bdc1c
Add functionality to remove bugs from a local repository. (#423)
Add functionality to remove bugs from a local repository.

This adds a function to remove git references in the repo and another one to remove bugs.
2020-07-09 14:40:44 +02:00
Michael Muré
44096b785f repo: fix test chocking on randomized element in repo.ListRefs() 2020-07-03 19:05:05 +02:00
Michael Muré
3cf31fc404
repository: merge git.Hash in for one less /util package 2020-07-01 19:39:02 +02:00
Michael Muré
939bcd57b9
repo: more tests 2020-06-27 22:00:15 +02:00
Michael Muré
88ad7e606f
repository: remove tie to Bug, improved and reusable testing
- allow the creation of arbitrary Lamport clocks, freeing the way to new entities and removing Bug specific (upper layer) code.
- generalize the memory-only and persisted Lamport clocks behind a common interface
- rework the tests to provide reusable testing code for a Repo, a Clock, a Config, opening a path to add a new Repo implementation more easily
- test previously untested components with those new tests

Note: one problem found during this endeavor is that `identity.Version` also need to store one time + Lamport time for each other Entity (Bug, config, PR ...). This could possibly done without breaking change but it would be much easier to wait for https://github.com/MichaelMure/git-bug-migration to happen.
2020-06-26 19:14:22 +02:00
Simon Walker
e062d9aedf Supports git config includes
I like to have "private" settings in a git include file, and store the
main .gitconfig under version control. I do not want any authentication
keys or tokens (even if encrypted) in version control, so I have by main
.gitconfig include another file which is local and not tracked.

The current implementation calls `git config --global --get-regexp
<keyPrefix>` and for some reason, this command does not follow git
include files.

The changes suggested in this PR add the `--includes` flag to the
command, which then reads any included files.
2020-04-11 23:49:01 +01:00
Michael Muré
eeeb932b71
git: fix GetRemote to not break when there is no remotes 2020-03-01 13:53:12 +01:00
Josh Bialkowski
f15206e7b1
* Fix git config reader can't read values with spaces
* Add NewImportWarning for things that aren't exactly errors.
  Use this for unhandled changelog events.
* Add NewExportWarning for things that aren't exactly errors.
  Use this for un-exportable status changes.
2020-01-04 13:04:15 +01:00
Michael Muré
b92adfcb5f
bridge: huge refactor to accept multiple kind of credentials 2019-12-08 21:28:27 +01:00
Michael Muré
a9b32e6bda
repo: esthetism rename 2019-11-19 00:27:40 +01:00
Michael Muré
e2445edcb9
bridge: various improvement on the global token PR 2019-11-10 14:53:40 +01:00
Amine
3433fa5def commands: use token value as identifier 2019-11-09 13:25:07 +01:00
Amine
56551b6a22 bridge/core: comment token functionalities 2019-11-09 13:24:44 +01:00
Michael Muré
57e23c8ada bridge: improvement on the import resume feature 2019-11-03 17:23:05 +01:00
amine
f9f82957a7 repository: fix ineffectual assignment in git test 2019-11-01 22:51:37 +01:00
amine
60c6bd360f bridge: use new repository configuration interface
commands/webui: use new repository configuration interface
2019-11-01 22:44:11 +01:00
amine
b85b2c57a7 repository: improve documentation and fix typo mistake 2019-11-01 21:47:34 +01:00
amine
9304808070 repository: use repo.runGitCommand and flagLocality instead of execFn 2019-11-01 21:37:16 +01:00
amine
104224c9f0 repository: add StoreTimestamp/StoreBool to the config interface
repository: move the gitVersion logic to *gitConfig struct
2019-11-01 18:39:45 +01:00
amine
7f177c4750 repository: add ReadTimestamp methods and improve naming 2019-10-31 19:05:50 +01:00
amine
ab935674a2 repository: config interface and implementation rework 2019-10-31 15:46:09 +01:00
Michael Muré
2b14bb253c
Merge pull request #205 from seeduvax/issue-178
issue 178: fetch the repo dir with rev-parse --git-dir
2019-08-31 13:23:26 +02:00
Michael Muré
6a0336e04b
git: minor cleanup 2019-08-31 13:21:44 +02:00
Sebastien Devaux
1dc106279a issue 178: refined git command cwd setting.
For unknown reason setting .git as current directory for the called
git command fails when git-bug is called from a git hook (and it was
observed only in this case). Forcing use of current dir when the
repo path is ".git" restore the expected behavior.
2019-08-28 21:11:29 +02:00
Sebastien Devaux
ddcbd8d022 issue 178: adding required changes to InitGitRepo and CleanupTestRepos 2019-08-27 21:35:04 +02:00
Sebastien Devaux
7e123fbfca issue 178: fetch the repo dir with rev-parse --git-dir
Since is returns the .git dir directly, it is not more needed to
concatenate .git.
2019-08-24 22:42:25 +02:00
Michael Muré
91e4a183bd
repo: fix git version parsing with broken version 2019-08-24 15:32:11 +02:00
Amine Hilaly
fb50d47048
repository: RmConfigs usage of git version lt 2.18 2019-07-08 23:57:19 +02:00
Michael Muré
76db2f42eb
repository: rework how RmConfigs works with git 2019-07-08 12:14:41 +02:00
Amine Hilaly
bb68b391a0
Check git version before removing config section
update git config tests
2019-07-07 13:57:15 +02:00
Amine
acfd8ffdd7
Update repository/mock_repo.go
Co-Authored-By: Michael Muré <batolettre@gmail.com>
2019-06-19 18:02:16 +02:00
Amine Hilaly
ee2ca519e6
Changes to Repo.RmConfigs
RmConfigs try to remove key/value or section from keyPrefix
2019-06-17 23:33:32 +02:00
Sladyn
2c4c0132bf
Add GetRemotes functionalities 2019-05-29 22:58:01 +02:00
Michael Muré
d564e37b31 repository: add ReadConfigBool and ReadConfigString functions 2019-05-27 21:39:55 +02:00
Michael Muré
c7abac388a repo: refactor how test repo are created/cleaned 2019-05-27 21:14:55 +02:00
Michael Muré
475b7b4c49
a round of cleanup 2019-03-01 22:52:53 +01:00
Michael Muré
839b241f0c
git: fix RmConfigs 2019-03-01 22:40:29 +01:00
Michael Muré
71f9290fda
identity: store the times properly 2019-03-01 22:40:27 +01:00
Michael Muré
d2483d83dd
identity: I can compile again !! 2019-03-01 22:40:24 +01:00
Michael Muré
bdbe9e7e82
identity: more progress and fixes 2019-03-01 22:35:37 +01:00
Michael Muré
96f514168f
repo: minor cleaning 2018-12-25 16:35:37 +01:00
Michael Muré
061e83d4b4
commands: add "bridge rm" 2018-09-24 16:24:38 +02:00
Michael Muré
666586c5b9
repo: add functions to read/write git config 2018-09-24 15:21:34 +02:00