diff --git a/rad-patch.1.adoc b/rad-patch.1.adoc index cbcc5199..bd3bfebe 100644 --- a/rad-patch.1.adoc +++ b/rad-patch.1.adoc @@ -73,6 +73,9 @@ List patches in the current repository. The default is *--open*. *--merged*:: List only merged patches *--open*:: List only open patches *--draft*:: List only draft patches +*--authored*:: Show only patches that you have authored +*--author *:: Show only patched where the given user is an author + (may be specified multiple times) === ready diff --git a/radicle-cli/examples/rad-patch.md b/radicle-cli/examples/rad-patch.md index 96d7ba56..bb4d54ba 100644 --- a/radicle-cli/examples/rad-patch.md +++ b/radicle-cli/examples/rad-patch.md @@ -71,6 +71,17 @@ index 0000000..e69de29 ``` +We can also list only patches that we've authored. + +``` +$ rad patch list --authored +╭─────────────────────────────────────────────────────────────────────────────────────────╮ +│ ● ID Title Author Head + - Updated │ +├─────────────────────────────────────────────────────────────────────────────────────────┤ +│ ● 6ff4f09 Define power requirements z6MknSL…StBU8Vi (you) 3e674d1 +0 -0 now │ +╰─────────────────────────────────────────────────────────────────────────────────────────╯ +``` + We can also see that it set an upstream for our patch branch: ``` $ git branch -vv diff --git a/radicle-cli/src/commands/patch.rs b/radicle-cli/src/commands/patch.rs index c6d9b597..b3214a01 100644 --- a/radicle-cli/src/commands/patch.rs +++ b/radicle-cli/src/commands/patch.rs @@ -21,6 +21,7 @@ mod show; #[path = "patch/update.rs"] mod update; +use std::collections::BTreeSet; use std::ffi::OsString; use anyhow::anyhow; @@ -43,7 +44,7 @@ pub const HELP: Help = Help { Usage rad patch [