From 824a0c8288e19ac1d47c9b4ad2c60a0e1661561e Mon Sep 17 00:00:00 2001 From: Peer Sommerlund Date: Wed, 30 Apr 2025 19:06:15 +0200 Subject: [PATCH 1/5] Module dokumentation for main --- src/main.rs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/main.rs b/src/main.rs index 2e8e9b8575..50d7a98b93 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,36 @@ +//! +//! The gitui program is a text-based UI for working with a Git repository. +//! The main navigation occurs between a number of tabs. +//! When you execute commands, the program may use popups to communicate +//! with the user. It is possible to customize the keybindings. +//! +//! +//! ## Internal Modules +//! The top-level modules of gitui can be grouped as follows: +//! +//! - User Interface +//! - [tabs] for main navigation +//! - [components] for visual elements used on tabs +//! - [popups] for temporary dialogs +//! - [ui] for tooling like scrollbars +//! - Git Interface +//! - [asyncgit] (crate) for async operations on repository +//! - Distribution and Documentation +//! - Project files +//! - Github CI +//! - Installation files +//! - Usage guides +//! +//! ## Included Crates +//! Some crates are part of the gitui repository: +//! - [asyncgit] for Git operations in the background. +//! - git2-hooks (used by asyncgit). +//! - git2-testing (used by git2-hooks). +//! - invalidstring used by asyncgit for testing with invalid strings. +//! - [filetreelist] for a tree view of files. +//! - [scopetime] for measuring execution time. +//! + #![forbid(unsafe_code)] #![deny( unused_imports, From 1b81acf77a2a717a56ade22fb0b8d55c335a3932 Mon Sep 17 00:00:00 2001 From: Peer Sommerlund Date: Mon, 5 May 2025 09:42:26 +0200 Subject: [PATCH 2/5] Module documentation for tabs --- src/tabs/mod.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/tabs/mod.rs b/src/tabs/mod.rs index 6d8100f63c..ba479ad511 100644 --- a/src/tabs/mod.rs +++ b/src/tabs/mod.rs @@ -1,3 +1,17 @@ +/*! +The tabs module contains a struct for each of the tabs visible in the +ui: + +- [`Status`]: Stage changes, push, pull +- [`Revlog`]: Revision log (think git log) +- [`FilesTab`]: See content of any file at HEAD. Blame +- [`Stashing`]: Managing one stash +- [`StashList`]: Managing all stashes + +Many of the tabs can expand to show more details. This is done via +Enter or right-arrow. To close again, press ESC. +*/ + mod files; mod revlog; mod stashing; From 8c9ae6861767e9df20ec5b9fbd234dff43a147b1 Mon Sep 17 00:00:00 2001 From: Peer Sommerlund Date: Tue, 6 May 2025 06:59:09 +0200 Subject: [PATCH 3/5] Module documentation for components --- src/components/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/mod.rs b/src/components/mod.rs index f20d3f981a..9c531a1e6e 100644 --- a/src/components/mod.rs +++ b/src/components/mod.rs @@ -1,3 +1,7 @@ +/*! +Components are the visible building blocks of tabs. +*/ + mod changes; mod command; mod commit_details; From 129879a2e59646359b0436e523c34604eb4057b6 Mon Sep 17 00:00:00 2001 From: Peer Sommerlund Date: Fri, 9 May 2025 07:38:03 +0200 Subject: [PATCH 4/5] Crate documentation for asyncgit --- asyncgit/src/lib.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/asyncgit/src/lib.rs b/asyncgit/src/lib.rs index fa022e4020..e37ac2163f 100644 --- a/asyncgit/src/lib.rs +++ b/asyncgit/src/lib.rs @@ -1,4 +1,12 @@ -//! asyncgit +/*! +`AsyncGit` is a library that provides non-blocking access to Git +operations, enabling `GitUI` to perform potentially slow Git operations +in the background while keeping the user interface responsive. + +It also provides synchronous Git operations. + +It wraps libraries like git2 and gix. +*/ #![forbid(missing_docs)] #![deny( From 5ebea4e20a4e6e6b488bddffcb30005580916ce3 Mon Sep 17 00:00:00 2001 From: Peer Sommerlund Date: Mon, 12 May 2025 20:55:02 +0200 Subject: [PATCH 5/5] Fix doc warnings in asyncgit --- asyncgit/src/sync/remotes/mod.rs | 6 +++--- asyncgit/src/sync/sign.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/asyncgit/src/sync/remotes/mod.rs b/asyncgit/src/sync/remotes/mod.rs index 749940a192..8c3aaf32eb 100644 --- a/asyncgit/src/sync/remotes/mod.rs +++ b/asyncgit/src/sync/remotes/mod.rs @@ -132,7 +132,7 @@ fn get_current_branch( /// Tries to find the default repo to fetch from based on configuration. /// -/// > branch..remote +/// > `branch..remote` /// > /// > When on branch ``, it tells `git fetch` and `git push` which remote to fetch from or /// > push to. [...] If no remote is configured, or if you are not on any branch and there is more @@ -173,12 +173,12 @@ pub(crate) fn get_default_remote_for_fetch_in_repo( /// Tries to find the default repo to push to based on configuration. /// -/// > remote.pushDefault +/// > `remote.pushDefault` /// > /// > The remote to push to by default. Overrides `branch..remote` for all branches, and is /// > overridden by `branch..pushRemote` for specific branches. /// -/// > branch..remote +/// > `branch..remote` /// > /// > When on branch ``, it tells `git fetch` and `git push` which remote to fetch from or /// > push to. The remote to push to may be overridden with `remote.pushDefault` (for all diff --git a/asyncgit/src/sync/sign.rs b/asyncgit/src/sync/sign.rs index af6508466c..da5079f72c 100644 --- a/asyncgit/src/sync/sign.rs +++ b/asyncgit/src/sync/sign.rs @@ -281,7 +281,7 @@ pub struct SSHSign { } impl SSHSign { - /// Create new [`SSHDiskKeySign`] for sign. + /// Create new `SSHDiskKeySign` for sign. pub fn new(mut key: PathBuf) -> Result { key.set_extension(""); if key.is_file() {