public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/rust-git-delta] f43: Update xdg from 2.4.1 to 3.0.0
Date: Fri, 14 Aug 2026 20:26:55 GMT	[thread overview]
Message-ID: <178673921598.1.8849268799993269689.rpms-rust-git-delta-ae72c173eb3c@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rust-git-delta
Branch : f43
Commit : ae72c173eb3cd4d6ecd7a46658191d659a4a18a1
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-04-20T10:43:53+01:00
Stats  : +71/-1 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/rust-git-delta/c/ae72c173eb3cd4d6ecd7a46658191d659a4a18a1?branch=f43

Log:
Update xdg from 2.4.1 to 3.0.0

---
diff --git a/0001-Update-xdg-from-2.4.1-to-3.0.0.patch b/0001-Update-xdg-from-2.4.1-to-3.0.0.patch
new file mode 100644
index 0000000..c4e1e68
--- /dev/null
+++ b/0001-Update-xdg-from-2.4.1-to-3.0.0.patch
@@ -0,0 +1,46 @@
+From 6938e3e9c39fc69d28c68c84cc809645d0658a29 Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Mon, 20 Apr 2026 10:13:42 +0100
+Subject: [PATCH] Update xdg from 2.4.1 to 3.0.0
+
+---
+ Cargo.lock               | 12 ++++++------
+ Cargo.toml               |  2 +-
+ src/features/navigate.rs | 11 ++++++-----
+ 3 files changed, 13 insertions(+), 12 deletions(-)
+
+diff --git a/src/features/navigate.rs b/src/features/navigate.rs
+index 7f415bc..43a12b3 100644
+--- a/src/features/navigate.rs
++++ b/src/features/navigate.rs
+@@ -102,7 +102,7 @@ fn get_delta_less_hist_file() -> std::io::Result<PathBuf> {
+ 
+ #[cfg(not(target_os = "windows"))]
+ fn get_delta_less_hist_file() -> std::io::Result<PathBuf> {
+-    let dir = xdg::BaseDirectories::with_prefix("delta")?;
++    let dir = xdg::BaseDirectories::with_prefix("delta");
+     dir.place_data_file("lesshst")
+ }
+ 
+@@ -126,13 +126,14 @@ fn get_less_hist_file() -> Option<PathBuf> {
+                     // According to the less 643 manual:
+                     // "$XDG_STATE_HOME/lesshst" or "$HOME/.local/state/lesshst" or
+                     // "$XDG_DATA_HOME/lesshst" or "$HOME/.lesshst".
+-                    let xdg_dirs = xdg::BaseDirectories::new().ok()?;
++                    let xdg_dirs = xdg::BaseDirectories::new();
+                     [
+-                        xdg_dirs.get_state_home().join("lesshst"),
+-                        xdg_dirs.get_data_home().join("lesshst"),
+-                        home_dir.join(".lesshst"),
++                        xdg_dirs.get_state_home().map(|path| path.join("lesshst")),
++                        xdg_dirs.get_data_home().map(|path| path.join("lesshst")),
++                        Some(home_dir.join(".lesshst")),
+                     ]
+                     .iter()
++                    .flatten()
+                     .filter(|path| path.exists())
+                     .max_by_key(|path| {
+                         std::fs::metadata(path)
+-- 
+2.53.0
+

diff --git a/git-delta-fix-metadata.diff b/git-delta-fix-metadata.diff
index a1c4b65..4ecabf4 100644
--- a/git-delta-fix-metadata.diff
+++ b/git-delta-fix-metadata.diff
@@ -1,5 +1,5 @@
 --- git-delta-0.19.1/Cargo.toml	2006-07-24T01:21:28+00:00
-+++ git-delta-0.19.1/Cargo.toml	2026-03-22T22:31:23.105139+00:00
++++ git-delta-0.19.1/Cargo.toml	2026-04-20T09:43:23.155956+00:00
 @@ -85,7 +85,7 @@
  version = "4.4.4"
  
@@ -18,6 +18,15 @@
  
  [dependencies.unicode-segmentation]
  version = "1.10.1"
+@@ -147,7 +147,7 @@
+ version = ">=0.1.14, <0.2.0"
+ 
+ [dependencies.xdg]
+-version = "2.4.1"
++version = "3.0.0"
+ 
+ [dev-dependencies.insta]
+ version = "1.*"
 @@ -160,7 +160,7 @@
  version = "1.4"
  

diff --git a/rust-git-delta.spec b/rust-git-delta.spec
index 43e2fd4..c827740 100644
--- a/rust-git-delta.spec
+++ b/rust-git-delta.spec
@@ -17,9 +17,14 @@ Source:         %{crates_source}
 # * relax console dependency from 0.15.0 to >=0.15.0,<0.17.0
 # * bump terminal-colorsaurus from 0.4.8 to 1.0.3:
 #   https://github.com/dandavison/delta/pull/2119
+# * Update xdg from 2.4.1. to 3.0.0:
+#   https://github.com/dandavison/delta/pull/2147; requires a small source-code
+#   patch
 Patch:          git-delta-fix-metadata.diff
 # * https://github.com/dandavison/delta/pull/2119
 Patch2:         0001-Update-terminal-colorsaurus-to-version-1.0.3.patch
+# * https://github.com/dandavison/delta/pull/2147
+Patch3:         0001-Update-xdg-from-2.4.1-to-3.0.0.patch
 
 BuildRequires:  cargo-rpm-macros >= 24
 %if %{with check}

diff --git a/rust2rpm.toml b/rust2rpm.toml
index efad863..b3c3d10 100644
--- a/rust2rpm.toml
+++ b/rust2rpm.toml
@@ -11,6 +11,11 @@ cargo-toml-patch-comments = [
     bump terminal-colorsaurus from 0.4.8 to 1.0.3: \
     https://github.com/dandavison/delta/pull/2119\
     """,
+    """\
+    Update xdg from 2.4.1. to 3.0.0: \
+    https://github.com/dandavison/delta/pull/2147; \
+    requires a small source-code patch\
+    """,
 ]
 extra-files = [
     "%{bash_completions_dir}/delta.bash",
@@ -23,6 +28,11 @@ number = 2
 file = "0001-Update-terminal-colorsaurus-to-version-1.0.3.patch"
 comments = ["https://github.com/dandavison/delta/pull/2119"]
 
+[[package.extra-patches]]
+number = 3
+file = "0001-Update-xdg-from-2.4.1-to-3.0.0.patch"
+comments = ["https://github.com/dandavison/delta/pull/2147"]
+
 [requires]
 test = ["git-core"]
 

                 reply	other threads:[~2026-08-14 20:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178673921598.1.8849268799993269689.rpms-rust-git-delta-ae72c173eb3c@fedoraproject.org \
    --to=code@musicinmybrain.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox