diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-01-13 02:48:38 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-13 02:48:38 +0300 |
commit | 054d2fa05cf0bc55fe1556c9e87d58d67a144f44 (patch) | |
tree | efda16efdfad47941f14d19782d2f1518ef0c75c | |
parent | a8c37a0e011d67e3192834a0fffe17452ea57a08 (diff) | |
parent | 8efa5f629efb9a8af48619ee90dee02343e0f19d (diff) |
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
-rw-r--r-- | builtin-grep.c | 2 | ||||
-rwxr-xr-x | git-rebase--interactive.sh | 2 | ||||
-rw-r--r-- | remote-curl.c | 2 | ||||
-rwxr-xr-x | t/t5551-http-fetch.sh | 2 |
4 files changed, 3 insertions, 5 deletions
diff --git a/builtin-grep.c b/builtin-grep.c index a5b6719a1a..af6c6fe8a7 100644 --- a/builtin-grep.c +++ b/builtin-grep.c @@ -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); diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index d52932878c..6ed57e2664 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -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 () { diff --git a/remote-curl.c b/remote-curl.c index 28b2a316d3..70fdceade5 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -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) { diff --git a/t/t5551-http-fetch.sh b/t/t5551-http-fetch.sh index c0505ecd7b..7faa31a299 100755 --- a/t/t5551-http-fetch.sh +++ b/t/t5551-http-fetch.sh @@ -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 |