From 44fe5a519bc08c9a17da5b746d1fb9a4beabb2e9 Mon Sep 17 00:00:00 2001 From: zhenyi <434836402@qq.com> Date: Fri, 12 Jun 2026 15:06:39 +0800 Subject: [PATCH] chore(copyright): add copyright headers to all source files --- archive/get_archive.rs | 2 ++ archive/list_archive_entries.rs | 2 ++ archive/mod.rs | 2 ++ bare.rs | 2 ++ blame/do_blame.rs | 2 ++ blame/mod.rs | 2 ++ blob/get_blob.rs | 2 ++ blob/get_raw_blob.rs | 2 ++ blob/mod.rs | 2 ++ branch/compare_branch.rs | 2 ++ branch/create_branch.rs | 2 ++ branch/delete_branch.rs | 2 ++ branch/get_branch.rs | 2 ++ branch/list_branches.rs | 2 ++ branch/mod.rs | 2 ++ branch/rename_branch.rs | 2 ++ branch/set_branch_upstream.rs | 2 ++ branch/update_branch_target.rs | 2 ++ build.rs | 2 ++ commit/cherry_pick_commit.rs | 2 ++ commit/compare_commits.rs | 2 ++ commit/count_commits.rs | 2 ++ commit/create_commit.rs | 2 ++ commit/find_commit.rs | 2 ++ commit/get_commit.rs | 2 ++ commit/get_commit_ancestors.rs | 2 ++ commit/list_commits.rs | 2 ++ commit/mod.rs | 2 ++ commit/query.rs | 2 ++ commit/revert_commit.rs | 2 ++ commit/types.rs | 2 ++ config.rs | 2 ++ diff/changed_paths.rs | 2 ++ diff/get_commit_diff.rs | 2 ++ diff/get_diff.rs | 2 ++ diff/get_diff_stats.rs | 2 ++ diff/get_patch.rs | 2 ++ diff/mod.rs | 2 ++ diff/raw.rs | 2 ++ disk_cache.rs | 2 ++ error.rs | 2 ++ hooks/manager.rs | 2 ++ hooks/mod.rs | 2 ++ hooks/runner.rs | 2 ++ hooks/sanitize.rs | 2 ++ init.rs | 2 ++ lib.rs | 2 ++ macros.rs | 2 ++ main.rs | 2 ++ merge/check_merge.rs | 2 ++ merge/do_merge.rs | 2 ++ merge/list_merge_conflicts.rs | 2 ++ merge/mod.rs | 2 ++ merge/rebase.rs | 2 ++ merge/resolve_merge_conflicts.rs | 2 ++ metrics.rs | 2 ++ oid.rs | 2 ++ pack/advertise_refs.rs | 2 ++ pack/fsck.rs | 2 ++ pack/index_pack.rs | 2 ++ pack/list_packfiles.rs | 2 ++ pack/mod.rs | 2 ++ pack/pack_objects.rs | 2 ++ pack/receive_pack.rs | 2 ++ pack/upload_pack.rs | 2 ++ pack_cache.rs | 2 ++ paginate.rs | 2 ++ pb/mod.rs | 2 ++ rate_limit.rs | 2 ++ refs/find_refs.rs | 2 ++ refs/list_refs.rs | 2 ++ refs/mod.rs | 2 ++ refs/update_refs.rs | 2 ++ remote/find_remote.rs | 2 ++ remote/mirror.rs | 2 ++ remote/mod.rs | 2 ++ repository/find_license.rs | 2 ++ repository/find_merge_base.rs | 2 ++ repository/lang_stats.rs | 2 ++ repository/mod.rs | 2 ++ repository/objects_size.rs | 2 ++ repository/optimize.rs | 2 ++ repository/raw_changes.rs | 2 ++ repository/search_files.rs | 2 ++ sanitize.rs | 2 ++ server/archive.rs | 2 ++ server/blame.rs | 2 ++ server/branch.rs | 2 ++ server/cache.rs | 2 ++ server/commit.rs | 2 ++ server/diff.rs | 2 ++ server/merge.rs | 2 ++ server/mod.rs | 2 ++ server/pack.rs | 2 ++ server/refs.rs | 2 ++ server/remote.rs | 2 ++ server/repository.rs | 2 ++ server/repository_maint.rs | 2 ++ server/tag.rs | 2 ++ server/tree.rs | 2 ++ snapshot/mod.rs | 2 ++ snapshot/ops.rs | 2 ++ snapshot/storage.rs | 2 ++ snapshot/sync.rs | 2 ++ tag/create_tag.rs | 2 ++ tag/delete_tag.rs | 2 ++ tag/get_tag.rs | 2 ++ tag/list_tags.rs | 2 ++ tag/mod.rs | 2 ++ tag/verify_tag.rs | 2 ++ tests/archive_test.rs | 2 ++ tests/bare_test.rs | 2 ++ tests/blame_test.rs | 2 ++ tests/branch_test.rs | 2 ++ tests/commit_test.rs | 2 ++ tests/common/mod.rs | 2 ++ tests/diff_test.rs | 2 ++ tests/disk_cache_test.rs | 2 ++ tests/error_test.rs | 2 ++ tests/hooks_test.rs | 2 ++ tests/infrastructure_test.rs | 2 ++ tests/integration.rs | 2 ++ tests/lang_stats_test.rs | 2 ++ tests/macro_test.rs | 2 ++ tests/merge_test.rs | 2 ++ tests/oid_test.rs | 2 ++ tests/pack_test.rs | 2 ++ tests/refs_test.rs | 2 ++ tests/remote_test.rs | 2 ++ tests/repository_test.rs | 2 ++ tests/sanitize_test.rs | 2 ++ tests/snapshot_test.rs | 2 ++ tests/tag_test.rs | 2 ++ tests/tree_test.rs | 2 ++ tree/find_files.rs | 2 ++ tree/get_file_metadata.rs | 2 ++ tree/get_tree.rs | 2 ++ tree/list_tree.rs | 2 ++ tree/mod.rs | 2 ++ 139 files changed, 278 insertions(+) diff --git a/archive/get_archive.rs b/archive/get_archive.rs index f53b289..69ffe23 100644 --- a/archive/get_archive.rs +++ b/archive/get_archive.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use std::process::{Command, Stdio}; use tokio_stream::wrappers::ReceiverStream; diff --git a/archive/list_archive_entries.rs b/archive/list_archive_entries.rs index 2f8e611..de52d41 100644 --- a/archive/list_archive_entries.rs +++ b/archive/list_archive_entries.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use std::process::Command; use crate::bare::GitBare; diff --git a/archive/mod.rs b/archive/mod.rs index ddd2882..a5a7cb2 100644 --- a/archive/mod.rs +++ b/archive/mod.rs @@ -1,2 +1,4 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub mod get_archive; pub mod list_archive_entries; diff --git a/bare.rs b/bare.rs index 9ac553d..7e9df02 100644 --- a/bare.rs +++ b/bare.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use std::path::{Path, PathBuf}; use crate::error::{GitError, GitResult}; diff --git a/blame/do_blame.rs b/blame/do_blame.rs index 5fa9044..7eda36b 100644 --- a/blame/do_blame.rs +++ b/blame/do_blame.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::paginate; diff --git a/blame/mod.rs b/blame/mod.rs index 9225936..2dad2a5 100644 --- a/blame/mod.rs +++ b/blame/mod.rs @@ -1 +1,3 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub mod do_blame; diff --git a/blob/get_blob.rs b/blob/get_blob.rs index 9898f2a..b60076d 100644 --- a/blob/get_blob.rs +++ b/blob/get_blob.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use gix::object::tree::EntryKind; use crate::bare::GitBare; diff --git a/blob/get_raw_blob.rs b/blob/get_raw_blob.rs index ca54496..46a43c4 100644 --- a/blob/get_raw_blob.rs +++ b/blob/get_raw_blob.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::{GetBlobRequest, GetRawBlobRequest, GetRawBlobResponse}; diff --git a/blob/mod.rs b/blob/mod.rs index b47e4d9..79515c4 100644 --- a/blob/mod.rs +++ b/blob/mod.rs @@ -1,2 +1,4 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub mod get_blob; pub mod get_raw_blob; diff --git a/branch/compare_branch.rs b/branch/compare_branch.rs index ec0b5bd..d4e2de8 100644 --- a/branch/compare_branch.rs +++ b/branch/compare_branch.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::pb::{CompareBranchRequest, CompareBranchResponse}; diff --git a/branch/create_branch.rs b/branch/create_branch.rs index d931fcf..7e64c30 100644 --- a/branch/create_branch.rs +++ b/branch/create_branch.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use std::process::Command; use crate::bare::GitBare; diff --git a/branch/delete_branch.rs b/branch/delete_branch.rs index 7127089..44d30fc 100644 --- a/branch/delete_branch.rs +++ b/branch/delete_branch.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use std::process::Command; use crate::bare::GitBare; diff --git a/branch/get_branch.rs b/branch/get_branch.rs index 46e1556..ccde878 100644 --- a/branch/get_branch.rs +++ b/branch/get_branch.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::{Branch, GetBranchRequest}; diff --git a/branch/list_branches.rs b/branch/list_branches.rs index b72253a..f3f7b34 100644 --- a/branch/list_branches.rs +++ b/branch/list_branches.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::paginate; diff --git a/branch/mod.rs b/branch/mod.rs index c0c2e6e..a7ec923 100644 --- a/branch/mod.rs +++ b/branch/mod.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub mod compare_branch; pub mod create_branch; pub mod delete_branch; diff --git a/branch/rename_branch.rs b/branch/rename_branch.rs index 96803f4..f5395f6 100644 --- a/branch/rename_branch.rs +++ b/branch/rename_branch.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use std::process::Command; use crate::bare::GitBare; diff --git a/branch/set_branch_upstream.rs b/branch/set_branch_upstream.rs index 3fb9e1a..ca18049 100644 --- a/branch/set_branch_upstream.rs +++ b/branch/set_branch_upstream.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::pb::{Branch, GetBranchRequest, SetBranchUpstreamRequest}; diff --git a/branch/update_branch_target.rs b/branch/update_branch_target.rs index 446105e..0cfffcd 100644 --- a/branch/update_branch_target.rs +++ b/branch/update_branch_target.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + #![allow(clippy::collapsible_if)] use std::process::Command; diff --git a/build.rs b/build.rs index 1dbc93d..55eac88 100644 --- a/build.rs +++ b/build.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use serde::Deserialize; use std::collections::HashMap; use std::fs; diff --git a/commit/cherry_pick_commit.rs b/commit/cherry_pick_commit.rs index a383f5a..81fd273 100644 --- a/commit/cherry_pick_commit.rs +++ b/commit/cherry_pick_commit.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::commit::create_commit::command_ok; use crate::error::{GitError, GitResult}; diff --git a/commit/compare_commits.rs b/commit/compare_commits.rs index e22b12d..0a61f6e 100644 --- a/commit/compare_commits.rs +++ b/commit/compare_commits.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::commit::list_commits::read_commit_from_repo; use crate::diff::get_diff_stats::diff_stats_for_range; diff --git a/commit/count_commits.rs b/commit/count_commits.rs index 83d83ff..0fcbafe 100644 --- a/commit/count_commits.rs +++ b/commit/count_commits.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::*; diff --git a/commit/create_commit.rs b/commit/create_commit.rs index 9795ea4..f416cd1 100644 --- a/commit/create_commit.rs +++ b/commit/create_commit.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::oid::ZERO_OID; diff --git a/commit/find_commit.rs b/commit/find_commit.rs index 068de61..2b2f843 100644 --- a/commit/find_commit.rs +++ b/commit/find_commit.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::pb::*; diff --git a/commit/get_commit.rs b/commit/get_commit.rs index 22b5c83..9a9f02f 100644 --- a/commit/get_commit.rs +++ b/commit/get_commit.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::pb::{Commit, GetCommitRequest}; diff --git a/commit/get_commit_ancestors.rs b/commit/get_commit_ancestors.rs index d6cc1c1..2ed1e17 100644 --- a/commit/get_commit_ancestors.rs +++ b/commit/get_commit_ancestors.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::{GetCommitAncestorsRequest, GetCommitAncestorsResponse, ListCommitsRequest}; diff --git a/commit/list_commits.rs b/commit/list_commits.rs index a559046..1f771f3 100644 --- a/commit/list_commits.rs +++ b/commit/list_commits.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::pb::{Commit, ListCommitsRequest, ListCommitsResponse}; diff --git a/commit/mod.rs b/commit/mod.rs index fc7cb8c..8bd139b 100644 --- a/commit/mod.rs +++ b/commit/mod.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub mod cherry_pick_commit; pub mod compare_commits; pub mod count_commits; diff --git a/commit/query.rs b/commit/query.rs index d08eb73..d0ac574 100644 --- a/commit/query.rs +++ b/commit/query.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::*; diff --git a/commit/revert_commit.rs b/commit/revert_commit.rs index 672fed5..b1ee07a 100644 --- a/commit/revert_commit.rs +++ b/commit/revert_commit.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::commit::create_commit::command_ok; use crate::error::{GitError, GitResult}; diff --git a/commit/types.rs b/commit/types.rs index 8b13789..a53e7a1 100644 --- a/commit/types.rs +++ b/commit/types.rs @@ -1 +1,3 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + diff --git a/config.rs b/config.rs index 3307b0c..a6834f6 100644 --- a/config.rs +++ b/config.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Centralized configuration constants for GitKS. //! //! All magic numbers and resource limits are defined here for easy auditing, diff --git a/diff/changed_paths.rs b/diff/changed_paths.rs index eb91ad5..94ebbc8 100644 --- a/diff/changed_paths.rs +++ b/diff/changed_paths.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::*; diff --git a/diff/get_commit_diff.rs b/diff/get_commit_diff.rs index 5154cfe..7a2ccbb 100644 --- a/diff/get_commit_diff.rs +++ b/diff/get_commit_diff.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::pb::{GetCommitDiffRequest, GetDiffRequest, GetDiffResponse}; diff --git a/diff/get_diff.rs b/diff/get_diff.rs index 81699c0..9fc522d 100644 --- a/diff/get_diff.rs +++ b/diff/get_diff.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use std::collections::HashMap; use crate::bare::GitBare; diff --git a/diff/get_diff_stats.rs b/diff/get_diff_stats.rs index faa0877..c90ee52 100644 --- a/diff/get_diff_stats.rs +++ b/diff/get_diff_stats.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::pb::GetDiffStatsRequest; diff --git a/diff/get_patch.rs b/diff/get_patch.rs index 0a138e8..16d5825 100644 --- a/diff/get_patch.rs +++ b/diff/get_patch.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::pb::{GetPatchRequest, GetPatchResponse}; diff --git a/diff/mod.rs b/diff/mod.rs index 2e5f0cf..2ec53c3 100644 --- a/diff/mod.rs +++ b/diff/mod.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub mod changed_paths; pub mod get_commit_diff; pub mod get_diff; diff --git a/diff/raw.rs b/diff/raw.rs index cc99e7f..b76bddf 100644 --- a/diff/raw.rs +++ b/diff/raw.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::*; diff --git a/disk_cache.rs b/disk_cache.rs index c49cdb1..2d9b59c 100644 --- a/disk_cache.rs +++ b/disk_cache.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Disk-based cache infrastructure for GitKS. //! //! Implements the Gitaly-inspired diskcache design: diff --git a/error.rs b/error.rs index 4dc72d9..7cdfda0 100644 --- a/error.rs +++ b/error.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub type GitResult = Result; #[derive(Debug, thiserror::Error)] diff --git a/hooks/manager.rs b/hooks/manager.rs index 6c64ae0..02dea05 100644 --- a/hooks/manager.rs +++ b/hooks/manager.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Hook manager for GitKS. //! //! Manages the installation, listing, and removal of git hooks diff --git a/hooks/mod.rs b/hooks/mod.rs index 19128e6..45971bb 100644 --- a/hooks/mod.rs +++ b/hooks/mod.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Git hooks management for GitKS. //! //! Supports three layers of hooks: diff --git a/hooks/runner.rs b/hooks/runner.rs index 067d780..2c2a6df 100644 --- a/hooks/runner.rs +++ b/hooks/runner.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Hook execution runner. //! //! Executes server hooks, custom hooks, and gRPC callback hooks diff --git a/hooks/sanitize.rs b/hooks/sanitize.rs index 456a3b2..7247374 100644 --- a/hooks/sanitize.rs +++ b/hooks/sanitize.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Hook content sanitization. //! //! Validates custom hook scripts to prevent dangerous commands. diff --git a/init.rs b/init.rs index 69417f8..6273f7d 100644 --- a/init.rs +++ b/init.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; diff --git a/lib.rs b/lib.rs index b6646dd..825e071 100644 --- a/lib.rs +++ b/lib.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub mod archive; pub mod bare; pub mod config; diff --git a/macros.rs b/macros.rs index 3daeb38..d8af6e3 100644 --- a/macros.rs +++ b/macros.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Helper macro to extract and validate a revision selector. //! //! Replaces the repeated pattern of matching on ObjectSelector variants diff --git a/main.rs b/main.rs index cf4ca9d..d7f6cb5 100644 --- a/main.rs +++ b/main.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use std::path::PathBuf; use std::sync::Arc; use std::time::Duration; diff --git a/merge/check_merge.rs b/merge/check_merge.rs index 2e89421..e62ca25 100644 --- a/merge/check_merge.rs +++ b/merge/check_merge.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::{CheckMergeRequest, MergeResult, merge_result}; diff --git a/merge/do_merge.rs b/merge/do_merge.rs index 59741be..19a78b5 100644 --- a/merge/do_merge.rs +++ b/merge/do_merge.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::pb::{MergeRequest, MergeResult, merge_result}; diff --git a/merge/list_merge_conflicts.rs b/merge/list_merge_conflicts.rs index 01593cf..495695e 100644 --- a/merge/list_merge_conflicts.rs +++ b/merge/list_merge_conflicts.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::paginate; diff --git a/merge/mod.rs b/merge/mod.rs index 921cf71..1a813ff 100644 --- a/merge/mod.rs +++ b/merge/mod.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub mod check_merge; pub mod do_merge; pub mod list_merge_conflicts; diff --git a/merge/rebase.rs b/merge/rebase.rs index 4bd519f..c2cada2 100644 --- a/merge/rebase.rs +++ b/merge/rebase.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::commit::create_commit::command_ok; use crate::error::{GitError, GitResult}; diff --git a/merge/resolve_merge_conflicts.rs b/merge/resolve_merge_conflicts.rs index 42e3607..77e8b00 100644 --- a/merge/resolve_merge_conflicts.rs +++ b/merge/resolve_merge_conflicts.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::commit::create_commit::command_ok; use crate::error::{GitError, GitResult}; diff --git a/metrics.rs b/metrics.rs index 7477295..b33ad02 100644 --- a/metrics.rs +++ b/metrics.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Prometheus-compatible metrics for GitKS. //! //! Tracks: diff --git a/oid.rs b/oid.rs index 2326c2b..e3fb5a1 100644 --- a/oid.rs +++ b/oid.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use serde::{Deserialize, Serialize}; /// The null OID representing "no object" in git protocol. diff --git a/pack/advertise_refs.rs b/pack/advertise_refs.rs index 3feb170..9d02d8c 100644 --- a/pack/advertise_refs.rs +++ b/pack/advertise_refs.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::pb::{AdvertiseRefsRequest, AdvertiseRefsResponse, ReferenceAdvertisement}; diff --git a/pack/fsck.rs b/pack/fsck.rs index ed2305a..ef0d615 100644 --- a/pack/fsck.rs +++ b/pack/fsck.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::{FsckRequest, FsckResponse}; diff --git a/pack/index_pack.rs b/pack/index_pack.rs index d11feb3..5aa35d8 100644 --- a/pack/index_pack.rs +++ b/pack/index_pack.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use std::io::Write; use crate::bare::GitBare; diff --git a/pack/list_packfiles.rs b/pack/list_packfiles.rs index 6333860..bb2fd72 100644 --- a/pack/list_packfiles.rs +++ b/pack/list_packfiles.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitError; use crate::paginate; diff --git a/pack/mod.rs b/pack/mod.rs index 1009311..f3a0ddb 100644 --- a/pack/mod.rs +++ b/pack/mod.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub mod advertise_refs; pub mod fsck; pub mod index_pack; diff --git a/pack/pack_objects.rs b/pack/pack_objects.rs index 644f454..3f4a9c1 100644 --- a/pack/pack_objects.rs +++ b/pack/pack_objects.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use std::process::Stdio; use tokio::io::{AsyncReadExt, AsyncWriteExt}; diff --git a/pack/receive_pack.rs b/pack/receive_pack.rs index 2f9b930..c498cd2 100644 --- a/pack/receive_pack.rs +++ b/pack/receive_pack.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use std::process::Stdio; use tokio::io::{AsyncReadExt, AsyncWriteExt}; diff --git a/pack/upload_pack.rs b/pack/upload_pack.rs index 9de10c0..819de95 100644 --- a/pack/upload_pack.rs +++ b/pack/upload_pack.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use std::process::Stdio; use std::time::Duration; diff --git a/pack_cache.rs b/pack_cache.rs index 13ed920..8c05ce0 100644 --- a/pack_cache.rs +++ b/pack_cache.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Pack-objects cache module. //! //! Caches `git pack-objects` output on local disk to reduce CPU load diff --git a/paginate.rs b/paginate.rs index 3a24d9f..6592061 100644 --- a/paginate.rs +++ b/paginate.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::pb::{PageInfo, Pagination}; /// Simple offset-based pagination over an in-memory slice. diff --git a/pb/mod.rs b/pb/mod.rs index 3b64db6..a05ba15 100644 --- a/pb/mod.rs +++ b/pb/mod.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + #![allow(clippy::all)] #![allow(missing_docs)] #![allow(rustdoc::bare_urls)] diff --git a/rate_limit.rs b/rate_limit.rs index 1c75d2c..e50dcbb 100644 --- a/rate_limit.rs +++ b/rate_limit.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Repository-level rate limiting via per-repo semaphores. //! //! Prevents any single repository from consuming all server resources. diff --git a/refs/find_refs.rs b/refs/find_refs.rs index 7015522..88a02c2 100644 --- a/refs/find_refs.rs +++ b/refs/find_refs.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::paginate; diff --git a/refs/list_refs.rs b/refs/list_refs.rs index e510e62..2af0a88 100644 --- a/refs/list_refs.rs +++ b/refs/list_refs.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::ReferenceAdvertisement; diff --git a/refs/mod.rs b/refs/mod.rs index 8aa91f5..eca9f8d 100644 --- a/refs/mod.rs +++ b/refs/mod.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub mod find_refs; pub mod list_refs; pub mod update_refs; diff --git a/refs/update_refs.rs b/refs/update_refs.rs index d5f170e..a156a76 100644 --- a/refs/update_refs.rs +++ b/refs/update_refs.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::*; diff --git a/remote/find_remote.rs b/remote/find_remote.rs index 9a79746..3d627d0 100644 --- a/remote/find_remote.rs +++ b/remote/find_remote.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::error::GitResult; use crate::pb::*; diff --git a/remote/mirror.rs b/remote/mirror.rs index 7eaa235..367cea8 100644 --- a/remote/mirror.rs +++ b/remote/mirror.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::*; diff --git a/remote/mod.rs b/remote/mod.rs index e35ca0d..c28dc96 100644 --- a/remote/mod.rs +++ b/remote/mod.rs @@ -1,2 +1,4 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub mod find_remote; pub mod mirror; diff --git a/repository/find_license.rs b/repository/find_license.rs index 727da6e..bc958b2 100644 --- a/repository/find_license.rs +++ b/repository/find_license.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::*; diff --git a/repository/find_merge_base.rs b/repository/find_merge_base.rs index 1084a14..8ec1adf 100644 --- a/repository/find_merge_base.rs +++ b/repository/find_merge_base.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::*; diff --git a/repository/lang_stats.rs b/repository/lang_stats.rs index 968adc6..e007bd1 100644 --- a/repository/lang_stats.rs +++ b/repository/lang_stats.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use std::collections::HashMap; use std::path::Path; diff --git a/repository/mod.rs b/repository/mod.rs index b17c743..aaaf3b3 100644 --- a/repository/mod.rs +++ b/repository/mod.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub mod find_license; pub mod find_merge_base; pub mod lang_stats; diff --git a/repository/objects_size.rs b/repository/objects_size.rs index 0f0216c..54e8514 100644 --- a/repository/objects_size.rs +++ b/repository/objects_size.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::*; diff --git a/repository/optimize.rs b/repository/optimize.rs index ee2d4e9..6cd9516 100644 --- a/repository/optimize.rs +++ b/repository/optimize.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::*; diff --git a/repository/raw_changes.rs b/repository/raw_changes.rs index f34db99..3aea038 100644 --- a/repository/raw_changes.rs +++ b/repository/raw_changes.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::*; diff --git a/repository/search_files.rs b/repository/search_files.rs index 11c3e16..84f512b 100644 --- a/repository/search_files.rs +++ b/repository/search_files.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::*; diff --git a/sanitize.rs b/sanitize.rs index 376122e..3a0bc36 100644 --- a/sanitize.rs +++ b/sanitize.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Input sanitization for git subprocess arguments. //! //! Prevents command injection by validating user-supplied strings before diff --git a/server/archive.rs b/server/archive.rs index 88d8917..b43b24c 100644 --- a/server/archive.rs +++ b/server/archive.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::pb::archive_service_client::ArchiveServiceClient; use crate::pb::*; diff --git a/server/blame.rs b/server/blame.rs index 2edf48f..af04fc3 100644 --- a/server/blame.rs +++ b/server/blame.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::pb::blame_service_client::BlameServiceClient; use crate::pb::*; diff --git a/server/branch.rs b/server/branch.rs index b67b918..ec5b079 100644 --- a/server/branch.rs +++ b/server/branch.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::pb::branch_service_client::BranchServiceClient; use crate::pb::*; diff --git a/server/cache.rs b/server/cache.rs index 69267d3..8189e99 100644 --- a/server/cache.rs +++ b/server/cache.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! In-memory response cache layer for GitKS. //! //! Two-tier architecture: diff --git a/server/commit.rs b/server/commit.rs index d88fc00..a4470c9 100644 --- a/server/commit.rs +++ b/server/commit.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::pb::commit_service_client::CommitServiceClient; use crate::pb::*; diff --git a/server/diff.rs b/server/diff.rs index 1a21ea3..bb8032f 100644 --- a/server/diff.rs +++ b/server/diff.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::pb::diff_service_client::DiffServiceClient; use crate::pb::*; diff --git a/server/merge.rs b/server/merge.rs index 9814bc7..1673cd7 100644 --- a/server/merge.rs +++ b/server/merge.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::pb::merge_service_client::MergeServiceClient; use crate::pb::*; diff --git a/server/mod.rs b/server/mod.rs index 7d85874..9da8502 100644 --- a/server/mod.rs +++ b/server/mod.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + /// Single-machine mode: no cluster forwarding. macro_rules! remote_client { ($fn_name:ident, $client:ty, $svc_label:literal) => { diff --git a/server/pack.rs b/server/pack.rs index 0572f8b..f28482d 100644 --- a/server/pack.rs +++ b/server/pack.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use tokio_stream::StreamExt; use tokio_stream::wrappers::ReceiverStream; diff --git a/server/refs.rs b/server/refs.rs index c21e04f..a39cd02 100644 --- a/server/refs.rs +++ b/server/refs.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::pb::ref_service_server::RefService; use crate::pb::*; diff --git a/server/remote.rs b/server/remote.rs index 69f18cd..aea49b8 100644 --- a/server/remote.rs +++ b/server/remote.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::pb::remote_service_server::RemoteService; use crate::pb::*; use crate::remote::find_remote::{find_remote_repository, find_remote_root_ref}; diff --git a/server/repository.rs b/server/repository.rs index 225807a..2934603 100644 --- a/server/repository.rs +++ b/server/repository.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::pb::repository_service_client::RepositoryServiceClient; use crate::pb::*; diff --git a/server/repository_maint.rs b/server/repository_maint.rs index d5844b0..ef91eb3 100644 --- a/server/repository_maint.rs +++ b/server/repository_maint.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::pb::*; use super::git_cmd; diff --git a/server/tag.rs b/server/tag.rs index a70815e..cc9e35d 100644 --- a/server/tag.rs +++ b/server/tag.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::pb::tag_service_client::TagServiceClient; use crate::pb::*; diff --git a/server/tree.rs b/server/tree.rs index 9cf5d95..8ac2da5 100644 --- a/server/tree.rs +++ b/server/tree.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::pb::tree_service_client::TreeServiceClient; use crate::pb::*; diff --git a/snapshot/mod.rs b/snapshot/mod.rs index 84ad4dc..0be9afc 100644 --- a/snapshot/mod.rs +++ b/snapshot/mod.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Repository snapshot and move operations. //! //! Supports: diff --git a/snapshot/ops.rs b/snapshot/ops.rs index 384c109..a112012 100644 --- a/snapshot/ops.rs +++ b/snapshot/ops.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Snapshot and move operations. //! //! Core operations for creating, restoring, and verifying repository snapshots diff --git a/snapshot/storage.rs b/snapshot/storage.rs index 1a14c9d..2d58060 100644 --- a/snapshot/storage.rs +++ b/snapshot/storage.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Snapshot storage backend abstraction. //! //! Currently implements local filesystem storage. diff --git a/snapshot/sync.rs b/snapshot/sync.rs index b33703e..6fd8480 100644 --- a/snapshot/sync.rs +++ b/snapshot/sync.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Bundle applicator for restoring snapshots to git repositories. //! //! Uses `git bundle unbundle` to apply pack data to a bare repository. diff --git a/tag/create_tag.rs b/tag/create_tag.rs index 60b84d6..8dc24ed 100644 --- a/tag/create_tag.rs +++ b/tag/create_tag.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::pb::{CreateTagRequest, GetTagRequest, Tag}; diff --git a/tag/delete_tag.rs b/tag/delete_tag.rs index bc90828..060673e 100644 --- a/tag/delete_tag.rs +++ b/tag/delete_tag.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::pb::DeleteTagRequest; diff --git a/tag/get_tag.rs b/tag/get_tag.rs index c2d8042..bffbea0 100644 --- a/tag/get_tag.rs +++ b/tag/get_tag.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use gix::bstr::ByteSlice; use crate::bare::GitBare; diff --git a/tag/list_tags.rs b/tag/list_tags.rs index d675317..378504a 100644 --- a/tag/list_tags.rs +++ b/tag/list_tags.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::paginate; diff --git a/tag/mod.rs b/tag/mod.rs index 61127b6..ebffd89 100644 --- a/tag/mod.rs +++ b/tag/mod.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub mod create_tag; pub mod delete_tag; pub mod get_tag; diff --git a/tag/verify_tag.rs b/tag/verify_tag.rs index bf41dd1..2a308d8 100644 --- a/tag/verify_tag.rs +++ b/tag/verify_tag.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::pb::{VerifiedSignature, VerifyTagRequest}; diff --git a/tests/archive_test.rs b/tests/archive_test.rs index f4e249f..b157c3e 100644 --- a/tests/archive_test.rs +++ b/tests/archive_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + mod common; use gitks::pb::archive_service_server::ArchiveService; diff --git a/tests/bare_test.rs b/tests/bare_test.rs index 870b785..6c6550b 100644 --- a/tests/bare_test.rs +++ b/tests/bare_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + mod common; use gitks::bare::GitBare; diff --git a/tests/blame_test.rs b/tests/blame_test.rs index ac0bb30..e2dc1ed 100644 --- a/tests/blame_test.rs +++ b/tests/blame_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + mod common; use gitks::pb::blame_service_server::BlameService; diff --git a/tests/branch_test.rs b/tests/branch_test.rs index c2ad357..7174081 100644 --- a/tests/branch_test.rs +++ b/tests/branch_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + mod common; use gitks::pb::branch_service_server::BranchService; diff --git a/tests/commit_test.rs b/tests/commit_test.rs index e8cd100..7eb4587 100644 --- a/tests/commit_test.rs +++ b/tests/commit_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + mod common; use gitks::pb::commit_service_server::CommitService; diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 43f7931..827cb8d 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use gitks::bare::GitBare; use gitks::server::GitksService; diff --git a/tests/diff_test.rs b/tests/diff_test.rs index 9f1e747..665853e 100644 --- a/tests/diff_test.rs +++ b/tests/diff_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + mod common; use gitks::pb::commit_service_server::CommitService; diff --git a/tests/disk_cache_test.rs b/tests/disk_cache_test.rs index b629eff..9d62ff7 100644 --- a/tests/disk_cache_test.rs +++ b/tests/disk_cache_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Tests for DiskCache and PackCache. use std::path::PathBuf; diff --git a/tests/error_test.rs b/tests/error_test.rs index f2e1043..6f6c687 100644 --- a/tests/error_test.rs +++ b/tests/error_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use gitks::error::GitError; #[test] diff --git a/tests/hooks_test.rs b/tests/hooks_test.rs index 9b6a15f..fee56e1 100644 --- a/tests/hooks_test.rs +++ b/tests/hooks_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Tests for hooks system. use std::path::PathBuf; diff --git a/tests/infrastructure_test.rs b/tests/infrastructure_test.rs index 6efbb98..b0f3e43 100644 --- a/tests/infrastructure_test.rs +++ b/tests/infrastructure_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + #[test] fn test_metrics_render_all_counters() { diff --git a/tests/integration.rs b/tests/integration.rs index e36808c..5b15d02 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use gitks::bare::GitBare; use gitks::pb::{ CreateCommitAction, CreateCommitRequest, FindFilesRequest, FsckRequest, GetBlobRequest, diff --git a/tests/lang_stats_test.rs b/tests/lang_stats_test.rs index 8ea6305..c871af7 100644 --- a/tests/lang_stats_test.rs +++ b/tests/lang_stats_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + mod common; use gitks::pb::GetLanguageStatsRequest; diff --git a/tests/macro_test.rs b/tests/macro_test.rs index 8bb1141..248f732 100644 --- a/tests/macro_test.rs +++ b/tests/macro_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use gitks::error::GitResult; use gitks::pb::object_selector::Selector; use gitks::pb::{ObjectName, ObjectSelector}; diff --git a/tests/merge_test.rs b/tests/merge_test.rs index 87c620f..4362912 100644 --- a/tests/merge_test.rs +++ b/tests/merge_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + mod common; use gitks::pb::commit_service_server::CommitService; diff --git a/tests/oid_test.rs b/tests/oid_test.rs index 95b5151..d6fda51 100644 --- a/tests/oid_test.rs +++ b/tests/oid_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use gitks::error::GitError; use gitks::oid::{ObjectId, ZERO_OID, hex_to_bytes}; diff --git a/tests/pack_test.rs b/tests/pack_test.rs index 841aa50..93ea87d 100644 --- a/tests/pack_test.rs +++ b/tests/pack_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + mod common; use gitks::pb::*; diff --git a/tests/refs_test.rs b/tests/refs_test.rs index 39e9fd5..fb1718c 100644 --- a/tests/refs_test.rs +++ b/tests/refs_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + mod common; fn hdr() -> gitks::pb::RepositoryHeader { diff --git a/tests/remote_test.rs b/tests/remote_test.rs index 2f38ef1..ac8d392 100644 --- a/tests/remote_test.rs +++ b/tests/remote_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use gitks::pb::*; use gitks::remote::find_remote::{find_remote_repository, find_remote_root_ref}; diff --git a/tests/repository_test.rs b/tests/repository_test.rs index 3c3efe5..51fad35 100644 --- a/tests/repository_test.rs +++ b/tests/repository_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + mod common; use gitks::bare::GitBare; diff --git a/tests/sanitize_test.rs b/tests/sanitize_test.rs index 95e5edf..b56767f 100644 --- a/tests/sanitize_test.rs +++ b/tests/sanitize_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use gitks::sanitize::*; diff --git a/tests/snapshot_test.rs b/tests/snapshot_test.rs index be85ce1..879ce93 100644 --- a/tests/snapshot_test.rs +++ b/tests/snapshot_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + //! Tests for snapshot operations. use std::path::PathBuf; diff --git a/tests/tag_test.rs b/tests/tag_test.rs index b5827b7..244e229 100644 --- a/tests/tag_test.rs +++ b/tests/tag_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + mod common; use gitks::pb::tag_service_server::TagService; diff --git a/tests/tree_test.rs b/tests/tree_test.rs index 71c0107..8629413 100644 --- a/tests/tree_test.rs +++ b/tests/tree_test.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + mod common; use gitks::pb::tree_service_server::TreeService; diff --git a/tree/find_files.rs b/tree/find_files.rs index 1da2c5d..0460e88 100644 --- a/tree/find_files.rs +++ b/tree/find_files.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::GitResult; use crate::paginate; diff --git a/tree/get_file_metadata.rs b/tree/get_file_metadata.rs index fc93851..722a3ca 100644 --- a/tree/get_file_metadata.rs +++ b/tree/get_file_metadata.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use gix::object::tree::EntryKind; use crate::bare::GitBare; diff --git a/tree/get_tree.rs b/tree/get_tree.rs index 5a33208..ebed17c 100644 --- a/tree/get_tree.rs +++ b/tree/get_tree.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use crate::bare::GitBare; use crate::error::{GitError, GitResult}; use crate::pb::{GetTreeRequest, ListTreeRequest, Tree}; diff --git a/tree/list_tree.rs b/tree/list_tree.rs index 6014e3f..c6b15e1 100644 --- a/tree/list_tree.rs +++ b/tree/list_tree.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + use gix::object::tree::EntryKind; use crate::bare::GitBare; diff --git a/tree/mod.rs b/tree/mod.rs index 22b3c89..4e1bdd6 100644 --- a/tree/mod.rs +++ b/tree/mod.rs @@ -1,3 +1,5 @@ +//! Copyright (c) 2022-2026 GitDataAi All rights reserved. + pub mod find_files; pub mod get_file_metadata; pub mod get_tree;