Re: [RFC 0/1] mailinfo: de-quote quoted-pair in header fields

2016-09-13 Thread Junio C Hamano
Jeff King writes: > It has been a while since I looked at rfc2822, but aren't the quoting > and syntax rules different for addresses versus other headers? We would > not want to dequote a Subject header, I think. You're absolutely right. RFC2822 does not quite _want_ to dequote

Re: [RFC 0/1] mailinfo: de-quote quoted-pair in header fields

2016-09-13 Thread Jeff King
On Wed, Sep 14, 2016 at 01:46:12AM +0200, Kevin Daudt wrote: > diff --git a/t/t5100/quoted-pair.expect b/t/t5100/quoted-pair.expect > new file mode 100644 > index 000..9fe72e9 > --- /dev/null > +++ b/t/t5100/quoted-pair.expect > @@ -0,0 +1,5 @@ > +Author: "Author "The Author" Name" > +Email:

Re: [RFC 0/1] mailinfo: de-quote quoted-pair in header fields

2016-09-13 Thread Jeff King
On Tue, Sep 13, 2016 at 05:04:45PM -0700, Junio C Hamano wrote: > > @@ -461,6 +506,7 @@ static int check_header(struct mailinfo *mi, > > */ > > strbuf_add(, line->buf + len + 2, line->len - len - > > 2); > > decode_header(mi, ); > > +

Re: [RFC 0/1] mailinfo: de-quote quoted-pair in header fields

2016-09-13 Thread Kevin Daudt
On Tue, Sep 13, 2016 at 05:04:45PM -0700, Junio C Hamano wrote: > Kevin Daudt writes: > > > It often is easier to read if smaller of the two are in the if part > and the larger in else part. Also your switch/case is indented one > level too deep. I.e. > Thanks, I've switched

Re: [RFC 0/1] mailinfo: de-quote quoted-pair in header fields

2016-09-13 Thread Junio C Hamano
Kevin Daudt writes: > +static int unescape_quoted_pair(struct mailinfo *mi, struct strbuf *line) > +{ > + struct strbuf outbuf = STRBUF_INIT; > + const char *in = line->buf; > + int c, skip=0; > + char escape_context=0; Have SP around '=', i.e. int c,

[RFC 0/1] de-quote quoted-strings in mailinfo

2016-09-13 Thread Kevin Daudt
This is my first 'big' C patch, so first an RFC. This patch implements RFC2822 dequoting of quoted-pairs in quoted strings, which was not done yet. This means removing the "\" as escape character from header fields, but only quoted strings, and comments (text between braces). According to the

[RFC 0/1] mailinfo: de-quote quoted-pair in header fields

2016-09-13 Thread Kevin Daudt
rfc2822 has provisions for quoted strings in structured header fields, but also allows for escaping these with so-called quoted-pairs. git currently does not do anything with this at all, and verbatim takes over the field body. Make sure to properly dequote these quoted-strings and comments.

Re: [RFC/PATCH 16/17] diff: buffer output in emit_line_0

2016-09-13 Thread Stefan Beller
On Tue, Sep 13, 2016 at 4:32 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> So would we rather want to keep the ecbdata around for each file pair and >> just reference that? I thought we deliberately want to avoid ecbdata, so >> maybe >> we rather

[RFC 0/1] de-quote quoted-strings in mailinfo

2016-09-13 Thread Kevin Daudt
This is my first 'big' C patch, so first an RFC. This patch implements RFC2822 dequoting of quoted-pairs in quoted strings, which was not done yet. This means removing the "\" as escape character from header fields, but only quoted strings, and comments (text between braces). According to the

Re: [RFC/PATCH 16/17] diff: buffer output in emit_line_0

2016-09-13 Thread Junio C Hamano
Stefan Beller writes: > So would we rather want to keep the ecbdata around for each file pair and > just reference that? I thought we deliberately want to avoid ecbdata, so maybe > we rather want to have another struct that keeps path related information > around (pointer to

Re: [RFC/PATCH 16/17] diff: buffer output in emit_line_0

2016-09-13 Thread Stefan Beller
On Tue, Sep 13, 2016 at 4:06 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> +struct line_emission { >> + const char *set; >> + const char *line; >> + const char *ws; >> + const char *reset; >> + int first; >> + int len; >> +

Re: [PATCH] unpack-trees: pass checkout state explicitly to check_updates()

2016-09-13 Thread Junio C Hamano
René Scharfe writes: > Add a parameter for the struct checkout variable to check_updates() > instead of using a static global variable. Passing it explicitly makes > object ownership and usage more easily apparent. And we get rid of a > static variable; those can be problematic

Re: [RFC/PATCH 10/17] submodule.c: convert show_submodule_summary to use emit_line_fmt

2016-09-13 Thread Stefan Beller
On Tue, Sep 13, 2016 at 4:02 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> In a later patch, I want to propose an option to detect >> moved lines in a diff, which cannot be done in a one-pass over >> the diff. Instead we need to go over the whole

Re: [PATCH] pathspec: removed unnecessary function prototypes

2016-09-13 Thread Junio C Hamano
Jeff King writes: > On Tue, Sep 13, 2016 at 09:52:51AM -0700, Brandon Williams wrote: > >> removed function prototypes from pathspec.h which don't have a >> corresponding implementation. > > I'm always curious of the "why" in cases like this. Did we forget to add > them? Did they

Re: [RFC/PATCH 16/17] diff: buffer output in emit_line_0

2016-09-13 Thread Junio C Hamano
Stefan Beller writes: > +struct line_emission { > + const char *set; > + const char *line; > + const char *ws; > + const char *reset; > + int first; > + int len; > + int whitespace_check; > + unsigned ws_rule; > + int

Re: [RFC/PATCH 10/17] submodule.c: convert show_submodule_summary to use emit_line_fmt

2016-09-13 Thread Junio C Hamano
Stefan Beller writes: > In a later patch, I want to propose an option to detect > moved lines in a diff, which cannot be done in a one-pass over > the diff. Instead we need to go over the whole diff twice, > because we cannot detect the first line of the two corresponding >

Re: [RFC/PATCH 06/17] diff.c: convert fn_out_consume to use emit_line_*

2016-09-13 Thread Junio C Hamano
Stefan Beller writes: > In a later patch, I want to propose an option to detect > moved lines in a diff, which cannot be done in a one-pass over > the diff. Instead we need to go over the whole diff twice, > because we cannot detect the first line of the two corresponding >

Re: [RFC/PATCH 05/17] diff.c: emit_line_0 can handle no color setting

2016-09-13 Thread Junio C Hamano
Stefan Beller writes: > In a later patch, I want to propose an option to detect > moved lines in a diff, which cannot be done in a one-pass over > the diff. Instead we need to go over the whole diff twice, > because we cannot detect the first line of the two corresponding >

Re: [PATCH v7 04/10] pkt-line: add packet_flush_gently()

2016-09-13 Thread Junio C Hamano
Lars Schneider writes: >> On 13 Sep 2016, at 00:30, Junio C Hamano wrote: >> >> larsxschnei...@gmail.com writes: >> >>> From: Lars Schneider >>> >>> packet_flush() would die in case of a write error even though for some

Re: [RFC/PATCH 01/17] diff: move line ending check into emit_hunk_header

2016-09-13 Thread Stefan Beller
On Tue, Sep 13, 2016 at 7:42 AM, René Scharfe wrote: >> >> strbuf_add(, line + len, org_len - len); >> + if (line[org_len - 1] != '\n') >> + strbuf_addch(, '\n'); >> + > > > Using strbuf_complete_line() would be nicer. That makes sense! Thanks, Stefan

Re: [PATCH 06/16] diff: always try to set up the repository

2016-09-13 Thread Jeff King
On Tue, Sep 13, 2016 at 03:00:17PM -0700, Stefan Beller wrote: > On Mon, Sep 12, 2016 at 8:23 PM, Jeff King wrote: > > > 2. If you're in a subdirectory of a repository, then we > > still try to read ".git/config", but it generally > > doesn't exist. So "diff

Re: [PATCH 16/16] init: reset cached config when entering new repo

2016-09-13 Thread Stefan Beller
I have reviewed all patches though I am no expert on the init routines. They all look good except for the one nit I noted for the commit message in patch 6. With that, the whole series is: Reviewed-by: Stefan Beller Thanks!

Re: [PATCH v7 04/10] pkt-line: add packet_flush_gently()

2016-09-13 Thread Lars Schneider
> On 13 Sep 2016, at 00:30, Junio C Hamano wrote: > > larsxschnei...@gmail.com writes: > >> From: Lars Schneider >> >> packet_flush() would die in case of a write error even though for some >> callers an error would be acceptable. Add

Re: [PATCH v7 10/10] convert: add filter..process option

2016-09-13 Thread Lars Schneider
> On 10 Sep 2016, at 17:40, Torsten Bögershausen wrote: > > [] > > One general question up here, more comments inline. > The current order for a clean-filter is like this, I removed the error > handling: > > int convert_to_git() > { > ret |= apply_filter(path, src, len,

Re: [PATCH v2 09/14] i18n: notes: mark error messages for translation

2016-09-13 Thread Junio C Hamano
Jean-Noël AVILA writes: >> Yes, these verbs are git notes subcommands > > Having one sentence per action is cumbersome, but avoiding sentence lego is > mandatory for proper i18n. How about just adding quotes around the > subcommand > and warn translators ? I think

Re: [PATCH 06/16] diff: always try to set up the repository

2016-09-13 Thread Stefan Beller
On Mon, Sep 12, 2016 at 8:23 PM, Jeff King wrote: > 2. If you're in a subdirectory of a repository, then we > still try to read ".git/config", but it generally > doesn't exist. So "diff --no-index" there does not > respect repo config. Nit: So IIUC your cover

Left with empty files after "git stash pop" when system hung

2016-09-13 Thread Daniel Hahler
I have used "git stash --include-untracked", checked out another branch, went back, and "git stash pop"ed the changes. Then my system crashed/hung (music that was playing was repeated in a loop). I have waited for some minutes, and then turned it off. Afterwards, the repository in question was

Re: [PATCH 01/16] t1007: factor out repeated setup

2016-09-13 Thread Stefan Beller
On Mon, Sep 12, 2016 at 8:23 PM, Jeff King wrote: > We have a series of 3 CRLF tests that do exactly the same > (long) setup sequence. Let's pull it out into a common setup > test, which is shorter, more efficient, and will make it > easier to add new tests. > > Note that we don't

Re: [ANNOUNCE] Git User's Survey 2016

2016-09-13 Thread Jakub Narębski
On 13 September 2016 at 22:11, Lars Schneider wrote: >> On 13 Sep 2016, at 17:54, Jakub Narębski wrote: >> On 13 September 2016 at 18:15, David Bainbridge >> wrote: >>> Hi Jakub, >>> >>> You said: >>> P.S. At request I

Re: [RFC 0/3] http: avoid repeatedly adding curl easy to curlm

2016-09-13 Thread Junio C Hamano
Eric Wong writes: > The key patch here is 3/3 which seems like an obvious fix to > adding the problem of adding a curl easy handle to a curl multi > handle repeatedly. Yeah, sounds like the right thing to do and 2/3 makes it really easy to read the resulting code. > I will

Re: [PATCH v2 09/14] i18n: notes: mark error messages for translation

2016-09-13 Thread Jean-Noël AVILA
On mardi 13 septembre 2016 16:35:05 CEST Vasco Almeida wrote: > A Seg, 12-09-2016 às 14:23 +0200, Jean-Noël Avila escreveu: > > Not sure this one will be easy to localize. The verb is passed as a > > parameter : see line 366 "list", line 426 "add", line 517 "copy", > > line > > 658 "show", line

Re: [ANNOUNCE] Git User's Survey 2016

2016-09-13 Thread Lars Schneider
> On 13 Sep 2016, at 17:54, Jakub Narębski wrote: > > On 13 September 2016 at 18:15, David Bainbridge > wrote: >> Hi Jakub, >> >> You said: >> P.S. At request I can open a separate channel in survey, with >> a separate survey URL, so that

Re: [PATCH] checkout: constify parameters of checkout_stage() and checkout_merged()

2016-09-13 Thread Jeff King
On Tue, Sep 13, 2016 at 07:11:52PM +0200, René Scharfe wrote: > Document the fact that checkout_stage() and checkout_merged() don't > change the objects passed to them by adding the modifier const. Hmm. Sometimes these big "context" objects are hard to make const, because we end up using them to

Re: [PATCH] pathspec: removed unnecessary function prototypes

2016-09-13 Thread Jeff King
On Tue, Sep 13, 2016 at 09:52:51AM -0700, Brandon Williams wrote: > removed function prototypes from pathspec.h which don't have a > corresponding implementation. I'm always curious of the "why" in cases like this. Did we forget to add them? Did they get renamed? Did they go away? Looks like

Re: [PATCH] strbuf: use valid pointer in strbuf_remove()

2016-09-13 Thread Jeff King
On Tue, Sep 13, 2016 at 06:40:22PM +0200, René Scharfe wrote: > The fourth argument of strbuf_splice() is passed to memcpy(3), which is > not supposed to handle NULL pointers. Let's be extra careful and use a > valid empty string instead. It even shortens the source code. :) Heh. Looks

Re: [PATCH] sha1_file: use llist_mergesort() for sorting packs

2016-09-13 Thread Jeff King
On Tue, Sep 13, 2016 at 07:54:42PM +0200, René Scharfe wrote: > Sort the linked list of packs directly using llist_mergesort() instead > of building an array, calling qsort(3) and fixing up the list pointers. > This is shorter and less complicated. Makes sense. > Peff: Or do you have other

[PATCH] sha1_file: use llist_mergesort() for sorting packs

2016-09-13 Thread René Scharfe
Sort the linked list of packs directly using llist_mergesort() instead of building an array, calling qsort(3) and fixing up the list pointers. This is shorter and less complicated. Signed-off-by: Rene Scharfe --- Peff: Or do you have other plans, e.g. to replace packed_git with

[PATCH] unpack-trees: pass checkout state explicitly to check_updates()

2016-09-13 Thread René Scharfe
Add a parameter for the struct checkout variable to check_updates() instead of using a static global variable. Passing it explicitly makes object ownership and usage more easily apparent. And we get rid of a static variable; those can be problematic in library-like code. Signed-off-by: Rene

Re: Bug

2016-09-13 Thread Santiago Torres
Hi, Michael. It would be helpful to get more context on what triggered this bug. I'm not a 'core' dev, so there may be a better way to send this. In general, you want to state the following: 0) Information about your git installation, host system, etc. 1) Information about your repo (was it

Bug

2016-09-13 Thread Mike Hawes
To whom this may concern, I found a bug in git while trying to push my website. I redid the process and it happened again. I also tried it on another computer and it happened again. I was wondering how to claim a bug? Thank you, Michael Hawes

[PATCH] checkout: constify parameters of checkout_stage() and checkout_merged()

2016-09-13 Thread René Scharfe
Document the fact that checkout_stage() and checkout_merged() don't change the objects passed to them by adding the modifier const. Signed-off-by: Rene Scharfe --- builtin/checkout.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/checkout.c

Re: [PATCH v2 07/14] i18n: merge-recursive: mark error messages for translation

2016-09-13 Thread Vasco Almeida
A Seg, 12-09-2016 às 09:04 -0700, Junio C Hamano escreveu: > Vasco Almeida writes: > > > > > Lowercase first word of such error messages following the usual > > style. > > "Change X to lowercase" is fine, but "Lowercase" is not a verb. > > Reword it to "Downcase the

Re: [ANNOUNCE] Git User's Survey 2016

2016-09-13 Thread Jakub Narębski
On 13 September 2016 at 18:15, David Bainbridge wrote: > Hi Jakub, > > You said: > P.S. At request I can open a separate channel in survey, with > a separate survey URL, so that responses from particular site > or organization could be separated out. > > Please can

[PATCH] pathspec: removed unnecessary function prototypes

2016-09-13 Thread Brandon Williams
removed function prototypes from pathspec.h which don't have a corresponding implementation. Signed-off-by: Brandon Williams --- pathspec.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/pathspec.h b/pathspec.h index 4a80f6f..59809e4 100644 --- a/pathspec.h +++

Re: [PATCH v7 10/10] convert: add filter..process option

2016-09-13 Thread Junio C Hamano
Torsten Bögershausen writes: > I would really consider to treat pathnames as binary, and not add a trailing > '\n', > are there other opinions ? It would be the most consistent if the same format as write_name_quoted() is used for this, I would think.

[PATCH] strbuf: use valid pointer in strbuf_remove()

2016-09-13 Thread René Scharfe
The fourth argument of strbuf_splice() is passed to memcpy(3), which is not supposed to handle NULL pointers. Let's be extra careful and use a valid empty string instead. It even shortens the source code. :) Signed-off-by: Rene Scharfe --- strbuf.c | 2 +- 1 file changed, 1

Re: [PATCH v2] ls-files: adding support for submodules

2016-09-13 Thread Junio C Hamano
Brandon Williams writes: > Allow ls-files to recognize submodules in order to retrieve a list of > files from a repository's submodules. This is done by forking off a > process to recursively call ls-files on all submodules. Also added an > output-path-prefix command in order

Re: [PATCH v2 09/14] i18n: notes: mark error messages for translation

2016-09-13 Thread Vasco Almeida
A Seg, 12-09-2016 às 14:23 +0200, Jean-Noël Avila escreveu: > Le 12/09/2016 à 13:29, Vasco Almeida a écrit : > > > > Signed-off-by: Vasco Almeida > > --- > >  builtin/notes.c | 18 +- > >  1 file changed, 9 insertions(+), 9 deletions(-) > > > > diff --git

RE: [ANNOUNCE] Git User's Survey 2016

2016-09-13 Thread David Bainbridge
Hi Jakub, You said: P.S. At request I can open a separate channel in survey, with a separate survey URL, so that responses from particular site or organization could be separated out. Please can you open a channel for use by Ericsson? Many thanks David DAVID BAINBRIDGE Product Manager SW

Re: [PATCH v7 00/10] Git filter protocol

2016-09-13 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > From: Lars Schneider > > The goal of this series is to avoid launching a new clean/smudge filter > process for each file that is filtered. I tentatively queued this in 'pu' because I wanted to see these changes in context and also

Re: git-am includes escape characters from 'From' field

2016-09-13 Thread Jeff King
On Mon, Sep 12, 2016 at 10:10:23PM +0200, Swift Geek wrote: > git-am seems to add backslash that escapes double quote character, example > git format-patch > > From 63da989a5295214f9bd06cd7b409a86a65241eea Mon Sep 17 00:00:00 2001 > From: "Sebastian \"Swift Geek\" Grzywna"

Re: [PATCH v7 10/10] convert: add filter..process option

2016-09-13 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > diff --git a/contrib/long-running-filter/example.pl > b/contrib/long-running-filter/example.pl > ... > +sub packet_read { > +my $buffer; > +my $bytes_read = read STDIN, $buffer, 4; > +if ( $bytes_read == 0 ) { > + > +# EOF - Git stopped

Re: [ANNOUNCE] Git User's Survey 2016

2016-09-13 Thread Kevin Daudt
On Tue, Sep 13, 2016 at 03:52:28PM +0200, Jakub Narębski wrote: > Hello Kevin, > > On 13 September 2016 at 15:32, Kevin Daudt wrote: > > On Mon, Sep 12, 2016 at 09:51:09PM +0200, Jakub Narębski wrote: > > >> > >> P.P.S. Different announcements use different URLs (different

Re: [PATCH v7 10/10] convert: add filter..process option

2016-09-13 Thread Torsten Bögershausen
On 12.09.16 11:49, Lars Schneider wrote: >> How do we send pathnames the have '\n' ? >> Not really recommended, but allowed. >> And here I am a little bit lost, is each of the lines packed into >> a pkt-line ? >> command=smudge is packet as pkt-line and pathname= is packed into >> another one ?

Re: [RFC/PATCH 01/17] diff: move line ending check into emit_hunk_header

2016-09-13 Thread René Scharfe
Am 13.09.2016 um 06:45 schrieb Stefan Beller: In a later patch, I want to propose an option to detect moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines

[PATCH v3] checkout: eliminate unnecessary merge for trivial checkout

2016-09-13 Thread Ben Peart
Teach git to avoid unnecessary merge during trivial checkout. When running 'git checkout -b foo' git follows a common code path through the expensive merge_working_tree even when it is unnecessary. As a result, 95% of the time is spent in merge_working_tree doing the 2-way merge between the new

Re: [ANNOUNCE] Git User's Survey 2016

2016-09-13 Thread Jakub Narębski
Hello Kevin, On 13 September 2016 at 15:32, Kevin Daudt wrote: > On Mon, Sep 12, 2016 at 09:51:09PM +0200, Jakub Narębski wrote: >> >> P.P.S. Different announcements use different URLs (different channels) >> to better track where one got information about this survey. >> >>

Re: [ANNOUNCE] Git User's Survey 2016

2016-09-13 Thread Kevin Daudt
On Mon, Sep 12, 2016 at 09:51:09PM +0200, Jakub Narębski wrote: > Hello all, > > > P.P.S. Different announcements use different URLs (different channels) > to better track where one got information about this survey. > > Thanks in advance for taking time to answer the survey, Can we get a

RE: [PATCH v2] checkout: eliminate unnecessary merge for trivial checkout

2016-09-13 Thread Ben Peart
> -Original Message- > From: Junio C Hamano [mailto:gits...@pobox.com] > Sent: Monday, September 12, 2016 4:32 PM > To: Ben Peart > Cc: git@vger.kernel.org; pclo...@gmail.com; 'Ben Peart' > > Subject: Re: [PATCH v2] checkout: eliminate

Greetings to you and your family,,

2016-09-13 Thread Mr.Abdulaiye Rahmani
-- Greetings to you and your family, Good Day, I am writing to request your assistance to transfer the sum of $8, 600.000.00 (Eight million Six hundred thousand USD) into your accounts. Please delete it if you are not interested. The total sum will be shared as follows: 60% for me, 40% for you.

Re: [PATCH] [git-p4.py] Add --checkpoint-period option to sync/clone

2016-09-13 Thread Luke Diamand
On 12 September 2016 at 23:02, Ori Rawlings wrote: > Importing a long history from Perforce into git using the git-p4 tool > can be especially challenging. The `git p4 clone` operation is based > on an all-or-nothing transactionality guarantee. Under real-world > conditions

Re: [PATCH 1/2 v8] pack-objects: respect --local/--honor-pack-keep/--incremental when bitmap is in use

2016-09-13 Thread Kirill Smelkov
On Mon, Sep 12, 2016 at 11:23:18PM -0700, Junio C Hamano wrote: > Kirill Smelkov writes: > > > +static int want_found_object(int exclude, struct packed_git *p) > > +{ > > + if (exclude) > > + return 1; > > + if (incremental) > > + return 0; > > + > > +

Re: [PATCH] t/perf/run: Don't forget to copy config.mak.autogen & friends to build area

2016-09-13 Thread Kirill Smelkov
On Mon, Sep 12, 2016 at 04:10:09PM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > In other words, something along this line, perhaps. > > ... > > Not quite. There is no guanratee that the user is using autoconf at > all. It should be more like this, I think. >

Re: [PATCH 1/2 v8] pack-objects: respect --local/--honor-pack-keep/--incremental when bitmap is in use

2016-09-13 Thread Junio C Hamano
Kirill Smelkov writes: > +static int want_found_object(int exclude, struct packed_git *p) > +{ > + if (exclude) > + return 1; > + if (incremental) > + return 0; > + > + /* > + * When asked to do --local (do not include an object that