mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
Merge branch 'lf/bundle-with-tip-wo-message'
"git bundle" did not like a bundle created using a commit without any message as its one of the prerequistes. * lf/bundle-with-tip-wo-message: bundle: Accept prerequisites without commit messages
This commit is contained in:
commit
e1a3f17e9d
2
bundle.c
2
bundle.c
|
@ -57,7 +57,7 @@ static int parse_bundle_header(int fd, struct bundle_header *header,
|
|||
* followed by SP and subject line.
|
||||
*/
|
||||
if (get_sha1_hex(buf.buf, sha1) ||
|
||||
(40 <= buf.len && !isspace(buf.buf[40])) ||
|
||||
(buf.len > 40 && !isspace(buf.buf[40])) ||
|
||||
(!is_prereq && buf.len <= 40)) {
|
||||
if (report_path)
|
||||
error(_("unrecognized header: %s%s (%d)"),
|
||||
|
|
|
@ -58,4 +58,14 @@ test_expect_success 'ridiculously long subject in boundary' '
|
|||
grep "^-[0-9a-f]\\{40\\} " boundary
|
||||
'
|
||||
|
||||
test_expect_success 'prerequisites with an empty commit message' '
|
||||
: >file1 &&
|
||||
git add file1 &&
|
||||
test_tick &&
|
||||
git commit --allow-empty-message -m "" &&
|
||||
test_commit file2 &&
|
||||
git bundle create bundle HEAD^.. &&
|
||||
git bundle verify bundle
|
||||
'
|
||||
|
||||
test_done
|
||||
|
|
Loading…
Reference in a new issue