summaryrefslogtreecommitdiff
path: root/git.c
AgeCommit message (Collapse)Author
2022-08-06git: Make use of `create_key_value_file()` in `create_info_file()`mrb0nk500
This greatly simplifies the code for it, and helps make the codebase more generic.
2022-08-06git: Fix an issue with `get_patch_list()` not properly adding whitespacemrb0nk500
2022-08-06git: Add `get_pr_type()` keyword getter callbackmrb0nk500
This callback is needed because `pr_type` is a `uint8_t`, but the keyword type is `TYPE_INT` which assumes that the type is an `int`.
2022-08-05git: Add `get_keyword_cb` getter callbacksmrb0nk500
2022-08-05git: Don't return an error when the patch file array is NULL inmrb0nk500
`create_pull_request_dir()` This is because we won't be creating patch files for remote branches.
2022-08-05git: Don't check if `pr->branch->name` isn't empty inmrb0nk500
`create_pull_request_branch()` We don't need to do this anymore, since `dir_path_name()` now does that.
2022-08-05git: Add `create_pull_request_branch()`mrb0nk500
This takes in the PR, the index of that PR, and the repo the PR is for, and will create a branch for that PR in the given repo. Currently it only supports working with remote branches, but eventually it'll support patch files too.
2022-08-05git: Add `get_repo()`mrb0nk500
This function takes a null-terminated `git_repo` array, and the name of the repo to get, and will return said repo if found, and NULL if not.
2022-08-04git: Use `is_empty()`, and `find_delm(),` rather than doing it manuallymrb0nk500
in `parse_dsv_str()`
2022-08-01git: Make sure `pr->merge_branch` uses `free()` instead ofmrb0nk500
`free_git_branch()` Forgot to commit this when changing `merge_branch` to a string.
2022-08-01git, keyword: Move `parse_key_value_file()` to `keyword.{c,h}`mrb0nk500
2022-08-01git: Make `parse_key_value_file()` externally accessablemrb0nk500
2022-08-01git: Replace all uses of `parse_colon_key_value_file()` withmrb0nk500
`parse_key_value_file()`
2022-08-01git: Rename `parse_colon_key_value_file()` to `parse_key_value_file()`,mrb0nk500
and make it more generic This will allow us to parse pretty much anything with a key, value pair seperated by some delimiter(s).
2022-08-01git: Add `parse_remote_branch()` callbackmrb0nk500
This needs to be done in order to properly allocate the remote branch before setting it's members.
2022-07-31git: Add support for specifying the name of a repo when getting, andmrb0nk500
creating PRs This allows for repos to have their own set of PRs, rather than only having a global set of PRs. Although, if you leave the repo name empty, then it will treat it as a global PR, rather than a repo specific PR.
2022-07-31git: Make use of both `is_dir()`, and `mkdirp()` inmrb0nk500
`create_pull_request_dir()`
2022-07-31git: Use `format_len()` instead of `strlen()` when creating the repomrb0nk500
path in `init_git()`
2022-07-31pullreqd, git: Replace every current instance of `git_repository` with ↵mrb0nk500
`git_repo` This is done in order to make it easier to get the name of the repo.
2022-07-31git: Use `linked_list_to_array()` to add create the repo table, rathermrb0nk500
than doing it manually in `init_git`
2022-07-30git: Add `cleanup_pull_request()`mrb0nk500
2022-07-30git: Properly sanitize, and format the patch file name inmrb0nk500
`parse_patch_list()`
2022-07-30git: Make sure `f->name` is NULL before freeing `f` inmrb0nk500
`parse_{comments,info}_file_path`
2022-07-30git: Check if either `lhs`, or `buf` are empty inmrb0nk500
`parse_colon_key_value_file()`
2022-07-30git: Replace `filename` with `path` in `create_file()`mrb0nk500
2022-07-28everywhere: Fix compiler errors, compiler warnings, and correct typosmrb0nk500
2022-07-28index: rename typedef `index` to `index_t`mrb0nk500
This had to be done because `index()` is a function in the standard library.
2022-07-28keyword: Make `keyword_cb`, and `set_keyword()` return an `int`mrb0nk500
`set_keyword()` now checks the return value of the callback to determine whether to return early, fallback to the default, or return an error if the callback returns true, false, and -1 respectivly.
2022-07-28git: Implement all of `get_pull_request()`mrb0nk500
`get_pull_request()` takes an index, and the main PR root, and returns the PR of the supplied index if it exists, or NULL if no PR with that index exists.
2022-07-27git: Replace all uses of `git_repo` with the more generic `linked_list`mrb0nk500
We don't need a type specific linked list anymore, so we can just get rid of it, plus it makes the code much cleaner in the process.
2022-07-26git: Add `create_file()`mrb0nk500
2022-07-26git, index: Move index related functions to `index.{c,h}`mrb0nk500
2022-07-24git: Remove reason string reference from `is_valid_index()`mrb0nk500
2022-07-13git: Use an index instead of an id for creating PR directoriesmrb0nk500
PR's will now be identified by index, rather than by id. If no index is found, then it falls back to using the PR title as the directory name.
2021-08-01Fixed a typo in `create_pull_request_dir()`.mrb0nk500
2021-08-01Removed a free to a non-existent variable inmrb0nk500
`create_pull_request_dir()`. Forgot about thatm lol.
2021-08-01Replace all instances of `dir_path_name()`, withmrb0nk500
`sanitized_dir_path_name()` in `create_pull_request_dir()`.
2021-08-01Fixed a bug in `create_pull_request_dir()`.mrb0nk500
The patch file(s) were being created in the current working directory, rather than the PR directory.
2021-08-01Set return value to zero, if the PR ID is negative inmrb0nk500
`create_pull_request_dir()`.
2021-08-01Move the creation of the info file to after themrb0nk500
PR directory check in `create_pull_request_dir()`.
2021-08-01Fixed a typo in `create_pull_request_dir()`.mrb0nk500
2021-08-01Added `free_files()`, and `free_file()`.mrb0nk500
2021-08-01Added `get_branch_commits()`.mrb0nk500
It's currently a stub, but, I added it in order to at least get it to compile.
2021-08-01Fixed typo in `create_info_file()`.mrb0nk500
> mfw copy paste error
2021-07-11Replace `%c` in the time format string with the RFCmrb0nk500
2822 date format.
2021-07-03Use the filename created by `create_num_str()`, rathermrb0nk500
than the patch filename itself.
2021-06-30Fixed a typo in `get_comment_len()`.mrb0nk500
2021-06-30Add `get_comment_len()`.mrb0nk500
2021-06-30Seperate each PR comment by one blank line inmrb0nk500
`add_comment()`.
2021-06-30Added a check to see if `commits` is non-NULL.mrb0nk500