diff options
author | Maxime Coste <frrrwww@gmail.com> | 2014-05-24 18:40:35 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-05-27 12:35:15 -0700 |
commit | b4073bb387ef303c9ac3c044f46d6a8ae6e190f0 (patch) | |
tree | fa976e0bbd616b058abe1a41fce3ff64f000d94f /t | |
parent | Update draft release notes to 2.0 (diff) | |
download | tgif-b4073bb387ef303c9ac3c044f46d6a8ae6e190f0.tar.xz |
git-p4: Do not include diff in spec file when just preparing p4
The diff information render the spec file unusable as is by p4,
do not include it when run with --prepare-p4-only so that the
given file can be directly passed to p4.
With --prepare-p4-only, git-p4 already tells the user it can use
p4 submit with the generated spec file. This fails because of the
diff being present in the file. Not including the diff fixes that.
Without --prepare-p4-only, keeping the diff makes sense for a
quick review of the patch before submitting it. And does not cause
problems with p4 as we remove it programmatically.
Signed-off-by: Maxime Coste <frrrwww@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t9807-git-p4-submit.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh index 4caf36e006..7fab2ed977 100755 --- a/t/t9807-git-p4-submit.sh +++ b/t/t9807-git-p4-submit.sh @@ -403,7 +403,8 @@ test_expect_success 'submit --prepare-p4-only' ' git commit -m "prep only add" && git p4 submit --prepare-p4-only >out && test_i18ngrep "prepared for submission" out && - test_i18ngrep "must be deleted" out + test_i18ngrep "must be deleted" out && + ! test_i18ngrep "everything below this line is just the diff" out ) && ( cd "$cli" && |