Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Junio C Hamano committed Jan 12, 2010
2 parents a8c37a0 + 8efa5f6 commit 054d2fa
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions builtin-grep.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ static int grep_file(struct grep_opt *opt, const char *filename)
error("'%s': %s", filename, strerror(errno));
return 0;
}
if (!st.st_size)
return 0; /* empty file -- no grep hit */
if (!S_ISREG(st.st_mode))
return 0;
sz = xsize_t(st.st_size);
Expand Down
2 changes: 1 addition & 1 deletion git-rebase--interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ make_squash_message () {
}

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

do_next () {
Expand Down
2 changes: 1 addition & 1 deletion remote-curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ static int rpc_service(struct rpc_state *rpc, struct discovery *heads)
strbuf_addf(&buf, "Content-Type: application/x-%s-request", svc);
rpc->hdr_content_type = strbuf_detach(&buf, NULL);

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

while (!err) {
Expand Down
2 changes: 1 addition & 1 deletion t/t5551-http-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ cat >exp <<EOF
> POST /smart/repo.git/git-upload-pack HTTP/1.1
> Accept-Encoding: deflate, gzip
> Content-Type: application/x-git-upload-pack-request
> Accept: application/x-git-upload-pack-response
> Accept: application/x-git-upload-pack-result
> Content-Length: xxx
< HTTP/1.1 200 OK
< Pragma: no-cache
Expand Down

0 comments on commit 054d2fa

Please sign in to comment.