Skip to content

Commit 53cdd8a

Browse files
committed
Allow builds from 'git archive' generated tarballs
1 parent d6ab753 commit 53cdd8a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
### Added
11+
* enable builds from `git archive` generated source tarballs [[@alerque](https://github.com/alerque)] ([#2187](https://github.com/extrawurst/gitui/pull/2187))
12+
1013
## [0.26.0+1] - 2024-04-14
1114

1215
**0.26.1**

build.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
fn get_git_hash() -> String {
22
use std::process::Command;
33

4+
// Allow builds from `git archive` generated tarballs if output of `git get-tar-commit-id` is
5+
// set in an env var.
6+
if let Ok(commit) = std::env::var("TAR_COMMIT_ID") {
7+
return commit[..7].to_string();
8+
};
49
let commit = Command::new("git")
510
.arg("rev-parse")
6-
.arg("--short")
11+
.arg("--short=7")
712
.arg("--verify")
813
.arg("HEAD")
914
.output();

0 commit comments

Comments
 (0)