diff options
Diffstat (limited to 'src/bin/ngit/sub_commands/push.rs')
| -rw-r--r-- | src/bin/ngit/sub_commands/push.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/ngit/sub_commands/push.rs b/src/bin/ngit/sub_commands/push.rs index aaf1009..89b2364 100644 --- a/src/bin/ngit/sub_commands/push.rs +++ b/src/bin/ngit/sub_commands/push.rs | |||
| @@ -29,7 +29,7 @@ pub struct SubCommandArgs { | |||
| 29 | 29 | ||
| 30 | #[allow(clippy::too_many_lines)] | 30 | #[allow(clippy::too_many_lines)] |
| 31 | pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | 31 | pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { |
| 32 | let git_repo = Repo::discover().context("cannot find a git repository")?; | 32 | let git_repo = Repo::discover().context("failed to find a git repository")?; |
| 33 | let git_repo_path = git_repo.get_path()?; | 33 | let git_repo_path = git_repo.get_path()?; |
| 34 | 34 | ||
| 35 | let (main_or_master_branch_name, _) = git_repo | 35 | let (main_or_master_branch_name, _) = git_repo |
| @@ -42,7 +42,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 42 | 42 | ||
| 43 | let branch_name = git_repo | 43 | let branch_name = git_repo |
| 44 | .get_checked_out_branch_name() | 44 | .get_checked_out_branch_name() |
| 45 | .context("cannot get checked out branch name")?; | 45 | .context("failed to get checked out branch name")?; |
| 46 | 46 | ||
| 47 | if branch_name == main_or_master_branch_name { | 47 | if branch_name == main_or_master_branch_name { |
| 48 | bail!("checkout a branch associated with a proposal first") | 48 | bail!("checkout a branch associated with a proposal first") |
| @@ -70,7 +70,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 70 | is_event_proposal_root_for_branch(e, &branch_name, &logged_in_public_key) | 70 | is_event_proposal_root_for_branch(e, &branch_name, &logged_in_public_key) |
| 71 | .unwrap_or(false) | 71 | .unwrap_or(false) |
| 72 | }) | 72 | }) |
| 73 | .context("cannot find proposal that matches the current branch name")? | 73 | .context("failed to find proposal that matches the current branch name")? |
| 74 | .clone(); | 74 | .clone(); |
| 75 | 75 | ||
| 76 | let commit_events = | 76 | let commit_events = |
| @@ -78,7 +78,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 78 | .await?; | 78 | .await?; |
| 79 | 79 | ||
| 80 | let most_recent_proposal_patch_chain = get_most_recent_patch_with_ancestors(commit_events) | 80 | let most_recent_proposal_patch_chain = get_most_recent_patch_with_ancestors(commit_events) |
| 81 | .context("cannot get most recent patch for proposal")?; | 81 | .context("failed to get most recent patch for proposal")?; |
| 82 | 82 | ||
| 83 | let branch_tip = git_repo.get_tip_of_branch(&branch_name)?; | 83 | let branch_tip = git_repo.get_tip_of_branch(&branch_name)?; |
| 84 | 84 | ||
| @@ -191,7 +191,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 191 | &[], | 191 | &[], |
| 192 | ) | 192 | ) |
| 193 | .await | 193 | .await |
| 194 | .context("cannot make patch event from commit")?, | 194 | .context("failed to make patch event from commit")?, |
| 195 | ); | 195 | ); |
| 196 | } | 196 | } |
| 197 | println!("pushing {} commits", ahead.len()); | 197 | println!("pushing {} commits", ahead.len()); |