Code

Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Tue, 12 Jan 2010 23:48:38 +0000 (15:48 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Jan 2010 23:48:38 +0000 (15:48 -0800)
* 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

builtin-grep.c
git-rebase--interactive.sh
remote-curl.c
t/t5551-http-fetch.sh

index a5b6719a1af014497399ea6ff4f1a6f3852a0570..af6c6fe8a7ed677de84cdbd828e8daae0a6bb12d 100644 (file)
@@ -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);
index d52932878c05af1aeb714c0cf4d48dbbcddc19ee..6ed57e2664f72dde2d248a30b89dc66540837a32 100755 (executable)
@@ -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 () {
index 28b2a316d3dfdd595b055623942afd1681697a67..70fdceade5b0d1f13be2f9f8bba3a310d0af8182 100644 (file)
@@ -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) {
index c0505ecd7be7c63f3d33efc28744e251600bc3fb..7faa31a299f263b0628d4a23e4500d3e43e0fdda 100755 (executable)
@@ -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