threads / patch / 14618

patch, 12 partsgit-grep: read config

Subject: [PATCH 01/12] git-grep: read config

## tl;dr

9 messages between Jul 23, 2008 and Jul 24, 2008. Diffs are folded; open one to read it.

replies: 8people: 4as markdown or json

Nguyễn Thái Ngọc Duy· Jul 23, 2008, 14:55 UTC · lore
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 builtin-grep.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Show changes to builtin-grep.c +2 −0
diff --git a/builtin-grep.c b/builtin-grep.c
index 631129d..cc9ba6b 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -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;
-- 
1.5.5.GIT
Jeff King· Jul 24, 2008, 17:15 UTC · re: Nguyễn Thái Ngọc Duy · lore

Re: [PATCH 01/12] git-grep: read config

On Wed, Jul 23, 2008 at 09:55:35PM +0700, Nguyễn Thái Ngọc Duy wrote:
> 
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
The commit message is a bit lacking...what config are we interested in?
-Peff
Nguyen Thai Ngoc Duy· Jul 24, 2008, 18:45 UTC · re: Jeff King · lore

Re: [PATCH 01/12] git-grep: read config

On 7/25/08, Jeff King <peff@peff.net> wrote:
Show 7 quoted lines
> On Wed, Jul 23, 2008 at 09:55:35PM +0700, Nguyen Thai Ngoc Duy wrote:
>
>  >
>  > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
>
>
> The commit message is a bit lacking...what config are we interested in?
core.sparsecheckout, but I will probably stay away from config.
-- 
Duy
Sverre Rabbelier· Jul 24, 2008, 18:53 UTC · re: Nguyen Thai Ngoc Duy · lore

Re: [PATCH 01/12] git-grep: read config

On Thu, Jul 24, 2008 at 8:45 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
>

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

-- 
Cheers,

Sverre Rabbelier
Nguyen Thai Ngoc Duy· Jul 24, 2008, 19:03 UTC · re: Sverre Rabbelier · lore

Re: [PATCH 01/12] git-grep: read config

On 7/25/08, Sverre Rabbelier <alturin@gmail.com> wrote:
Show 5 quoted lines
> On Thu, Jul 24, 2008 at 8:45 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
>  >
>
>  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.

-- 
Duy
Sverre Rabbelier· Jul 24, 2008, 19:12 UTC · re: Nguyen Thai Ngoc Duy · lore

Re: [PATCH 01/12] git-grep: read config

On Thu, Jul 24, 2008 at 9:03 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
Show 10 quoted lines
> On 7/25/08, Sverre Rabbelier <alturin@gmail.com> wrote:
>> On Thu, Jul 24, 2008 at 8:45 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
>>  >
>>
>>  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.

-- 
Cheers,

Sverre Rabbelier
Jay Soffian· Jul 24, 2008, 19:16 UTC · re: Sverre Rabbelier · lore

Re: [PATCH 01/12] git-grep: read config

On Thu, Jul 24, 2008 at 2:53 PM, Sverre Rabbelier <alturin@gmail.com> wrote:
Show 5 quoted lines
> On Thu, Jul 24, 2008 at 8:45 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
>>
>
> 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 majordomo@vger.kernel.org
   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 git-owner@vger.kernel.org (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.
Jeff King· Jul 24, 2008, 18:58 UTC · re: Nguyen Thai Ngoc Duy · lore

Re: [PATCH 01/12] git-grep: read config

On Fri, Jul 25, 2008 at 01:45:58AM +0700, Nguyen Thai Ngoc Duy wrote:
> > 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
Nguyen Thai Ngoc Duy· Jul 24, 2008, 19:07 UTC · re: Jeff King · lore

Re: [PATCH 01/12] git-grep: read config

On 7/25/08, Jeff King <peff@peff.net> wrote:
Show 9 quoted lines
> On Fri, Jul 25, 2008 at 01:45:58AM +0700, Nguyen Thai Ngoc Duy wrote:
>
>  > > 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 :)

-- 
Duy

← back to recent threads