Skip to contentSkip to conversation

git-grep: read config

PATCH In review Nguyễn Thái Ngọc Duy 4 participants 9 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/12 git-grep: read config

---
 builtin-grep.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
builtin-grep.c +2 -0
index 631129d..cc9ba6b 100644
@@ -517,6 +517,8 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
 	const char **paths = NULL;
 	int i;
 
+	git_config(git_default_config, NULL);
+
 	memset(&opt, 0, sizeof(opt));
 	opt.prefix_length = (prefix && *prefix) ? strlen(prefix) : 0;
 	opt.relative = 1;
Signature · 1 line
1.5.5.GIT
#3 lore raw
Quoted 3 lines · Nguyen Thai Ngoc Duy
Quoted 1 line

The commit message is a bit lacking...what config are we interested in?

core.sparsecheckout, but I will probably stay away from config.

Right, I kind of guessed that from reading the rest of the series. But that sort of "why" really should go into the commit message.

-Peff

#4 lore raw
Quoted 9 lines · Jeff King
Quoted 3 lines · Nguyen Thai Ngoc Duy
Quoted 1 line

The commit message is a bit lacking...what config are we interested in?

core.sparsecheckout, but I will probably stay away from config.

Right, I kind of guessed that from reading the rest of the series. But
that sort of "why" really should go into the commit message.

There was "why" in the commit before but I wanted to make the first two patches independent to this series. Turns out bad, I think :)

Signature · 1 line
Duy
#5 lore raw
In reply to Nguyen Thai Ngoc Duy
Quoted 1 line · Nguyen Thai Ngoc Duy

Something went wrong replying here possibly? Or is it just me who is receiving empty messages? (At least the 3rd empty mail I see.)

Signature · 3 lines
Cheers,

Sverre Rabbelier
#6 lore raw
Quoted 5 lines · Sverre Rabbelier
Quoted 1 line · Nguyen Thai Ngoc Duy

Something went wrong replying here possibly? Or is it just me who is receiving empty messages? (At least the 3rd empty mail I see.)

Here's what's going on.

1. Gmail will often send messages as base64 encoded, inline. i.e.:

Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64
Content-Disposition: inline

2. Majordomo is dumb dumb dumb and adds the standard list footer to the message. It should probably either not add the footer to such messages, or it should do it correctly by base64 decoding them, adding the footer, then re-encoding. Anyway, what it sends out is:

[... prior base64 encoded lines elided ...] b3V0LCBidXQgSSB3aWxsIHByb2JhYmx5IHN0YXkgYXdheSBmcm9tIGNvbmZpZy4KCi0tIApEdXkK --
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

3. Gmail is dumb dumb dumb and cannot decode such "corrupted" messages. They display as completely blank. If you go to gmane you can see the message is fine. (I think gmane strips the majordomo added footer.)

I've filed a bug against gmail multiple times about this. No idea if they'll ever fix it.

I also sent an email to [email protected] (which I think was /dev/null'ed) offering to patch Majordomo, but got no reply.

I wonder if such a mailing list footer is useful in the first place. Perhaps it could just be disabled.

Anyway, my offer to "fix" majordomo still stands. Perhaps someone knows who I should contact at vger.kernel.org to find out whether they're willing to accept a patch.

j.

#7 lore raw
In reply to Sverre Rabbelier
Quoted 5 lines · Sverre Rabbelier
Quoted 1 line · Nguyen Thai Ngoc Duy

Something went wrong replying here possibly? Or is it just me who is receiving empty messages? (At least the 3rd empty mail I see.)

I blame gmail MTA or my name's having non-ascii chars in it. Combining those two, it produces base64-encoded messages, which are usually refused by vger.

Signature · 1 line
Duy
#8 lore raw
Quoted 10 lines · Nguyen Thai Ngoc Duy
Quoted 5 lines · Sverre Rabbelier
Quoted 1 line · Nguyen Thai Ngoc Duy

Something went wrong replying here possibly? Or is it just me who is receiving empty messages? (At least the 3rd empty mail I see.)

I blame gmail MTA or my name's having non-ascii chars in it. Combining those two, it produces base64-encoded messages, which are usually refused by vger.

Curiously enough, in the first mail there -are- non-asci characters in your name, in the 'empty' mail there are non, instead the 'letter decorations' were removed.

Signature · 3 lines
Cheers,

Sverre Rabbelier