diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-12-20 09:59:14 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-12-20 10:17:27 +0000 |
| commit | 316f858f223162408cfd52183ef7645828c2f480 (patch) | |
| tree | 4f275320ad776ed4fcc85a1d75b2ac2c46c63609 /src/bin/git_remote_nostr/push.rs | |
| parent | 8cc4a21061433c9a29e36c4f33e4d84bea1defee (diff) | |
refactor: branch_name handling
improve clarity by renaming variables and methods
defend against `branch-name` tag with an unsafe name
Diffstat (limited to 'src/bin/git_remote_nostr/push.rs')
| -rw-r--r-- | src/bin/git_remote_nostr/push.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/git_remote_nostr/push.rs b/src/bin/git_remote_nostr/push.rs index 05c8fc2..922808c 100644 --- a/src/bin/git_remote_nostr/push.rs +++ b/src/bin/git_remote_nostr/push.rs | |||
| @@ -1184,7 +1184,8 @@ async fn create_merge_events( | |||
| 1184 | term.write_line( | 1184 | term.write_line( |
| 1185 | format!( | 1185 | format!( |
| 1186 | "applied commits from proposal: create nostr proposal status event for {}", | 1186 | "applied commits from proposal: create nostr proposal status event for {}", |
| 1187 | event_to_cover_letter(&proposal)?.get_branch_name()?, | 1187 | event_to_cover_letter(&proposal)? |
| 1188 | .get_branch_name_with_pr_prefix_and_shorthand_id()?, | ||
| 1188 | ) | 1189 | ) |
| 1189 | .as_str(), | 1190 | .as_str(), |
| 1190 | )?; | 1191 | )?; |
| @@ -1192,7 +1193,8 @@ async fn create_merge_events( | |||
| 1192 | term.write_line( | 1193 | term.write_line( |
| 1193 | format!( | 1194 | format!( |
| 1194 | "fast-forward merge: create nostr proposal status event for {}", | 1195 | "fast-forward merge: create nostr proposal status event for {}", |
| 1195 | event_to_cover_letter(&proposal)?.get_branch_name()?, | 1196 | event_to_cover_letter(&proposal)? |
| 1197 | .get_branch_name_with_pr_prefix_and_shorthand_id()?, | ||
| 1196 | ) | 1198 | ) |
| 1197 | .as_str(), | 1199 | .as_str(), |
| 1198 | )?; | 1200 | )?; |