Commit graph

206 commits

Author SHA1 Message Date
Robert Bartlensky
c35b4dfce6
Update head_tree when no commit happens.
This regression was introduced in
fb9e1b3950.

Moreover, the tests didn't catch it because they didn't check that
there are no leftover changes.
2023-08-04 01:10:14 +01:00
Stephen Jung
48f2ab7c1f
Merge pull request #92 from rbartlensky/one-fixup-per-commit
Only update head_tree when we commit.
2023-07-26 16:17:22 -04:00
Robert Bartlensky
fb9e1b3950
Only update head_tree when we commit.
Fixes the case where if we pass `--dry-run` the additions/deletions
keep growing in number since we never "reset" the tree back.
2023-07-26 20:45:10 +01:00
Stephen Jung
bca5f29ec4
Merge pull request #91 from rbartlensky/one-fixup-per-commit
Add feature to generate one fixup per commit.
2023-07-25 17:52:27 -04:00
Robert Bartlensky
e16fcff80e
Add some cargo-fmt changes. 2023-07-25 22:38:59 +01:00
Robert Bartlensky
88928cd849
Add basic tests for one_fixup_per_commit feature. 2023-07-25 22:38:59 +01:00
Robert Bartlensky
019cd8a393
Add option to create one fixup per commit.
This means that all hunks meant to be fixed up into the same commit
will be grouped into a single commit, rather than multiple ones.

In order to not break the workflow of others, we choose to make this
an option rather than the default. Moreover, folks can `alias
git-absorb="git-absorb --one-fixup-per-commit"` if they wish to always
use this option, and not have to type it out.
2023-07-25 22:38:34 +01:00
Stephen Jung
d61ed5f635
Merge pull request #87 from agriffis/patch-1
add fedora to system package manager list
2023-05-03 11:55:30 -04:00
Aron Griffis
c03cc1bd32
add fedora to system package manager list 2023-05-03 11:52:32 -04:00
Stephen Jung
b17b4e744c
Merge pull request #84 from theaquamarine/target
Fix conditional in release.yml
2023-04-12 17:06:00 -04:00
blue
55de499f7c use [[ for matching target
Regex match =~ doesn't work with [
2023-04-12 20:05:15 +01:00
tummychow
e64a5607ad bump 0.6.10 2023-04-06 16:49:15 -04:00
tummychow
1d0c0a0b3c nit to make flag names consistent 2023-04-06 16:48:36 -04:00
Stephen Jung
eb852ab9e3
Merge pull request #80 from nunojsa/dev/add-new-match-file-flag
Dev/add new match file flag
2023-04-06 16:45:39 -04:00
Nuno Sa
a6ec1a5da4 docs: Document the new '-w|--whole-file' flag
The man page was generated with the makefile.

Signed-off-by: Nuno Sa <noname.nuno@gmail.com>
2023-04-06 13:28:06 +02:00
Nuno Sa
fd95530803 src: lib.rs: add whole-file match option
Sometimes we just forget some change (eg: intializing some object) that
happens in a completely unrelated place with the current hunks. In those
cases, might be helpful to just match the first commit touching the same
file as the current hunk.

This above is enabled by passing the new '-w|--whole-file' flag. It
should be used with extreme care to not get undesired results.

Signed-off-by: Nuno Sa <noname.nuno@gmail.com>
2023-04-06 13:28:02 +02:00
Stephen Jung
f3f47f06a6
Merge pull request #75 from tummychow/dependabot/cargo/git2-0.16.1
Bump git2 from 0.13.25 to 0.16.1
2023-01-20 18:52:13 -05:00
dependabot[bot]
466110e181
Bump git2 from 0.13.25 to 0.16.1
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.25 to 0.16.1.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.25...0.16.1)

---
updated-dependencies:
- dependency-name: git2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-20 23:43:50 +00:00
Stephen Jung
764f4776f2
Merge pull request #71 from kianmeng/fix-typos
Fix typos
2022-11-30 17:42:44 -05:00
Kian-Meng Ang
9caec5f93f Fix typos
Found via `typos --format brief`
2022-11-23 10:50:29 +08:00
tummychow
5ce240fe9b bump 0.6.9
just to kick the gh release workflow
2022-11-17 16:03:37 -05:00
tummychow
bbc89e9654 update release workflow
the msvc targets don't work nicely with cross due to licensing issues,
so we build those natively. this also means we can't support i686 msvc
anymore, since the architecture would require cross compilation
2022-11-17 16:00:28 -05:00
tummychow
8c54c46101 bump 0.6.8 2022-11-17 00:37:09 -05:00
Stephen Jung
20c5c857ba
Merge pull request #70 from karlding/fix_double_free
bump git2/libgit2-sys locked dependencies
2022-11-16 21:36:12 -08:00
Karl Ding
6ef4a05c32 bump git2/libgit2-sys locked dependencies
There is a double free in libgit2 that is fixed somewhere between
v1.0.0 and v1.1.0. This means that the transitive libgit2-sys
dependency needs to be after 0.12.14+1.1.0.

This manifests itself via the following error message on certain
repositories:

    $ git absorb
    free(): double free detected in tcache 2
    Aborted (core dumped)

Bump git2 to the latest version, which also updates the transitive
libgit2-sys (and libgit2) dependency.

Fixes #69
2022-11-16 21:02:31 -08:00
tummychow
219e386ff6 update install instructions 2022-11-16 12:35:14 -05:00
Stephen Jung
4211129c2b
Merge pull request #67 from ianchanning/patch-1
Add mozilla quote
2022-11-16 09:23:47 -08:00
Ian Channing
ed6383bd20
Add mozilla quote
The mozilla quote from the google group is really helpful to explain the background behind `hb absorb`. Even after reading your README I didn't fully understand, but the below lines for example made a lot of sense and then the whole quote is very useful for context.

> The command essentially
> looks at the lines that were modified, finds a changeset modifying those
> lines, and amends that changeset to include your uncommitted changes. If
> the changes can't be made without conflicts, they remain uncommitted. This
> workflow is insanely useful for things like applying review feedback.
2022-11-16 10:49:48 +01:00
tummychow
564bc3adfd note --force for detached HEAD
fixes #64
2022-07-04 16:53:54 -07:00
Stephen Jung
f561829b35
Merge pull request #63 from tummychow/dependabot/cargo/thread_local-1.1.4
Bump thread_local from 1.0.1 to 1.1.4
2022-06-16 19:06:02 -07:00
dependabot[bot]
912593e92f
Bump thread_local from 1.0.1 to 1.1.4
Bumps [thread_local](https://github.com/Amanieu/thread_local-rs) from 1.0.1 to 1.1.4.
- [Release notes](https://github.com/Amanieu/thread_local-rs/releases)
- [Commits](https://github.com/Amanieu/thread_local-rs/compare/v1.0.1...1.1.4)

---
updated-dependencies:
- dependency-name: thread_local
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-17 01:36:34 +00:00
Stephen Jung
a97a9f169f
Merge pull request #61 from orhun/remove_dead_code
Remove unused `by_old` function
2022-06-04 15:07:23 -07:00
Orhun Parmaksız
8475ec5085
Remove unused by_old function 2022-06-04 21:27:31 +03:00
tummychow
be58e5378d bump to 0.6.7 2022-06-03 18:46:07 -07:00
Stephen Jung
36b76d6740
Merge pull request #60 from jankatins/release-infra
Release infra
2022-06-03 18:41:14 -07:00
Jan Katins
663d096662 Add automatic release workflow on pushed tag
Based on the workflow defined in ripgrep:
https://github.com/BurntSushi/ripgrep/blob/df83b8b44426b3f2179/.github/workflows/release.yml
2022-06-03 16:12:27 +02:00
Jan Katins
005d4adb90 Add .idea to .gitignore 2022-06-03 14:34:01 +02:00
tummychow
654ff94c20 Update hg absorb link
fixes #57
2022-01-08 20:32:25 -08:00
Stephen Jung
8801706fda
Merge pull request #54 from jgarte/guix
Adds guix installation instructions
2021-12-06 18:54:59 -08:00
jgart
17df2d6381
Adds guix installation instructions 2021-12-06 20:42:27 -05:00
Stephen Jung
89dd129d1a
Merge pull request #53 from theaquamarine/static
Statically link msvcrt for Windows-msvc target
2021-11-29 15:43:29 -08:00
Stephen Jung
5513a787fa
Merge pull request #52 from andrewshadura/patch-1
README.md: add Debian and Ubuntu
2021-11-29 15:29:35 -08:00
blue
75fe30b227 Statically link msvcrt
Avoid the user needing to have MS VC++ Redistributables/VCRUNTIME140.dll
2021-11-29 22:00:34 +00:00
Andrej Shadura
ec17498999
README.md: add Debian and Ubuntu
git-absorb has been accepted into Debian on 2020-11-05
(available in bullseye and in testing/unstable).
2021-11-29 14:03:02 +01:00
Stephen Jung
3c3ef7a603
Merge pull request #51 from Zopolis4/rebase
Implement multiplatform builds via CI actions.
2021-10-31 14:37:46 -07:00
Zopolis4
38644b5966 Update readme to reflect CI builds 2021-10-27 16:44:40 +11:00
blue
8ab8033f69 Build release rather than debug 2021-10-27 16:23:33 +11:00
blue
227524c6e3 Add github actions 2021-10-27 16:23:33 +11:00
Stephen Jung
fa756f33ce
Merge pull request #50 from orhun/update_readme
README.md: update installation instructions for Arch Linux
2021-10-11 10:51:43 -07:00
Orhun Parmaksız
e4e7b2f05e
README.md: update installation instructions for Arch Linux
`git-absorb` is moved to the [community] repository:
https://archlinux.org/packages/community/x86_64/git-absorb/
2021-10-11 15:19:19 +03:00