You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
2.9 KiB
55 lines
2.9 KiB
From f757300718b1861852d4a33459385eaf921d69e7 Mon Sep 17 00:00:00 2001
|
|
From: Benjamin Sago <ogham@bsago.me>
|
|
Date: Sun, 11 Mar 2018 11:25:06 +0000
|
|
Subject: [PATCH] Upgrade libgit2
|
|
|
|
The ogham/git2-rs repository that exa uses in the Vagrant VM has also been updated. The only casualty was that some constants got namespaced.
|
|
---
|
|
src/fs/feature/git.rs | 24 ++++++++++++------------
|
|
1 file changed, 12 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/src/fs/feature/git.rs b/src/fs/feature/git.rs
|
|
index 6ecf8e9..9cc1b7f 100644
|
|
--- a/src/fs/feature/git.rs
|
|
+++ b/src/fs/feature/git.rs
|
|
@@ -274,12 +274,12 @@ fn reorient(path: &Path) -> PathBuf {
|
|
/// The character to display if the file has been modified, but not staged.
|
|
fn working_tree_status(status: git2::Status) -> f::GitStatus {
|
|
match status {
|
|
- s if s.contains(git2::STATUS_WT_NEW) => f::GitStatus::New,
|
|
- s if s.contains(git2::STATUS_WT_MODIFIED) => f::GitStatus::Modified,
|
|
- s if s.contains(git2::STATUS_WT_DELETED) => f::GitStatus::Deleted,
|
|
- s if s.contains(git2::STATUS_WT_RENAMED) => f::GitStatus::Renamed,
|
|
- s if s.contains(git2::STATUS_WT_TYPECHANGE) => f::GitStatus::TypeChange,
|
|
- _ => f::GitStatus::NotModified,
|
|
+ s if s.contains(git2::Status::WT_NEW) => f::GitStatus::New,
|
|
+ s if s.contains(git2::Status::WT_MODIFIED) => f::GitStatus::Modified,
|
|
+ s if s.contains(git2::Status::WT_DELETED) => f::GitStatus::Deleted,
|
|
+ s if s.contains(git2::Status::WT_RENAMED) => f::GitStatus::Renamed,
|
|
+ s if s.contains(git2::Status::WT_TYPECHANGE) => f::GitStatus::TypeChange,
|
|
+ _ => f::GitStatus::NotModified,
|
|
}
|
|
}
|
|
|
|
@@ -287,11 +287,11 @@ fn working_tree_status(status: git2::Status) -> f::GitStatus {
|
|
/// has been staged.
|
|
fn index_status(status: git2::Status) -> f::GitStatus {
|
|
match status {
|
|
- s if s.contains(git2::STATUS_INDEX_NEW) => f::GitStatus::New,
|
|
- s if s.contains(git2::STATUS_INDEX_MODIFIED) => f::GitStatus::Modified,
|
|
- s if s.contains(git2::STATUS_INDEX_DELETED) => f::GitStatus::Deleted,
|
|
- s if s.contains(git2::STATUS_INDEX_RENAMED) => f::GitStatus::Renamed,
|
|
- s if s.contains(git2::STATUS_INDEX_TYPECHANGE) => f::GitStatus::TypeChange,
|
|
- _ => f::GitStatus::NotModified,
|
|
+ s if s.contains(git2::Status::INDEX_NEW) => f::GitStatus::New,
|
|
+ s if s.contains(git2::Status::INDEX_MODIFIED) => f::GitStatus::Modified,
|
|
+ s if s.contains(git2::Status::INDEX_DELETED) => f::GitStatus::Deleted,
|
|
+ s if s.contains(git2::Status::INDEX_RENAMED) => f::GitStatus::Renamed,
|
|
+ s if s.contains(git2::Status::INDEX_TYPECHANGE) => f::GitStatus::TypeChange,
|
|
+ _ => f::GitStatus::NotModified,
|
|
}
|
|
}
|
|
--
|
|
2.16.2
|
|
|