diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-14 08:41:02 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-14 08:47:27 +0000 |
| commit | c0847f928c32adb0b4dfc3b73ee77fa3cdb5ec21 (patch) | |
| tree | 07d89b9a5cb6770b25c22d35a13579df1278db0b /src/git.rs | |
| parent | 1022344a0529b5f6b50f35d3030a528a1a5c6f91 (diff) | |
feat!: move `prs create`>`send`, `prs list`>`list`
remove unnecessary hierachy of `prs` which is also a troublesome term
replace the concept of `create` which aligns more to the PR github model
to `send` which aligns more with the git patch model
Diffstat (limited to 'src/git.rs')
| -rw-r--r-- | src/git.rs | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -6,7 +6,7 @@ use anyhow::{bail, Context, Result}; | |||
| 6 | use git2::{DiffOptions, Oid, Revwalk}; | 6 | use git2::{DiffOptions, Oid, Revwalk}; |
| 7 | use nostr::prelude::{sha1::Hash as Sha1Hash, Hash}; | 7 | use nostr::prelude::{sha1::Hash as Sha1Hash, Hash}; |
| 8 | 8 | ||
| 9 | use crate::sub_commands::prs::list::tag_value; | 9 | use crate::sub_commands::list::tag_value; |
| 10 | 10 | ||
| 11 | pub struct Repo { | 11 | pub struct Repo { |
| 12 | git_repo: git2::Repository, | 12 | git_repo: git2::Repository, |
| @@ -1251,7 +1251,7 @@ mod tests { | |||
| 1251 | mod apply_patch { | 1251 | mod apply_patch { |
| 1252 | 1252 | ||
| 1253 | use super::*; | 1253 | use super::*; |
| 1254 | use crate::{repo_ref::RepoRef, sub_commands::prs::create::generate_patch_event}; | 1254 | use crate::{repo_ref::RepoRef, sub_commands::send::generate_patch_event}; |
| 1255 | 1255 | ||
| 1256 | fn generate_patch_from_head_commit(test_repo: &GitTestRepo) -> Result<nostr::Event> { | 1256 | fn generate_patch_from_head_commit(test_repo: &GitTestRepo) -> Result<nostr::Event> { |
| 1257 | let original_oid = test_repo.git_repo.head()?.peel_to_commit()?.id(); | 1257 | let original_oid = test_repo.git_repo.head()?.peel_to_commit()?.id(); |
| @@ -1405,7 +1405,7 @@ mod tests { | |||
| 1405 | use test_utils::TEST_KEY_1_KEYS; | 1405 | use test_utils::TEST_KEY_1_KEYS; |
| 1406 | 1406 | ||
| 1407 | use super::*; | 1407 | use super::*; |
| 1408 | use crate::{repo_ref::RepoRef, sub_commands::prs::create::generate_pr_and_patch_events}; | 1408 | use crate::{repo_ref::RepoRef, sub_commands::send::generate_pr_and_patch_events}; |
| 1409 | 1409 | ||
| 1410 | static BRANCH_NAME: &str = "add-example-feature"; | 1410 | static BRANCH_NAME: &str = "add-example-feature"; |
| 1411 | // returns original_repo, pr_event, patch_events | 1411 | // returns original_repo, pr_event, patch_events |