Skip to content

Commit 054d2fa

Browse files
committed
Merge branch 'maint'
* maint: remote-curl: Fix Accept header for smart HTTP connections grep: -L should show empty files rebase--interactive: Ignore comments and blank lines in peek_next_command
2 parents a8c37a0 + 8efa5f6 commit 054d2fa

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

builtin-grep.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,6 @@ static int grep_file(struct grep_opt *opt, const char *filename)
191191
error("'%s': %s", filename, strerror(errno));
192192
return 0;
193193
}
194-
if (!st.st_size)
195-
return 0; /* empty file -- no grep hit */
196194
if (!S_ISREG(st.st_mode))
197195
return 0;
198196
sz = xsize_t(st.st_size);

git-rebase--interactive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ make_squash_message () {
322322
}
323323

324324
peek_next_command () {
325-
sed -n "1s/ .*$//p" < "$TODO"
325+
sed -n -e "/^#/d" -e "/^$/d" -e "s/ .*//p" -e "q" < "$TODO"
326326
}
327327

328328
do_next () {

remote-curl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ static int rpc_service(struct rpc_state *rpc, struct discovery *heads)
510510
strbuf_addf(&buf, "Content-Type: application/x-%s-request", svc);
511511
rpc->hdr_content_type = strbuf_detach(&buf, NULL);
512512

513-
strbuf_addf(&buf, "Accept: application/x-%s-response", svc);
513+
strbuf_addf(&buf, "Accept: application/x-%s-result", svc);
514514
rpc->hdr_accept = strbuf_detach(&buf, NULL);
515515

516516
while (!err) {

t/t5551-http-fetch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ cat >exp <<EOF
3838
> POST /smart/repo.git/git-upload-pack HTTP/1.1
3939
> Accept-Encoding: deflate, gzip
4040
> Content-Type: application/x-git-upload-pack-request
41-
> Accept: application/x-git-upload-pack-response
41+
> Accept: application/x-git-upload-pack-result
4242
> Content-Length: xxx
4343
< HTTP/1.1 200 OK
4444
< Pragma: no-cache

0 commit comments

Comments
 (0)