bootstrap: always use commit info file instead of checking .git
authorMatthijs van Otterdijk <matthijs@wirevirt.net>
Thu, 14 Jul 2022 11:17:38 +0000 (13:17 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Fri, 26 Dec 2025 19:54:51 +0000 (20:54 +0100)
Forwarded: not-needed

Gbp-Pq: Topic build
Gbp-Pq: Name d-bootstrap-disable-git.patch

src/bootstrap/src/utils/channel.rs

index 21b4257e54d0b3195e8df49b842f1a8d96175246..6b4feb1568a655fd51e2ec07c2cffb5481478523 100644 (file)
@@ -37,12 +37,13 @@ pub struct Info {
 impl GitInfo {
     pub fn new(omit_git_hash: bool, dir: &Path, exec_ctx: impl AsRef<ExecutionContext>) -> GitInfo {
         // See if this even begins to look like a git dir
-        if !dir.join(".git").exists() {
+        // Debian: always use commit info file, since our .git is not upstreams..
+        //if !dir.join(".git").exists() {
             match read_commit_info_file(dir) {
                 Some(info) => return GitInfo::RecordedForTarball(info),
                 None => return GitInfo::Absent,
             }
-        }
+        //}
 
         let mut git_command = helpers::git(Some(dir));
         git_command.arg("rev-parse");