Commit graph

421 commits

Author SHA1 Message Date
extrawurst
cc907996f4
fix latest clippy (#2597) 2025-04-07 16:06:00 +02:00
Johannes Agricola
7f75307f6e
Resolve core.hooksPath relative to GIT_WORK_TREE (#2571)
* Resolve core.hooksPath relative to GIT_WORK_TREE

git supports relative values in core.hooksPath.

`man git-config`:

> A relative path is taken as relative to the directory where the hooks are
> run (see the "DESCRIPTION" section of githooks[5]).

`man githooks`:

> Before Git invokes a hook, it changes its working directory to either
> $GIT_DIR in a bare repository or the root of the working tree in a >
> non-bare repository.

I.e. relative paths in core.hooksPath in non-bare repositories are always
relative to GIT_WORK_TREE.

There is a further exception; I believe this is not considered for path
resolution:

> An exception are hooks triggered during a push (pre-receive, update,
> post-receive, post-update, push-to-checkout) which are always executed
> in $GIT_DIR.

* Favor Repository::workdir() over path().parent()

This more clearly errors in case of bare repositories instead of using
the parent directory of the bare repository.

---------

Co-authored-by: Naseschwarz <naseschwarz@0x53a.de>
Co-authored-by: extrawurst <776816+extrawurst@users.noreply.github.com>
2025-04-04 15:28:44 +02:00
Johannes Agricola
89f73d2ec2
Disable dotted range commit yanking (#2577)
The algorithm for computing marked_consecutive assumes that commits are
consecutive in the commit graph if they are consecutive in the
linearized log used in` commitlist.rs`. That is not universally correct,
as siblings may also be displayed consecutively in this list.

For now, this just removes generating commit lists in dotted range
notation.

Co-authored-by: Naseschwarz <naseschwarz@0x53a.de>
2025-04-04 15:27:50 +02:00
Lena
92ef9f6fde
Respect .mailmap (#2485) 2025-03-19 14:44:02 +01:00
vlad-anger
979fa68837
Push with refspec (#2542)
* push: respect `branch.*.merge` when push default is upstream
2025-03-18 18:35:39 +01:00
Johannes Agricola
a91132d187
Bump git2 from 0.20.0 to 0.20.1 (#2567)
* Bump git2 from 0.20.0 to 0.20.1

Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.20.0 to 0.20.1.
- [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/git2-rs/compare/git2-0.20.0...git2-0.20.1)

---
updated-dependencies:
- dependency-name: git2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Avoid passing reference into struct

git2-rs changed the lifetime of the result of Patch::hunk() to reference
the patch struct:
https://github.com/rust-lang/git2-rs/pull/1141

Thus, returning a patch struct and a reference into it is flagged by the
borrow checker upon move when returning.

This patch avoids returning both alltogether by separating retrieving
and retrieving the patch.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Naseschwarz <naseschwarz@0x53a.de>
2025-03-18 09:09:11 +01:00
Vasley
4031b0d1a7
Change links to point to gitui-org instead of extrawurst (#2538) 2025-03-16 15:33:28 +01:00
extrawurst
01ad0615b2
git2 upgrade (#2473) 2025-01-10 15:28:52 +01:00
extrawurst
66af52ae70 rust 1.84 update 2025-01-09 17:38:44 +01:00
extrawurst
640bf333fc
Fix ci (#2447) 2024-12-10 09:44:01 +01:00
Christoph Rüßler
b49bacfac1
Bump gix from 0.66.0 to 0.67.0 and adapt to API changes (#2422)
* Bump gix from 0.66.0 to 0.67.0

Bumps [gix](https://github.com/GitoxideLabs/gitoxide) from 0.66.0 to 0.67.0.
- [Release notes](https://github.com/GitoxideLabs/gitoxide/releases)
- [Changelog](https://github.com/GitoxideLabs/gitoxide/blob/main/CHANGELOG.md)
- [Commits](https://github.com/GitoxideLabs/gitoxide/compare/gix-v0.66.0...gix-v0.67.0)

---
updated-dependencies:
- dependency-name: gix
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Adapt to API changes

* Update backtrace

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-08 09:53:43 +01:00
Christoph Rüßler
9c4bd29fc8
Improve test for env variables (#2409)
* Add test for AsyncLog respecting GIT_DIR

* Mark test as serial

* Mark additional test as serial

* Unwrap result to get more info in error case

---------

Co-authored-by: extrawurst <776816+extrawurst@users.noreply.github.com>
2024-10-29 09:42:25 +01:00
extrawurst
d7765c4239 fix doc comments to please new rust version lints 2024-10-18 18:02:02 +02:00
extrawurst
c4f517acb5 Revert "Add test for AsyncLog respecting GIT_DIR (#2387)"
This reverts commit 9c433b4de3.
2024-10-17 11:28:40 +02:00
Christoph Rüßler
9c433b4de3
Add test for AsyncLog respecting GIT_DIR (#2387) 2024-10-15 20:20:03 +02:00
Robin
d4f9400e04
Remotes popup (#2350)
Co-authored-by: extrawurst <mail@rusticorn.com>
Co-authored-by: extrawurst <776816+extrawurst@users.noreply.github.com>
2024-09-18 16:31:21 +02:00
Christoph Rüßler
2b8ef40289
Fix log crashing in subdirectories (#2301)
* Fix log crashing in subdirectories
Replace `gix::open` by `gix::discover`. `gix::open` errors when the
passed directory is not a git repository.
* Add test for AsyncLog in sub-directory
* Respect env variables when discovering repo

---------

Co-authored-by: extrawurst <776816+extrawurst@users.noreply.github.com>
2024-09-17 11:37:52 +02:00
extrawurst
0f5cf893f7 fix fmt 2024-09-11 22:24:32 +02:00
extrawurst
134ef734a4 clippy fix 2024-09-11 21:30:34 +02:00
extrawurst
b89672b134 rust 1.80 clippy fixes 2024-07-26 13:24:52 +07:00
extrawurst
ce923e6fe4
supply libgit2 with flag to respect env variables (#2299)
closes #2298
2024-07-25 11:16:01 +07:00
Christoph Rüßler
d30de223fe
Add LogWalkerWithoutFilter, using gitoxide (#2275)
* Add LogWalkerWithoutFilter, using gitoxide
* Use feature revision for gix

---------

Co-authored-by: extrawurst <776816+extrawurst@users.noreply.github.com>
2024-07-08 09:25:44 +02:00
Christoph Rüßler
a92be3be9d
Get default fetch remote from configuration (#2204)
fixes #1093
2024-05-16 12:03:55 +02:00
extrawurst
6e12c1e974 fix clippy and nightly build 2024-05-16 11:11:05 +02:00
Christoph Rüßler
b08eddb45b
Get default push remote from configuration (#2156) 2024-04-14 12:12:09 +02:00
Antonio Yang
945ec45027
sign with ssh key in disc (#2175) 2024-04-10 11:53:23 +02:00
Concelare
92e0face1e
add tests for commitChar filtering (#2151)
adds missing tests for b15c8643c8 (see #2145)
2024-03-26 15:50:13 +00:00
ZingyAwesome
ef6abbba0f
Fix typo in commit.rs (#2150) 2024-03-24 15:14:07 -07:00
Hendrik Maus
5b3e2c9ae3
Support git commit signing using OpenPGP (#1544)
* Support git commit signing using OpenPGP
* workaround for amending signed commits
* workaround for rewording signed commits
* support signing initial commit
* return both signature and signature_field value from sign

---------

Co-authored-by: Utkarsh Gupta <utkarshgupta137@gmail.com>
2024-03-24 13:08:28 -07:00
extrawurst
540a95c160 fix failing to commit since b15c864
(if it would not find core.commitComment config)
2024-03-24 12:54:00 -07:00
Concelare
b15c8643c8
Git Config Commit Comments (#2145)
Closes #2136
2024-03-22 15:12:08 -07:00
Juan
43af49bab4
Remove unused clippy warning suppression (missing_const_for_fn) (#2115) 2024-03-07 20:08:28 +01:00
Anas
c629070ea5
fix: fix typos (#2092) 2024-02-21 21:27:33 +01:00
extrawurst
2bbaa6f3a1 fix a bunch more typos 2024-02-20 19:51:05 +01:00
extrawurst
5dad9f4adb
cancel commit search (#2078)
closes #1860

Co-authored-by: StemCll <lydjotj6f@mozmail.com>
2024-02-20 19:07:25 +01:00
extrawurst
762b889b48
better theme file handling (#2077)
* better theme file handling
* print all possible err of loading theme

closes #2007
2024-02-20 18:52:35 +01:00
extrawurst
acf4661c1e fix nighty and raise msrv 2024-02-19 11:36:38 +01:00
Joshix-1
7335cd1c5d
fix sorting of commits in diff view (#1747) 2024-02-12 20:33:46 +01:00
extrawurst
673edd8f2d
cargo updates (#1856)
closes #1781
2024-02-12 11:53:22 +01:00
extrawurst
e7c61ffc89
Support prepare commit hook (#1978) 2023-12-16 00:07:54 +01:00
extrawurst
521ab91309
git2-hooks: allows customizing what places to look for hooks (#1975)
* allows customizing what places to look for hooks
2023-12-08 14:33:22 +01:00
extrawurst
d4dd58f6ca
move git hooks support into separate crate (#1971)
* unique error type name
* git2 dependency future 
* return hook out/err separately
2023-12-07 16:28:52 +01:00
extrawurst
83df6ddbc8 test that proved hook has access to PATH (#1967) 2023-12-02 13:21:33 +01:00
extrawurst
c39eb93736 fix ci 2023-11-28 09:24:58 +01:00
extrawurst
bcf9bac934 simplify implementation 2023-11-27 16:21:04 +01:00
extrawurst
253a18f62a search message body/summary separately
closes #1875
2023-09-04 22:24:20 +02:00
extrawurst
0e1d83fb02
Parallelize log search (#1874) 2023-09-04 20:55:17 +02:00
extrawurst
ecb793206d seems useless, lets remove 2023-09-04 09:46:08 +02:00
extrawurst
42043bda6f make update_progress simpler 2023-09-03 18:34:09 +02:00
extrawurst
52dfefe624 Revert "parallelize log search"
This reverts commit ebe41e8a75.
2023-09-03 18:30:34 +02:00