| Age | Commit message (Collapse) | Author |
|
|
|
The output and exit code of run_app() are now testable, used for diff test.
|
|
E.g.
org-123456@github.com:temporalio/api.git
|
|
The `error_chain` crate is now deprecated for a long time and `anyhow`
has proven to be a popular replacement for applications.
This also improves the current error messages for panics.
```
PAGER='"less' git show
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: \
Error(Msg("Could not parse pager command."), State { next_error: Some(ParseError), \
backtrace: InternalBacktrace })', src/main.rs:136:88
```
```
PAGER='"less' git show
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Could not parse pager command.
Caused by:
missing closing quote', src/main.rs:125:88
```
|
|
The `try_create_from_path` function and the `from_path` function for
tests can be merged into a single function.
|
|
The `GitConfigEntry` enum has been removed from the module and now only
contains the `GitRemoteRepo` type.
|
|
|
|
* feat: Added config option.
|
|
The type is unnecessarily wrapped and it's the only use for
`GitConfigEntry::GitRemote` enum variant.
|
|
* Move theme iteration logic to `GitConfig`
The `git2::Config` type is now encapsulated and the regex is given to
`libgit2` to filter the config entries.
* Move remote url getter to `GitConfig`
|
|
* Fix clippy warnings
- `clippy::uninlined_format_args`
* Fix clippy warnings
- `clippy::clone_on_copy`
- `clippy::explicit_auto_deref`
- `clippy::iter_cloned_collect`
- `clippy::map_clone`
- `clippy::needless_borrow`
- `clippy::needless_lifetimes`
- `clippy::needless_return`
- `clippy::redundant_clone`
- `clippy::redundant_field_names`
- `clippy::seek_to_start_instead_of_rewind`
- `clippy::unnecessary_cast`
- `clippy::unused_unit`
|
|
|
|
* Add sourcehut link parsing
* refactor: GitRemoteRepo::GitHubRepo -> ..::GitHub, repo_slug -> slug
https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
* readme.md: change bitbucket to sourcehut
|
|
Following fixes are included:
* derive_partial_eq_without_eq:
Eq trait was added by running `cargo clippy --fix --no-deps`.
* get_first:
Function was replaced by running `cargo clippy --fix --no-deps`.
* unnecessary_to_owned:
This check was disabled for ANSIString as to_string call is required
to enforce formatting. Otherwise the underlying string was returned
directly (probably due to Deref implementation).
* type_complexity:
Closure type was simplified and Box<> usage was removed.
|
|
This allow to no longer ignore some tests (marked previously as FIXME)
by storing the env at the start of the program (Or creating a custom env
for test purpose)
This centralize almost alls calls to std::env inside one wrapper
Add a test profile to increase speed for testing (5min -> 20sec on my
machine)
clean a few code style like this:
```
if Some(value) = ...
if value
```
to
```
if Some(true) = ...
```
Co-authored-by: William Escande <wescande@google.com>
|
|
* Enable commit links for GitLab
|
|
Fixes #890
|
|
Only cloneable when testing, the types git2::Config and
git2::Repository in GitConfig contain C pointers and can't
really be cloned.
|
|
* Fix two typos
* Dismantle two Pyramids of Doom
Use question mark operator instead
* Use fatal() to exit with errorcode 2
|
|
(#668)
Closes #667.
SSH remote URLs are usually formatted as `git@github.com:user/repo` but
certain setups can allow using just `github.com:user/repo`, see issue #667
for an example.
This modifies the regex used to detect a GitHub remote for hyperlink
generation to also allow the latter form.
|
|
https://github.com/git/git/blob/311531c9de557d25ac087c1637818bd2aad6eb3a/Documentation/RelNotes/2.31.0.txt#L127-L130
|
|
|
|
|
|
|
|
|
|
|
|
Ref #563
|
|
|
|
`.git` is optional in clones from GitHub.com.
|
|
|
|
|
|
|
|
When git is invoked as `git -c aaa.bbb=ccc -c ddd.eee=fff` then git
sets the env var GIT_CONFIG_PARAMETERS containing the changed config
entries, so that child processes can honor them.
libgit2 doesn't yet honor the env var: see
https://github.com/libgit2/libgit2/issues/3854.
Fixes #493
Fixes #307
Ref https://github.com/dandavison/magit-delta/issues/13
|
|
|
|
|