diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-09 07:21:00 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-09 07:21:00 +0000 |
| commit | 9cd3e43b899b23b7f6e75276fa3d19bf9550f8fd (patch) | |
| tree | f88539e7988e13a7fdd9736a6a672048ee00e59a /src/sub_commands/push.rs | |
| parent | 4b0a35583644e703eb615e0724d33fe93aec932b (diff) | |
refactor(git): find root commit from head
this is simpler
there is no need to check whether main or master exist
because one does 99+% of the time
the root commit wil be te same for head as master 99+% of the time
Diffstat (limited to 'src/sub_commands/push.rs')
| -rw-r--r-- | src/sub_commands/push.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sub_commands/push.rs b/src/sub_commands/push.rs index de2a92f..037d512 100644 --- a/src/sub_commands/push.rs +++ b/src/sub_commands/push.rs | |||
| @@ -25,7 +25,7 @@ pub async fn launch(cli_args: &Cli) -> Result<()> { | |||
| 25 | .context("no main or master branch")?; | 25 | .context("no main or master branch")?; |
| 26 | 26 | ||
| 27 | let root_commit = git_repo | 27 | let root_commit = git_repo |
| 28 | .get_root_commit(main_or_master_branch_name) | 28 | .get_root_commit() |
| 29 | .context("failed to get root commit of the repository")?; | 29 | .context("failed to get root commit of the repository")?; |
| 30 | 30 | ||
| 31 | let branch_name = git_repo | 31 | let branch_name = git_repo |