| @@ -93,7 +93,7 @@ mod update { · 92 unmodified lines |
| 93 | // ), | 93 | // ), |
| 94 | ] { | 94 | ] { |
| 95 | let (mapping, specs) = mapping_from_spec(spec, &repo); | 95 | let (mapping, specs) = mapping_from_spec(spec, &repo); |
| 96 | let out = fetch::refs::update(&repo, &mapping, &specs, fetch::DryRun::Yes).unwrap(); | 96 | let out = fetch::refs::update(&repo, "action", &mapping, &specs, fetch::DryRun::Yes).unwrap(); |
| 97 | | 97 | |
| 98 | assert_eq!( | 98 | assert_eq!( |
| 99 | out.updates, | 99 | out.updates, |
| @@ -109,7 +109,8 @@ mod update { · 9 unmodified lines |
| 109 | match &edit.change { | 109 | match &edit.change { |
| 110 | Change::Update { log, .. } => { | 110 | Change::Update { log, .. } => { |
| 111 | assert_eq!( | 111 | assert_eq!( |
| 112 | log.message, reflog_message, | 112 | log.message, |
| | 113 | format!("action: {}", reflog_message), |
| 113 | "reflog messages are specific and we emulate git word for word" | 114 | "reflog messages are specific and we emulate git word for word" |
| 114 | ); | 115 | ); |
| 115 | } | 116 | } |
| @@ -137,7 +138,7 @@ mod update { · 21 unmodified lines |
| 137 | ] { | 138 | ] { |
| 138 | let spec = format!("refs/heads/main:refs/heads/{}", branch); | 139 | let spec = format!("refs/heads/main:refs/heads/{}", branch); |
| 139 | let (mappings, specs) = mapping_from_spec(&spec, &repo); | 140 | let (mappings, specs) = mapping_from_spec(&spec, &repo); |
| 140 | let out = fetch::refs::update(&repo, &mappings, &specs, fetch::DryRun::Yes)?; | 141 | let out = fetch::refs::update(&repo, "action", &mappings, &specs, fetch::DryRun::Yes)?; |
| 141 | | 142 | |
| 142 | assert_eq!( | 143 | assert_eq!( |
| 143 | out.updates, | 144 | out.updates, |
| @@ -158,7 +159,7 @@ mod update { · 14 unmodified lines |
| 158 | fn symbolic_refs_are_never_written() { | 159 | fn symbolic_refs_are_never_written() { |
| 159 | let repo = repo("two-origins"); | 160 | let repo = repo("two-origins"); |
| 160 | let (mappings, specs) = mapping_from_spec("refs/heads/main:refs/heads/symbolic", &repo); | 161 | let (mappings, specs) = mapping_from_spec("refs/heads/main:refs/heads/symbolic", &repo); |
| 161 | let out = fetch::refs::update(&repo, &mappings, &specs, fetch::DryRun::Yes).unwrap(); | 162 | let out = fetch::refs::update(&repo, "action", &mappings, &specs, fetch::DryRun::Yes).unwrap(); |
| 162 | | 163 | |
| 163 | assert_eq!( | 164 | assert_eq!( |
| 164 | out.updates, | 165 | out.updates, |
| @@ -176,7 +177,7 @@ mod update { · 11 unmodified lines |
| 176 | fn fast_forward_is_not_implemented_yet_but_should_be_denied() { | 177 | fn fast_forward_is_not_implemented_yet_but_should_be_denied() { |
| 177 | let repo = repo("two-origins"); | 178 | let repo = repo("two-origins"); |
| 178 | let (mappings, specs) = mapping_from_spec("refs/heads/main:refs/remotes/origin/g", &repo); | 179 | let (mappings, specs) = mapping_from_spec("refs/heads/main:refs/remotes/origin/g", &repo); |
| 179 | let out = fetch::refs::update(&repo, &mappings, &specs, fetch::DryRun::Yes).unwrap(); | 180 | let out = fetch::refs::update(&repo, "action", &mappings, &specs, fetch::DryRun::Yes).unwrap(); |
| 180 | | 181 | |
| 181 | assert_eq!( | 182 | assert_eq!( |
| 182 | out.updates, | 183 | out.updates, |