Re: [PATCH v1 1/2] entry.c: update cache entry only for existing files

2017-10-05 Thread Jeff King
On Thu, Oct 05, 2017 at 08:19:13PM +0900, Junio C Hamano wrote: > > diff --git a/entry.c b/entry.c > > index 1c7e3c11d5..5dab656364 100644 > > --- a/entry.c > > +++ b/entry.c > > @@ -304,7 +304,7 @@ static int write_entry(struct cache_entry *ce, > > ce->name,

Re: [PATCH v1 2/2] entry.c: check if file exists after checkout

2017-10-05 Thread Jeff King
On Thu, Oct 05, 2017 at 12:44:07PM +0200, lars.schnei...@autodesk.com wrote: > From: Lars Schneider > > If we are checking out a file and somebody else racily deletes our file, > then we would write garbage to the cache entry. Fix that by checking > the result of the

Re: [PATCH v1 1/2] entry.c: update cache entry only for existing files

2017-10-05 Thread Junio C Hamano
lars.schnei...@autodesk.com writes: > diff --git a/entry.c b/entry.c > index 1c7e3c11d5..5dab656364 100644 > --- a/entry.c > +++ b/entry.c > @@ -304,7 +304,7 @@ static int write_entry(struct cache_entry *ce, > ce->name, new, size, , dco); >

Re: [PATCH v1 1/2] entry.c: update cache entry only for existing files

2017-10-05 Thread Jeff King
On Thu, Oct 05, 2017 at 12:44:06PM +0200, lars.schnei...@autodesk.com wrote: > From: Lars Schneider > > In 2841e8f ("convert: add "status=delayed" to filter process protocol", > 2017-06-30) we taught the filter process protocol to delay responses. > > That means an

git send-email does not work with Google anymore?!

2017-10-05 Thread Lars Schneider
Hi, I used to use the Google SMTP server to send my patches to the list with the following config: [sendemail] smtpencryption = tls smtpserver = smtp.gmail.com smtpuser = larsxschnei...@gmail.com smtpserverport = 587 from = larsxschnei...@gmail.com

Re: lstat-ing delayed-filter output, was Re: playing with MSan

2017-10-05 Thread Lars Schneider
> On 05 Oct 2017, at 05:46, Jeff King wrote: > > On Wed, Oct 04, 2017 at 08:30:05PM +0100, Thomas Gummerer wrote: > >>> So I dunno. This approach is a _lot_ more convenient than trying to >>> rebuild all the dependencies from scratch, and it runs way faster than >>> valgrind.

[PATCH v1 1/2] entry.c: update cache entry only for existing files

2017-10-05 Thread lars . schneider
From: Lars Schneider In 2841e8f ("convert: add "status=delayed" to filter process protocol", 2017-06-30) we taught the filter process protocol to delay responses. That means an external filter might answer in the first write_entry() call on a file that requires

[PATCH v1 0/2] fix temporary garbage in the cache entry

2017-10-05 Thread lars . schneider
From: Lars Schneider Hi, in [1] Peff noticed that the delayed filter mechanism causes garbage in the cache entry for a brief moment during a delayed checkout process. The first patch fixes this issue. The second patch ensures that we don't write garbage in that way to

[PATCH v1 2/2] entry.c: check if file exists after checkout

2017-10-05 Thread lars . schneider
From: Lars Schneider If we are checking out a file and somebody else racily deletes our file, then we would write garbage to the cache entry. Fix that by checking the result of the lstat() call on that file. Print an error to the user if the file does not exist.

Re: [PATCH v2 1/5] test-list-objects: List a subset of object ids

2017-10-05 Thread Junio C Hamano
On Thu, Oct 5, 2017 at 7:00 PM, Jeff King wrote: > >> Jeff King writes: >> > Actually, I'd just as soon see timings for "git log --format=%h" or "git > log --raw", as opposed to patches 1 and 2. > > You won't see a 90% speedup there, but you will see the actual >

Re: [PATCH] Documentation/git-config.txt: reword missleading sentence

2017-10-05 Thread Junio C Hamano
On Thu, Oct 5, 2017 at 5:17 PM, PAYRE NATHAN p1508475 wrote: > Change the word "bla" to "section.variable" to make it clear that it's a > placeholder for a variable name. Please make sure that your log message shows without wrapping and is a confortable read on a

Re: Updated to v2.14.2 on macOS; git add --patch broken

2017-10-05 Thread Jeff King
On Wed, Oct 04, 2017 at 11:59:57AM +0900, Junio C Hamano wrote: > Jeff King writes: > > > Here's what I came up with on the "color.ui=always is nonsense that we > > should not offer" front. The number of patches may be a little daunting, > > but most of them are just removing

Re: [PATCH v2 1/5] test-list-objects: List a subset of object ids

2017-10-05 Thread Jeff King
On Thu, Oct 05, 2017 at 06:48:10PM +0900, Junio C Hamano wrote: > Jeff King writes: > > > This is weirdly specific. Can we accomplish the same thing with existing > > tools? > > > > E.g., could: > > > > git cat-file --batch-all-objects --batch-check='%(objectname)' | > >

Re: couple questions about git "logical variables" and "git var"

2017-10-05 Thread Jeff King
On Thu, Oct 05, 2017 at 05:11:04AM -0400, rpj...@crashcourse.ca wrote: > i just ran across "git var" for the first time, and it seems a bit weird. > it refers to the (apparently) four git "logical variables": It's definitely weird. > - GIT_AUTHOR_IDENT > - GIT_COMMITTER_IDENT > -

Re: [PATCH v3 3/5] sha1_name: Unroll len loop in find_unique_abbrev_r

2017-10-05 Thread Junio C Hamano
Jeff King writes: > So I think on the generating side we are better off creating a slightly > longer abbreviation that is unambiguous no matter what context it is > used in. I.e., I'd argue that it's actually more _correct_ to ignore > the disambiguation code entirely on the

Re: [PATCH v3 0/5] Improve abbreviation disambituation

2017-10-05 Thread Jeff King
On Mon, Oct 02, 2017 at 10:56:46AM -0400, Derrick Stolee wrote: > Thanks for the feedback on my previous versions, and for patience > with my inexperience on the mailing list. I tried to respond to all > feedback, but decided to not apply one suggestion: For what it's worth, the optimizations

Re: [PATCH v2 1/5] test-list-objects: List a subset of object ids

2017-10-05 Thread Junio C Hamano
Jeff King writes: > This is weirdly specific. Can we accomplish the same thing with existing > tools? > > E.g., could: > > git cat-file --batch-all-objects --batch-check='%(objectname)' | > shuffle | > head -n 100 > > do the same thing? > > I know that "shuffle" isn't

Re: [PATCH v3 5/5] sha1_name: Minimize OID comparisons during disambiguation

2017-10-05 Thread Jeff King
On Mon, Oct 02, 2017 at 10:56:51AM -0400, Derrick Stolee wrote: > +static void find_abbrev_len_for_pack(struct packed_git *p, > + struct min_abbrev_data *mad) > +{ > + int match = 0; > + uint32_t num, last, first = 0; > + struct object_id oid; > + > +

Re: Quoted-printable support in git am

2017-10-05 Thread Junio C Hamano
On Thu, Oct 5, 2017 at 6:30 PM, Jeff King wrote: > >> The patch header contains: >> >> Content-Type: text/plain; charset=UTF-8; format=flowed >> Content-Transfer-Encoding: quoted-printable > > That looks right. Though I wouldn't be surprised if whatever generated > the "flowed"

Re: Quoted-printable support in git am

2017-10-05 Thread Jeff King
On Thu, Oct 05, 2017 at 11:15:08AM +0200, Mason wrote: > Is there a magic option I should be passing to git am? No, it's supposed to work out of the box. > The patch header contains: > > Content-Type: text/plain; charset=UTF-8; format=flowed > Content-Transfer-Encoding: quoted-printable That

Quoted-printable support in git am

2017-10-05 Thread Mason
Hello everyone, Recently, the SMTP server we use at work started mangling outgoing messages, by converting them to quoted-printable, whatever their original encoding (even 7-bit clean, pure ASCII). This breaks patches I send to Linux mailing lists, because it changes TAB to =09, EQUAL to =3D,

Re: [PATCH 2/3] for-each-ref: let upstream/push optionally report merge name.

2017-10-05 Thread Junio C Hamano
Junio C Hamano writes: > I think the remaining points from my reviews are: > > - It would be better to compute precomputable stuff when used atoms >are parsed, instead of running starts_with() in these functions; After reading the original (before these three patches)

Re: [PATCH v3 3/5] sha1_name: Unroll len loop in find_unique_abbrev_r

2017-10-05 Thread Jeff King
On Wed, Oct 04, 2017 at 03:07:25PM +0900, Junio C Hamano wrote: > > - exists = has_sha1_file(sha1); > > - while (len < GIT_SHA1_HEXSZ) { > > - struct object_id oid_ret; > > - status = get_short_oid(hex, len, _ret, GET_OID_QUIETLY); > > - if (exists > > -

couple questions about git "logical variables" and "git var"

2017-10-05 Thread rpjday
i just ran across "git var" for the first time, and it seems a bit weird. it refers to the (apparently) four git "logical variables": - GIT_AUTHOR_IDENT - GIT_COMMITTER_IDENT - GIT_EDITOR - GIT_PAGER first question -- what is it about precisely those four variables that makes them

Re: [PATCH v2 2/5] p0008-abbrev.sh: Test find_unique_abbrev() perf

2017-10-05 Thread Jeff King
On Thu, Oct 05, 2017 at 04:55:53AM -0400, Jeff King wrote: > On Mon, Sep 25, 2017 at 05:54:49AM -0400, Derrick Stolee wrote: > > > Create helper program test-abbrev to compute the minimum length of a > > disambiguating short-sha for an input list of object ids. > > This seems like something

Re: [PATCH v2 2/5] p0008-abbrev.sh: Test find_unique_abbrev() perf

2017-10-05 Thread Jeff King
On Mon, Sep 25, 2017 at 05:54:49AM -0400, Derrick Stolee wrote: > Create helper program test-abbrev to compute the minimum length of a > disambiguating short-sha for an input list of object ids. This seems like something that Git ought to be able to do via real commands. Using "log --stdin

Re: [PATCH v2 1/5] test-list-objects: List a subset of object ids

2017-10-05 Thread Jeff King
On Mon, Sep 25, 2017 at 05:54:48AM -0400, Derrick Stolee wrote: > Create test-list-objects helper program to output a random sample of > OIDs present in the repo. > > If no command line arguments are provided, all OIDs are output. This is weirdly specific. Can we accomplish the same thing with

[PATCH] Documentation/git-config.txt: reword missleading sentence

2017-10-05 Thread PAYRE NATHAN p1508475
Change the word "bla" to "section.variable" to make it clear that it's a placeholder for a variable name. See discussion at: https://public-inbox.org/git/20171002061303.horde.sl92grzcqtrv9oqkbfpe...@crashcourse.ca/ Noticed-by: rpj...@crashcourse.ca --- Documentation/git-config.txt | 4 ++-- 1

Re: [ANNOUNCE] Git v2.15.0-rc0

2017-10-05 Thread Jeff King
On Thu, Oct 05, 2017 at 02:55:31PM +0900, Junio C Hamano wrote: > Git 2.15 Release Notes (draft) > == > > Backward compatibility notes and other notable changes. > > * Use of an empty string as a pathspec element that is used for >'everything matches' is still

[PATCH] sha1_loose_object_info: handle errors from unpack_sha1_rest

2017-10-05 Thread Jeff King
When a caller of sha1_object_info_extended() sets the "contentp" field in object_info, we call unpack_sha1_rest() but do not check whether it signaled an error. This causes two problems: 1. We pass back NULL to the caller via the contentp field, but the function returns "0" for success. A

<    1   2