Skip to content

Commit 2be2eb9

Browse files
committed
Merge branch 'fc/push-with-export-reporting-result'
* fc/push-with-export-reporting-result: transport-helper: improve push messages
2 parents 7d3ccdf + b056620 commit 2be2eb9

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

t/t5801-remote-helpers.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,18 @@ test_expect_success GPG 'push signed tag with signed-tags capability' '
186186
compare_refs local signed-tag-2 server signed-tag-2
187187
'
188188

189+
test_expect_success 'push messages' '
190+
(cd local &&
191+
git checkout -b new_branch master &&
192+
echo new >>file &&
193+
git commit -a -m new &&
194+
git push origin new_branch &&
195+
git fetch origin &&
196+
echo new >>file &&
197+
git commit -a -m new &&
198+
git push origin new_branch 2> msg &&
199+
! grep "\[new branch\]" msg
200+
)
201+
'
202+
189203
test_done

transport-helper.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ static int push_refs_with_export(struct transport *transport,
806806
if (private && !get_sha1(private, sha1)) {
807807
strbuf_addf(&buf, "^%s", private);
808808
string_list_append(&revlist_args, strbuf_detach(&buf, NULL));
809+
hashcpy(ref->old_sha1, sha1);
809810
}
810811
free(private);
811812

0 commit comments

Comments
 (0)