Skip to content

Commit 4e604fb

Browse files
committed
chore: refactor code
1 parent cb78f46 commit 4e604fb

File tree

4 files changed

+15
-72
lines changed

4 files changed

+15
-72
lines changed

src/git_config.c

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/gitkeykit.h

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <time.h> // Time/date utilities
1414

1515
// ++++ ++++ ++++ ++++ ++++ ++++ ++++
16+
1617
#ifdef _WIN32
1718
#include <windows.h>
1819
#include <direct.h>
@@ -34,6 +35,7 @@
3435
#endif
3536

3637
// ++++ ++++ ++++ ++++ ++++ ++++ ++++
38+
3739
#define SUCCESS 0
3840
#define ERR_GPG_NOT_FOUND 1
3941
#define ERR_GIT_NOT_FOUND 2
@@ -48,16 +50,19 @@
4850
#define ERR_HOME_DIRECTORY_NOT_FOUND 11
4951

5052
// ++++ ++++ ++++ ++++ ++++ ++++ ++++
51-
int check_gpg_installation(char *gpg_path, size_t path_size);
52-
int check_git_installation(void);
53+
54+
int reset(void);
55+
int start(void);
5356
int create_pgp_key(void);
57+
int add_extra_config(void);
58+
int clear_gpg_config(void);
5459
int import_key(char * key_path);
55-
// int import_pgp_key(const char *key_path);
56-
int configure_git_gpg(const char *key_id);
57-
int reset_configuration(void);
58-
int check_required_dependencies(char *gpg_path, size_t path_size);
59-
int check_secret_keys(char *gpg_path);
60+
int check_git_installation(void);
6061
int set_git_config(char *gpg_path);
61-
int add_extra_config(void);
62+
int check_secret_keys(char *gpg_path);
63+
int check_gpg_installation(char *gpg_path, size_t path_size);
64+
int check_required_dependencies(char *gpg_path, size_t path_size);
65+
66+
// ++++ ++++ ++++ ++++ ++++ ++++ ++++
6267

6368
#endif

src/key_management.c.txt

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ void print_usage(void) {
3535
int main(int argc, char *argv[]) {
3636

3737
if (argc == 1) {
38-
// return check_required_dependencies();
38+
return start();
3939
}
4040

4141
if (strcmp(argv[1], "--reset") == 0) {
42-
return reset_configuration();
42+
return reset();
4343
}
4444
else if (strcmp(argv[1], "import") == 0) {
4545
if (argc != 3) {

0 commit comments

Comments
 (0)