Skip to content

fix(autocomplete): check for empty repo before revwalk#105

Merged
cococonscious merged 1 commit intomainfrom
fix/initial-commits
Nov 13, 2024
Merged

fix(autocomplete): check for empty repo before revwalk#105
cococonscious merged 1 commit intomainfrom
fix/initial-commits

Conversation

@cococonscious
Copy link
Owner

push_head on Revwalk fails when the repository had just been initialized as the commit reference doesn't exist yet. A simple check for if the repository is empty fixes this.

Refs: #104

`push_head` on Revwalk fails when the repository had just been initialized as the commit reference doesn't exist yet. A simple check for if the repository is empty fixes this.

Refs: #104
@codecov
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/lib/questions.rs 100.00% <ø> (ø)

@cococonscious cococonscious merged commit 26dd8ba into main Nov 13, 2024
@cococonscious cococonscious deleted the fix/initial-commits branch November 13, 2024 10:16
@github-actions github-actions bot mentioned this pull request Nov 13, 2024
cococonscious added a commit that referenced this pull request Nov 26, 2024
## 🤖 New release
* `koji`: 2.2.0 -> 3.0.0 (⚠️ API breaking changes)

### ⚠️ `koji` breaking changes

As koji is not a library, the information below is a bit irrelevant. The
actual breaking change is the change of CLI arguments.

```
--- failure constructible_struct_adds_field: externally-constructible struct adds field ---

Description:
A pub struct constructible with a struct literal has a new pub field. Existing struct literals must be updated to include the new field.
        ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/constructible_struct_adds_field.ron

Failed in:
  field ConfigArgs._user_config_path in /tmp/.tmpHS9YHR/koji/src/lib/config.rs:43
  field ConfigArgs._current_dir in /tmp/.tmpHS9YHR/koji/src/lib/config.rs:44

--- failure function_parameter_count_changed: pub fn parameter count changed ---

Description:
A publicly-visible function now takes a different number of parameters.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/function_parameter_count_changed.ron

Failed in:
  koji::questions::create_prompt now takes 2 parameters instead of 3, in /tmp/.tmpHS9YHR/koji/src/lib/questions.rs:266
  koji::commit::commit now takes 1 parameters instead of 6, in /tmp/.tmpHS9YHR/koji/src/lib/commit.rs:37

--- failure pub_module_level_const_missing: pub module-level const is missing ---

Description:
A public const is missing, renamed, or changed from const to static.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/pub_module_level_const_missing.ron

Failed in:
  Q_IS_BREAKING_CHANGE in file /tmp/.tmpIfvFCR/koji/src/lib/questions.rs:21
  Q_SUMMARY in file /tmp/.tmpIfvFCR/koji/src/lib/questions.rs:19
  Q_COMMIT_TYPE in file /tmp/.tmpIfvFCR/koji/src/lib/questions.rs:17
  Q_HAS_OPEN_ISSUE in file /tmp/.tmpIfvFCR/koji/src/lib/questions.rs:22
  Q_BODY in file /tmp/.tmpIfvFCR/koji/src/lib/questions.rs:20
  Q_SCOPE in file /tmp/.tmpIfvFCR/koji/src/lib/questions.rs:18
  Q_ISSUE_REFERENCE in file /tmp/.tmpIfvFCR/koji/src/lib/questions.rs:23
```

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[3.0.0](v2.2.0...v3.0.0) -
2024-11-26

### Added

- type filtering, multi-line body support
([#99](#99))
- breaking change footers
([#101](#101))
- [**breaking**] stage files, better args, deps
([#102](#102))
- add shell completions subcommand
([#106](#106))
- non-default vendored-openssl feature
([#98](#98))
- *(cargo)* add documentation and repository links
([#88](#88))

### Changed

- split test and coverage, deps
([#107](#107))
- shorter test asserts, vendored openssl, complete workflow overhaul
([#94](#94))
- *(readme)* better badges
([#100](#100))
- *(gitignore)* add intellij, vim, vscode and git
([#96](#96))
- update repository url, badges and license
([#93](#93))
- use asdf

### Fixed

- *(autocomplete)* check for empty repo before revwalk
([#105](#105))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Finley Thomalla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant