Commit graph

1839 commits

Author SHA1 Message Date
罗泽轩 6293bb5b8f
Bump git-extras version to 7.6.0-dev 2026-05-10 10:35:45 +08:00
罗泽轩 2bdeb59a73
Version 7.5.0 (#1250)
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2026-05-10 10:19:14 +08:00
Russ c5a0fdf660
Use standard prefix for home dir installs (#1248) 2026-04-29 13:46:32 -07:00
Ricardo Fernández Serrata 8d1c970031
refactor(abort): common gitdir (#1244)
* refactor(abort): common gitdir

* un-readonly
2026-04-14 13:26:28 +08:00
罗泽轩 c06fad59d2
Fix man page usage docs (#1241) 2026-03-23 23:21:26 -07:00
phanium 65dd36ae62
Fix git-changelog to handle whitespace in command arguments (#1232) 2026-03-05 23:06:10 -08:00
dependabot[bot] 967e339f91
chore(deps): bump bats-core/bats-action from 3.0.1 to 4.0.0 (#1230)
Bumps [bats-core/bats-action](https://github.com/bats-core/bats-action) from 3.0.1 to 4.0.0.
- [Release notes](https://github.com/bats-core/bats-action/releases)
- [Commits](https://github.com/bats-core/bats-action/compare/3.0.1...4.0.0)

---
updated-dependencies:
- dependency-name: bats-core/bats-action
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-09 14:36:15 +08:00
罗泽轩 ae3d30fb6e
add details when multiple active operations found (#1229)
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2026-02-06 15:03:50 +08:00
John Bachir 032090e847
Add persistent history to git-repl (#1226)
* persistent command history

* notes

* decision on which commands to save

* configurable history location

* fix history initialization in various scenarios

* documentation

* comment

* don't add whitespace or consecutive duplicates to history

* fix manpage output

* Update bin/git-repl

Co-authored-by: Edwin Kofler <edwin@kofler.dev>

* Update bin/git-repl

Co-authored-by: Edwin Kofler <edwin@kofler.dev>

* Update git-repl

* Update bin/git-repl

* Apply suggestions from code review

* Add `extglob` and generate docs

* Fix regex

* update docs

rm man/git-repl.{1,html}
touch man/git-repl.md
make man/git-repl.{1,html}

---------

Co-authored-by: Edwin Kofler <edwin@kofler.dev>
2026-02-05 11:05:01 -08:00
Erik Skultety 5367101f2e
Support passing ref to git-commits-since (#1228) 2026-02-02 21:39:48 -08:00
John Bachir 6ed2643252
ability to specify command when hitting enter (#1223)
* ability to specify command when hitting enter

* documentation

* man page

* generate man page and html

* run default command through same logic as other commands

impetuous: persist return val for display in promt if non-zero

also future-proofs for other benefits / DRYness. no need for another eval invocation.

* fix generated manpage
2026-01-20 14:11:45 +08:00
John Bachir b9bd309a87
Improve git-repl prompt (#1224)
* repl config ideas

* documentation

* Update bin/git-repl

Co-authored-by: Edwin Kofler <edwin@kofler.dev>

* separator

* man page and web docs

* always use dir for project name

---------

Co-authored-by: Edwin Kofler <edwin@kofler.dev>
2026-01-19 16:15:42 -08:00
johnpyp 6f4cf0c1bb
feat: delete-branch multiple unique branch names completions (#1221) 2025-12-18 12:40:24 -08:00
dependabot[bot] f5c48e4842
chore(deps): bump actions/checkout from 5 to 6 (#1219)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 10:42:06 +08:00
Hugo Ruiz-Mireles daf9d4148e
Made Git Magic use --force-with-lease (#1218)
This change simply overwrites the usage of `-f` with
`--force-with-lease` in git-magic because `--force-with-lease` is a
safer alternative.
2025-10-22 11:49:27 +08:00
dependabot[bot] eb34655aea
chore(deps): bump actions/stale from 9 to 10 (#1214)
Bumps [actions/stale](https://github.com/actions/stale) from 9 to 10.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v9...v10)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: '10'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 10:29:50 +08:00
dependabot[bot] 1f1320f4d6
chore(deps): bump actions/setup-go from 5 to 6 (#1215)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5 to 6.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 10:29:28 +08:00
dependabot[bot] 4d05955bc5
chore(deps): bump actions/setup-python from 5 to 6 (#1216)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 10:28:51 +08:00
Daniele Paolella b57eb8b92a
Fix minor typo in git rename-branch man page (#1211)
* docs: fix symbols in `git rename-branch` man page

* Format doc page after others and rebuild artifacts
2025-09-04 10:51:48 +08:00
Daniele Paolella cf6d40d446
Improvements to Bash completion (#1210)
* Sort Bash completion functions

* feat: add Bash completion for `git rename-branch`

* feat: add Bash completion for `git rename-remote`

* feat: add Bash completion for `git rename-tag`

* fix: use default completion for `git rename-file`

* Refactor rename completion functions common logic
2025-08-29 18:29:31 +08:00
Edwin Kofler 14586c7da0
Fix use of git-whatchanged to git-log (#1212) 2025-08-29 18:27:55 +08:00
dependabot[bot] 5c9a7a2533
chore(deps): bump actions/checkout from 4 to 5 (#1209)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-18 11:15:38 +08:00
罗泽轩 215382b12d
Bump version to 7.5.0-dev (#1207)
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2025-06-23 11:08:27 +08:00
罗泽轩 13cbdfc51e
Version 7.4.0 (#1206)
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2025-06-20 11:12:58 +08:00
Edwin Kofler 3ddc315a76
Format comparisons, functions, and redirections to be consistent (#1201)
* Format comparisons and functions to be consistent

* Add `checkstyle.py` script and add check to CI

* Fix Ruff lints
2025-06-06 11:10:50 +08:00
Andrew Sullivan Cant c63b46a33b
add git-wip and git-unwip (#669)
* Upgrade codespell to v2.4.0

It is a lastet verison, and is needed so that I can use the inline
ignore support in a future commit.

After updating tests/pyproject.toml I ran the following commands:
```
cd tests
poetry lock --no-update
poetry install
```

I also fixed a spelling error in man/git-summary.md, which was not
caught by the old version of codespell. After updating the file I also
updated the related files by running the following commands:

```
cd man
make -C .. man/git-summary.{1,html}
```

* add git-wip and git-unwip

Updated/re-built the documentation with:
```
cd man
make -C .. man/git-unwip.{1,html}
make -C .. man/git-wip.{1,html}
make -C .. man/git-extras.{1,html}
```
2025-05-14 17:05:41 +08:00
dependabot[bot] d4cd272556
Merge pull request #1203 from tj/dependabot/github_actions/bats-core/bats-action-3.0.1 2025-03-31 05:00:48 +00:00
dependabot[bot] 783812b627
chore(deps): bump bats-core/bats-action from 3.0.0 to 3.0.1
Bumps [bats-core/bats-action](https://github.com/bats-core/bats-action) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/bats-core/bats-action/releases)
- [Commits](https://github.com/bats-core/bats-action/compare/3.0.0...3.0.1)

---
updated-dependencies:
- dependency-name: bats-core/bats-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-31 00:23:42 +00:00
Edwin Kofler c49ca70814
Mostly finish pytest to Bats conversion (#1200)
* Mostly finish pytest to Bats conversion

* Add Bats version note to testing docs

* Move Bats CI check to separate job
2025-03-26 11:19:30 +08:00
Edwin Kofler 18ecffef5e
Implement half of tests in Bats (#1187)
Some checks failed
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
* Initial scaffold

* Finish first half of Bats tests

* Add Bats to CI

* Fix CI

* Fix CI

* Fix configuration to set git name and email

* Fix `GIT_CONFIG_{KEY,VALUE}` indexing

* Fix Git config override precedence

* Remove unused and untested function
2025-03-12 18:15:37 +08:00
Edwin Kofler aadf5f874b
Add stale bot for old PRs (#1186)
* Add stale bot for old PRs

* Update message

* Update .github/workflows/stale.yaml

Co-authored-by: 罗泽轩 <spacewanderlzx@gmail.com>

* Fix stale workflow

* Update .github/workflows/stale.yaml

Co-authored-by: 罗泽轩 <spacewanderlzx@gmail.com>

---------

Co-authored-by: 罗泽轩 <spacewanderlzx@gmail.com>
2025-03-12 18:14:53 +08:00
Pierre Ayoub 18d1017325
feat(git-bulk): add new option to not follow hidden directories (#1195)
Some checks failed
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
* feat(git-bulk): add --no-follow-hidden flag

* docs(git-bulk): add --no-follow-hidden description

* docs(man): make ronn

* docs(git-bulk): put --no-follow-hidden at right place in usage()

* refactor(git-bulk): logic optimization

Remove unnecessary subshell

Co-authored-by: Edwin Kofler <edwin@kofler.dev>

* fix(git-bulk): bad test operator

With the Bash' regexp matching operator `=~`, we need to use the Bash
conditional expression evaluation command `[[ ]]`.

* docs(completion.zsh): add --no-follow-hidden and --no-follow-symlink

---------

Co-authored-by: Pierre Ayoub <pierre.ayoub@protonmail.com>
Co-authored-by: Edwin Kofler <edwin@kofler.dev>
2025-03-05 10:39:41 +08:00
Pierre Ayoub a841845d9a
Feat: allow git-summary showing full path of repository (#1193)
Some checks failed
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
* feat(git-summary): add --full-path option

* docs(git-summary): add doc for --full-path option

* docs(man): make using ronn

* docs(git-extras-completion.zsh): add --full-path option of git-summary
2025-02-27 14:25:55 +08:00
Pierre Ayoub 8eed5f49ad
feat(git-bulk): add new option to no follow symlinks (#1194)
* feat(git-bulk): add --no-follow-symlinks flag

* docs(git-bulk): add --no-follow-symlinks description

* docs(man): make ronn

* docs(git-bulk): put --no-follow-symlinks at right place in usage()

* fix(git-bulk): use readarray for find command

1. Use `readarray` such that we can handle paths with spaces
2. Remove the unnecessary `eval`
2025-02-27 14:18:16 +08:00
Pierre Ayoub 64687599ae
docs(git-bulk): Add zsh completion (#1190)
* docs(git-bulk): Add zsh completion

* docs(git-bulk): Harmonize help strings

* docs(git-bulk): simplify previous bad logic

The previous logic was not allowing to use multiple options (which is
often the case). This was bad because this is my first time with zsh
automcompletion. Without it, the user can use any flag combination --
but at least, he has the freedom.
2025-02-26 12:34:04 +08:00
Pierre Ayoub 8ce63003c0
fix(git-bulk): fix workspace selection when cd fails (#1197)
* fix(git-bulk): fix workspace selection when cd fails

`cd` may fails for multiple reasons:
- mistake when editing `.gitconfig` manually
- previously existing workspace that have been removed
- ...

Currently, if `cd` fails, the `BulkOp` continue its execution ... in the
workspace defined in a higher directory that where the user, despite the
user specified a specific workspace (`-w`).

The user should be noticed of a failed `cd` (this is really not expected
for a valid configuration) and the operations should stop to not execute
something unexpected.

* fix(git-bulk): replace weak eval for better variable substitution

Get rid of poor `eval` syntax because they are vulnerable to command
injection, which may have unexpected side effects.

However, they enabled a useful feature: using environment variable
(*e.g.*, defined in a `.bashrc`) inside the `.gitconfig` to use dynamic
paths as  `bulk` workspaces.

As such, I keep this feature possible by using the Bash's ${!VAR}
syntax, which allows to get the value of one variable using the name of
a another variable. However, arbitrary command injection is not possible
anymore.

* fix(git-bulk): missing check about empty environnement variable

* style(git-bulk): typo

* docs(Commands.md): git-bulk env var feature

* docs(man/git-bulk): git-bulk env var feature

* docs(man/git-bulk): mention .gitconfig for config storage

* style(man/git-bulk): typo

* docs(man/git-bulk): run make/ronn for .1 and .html
2025-02-26 12:33:16 +08:00
Pierre Ayoub 1a9b0c2ab4
fix(git-bulk): quiet find errors by default (#1196)
Some checks failed
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
2025-02-20 15:47:27 +08:00
Pierre Ayoub 82cc37d0f5
fix(git-bulk): fix a bad integer expression (#1198)
Fix a logic error inside the `allowedargcount()` function. This function
may be called with one or two arguments. However, no default values are
assigned to `$1` and `$2` that are used inside a numerical comparison.
Therefore, when using a bad number of arguments for the following lines:

```
listall|purge) allowedargcount 1;;
addcurrent|removeworkspace) allowedargcount 2;;
```

Then, we would get the error `[: : integer expression expected`. To fix
this, we assign the 0 default value to `$1` and `$2`, such that we
trigger the error message destined to the user without any integer error
when there is a bad number of argument and that the function is called
with only 1 argument instead of 2.
2025-02-20 15:41:42 +08:00
dependabot[bot] df53711fc7
chore(deps): bump astral-sh/ruff-action from 2 to 3 (#1189)
Some checks failed
ci / test (push) Has been cancelled
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
Bumps [astral-sh/ruff-action](https://github.com/astral-sh/ruff-action) from 2 to 3.
- [Release notes](https://github.com/astral-sh/ruff-action/releases)
- [Commits](https://github.com/astral-sh/ruff-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: astral-sh/ruff-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-29 18:13:50 -08:00
oikarinen e691826b4b
Fix all ShellCheck errors and add to CI (#1179)
Some checks failed
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
2024-12-20 23:16:39 -08:00
dependabot[bot] fdaca2cd26
chore(deps): bump astral-sh/ruff-action from 1 to 2 (#1188)
Some checks failed
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
ci / lint (push) Has been cancelled
Bumps [astral-sh/ruff-action](https://github.com/astral-sh/ruff-action) from 1 to 2.
- [Release notes](https://github.com/astral-sh/ruff-action/releases)
- [Commits](https://github.com/astral-sh/ruff-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: astral-sh/ruff-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-02 10:06:50 +08:00
oikarinen 3db275cbe2
fix(ci): use poetry (#1183)
Some checks failed
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
For managing the python dependencies, running the unit tests and
spellchecker. This makes it easier for everyone to have same environment
as CI. Also includes few cosmetic edits for style for the ci.yml
2024-11-29 10:39:42 +08:00
Edwin Kofler 1345c5977d
Delete etc/test.fish (#1185) 2024-11-29 10:39:09 +08:00
oikarinen 2f4b57d52b
feat: add git-continue (#1176)
Some checks are pending
ci / lint (push) Waiting to run
ci / typo (push) Waiting to run
ci / test (push) Waiting to run
ci / build (macos-latest) (push) Waiting to run
ci / build (ubuntu-latest) (push) Waiting to run
* feat: add git-continue

Also refactor `git-abort` to parse action from the called file name.

There's a promise for this in #865 but that was a long time ago.

* fix: add git-continue

address review comments, fix the script, remove unnecessary testpath
import.
2024-11-28 16:50:29 +08:00
oikarinen c23da8ae9c
feat: add ruff linter with ci check (#1182)
Some checks are pending
ci / lint (push) Waiting to run
ci / typo (push) Waiting to run
ci / test (push) Waiting to run
ci / build (macos-latest) (push) Waiting to run
ci / build (ubuntu-latest) (push) Waiting to run
* feat: add ruff linter with ci check

Liniting the python files in tests directory would reduce whitespace etc
change and enforce basic coding standard for those. Kind of
opportunistic PR as there might be other opinions about how to deal with
this.

* fix: format with ruff
2024-11-28 10:30:14 +08:00
oikarinen f1f50ac5ba
fix(ci): missing dollar sign (#1184)
Some checks are pending
ci / lint (push) Waiting to run
ci / typo (push) Waiting to run
ci / test (push) Waiting to run
ci / build (macos-latest) (push) Waiting to run
ci / build (ubuntu-latest) (push) Waiting to run
Let's get the ci fixed!
2024-11-27 08:40:33 -08:00
oikarinen 0989b773de
fix(github-actions): changed files output for editorcondig-checker (#1180)
Some checks failed
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
* fix(github-actions): changed files output for editorcondig-checker

Seems that ci.yml includes a dead dependency action just to get list of
changed files for the PR / push. This seems weird as the repo is all
about git. Propose removing this extra dep with straightforward
implemenation. Also: github runners do have `jq` preinstalled.

* feat(ci): print changed files to log in lint job
2024-11-26 11:53:50 +08:00
罗泽轩 65203312c1
Revert "feat: add ruff linter with ci check (#1178)" (#1181)
Some checks are pending
ci / lint (push) Waiting to run
ci / typo (push) Waiting to run
ci / test (push) Waiting to run
ci / build (macos-latest) (push) Waiting to run
ci / build (ubuntu-latest) (push) Waiting to run
This reverts commit a2c424aada.
2024-11-25 14:32:54 +08:00
oikarinen a2c424aada
feat: add ruff linter with ci check (#1178)
Some checks are pending
ci / lint (push) Waiting to run
ci / typo (push) Waiting to run
ci / test (push) Waiting to run
ci / build (macos-latest) (push) Waiting to run
ci / build (ubuntu-latest) (push) Waiting to run
* feat: add ruff linter with ci check

Liniting the python files in tests directory would reduce whitespace etc
change and enforce basic coding standard for those. Kind of
opportunistic PR as there might be other opinions about how to deal with
this.

* fix: format with ruff
2024-11-25 10:14:37 +08:00
Guilhem Saurel d291b2775c
Support GITHUB_TOKEN var for git-fork and git-pull-request (#1177)
Some checks failed
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
Co-authored-by: 罗泽轩 <4161644+spacewander@users.noreply.github.com>
2024-11-16 10:33:26 -08:00