author | Junio C Hamano <gitster@pobox.com> | |
Tue, 12 Jan 2010 23:48:38 +0000 (15:48 -0800) | ||
committer | Junio 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
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 | patch | blob | history | |
git-rebase--interactive.sh | patch | blob | history | |
remote-curl.c | patch | blob | history | |
t/t5551-http-fetch.sh | patch | blob | history |
diff --git a/builtin-grep.c b/builtin-grep.c
index a5b6719a1af014497399ea6ff4f1a6f3852a0570..af6c6fe8a7ed677de84cdbd828e8daae0a6bb12d 100644 (file)
--- a/builtin-grep.c
+++ b/builtin-grep.c
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)
}
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 28b2a316d3dfdd595b055623942afd1681697a67..70fdceade5b0d1f13be2f9f8bba3a310d0af8182 100644 (file)
--- a/remote-curl.c
+++ b/remote-curl.c
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 c0505ecd7be7c63f3d33efc28744e251600bc3fb..7faa31a299f263b0628d4a23e4500d3e43e0fdda 100755 (executable)
--- a/t/t5551-http-fetch.sh
+++ b/t/t5551-http-fetch.sh
> 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