chore(copyright): add copyright headers to all source files
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use std::process::{Command, Stdio};
|
use std::process::{Command, Stdio};
|
||||||
|
|
||||||
use tokio_stream::wrappers::ReceiverStream;
|
use tokio_stream::wrappers::ReceiverStream;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
pub mod get_archive;
|
pub mod get_archive;
|
||||||
pub mod list_archive_entries;
|
pub mod list_archive_entries;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
use crate::paginate;
|
use crate::paginate;
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
pub mod do_blame;
|
pub mod do_blame;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use gix::object::tree::EntryKind;
|
use gix::object::tree::EntryKind;
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::{GetBlobRequest, GetRawBlobRequest, GetRawBlobResponse};
|
use crate::pb::{GetBlobRequest, GetRawBlobRequest, GetRawBlobResponse};
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
pub mod get_blob;
|
pub mod get_blob;
|
||||||
pub mod get_raw_blob;
|
pub mod get_raw_blob;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
use crate::pb::{CompareBranchRequest, CompareBranchResponse};
|
use crate::pb::{CompareBranchRequest, CompareBranchResponse};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::{Branch, GetBranchRequest};
|
use crate::pb::{Branch, GetBranchRequest};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::paginate;
|
use crate::paginate;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
pub mod compare_branch;
|
pub mod compare_branch;
|
||||||
pub mod create_branch;
|
pub mod create_branch;
|
||||||
pub mod delete_branch;
|
pub mod delete_branch;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
use crate::pb::{Branch, GetBranchRequest, SetBranchUpstreamRequest};
|
use crate::pb::{Branch, GetBranchRequest, SetBranchUpstreamRequest};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
#![allow(clippy::collapsible_if)]
|
#![allow(clippy::collapsible_if)]
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::commit::create_commit::command_ok;
|
use crate::commit::create_commit::command_ok;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::commit::list_commits::read_commit_from_repo;
|
use crate::commit::list_commits::read_commit_from_repo;
|
||||||
use crate::diff::get_diff_stats::diff_stats_for_range;
|
use crate::diff::get_diff_stats::diff_stats_for_range;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
use crate::oid::ZERO_OID;
|
use crate::oid::ZERO_OID;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
use crate::pb::{Commit, GetCommitRequest};
|
use crate::pb::{Commit, GetCommitRequest};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::{GetCommitAncestorsRequest, GetCommitAncestorsResponse, ListCommitsRequest};
|
use crate::pb::{GetCommitAncestorsRequest, GetCommitAncestorsResponse, ListCommitsRequest};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
use crate::pb::{Commit, ListCommitsRequest, ListCommitsResponse};
|
use crate::pb::{Commit, ListCommitsRequest, ListCommitsResponse};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
pub mod cherry_pick_commit;
|
pub mod cherry_pick_commit;
|
||||||
pub mod compare_commits;
|
pub mod compare_commits;
|
||||||
pub mod count_commits;
|
pub mod count_commits;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::commit::create_commit::command_ok;
|
use crate::commit::create_commit::command_ok;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
//! Centralized configuration constants for GitKS.
|
//! Centralized configuration constants for GitKS.
|
||||||
//!
|
//!
|
||||||
//! All magic numbers and resource limits are defined here for easy auditing,
|
//! All magic numbers and resource limits are defined here for easy auditing,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
use crate::pb::{GetCommitDiffRequest, GetDiffRequest, GetDiffResponse};
|
use crate::pb::{GetCommitDiffRequest, GetDiffRequest, GetDiffResponse};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
use crate::pb::GetDiffStatsRequest;
|
use crate::pb::GetDiffStatsRequest;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
use crate::pb::{GetPatchRequest, GetPatchResponse};
|
use crate::pb::{GetPatchRequest, GetPatchResponse};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
pub mod changed_paths;
|
pub mod changed_paths;
|
||||||
pub mod get_commit_diff;
|
pub mod get_commit_diff;
|
||||||
pub mod get_diff;
|
pub mod get_diff;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
//! Disk-based cache infrastructure for GitKS.
|
//! Disk-based cache infrastructure for GitKS.
|
||||||
//!
|
//!
|
||||||
//! Implements the Gitaly-inspired diskcache design:
|
//! Implements the Gitaly-inspired diskcache design:
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
pub type GitResult<T> = Result<T, GitError>;
|
pub type GitResult<T> = Result<T, GitError>;
|
||||||
|
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
//! Hook manager for GitKS.
|
//! Hook manager for GitKS.
|
||||||
//!
|
//!
|
||||||
//! Manages the installation, listing, and removal of git hooks
|
//! Manages the installation, listing, and removal of git hooks
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
//! Git hooks management for GitKS.
|
//! Git hooks management for GitKS.
|
||||||
//!
|
//!
|
||||||
//! Supports three layers of hooks:
|
//! Supports three layers of hooks:
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
//! Hook execution runner.
|
//! Hook execution runner.
|
||||||
//!
|
//!
|
||||||
//! Executes server hooks, custom hooks, and gRPC callback hooks
|
//! Executes server hooks, custom hooks, and gRPC callback hooks
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
//! Hook content sanitization.
|
//! Hook content sanitization.
|
||||||
//!
|
//!
|
||||||
//! Validates custom hook scripts to prevent dangerous commands.
|
//! Validates custom hook scripts to prevent dangerous commands.
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
pub mod archive;
|
pub mod archive;
|
||||||
pub mod bare;
|
pub mod bare;
|
||||||
pub mod config;
|
pub mod config;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
//! Helper macro to extract and validate a revision selector.
|
//! Helper macro to extract and validate a revision selector.
|
||||||
//!
|
//!
|
||||||
//! Replaces the repeated pattern of matching on ObjectSelector variants
|
//! Replaces the repeated pattern of matching on ObjectSelector variants
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::{CheckMergeRequest, MergeResult, merge_result};
|
use crate::pb::{CheckMergeRequest, MergeResult, merge_result};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
use crate::pb::{MergeRequest, MergeResult, merge_result};
|
use crate::pb::{MergeRequest, MergeResult, merge_result};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
use crate::paginate;
|
use crate::paginate;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
pub mod check_merge;
|
pub mod check_merge;
|
||||||
pub mod do_merge;
|
pub mod do_merge;
|
||||||
pub mod list_merge_conflicts;
|
pub mod list_merge_conflicts;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::commit::create_commit::command_ok;
|
use crate::commit::create_commit::command_ok;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::commit::create_commit::command_ok;
|
use crate::commit::create_commit::command_ok;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
//! Prometheus-compatible metrics for GitKS.
|
//! Prometheus-compatible metrics for GitKS.
|
||||||
//!
|
//!
|
||||||
//! Tracks:
|
//! Tracks:
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
/// The null OID representing "no object" in git protocol.
|
/// The null OID representing "no object" in git protocol.
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::{GitError, GitResult};
|
use crate::error::{GitError, GitResult};
|
||||||
use crate::pb::{AdvertiseRefsRequest, AdvertiseRefsResponse, ReferenceAdvertisement};
|
use crate::pb::{AdvertiseRefsRequest, AdvertiseRefsResponse, ReferenceAdvertisement};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::{FsckRequest, FsckResponse};
|
use crate::pb::{FsckRequest, FsckResponse};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitError;
|
use crate::error::GitError;
|
||||||
use crate::paginate;
|
use crate::paginate;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
pub mod advertise_refs;
|
pub mod advertise_refs;
|
||||||
pub mod fsck;
|
pub mod fsck;
|
||||||
pub mod index_pack;
|
pub mod index_pack;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use std::process::Stdio;
|
use std::process::Stdio;
|
||||||
|
|
||||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use std::process::Stdio;
|
use std::process::Stdio;
|
||||||
|
|
||||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use std::process::Stdio;
|
use std::process::Stdio;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
//! Pack-objects cache module.
|
//! Pack-objects cache module.
|
||||||
//!
|
//!
|
||||||
//! Caches `git pack-objects` output on local disk to reduce CPU load
|
//! Caches `git pack-objects` output on local disk to reduce CPU load
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::pb::{PageInfo, Pagination};
|
use crate::pb::{PageInfo, Pagination};
|
||||||
|
|
||||||
/// Simple offset-based pagination over an in-memory slice.
|
/// Simple offset-based pagination over an in-memory slice.
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
#![allow(clippy::all)]
|
#![allow(clippy::all)]
|
||||||
#![allow(missing_docs)]
|
#![allow(missing_docs)]
|
||||||
#![allow(rustdoc::bare_urls)]
|
#![allow(rustdoc::bare_urls)]
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
//! Repository-level rate limiting via per-repo semaphores.
|
//! Repository-level rate limiting via per-repo semaphores.
|
||||||
//!
|
//!
|
||||||
//! Prevents any single repository from consuming all server resources.
|
//! Prevents any single repository from consuming all server resources.
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::paginate;
|
use crate::paginate;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::ReferenceAdvertisement;
|
use crate::pb::ReferenceAdvertisement;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
pub mod find_refs;
|
pub mod find_refs;
|
||||||
pub mod list_refs;
|
pub mod list_refs;
|
||||||
pub mod update_refs;
|
pub mod update_refs;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
pub mod find_remote;
|
pub mod find_remote;
|
||||||
pub mod mirror;
|
pub mod mirror;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
pub mod find_license;
|
pub mod find_license;
|
||||||
pub mod find_merge_base;
|
pub mod find_merge_base;
|
||||||
pub mod lang_stats;
|
pub mod lang_stats;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::bare::GitBare;
|
use crate::bare::GitBare;
|
||||||
use crate::error::GitResult;
|
use crate::error::GitResult;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
//! Input sanitization for git subprocess arguments.
|
//! Input sanitization for git subprocess arguments.
|
||||||
//!
|
//!
|
||||||
//! Prevents command injection by validating user-supplied strings before
|
//! Prevents command injection by validating user-supplied strings before
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::pb::archive_service_client::ArchiveServiceClient;
|
use crate::pb::archive_service_client::ArchiveServiceClient;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::pb::blame_service_client::BlameServiceClient;
|
use crate::pb::blame_service_client::BlameServiceClient;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::pb::branch_service_client::BranchServiceClient;
|
use crate::pb::branch_service_client::BranchServiceClient;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
//! In-memory response cache layer for GitKS.
|
//! In-memory response cache layer for GitKS.
|
||||||
//!
|
//!
|
||||||
//! Two-tier architecture:
|
//! Two-tier architecture:
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::pb::commit_service_client::CommitServiceClient;
|
use crate::pb::commit_service_client::CommitServiceClient;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::pb::diff_service_client::DiffServiceClient;
|
use crate::pb::diff_service_client::DiffServiceClient;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::pb::merge_service_client::MergeServiceClient;
|
use crate::pb::merge_service_client::MergeServiceClient;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
/// Single-machine mode: no cluster forwarding.
|
/// Single-machine mode: no cluster forwarding.
|
||||||
macro_rules! remote_client {
|
macro_rules! remote_client {
|
||||||
($fn_name:ident, $client:ty, $svc_label:literal) => {
|
($fn_name:ident, $client:ty, $svc_label:literal) => {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use tokio_stream::StreamExt;
|
use tokio_stream::StreamExt;
|
||||||
use tokio_stream::wrappers::ReceiverStream;
|
use tokio_stream::wrappers::ReceiverStream;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::pb::ref_service_server::RefService;
|
use crate::pb::ref_service_server::RefService;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::pb::remote_service_server::RemoteService;
|
use crate::pb::remote_service_server::RemoteService;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
use crate::remote::find_remote::{find_remote_repository, find_remote_root_ref};
|
use crate::remote::find_remote::{find_remote_repository, find_remote_root_ref};
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::pb::repository_service_client::RepositoryServiceClient;
|
use crate::pb::repository_service_client::RepositoryServiceClient;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|
||||||
use super::git_cmd;
|
use super::git_cmd;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::pb::tag_service_client::TagServiceClient;
|
use crate::pb::tag_service_client::TagServiceClient;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Copyright (c) 2022-2026 GitDataAi All rights reserved.
|
||||||
|
|
||||||
use crate::pb::tree_service_client::TreeServiceClient;
|
use crate::pb::tree_service_client::TreeServiceClient;
|
||||||
use crate::pb::*;
|
use crate::pb::*;
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user