// Copyright 2023 Georges Racinet <georges.racinet@octobus.net> // // This software may be used and distributed according to the terms of the // GNU General Public License version 2 or any later version. // // SPDX-License-Identifier: GPL-2.0-or-later //! Git specific things, mostly constants. // Not sure about these, maybe bytes variants would turn out to be more useful pub const ZERO_SHA_1: &str = "0000000000000000000000000000000000000000"; pub const NULL_COMMIT_ID: &str = ZERO_SHA_1; pub const NULL_BLOB_OID: &str = ZERO_SHA_1; // from `sha1-file.c` in Git 2.28 sources // we're not dealing for now with the fact that there will be // two kinds of OIDs with SHA-1 and SHA-256 soon. // The Git tree object hash that corresponds to an empty tree (directory) pub const EMPTY_TREE_OID: &str = "4b825dc642cb6eb9a060e54bf8d69288fbee4904"; // The Git blob object hash that corresponds to an empty blob (file) pub const EMPTY_BLOB_OID: &str = "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"; pub const OBJECT_MODE_DOES_NOT_EXIST: i32 = 0; // see, e.g, ChangedPaths in diff.proto pub const OBJECT_MODE_LINK: i32 = 0o120000; // symlink to file or directory pub const OBJECT_MODE_EXECUTABLE: i32 = 0o100755; // for blobs only pub const OBJECT_MODE_NON_EXECUTABLE: i32 = 0o100644; // for blobs only pub const OBJECT_MODE_TREE: i32 = 0o40000;