diff options
author | Aaron Ball <nullspoon@oper.io> | 2021-07-11 15:33:52 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2021-07-11 15:33:52 -0600 |
commit | 9aa89ac1ca1437a5058479b5f7917c22d8e60ca7 (patch) | |
tree | 56f2b24667a59f677a3fa06f61f3203363736b0b | |
parent | 2daf79139f24e78de63c37d143e40d6341146afe (diff) | |
download | gitaccess-9aa89ac1ca1437a5058479b5f7917c22d8e60ca7.tar.gz gitaccess-9aa89ac1ca1437a5058479b5f7917c22d8e60ca7.tar.xz |
Simplify the is_git_cmd function
-rw-r--r-- | src/main.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -159,11 +159,9 @@ int line_in_file(char* path, char* line) { * @return 1 if is a git command, 0 if not */ int is_git_cmd(char* str) { - if(strcmp(str, "git-upload-pack") == 0) - return 1; - else if(strcmp(str, "git-upload-archive") == 0) - return 1; - else if(strcmp(str, "git-receive-pack") == 0) + if(strcmp(str, "git-upload-pack") == 0 + || strcmp(str, "git-upload-archive") == 0 + || strcmp(str, "git-receive-pack") == 0) return 1; return 0; } |