tags 1139491 +patch
thanks

The important part of the log is actually.

error: Please set either the `sha1` or the `sha256` feature flag
  --> /usr/share/cargo/registry/gix-hash-0.25.0/src/lib.rs:32:1
   |
32 | compile_error!("Please set either the `sha1` or the `sha256` feature 
flag");
   | 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^.
With recent versions of gix, applications must specify whether they
want sha1 and/or sha256 support.

I believe turning on just sha1 will give the same behaviour previous
versions of gix used by default, but you may want to consider also
turning on support for sha256.

After fixing that, the build failed with.

error[E0599]: no method named `is_bare` found for enum `gix::repository::Kind` 
in the current scope
  --> src/modules/git_status.rs:37:18
   |
37 |     if repo.kind.is_bare() {
   |                  ^^^^^^^ method not found in `gix::repository::Kind`

For more information about this error, try `rustc --explain E0599`.

It looks like since gix 0.79 the "kind" enum no longer distinguishes
between regular and bare repos, I grabbed a patch from upstream to
deal with that.

And with that dealt with, the package built successfully. Debdiff
is attatched.
diff -Nru starship-1.22.1/debian/changelog starship-1.22.1/debian/changelog
--- starship-1.22.1/debian/changelog    2026-04-17 13:23:18.000000000 +0000
+++ starship-1.22.1/debian/changelog    2026-07-09 15:24:08.000000000 +0000
@@ -1,3 +1,11 @@
+starship (1.22.1-9.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Enable sha1 feature in gix.
+  * Backport upstream patch to support gix 0.79 and newer.
+
+ -- Peter Michael Green <[email protected]>  Thu, 09 Jul 2026 15:24:08 +0000
+
 starship (1.22.1-9) unstable; urgency=medium
 
   * Team upload.
diff -Nru starship-1.22.1/debian/patches/enable-sha1.patch 
starship-1.22.1/debian/patches/enable-sha1.patch
--- starship-1.22.1/debian/patches/enable-sha1.patch    1970-01-01 
00:00:00.000000000 +0000
+++ starship-1.22.1/debian/patches/enable-sha1.patch    2026-07-09 
15:24:08.000000000 +0000
@@ -0,0 +1,13 @@
+Index: starship-1.22.1/Cargo.toml
+===================================================================
+--- starship-1.22.1.orig/Cargo.toml
++++ starship-1.22.1/Cargo.toml
+@@ -41,7 +41,7 @@ clap_complete = "4.5.40"
+ dirs = "6.0.0"
+ dunce = "1.0.5"
+ # default feature restriction addresses 
https://github.com/starship/starship/issues/4251
+-gix = { version = ">= 0.69.1", default-features = false, features = 
["max-performance-safe", "revision"] }
++gix = { version = ">= 0.69.1", default-features = false, features = 
["max-performance-safe", "revision", "sha1"] }
+ gix-features = { version = ">= 0.39.1", optional = true }
+ indexmap = { version = "2.7.0", features = ["serde"] }
+ log = { version = "0.4.24", features = ["std"] }
diff -Nru starship-1.22.1/debian/patches/gix-0.79.patch 
starship-1.22.1/debian/patches/gix-0.79.patch
--- starship-1.22.1/debian/patches/gix-0.79.patch       1970-01-01 
00:00:00.000000000 +0000
+++ starship-1.22.1/debian/patches/gix-0.79.patch       2026-07-09 
15:24:08.000000000 +0000
@@ -0,0 +1,49 @@
+This patch is based on the upstream commit described below, adapted for use
+in the Debian package by Peter Michael Green.
+
+commit a981bea0948acea32580cc8551083e95c97dd50e
+Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
+Date:   Sat Feb 28 19:42:30 2026 +0100
+
+    build(deps): update rust crate gix to 0.80.0 (#7267)
+    
+    * build(deps): update rust crate gix to 0.80.0
+    
+    * chore: handle gix update
+    
+    ---------
+    
+    Co-authored-by: renovate[bot] 
<29139614+renovate[bot]@users.noreply.github.com>
+    Co-authored-by: David Knaack <[email protected]>
+
+diff --git a/src/context.rs b/src/context.rs
+index e82acaa3..ef56d1f8 100644
+--- a/src/context.rs
++++ b/src/context.rs
+@@ -9,1 +9,0 @@
+-    repository::Kind,
+@@ -381,7 +380,6 @@ impl<'a> Context<'a> {
+                     state: repository.state(),
+                     remote,
+                     fs_monitor_value_is_true,
+-                    kind: repository.kind(),
+                 })
+             })
+             .as_ref()
+@@ -727,3 +725,0 @@
+-
+-    // Kind of repository, work tree or bare
+-    pub kind: Kind,
+diff --git a/src/modules/git_status.rs b/src/modules/git_status.rs
+index dee36c0b..48866e3d 100644
+--- a/src/modules/git_status.rs
++++ b/src/modules/git_status.rs
+@@ -35,7 +35,7 @@ pub fn module<'a>(context: &'a Context) -> 
Option<Module<'a>> {
+     // Return None if not in git repository
+     let repo = context.get_repo().ok()?;
+ 
+-    if repo.kind.is_bare() {
++    if repo.open().is_bare() {
+         log::debug!("This is a bare repository, git_status is not 
applicable");
+         return None;
+     }
diff -Nru starship-1.22.1/debian/patches/series 
starship-1.22.1/debian/patches/series
--- starship-1.22.1/debian/patches/series       2026-04-17 13:23:18.000000000 
+0000
+++ starship-1.22.1/debian/patches/series       2026-07-09 15:24:08.000000000 
+0000
@@ -5,3 +5,5 @@
 quick-xml-0.38.patch
 newer-gix.patch
 bytesize-2.patch
+enable-sha1.patch
+gix-0.79.patch

Reply via email to