upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/sub_commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/sub_commands')
-rw-r--r--src/sub_commands/send.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sub_commands/send.rs b/src/sub_commands/send.rs
index 2a6c220..8d07958 100644
--- a/src/sub_commands/send.rs
+++ b/src/sub_commands/send.rs
@@ -50,10 +50,11 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
50 if args.since_or_revision_range.is_empty() 50 if args.since_or_revision_range.is_empty()
51 || args.since_or_revision_range.eq("master..HEAD") 51 || args.since_or_revision_range.eq("master..HEAD")
52 { 52 {
53 let (branch_name, tip) = git_repo.get_main_or_master_branch()?; 53 let branch_name = git_repo.get_checked_out_branch_name()?;
54 if branch_name.eq("main") || branch_name.eq("master") { 54 let (main_branch_name, main_tip) = git_repo.get_main_or_master_branch()?;
55 if branch_name.eq(main_branch_name) {
55 println!("creating 1 patch from latest commit"); 56 println!("creating 1 patch from latest commit");
56 vec![tip] 57 vec![main_tip]
57 } else { 58 } else {
58 let (from_branch, to_branch, ahead, behind) = 59 let (from_branch, to_branch, ahead, behind) =
59 identify_ahead_behind(&git_repo, &None, &None)?; 60 identify_ahead_behind(&git_repo, &None, &None)?;