Skip to content

Commit f2cabf6

Browse files
jrngitster
authored andcommitted
adapt request-pull tests for new pull request format
10eb000 (request-pull: avoid mentioning that the start point is a single commit, 2010-01-29), changed the pull request format, so the test needs some changes to still pass: - tolerate a missing blank line between “in the git repository at:” and the name of repository and branch - recognize subject and date in the new request format - update the expected request template to match the new format Signed-off-by: Jonathan Nieder <[email protected]> Acked-by: Miklos Vajna <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ea0edad commit f2cabf6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

t/t5150-request-pull.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ test_expect_success 'setup: two scripts for reading pull requests' '
6969
#!/bin/sed -nf
7070
/ in the git repository at:$/! d
7171
n
72-
/^$/! q
73-
n
72+
/^$/ n
7473
s/^[ ]*\(.*\) \([^ ]*\)/please pull\
7574
\1\
7675
\2/p
@@ -81,7 +80,9 @@ test_expect_success 'setup: two scripts for reading pull requests' '
8180
#!/bin/sed -nf
8281
s/$_x40/OBJECT_NAME/g
8382
s/A U Thor/AUTHOR/g
83+
s/[-0-9]\{10\} [:0-9]\{8\} [-+][0-9]\{4\}/DATE/g
8484
s/ [^ ].*/ SUBJECT/g
85+
s/ [^ ].* (DATE)/ SUBJECT (DATE)/g
8586
s/$downstream_url_for_sed/URL/g
8687
s/for-upstream/BRANCH/g
8788
s/mnemonic.txt/FILENAME/g
@@ -188,11 +189,10 @@ test_expect_success 'pull request format' '
188189
git init --bare downstream.git &&
189190
cat <<-\EOT >expect &&
190191
The following changes since commit OBJECT_NAME:
191-
AUTHOR (1):
192-
SUBJECT
193192
194-
are available in the git repository at:
193+
SUBJECT (DATE)
195194
195+
are available in the git repository at:
196196
URL BRANCH
197197
198198
SHORTLOG

0 commit comments

Comments
 (0)