Merge remote-tracking branch 'origin/master' into f32
This commit is contained in:
commit
1ccd5432d5
3
.gitignore
vendored
3
.gitignore
vendored
@ -9,3 +9,6 @@
|
||||
/bat-0.13.0.crate
|
||||
/bat-0.14.0.crate
|
||||
/bat-0.15.0.crate
|
||||
/bat-0.15.1.crate
|
||||
/bat-0.15.2.crate
|
||||
/bat-0.15.4.crate
|
||||
|
44
0001-Siwtch-to-path-absolutize.patch
Normal file
44
0001-Siwtch-to-path-absolutize.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From d565131b04db44067f1bf07eafc863022c6b7c55 Mon Sep 17 00:00:00 2001
|
||||
From: Igor Raits <i.gnatenko.brain@gmail.com>
|
||||
Date: Sun, 21 Jun 2020 10:16:03 +0200
|
||||
Subject: [PATCH] Siwtch to path-absolutize
|
||||
|
||||
This reverts commit bd17fd571f99d52b4d76a24aee719dcd89a0244d.
|
||||
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
|
||||
---
|
||||
src/assets.rs | 8 +++-----
|
||||
1 file changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/assets.rs b/src/assets.rs
|
||||
index 86c3fe0..3899d7c 100644
|
||||
--- a/src/assets.rs
|
||||
+++ b/src/assets.rs
|
||||
@@ -1,3 +1,4 @@
|
||||
+use std::borrow::Cow;
|
||||
use std::collections::BTreeMap;
|
||||
use std::ffi::OsStr;
|
||||
use std::fs::{self, File};
|
||||
@@ -8,7 +9,7 @@ use syntect::dumps::{dump_to_file, from_binary, from_reader};
|
||||
use syntect::highlighting::{Theme, ThemeSet};
|
||||
use syntect::parsing::{SyntaxReference, SyntaxSet, SyntaxSetBuilder};
|
||||
|
||||
-use path_abs::PathAbs;
|
||||
+use path_absolutize::Absolutize;
|
||||
|
||||
use crate::assets_metadata::AssetsMetadata;
|
||||
use crate::error::*;
|
||||
@@ -216,10 +217,7 @@ impl HighlightingAssets {
|
||||
if let Some(path_str) = path_str {
|
||||
// If a path was provided, we try and detect the syntax based on extension mappings.
|
||||
let path = Path::new(path_str);
|
||||
- let absolute_path = PathAbs::new(path)
|
||||
- .ok()
|
||||
- .map(|p| p.as_path().to_path_buf())
|
||||
- .unwrap_or_else(|| path.to_owned());
|
||||
+ let absolute_path = path.absolutize().unwrap_or(Cow::Borrowed(path));
|
||||
|
||||
match mapping.get_syntax_for(absolute_path) {
|
||||
Some(MappingTarget::MapToUnknown) => line_syntax.ok_or_else(|| {
|
||||
--
|
||||
2.27.0
|
||||
|
14
bat-fix-metadata.diff
Normal file
14
bat-fix-metadata.diff
Normal file
@ -0,0 +1,14 @@
|
||||
--- bat-0.15.4/Cargo.toml 2020-05-27T10:03:57+00:00
|
||||
+++ bat-0.15.4/Cargo.toml 2020-06-21T08:43:31.589254+00:00
|
||||
@@ -71,9 +71,8 @@
|
||||
version = "1.4"
|
||||
optional = true
|
||||
|
||||
-[dependencies.path_abs]
|
||||
-version = "0.5"
|
||||
-default-features = false
|
||||
+[dependencies.path-absolutize]
|
||||
+version = "3"
|
||||
|
||||
[dependencies.semver]
|
||||
version = "0.9"
|
@ -1,4 +1,4 @@
|
||||
# Generated by rust2rpm 13
|
||||
# Generated by rust2rpm 15
|
||||
%bcond_without check
|
||||
# No devel stuff in released Fedora
|
||||
%global __cargo_is_lib() false
|
||||
@ -6,7 +6,7 @@
|
||||
%global crate bat
|
||||
|
||||
Name: rust-%{crate}
|
||||
Version: 0.15.0
|
||||
Version: 0.15.4
|
||||
Release: 1%{?dist}
|
||||
Summary: cat(1) clone with wings
|
||||
|
||||
@ -14,6 +14,10 @@ Summary: cat(1) clone with wings
|
||||
License: MIT or ASL 2.0
|
||||
URL: https://crates.io/crates/bat
|
||||
Source: %{crates_source}
|
||||
# Initial patched metadata
|
||||
# * Switch to path-absolutize, https://github.com/sharkdp/bat/pull/1025
|
||||
Patch0: bat-fix-metadata.diff
|
||||
Patch0001: 0001-Siwtch-to-path-absolutize.patch
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
|
||||
@ -26,18 +30,16 @@ Cat(1) clone with wings.}
|
||||
|
||||
%package -n %{crate}
|
||||
Summary: %{summary}
|
||||
# Install all deps (without check), grab their licenses and make it simple
|
||||
# * ASL 2.0
|
||||
# * ASL 2.0 or Boost
|
||||
# * ASL 2.0 or MIT
|
||||
# * BSD
|
||||
# * CC0
|
||||
# * ISC
|
||||
# * LGPLv3+
|
||||
# * MIT
|
||||
# * MIT or ASL 2.0
|
||||
# * Unlicense or MIT
|
||||
# * zlib
|
||||
# ASL 2.0
|
||||
# ASL 2.0 or Boost
|
||||
# BSD
|
||||
# CC0
|
||||
# ISC
|
||||
# LGPLv3+
|
||||
# MIT
|
||||
# MIT or ASL 2.0
|
||||
# Unlicense or MIT
|
||||
# zlib
|
||||
License: ASL 2.0 and BSD and CC0 and ISC and LGPLv3+ and MIT and zlib
|
||||
|
||||
%description -n %{crate} %{_description}
|
||||
@ -74,6 +76,18 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/fish/vendor_completions.d \
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sun Jun 21 10:43:31 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.15.4-1
|
||||
- Update to 0.15.4
|
||||
|
||||
* Mon May 25 18:52:24 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.15.2-1
|
||||
- Update to 0.15.2
|
||||
|
||||
* Tue May 12 2020 Josh Stone <jistone@redhat.com> - 0.15.1-1
|
||||
- Update to 0.15.1
|
||||
|
||||
* Sat May 02 10:58:34 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.15.0-2
|
||||
- Update console to 0.11.2
|
||||
|
||||
* Mon Apr 27 08:12:43 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.15.0-1
|
||||
- Update to 0.15.0
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (bat-0.15.0.crate) = 961c26008328a70c611379d86dafa5565243e327a0898dff24e46447eb41594d106a846e638a2aae3d2d896f0cfb4ec0c60f678ea14aa534e80bfb1f2edf551f
|
||||
SHA512 (bat-0.15.4.crate) = 159fc9483c5fbc20df1451abb748e09c8953434ace907127388f4c22ab9fb545cbe8390d25005d00685074efd097111afab91ca87ada043720bfcdf83cfa526d
|
||||
|
Loading…
Reference in New Issue
Block a user