Re: [PATCH v1] Configure Git contribution guidelines for github.com

2017-06-15 Thread Ævar Arnfjörð Bjarmason
On Mon, Jun 12, 2017 at 5:52 PM, Junio C Hamano wrote: > "Philip Oakley" writes: > >> From: "Lars Schneider" >>> Many open source projects use github.com for their contribution process. >>> Although we mirror the Git core repository to github.com [1] we do not >>> use any other github.com servic

Re: [PATCH] wt-status.c: Modified status message shown for a parent-less branch

2017-06-15 Thread Kaartic Sivaraam
On Mon, 2017-06-12 at 17:37 -0400, Jeff King wrote: > On Mon, Jun 12, 2017 at 02:31:25PM -0700, Junio C Hamano wrote: > > > I think "staged for commit" still makes perfect sense even when > > > we are > > > just asking "what's the current status" and not "what would it > > > look like > > > if I we

Re: [PATCH] wt-status.c: Modified status message shown for a parent-less branch

2017-06-15 Thread Jeff King
On Thu, Jun 15, 2017 at 01:49:20PM +0530, Kaartic Sivaraam wrote: > What about, "not making any assumptions" about what the user would > think when he views the output of `git status` ? Why not try some > general messages like, > > * Staged changes > * Unstaged changes > > instead of the messag

[PATCH v2] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-15 Thread René Scharfe
There is no portable way to pass timezone information to strftime. Add parameters for timezone offset and name to strbuf_addftime and let it handle the timezone-related format specifiers %z and %Z internally. Callers can opt out for %Z by passing NULL as timezone name. %z is always handled inter

Re: rs/strbuf-addftime-zZ, was Re: What's cooking in git.git (Jun 2017, #04; Tue, 13)

2017-06-15 Thread René Scharfe
Am 15.06.2017 um 07:42 schrieb Jeff King: On Thu, Jun 15, 2017 at 01:03:29AM +0200, René Scharfe wrote: But there's more. strftime on Windows doesn't support common POSIX- defined tokens like %F (%Y-%m-%d) and %T (%H:%M:%S). We could handle them as well. Do we want that? At least we'd have to

Re:

2017-06-15 Thread Sai al
I would need your partnership in a transaction and details will disclose to you once i receive your reply. Thanks Saif.

[BUG] git cherry-pick segfaults with local changes in working directory

2017-06-15 Thread Sebastian Dröge
Hi, This is with git 2.11.0 (Debian 2.11.0-4) and can be reproduced with the packed checkout here: https://people.freedesktop.org/~slomo/git-cherry-pick-segfault_gst-plugins-good.tar.xz $ tar xf git-cherry-pick-segfault_gst-plugins-good.tar.xz $ cd gst-plugins-good $ git cherry-pick 0421fb0447

Which hash function to use, was Re: RFC: Another proposed hash function transition plan

2017-06-15 Thread Johannes Schindelin
Hi, I thought it better to revive this old thread rather than start a new thread, so as to automatically reach everybody who chimed in originally. On Mon, 6 Mar 2017, Brandon Williams wrote: > On 03/06, brian m. carlson wrote: > > > On Sat, Mar 04, 2017 at 06:35:38PM -0800, Linus Torvalds wrote:

Re: [BUG] git cherry-pick segfaults with local changes in working directory

2017-06-15 Thread Jeff King
On Thu, Jun 15, 2017 at 12:11:50PM +0300, Sebastian Dröge wrote: > This is with git 2.11.0 (Debian 2.11.0-4) and can be reproduced with > the packed checkout here: > > https://people.freedesktop.org/~slomo/git-cherry-pick-segfault_gst-plugins-good.tar.xz > > $ tar xf git-cherry-pick-segfault_g

Re: preserve untracked cache, was Re: What's cooking in git.git (Jun 2017, #01; Thu, 1)

2017-06-15 Thread Johannes Schindelin
Hi Junio, On Sat, 3 Jun 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > > On Fri, 2 Jun 2017, Junio C Hamano wrote: > > > >> Samuel Lijin writes: > >> > >> >> What is holding this topic up? Anything Ben or I can do to move this > >> >> closer to `next` or even `master`? > >> > >

[PATCH] docs/pretty-formats: stress that %- removes all preceding line-feeds

2017-06-15 Thread SZEDER Gábor
Signed-off-by: SZEDER Gábor --- A mere plural "line-feeds" was too subtle for me to grasp on first (and second...) reading. Documentation/pretty-formats.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.tx

Re: [BUG] git cherry-pick segfaults with local changes in working directory

2017-06-15 Thread Sebastian Dröge
Hi Jeff, Thanks for the fast reply! On Thu, 2017-06-15 at 06:32 -0400, Jeff King wrote: > On Thu, Jun 15, 2017 at 12:11:50PM +0300, Sebastian Dröge wrote: > > > This is with git 2.11.0 (Debian 2.11.0-4) and can be reproduced with > > the packed checkout here: > >   > > https://people.freedeskto

Re: pushing for a new hash, was Re: [PATCH 2/3] rebase: Add tests for console output

2017-06-15 Thread Johannes Schindelin
Hi Ævar, On Fri, 2 Jun 2017, Ævar Arnfjörð Bjarmason wrote: > On Fri, Jun 2, 2017 at 7:54 PM, Jonathan Nieder wrote: > > > > Johannes Schindelin wrote: > >> On Thu, 1 Jun 2017, Stefan Beller wrote: > > > >>> We had a discussion off list how much of the test suite is in bad > >>> shape, and "$ gi

Re: Which hash function to use, was Re: RFC: Another proposed hash function transition plan

2017-06-15 Thread Mike Hommey
On Thu, Jun 15, 2017 at 12:30:46PM +0200, Johannes Schindelin wrote: > Footnote *1*: SHA-256, as all hash functions whose output is essentially > the entire internal state, are susceptible to a so-called "length > extension attack", where the hash of a secret+message can be used to > generate the h

Re: [PATCH v2] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-15 Thread Ulrich Mueller
> On Thu, 15 Jun 2017, René Scharfe wrote: > Callers can opt out for %Z by passing NULL as timezone name. %z is > always handled internally -- this helps on Windows, where strftime would > expand it to a timezone name (same as %Z), in violation of POSIX. > Modifiers are not handled, e.g. %Ez

[PATCH] checkout: don't write merge results into the object database

2017-06-15 Thread René Scharfe
Merge results need to be written to the worktree, of course, but we don't necessarily need object entries for them, especially if they contain conflict markers. Use pretend_sha1_file() to create fake blobs to pass to make_cache_entry() and checkout_entry() instead. Signed-off-by: Rene Scharfe --

Re: [BUG] add_again() off-by-one error in custom format

2017-06-15 Thread René Scharfe
Am 15.06.2017 um 07:56 schrieb Jeff King: One interesting thing is that the cost of finding short hashes very much depends on your loose object setup. I timed: git log --format=%H >/dev/null versus git log --format=%h >/dev/null on git.git. It went from about 400ms to about 800ms. But t

Re: [PATCH] wt-status.c: Modified status message shown for a parent-less branch

2017-06-15 Thread Samuel Lijin
On Thu, Jun 15, 2017 at 4:42 AM, Jeff King wrote: > > On Thu, Jun 15, 2017 at 01:49:20PM +0530, Kaartic Sivaraam wrote: > > > What about, "not making any assumptions" about what the user would > > think when he views the output of `git status` ? Why not try some > > general messages like, > > > >

[BUG] GITK don't show unstaged changes

2017-06-15 Thread Clébio C . Felix
Details: https://github.com/git-for-windows/git/issues/1203 Version with bug: 2.13.1 Normal: 2.13.0 CCFelix

Re: [PATCH v2] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-15 Thread René Scharfe
Am 15.06.2017 um 13:27 schrieb Ulrich Mueller: On Thu, 15 Jun 2017, René Scharfe wrote: Callers can opt out for %Z by passing NULL as timezone name. %z is always handled internally -- this helps on Windows, where strftime would expand it to a timezone name (same as %Z), in violation of POSIX.

[PATCH v3] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-15 Thread René Scharfe
There is no portable way to pass timezone information to strftime. Add parameters for timezone offset and name to strbuf_addftime and let it handle the timezone-related format specifiers %z and %Z internally. Callers can opt out for %Z by passing NULL as timezone name. %z is always handled inter

Re: Which hash function to use, was Re: RFC: Another proposed hash function transition plan

2017-06-15 Thread Jeff King
On Thu, Jun 15, 2017 at 08:05:18PM +0900, Mike Hommey wrote: > On Thu, Jun 15, 2017 at 12:30:46PM +0200, Johannes Schindelin wrote: > > Footnote *1*: SHA-256, as all hash functions whose output is essentially > > the entire internal state, are susceptible to a so-called "length > > extension attac

Re: [BUG] git cherry-pick segfaults with local changes in working directory

2017-06-15 Thread Jeff King
On Thu, Jun 15, 2017 at 01:37:36PM +0300, Sebastian Dröge wrote: > > Note that the tarball doesn't have all the necessary objects. Its > > .git/objects/info/alternates points to another full clone of > > git://anongit.freedesktop.org/gstreamer/gst-plugins-good. > > Ah good to know, I thought this

Re: [PATCH] wt-status.c: Modified status message shown for a parent-less branch

2017-06-15 Thread Jeff King
On Thu, Jun 15, 2017 at 07:43:17AM -0400, Samuel Lijin wrote: > > Saying just "staged changes" is definitely accurate. I don't know if > > some users would find that too terse, too. The phrase "not staged for > > commit" gives more information if you don't know what "staged" means in > > the Git w

Re: [BUG] add_again() off-by-one error in custom format

2017-06-15 Thread Jeff King
On Thu, Jun 15, 2017 at 01:33:34PM +0200, René Scharfe wrote: > > The difference is that in the "before" case, we actually opened each > > directory and ran getdents(). But after gc, the directories are gone > > totally and open() fails. We also have to do a linear walk through the > > objects in

Re: [PATCH v3] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-15 Thread Jeff King
On Thu, Jun 15, 2017 at 02:29:53PM +0200, René Scharfe wrote: > There is no portable way to pass timezone information to strftime. Add > parameters for timezone offset and name to strbuf_addftime and let it > handle the timezone-related format specifiers %z and %Z internally. > > Callers can opt

[PATCH 1/2] t0006: check --date=format zone offsets

2017-06-15 Thread Jeff King
We already test that "%z" and "%Z" show the right thing, but we don't actually check that the time we display is the correct one. Let's add two new tests: 1. Test that "format:" shows the time in the author's timezone, just like the other time formats. 2. Test that "format-local:" shows

[PATCH 2/2] date: use localtime() for "-local" time formats

2017-06-15 Thread Jeff King
When we convert seconds-since-epochs timestamps into a broken-down "struct tm", we do so by adjusting the timestamp according to the known offset and then using gmtime() to break down the result. This means that the resulting struct "knows" that it's in GMT, even though the time it represents is ad

Re: [PATCH] checkout: don't write merge results into the object database

2017-06-15 Thread Jeff King
On Thu, Jun 15, 2017 at 01:33:42PM +0200, René Scharfe wrote: > Merge results need to be written to the worktree, of course, but we > don't necessarily need object entries for them, especially if they > contain conflict markers. Use pretend_sha1_file() to create fake > blobs to pass to make_cache

Re: [PATCH] sub-process: fix comment about api-sub-process.txt

2017-06-15 Thread Ben Peart
On 6/14/2017 2:26 PM, Jonathan Nieder wrote: Christian Couder wrote: Subject: sub-process: fix comment about api-sub-process.txt nit: this one-line description doesn't describe what was wrong and is being fixed. I think something like sub-process: correct path to API docs in comme

[PATCH 00/28] Create a reference backend for packed refs

2017-06-15 Thread Michael Haggerty
This patch series continues the saga of picking apart the code for handling packed references from the code for handling loose references, all in preparation for making big changes to how the packed-ref reading and writing works as described in [1]. As a reminder, the final goal is to read the "pac

[PATCH 01/28] add_packed_ref(): teach function to overwrite existing refs

2017-06-15 Thread Michael Haggerty
Teach `add_packed_ref()` to overwrite an existing entry if one already exists for the specified `refname`. This means that we can call it from `files_pack_refs()`, thereby reducing the amount that the latter function needs to know about the internals of packed-reference handling. Signed-off-by: Mi

[PATCH 03/28] packed_ref_store: move `packed_refs_path` here

2017-06-15 Thread Michael Haggerty
Move `packed_refs_path` from `files_ref_store` to `packed_ref_store`, and rename it to `path` since its meaning is clear from its new context. Inline `files_packed_refs_path()`. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 25 - 1 file changed, 12 insertion

[PATCH 07/28] get_packed_ref_cache(): take a `packed_ref_store *` parameter

2017-06-15 Thread Michael Haggerty
It only cares about the packed-refs part of the reference store. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index f061506bf0..b2ef7b3bb9 1006

[PATCH 09/28] add_packed_ref(): take a `packed_ref_store *` parameter

2017-06-15 Thread Michael Haggerty
It only cares about the packed-refs part of the reference store. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index bc5c0de84e..4943207098 100644 --- a/refs/file

[PATCH 08/28] get_packed_refs(): take a `packed_ref_store *` parameter

2017-06-15 Thread Michael Haggerty
It only cares about the packed-refs part of the reference store. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index b2ef7b3bb9..bc5c0de84e 100644 --- a/refs/file

[PATCH 04/28] packed_ref_store: move `packed_refs_lock` member here

2017-06-15 Thread Michael Haggerty
Move the `packed_refs_lock` member from `files_ref_store` to `packed_ref_store`, and rename it to `lock` since it's now more obvious what it is locking. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-

[PATCH 16/28] packed_ref_store: support iteration

2017-06-15 Thread Michael Haggerty
Add the infrastructure to iterate over a `packed_ref_store`. It's a lot of boilerplate, but it's all part of a campaign to make `packed_ref_store` implement `ref_store`. In the future, this iterator will work much differently. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 107 ++

[PATCH 10/28] lock_packed_refs(): take a `packed_ref_store *` parameter

2017-06-15 Thread Michael Haggerty
It only cares about the packed-refs part of the reference store. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 4943207098..0d8f39089f

[PATCH 15/28] packed_peel_ref(): new function, extracted from `files_peel_ref()`

2017-06-15 Thread Michael Haggerty
This will later become a method of `packed_ref_store`. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index c206791b91..185d05e1d6 100644 --- a/r

[PATCH 21/28] commit_packed_refs(): use a staging file separate from the lockfile

2017-06-15 Thread Michael Haggerty
We will want to be able to hold the lockfile for `packed-refs` even after we have activated the new values. So use a separate tempfile, `packed-refs.new`, as a place to stage the new contents of the `packed-refs` file. For now this is all done within `commit_packed_refs()`, but that will change sho

[PATCH 22/28] packed_refs_lock(): function renamed from lock_packed_refs()

2017-06-15 Thread Michael Haggerty
Rename `lock_packed_refs()` to `packed_refs_lock()` for consistency with how other methods are named. Also, it's about to get some companions. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 4 ++-- refs/packed-backend.c | 10 +- refs/packed-backend.h | 2 +- 3 files change

[PATCH 20/28] commit_packed_refs(): report errors rather than dying

2017-06-15 Thread Michael Haggerty
Report errors via a `struct strbuf *err` rather than by calling `die()`. To enable this goal, change `write_packed_entry()` to report errors via a return value and `errno` rather than dying. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 10 +++--- refs/packed-backend.c | 85 +++

[PATCH 11/28] commit_packed_refs(): take a `packed_ref_store *` parameter

2017-06-15 Thread Michael Haggerty
It only cares about the packed-refs part of the reference store. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 0d8f39089f..5d159620f0 100644 --- a/r

[PATCH 14/28] repack_without_refs(): take a `packed_ref_store *` parameter

2017-06-15 Thread Michael Haggerty
It only cares about the packed-refs part of the reference store. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 2b9d93d3b6..c206791b91 100644 ---

[PATCH 13/28] get_packed_ref(): take a `packed_ref_store *` parameter

2017-06-15 Thread Michael Haggerty
It only cares about the packed-refs part of the reference store. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index a08d3fbadf..2b9d93d3b6 100644 --- a/refs/fi

[PATCH 19/28] packed_ref_store: make class into a subclass of `ref_store`

2017-06-15 Thread Michael Haggerty
Add the infrastructure to make `packed_ref_store` implement `ref_store`, at least formally (few of the methods are actually implemented yet). Change the functions in its interface to take `ref_store *` arguments. Change `files_ref_store` to store a pointer to `ref_store *` and to call functions via

[PATCH 24/28] packed_refs_unlock(), packed_refs_is_locked(): new functions

2017-06-15 Thread Michael Haggerty
Add two new public functions, `packed_refs_unlock()` and `packed_refs_is_locked()`, with which callers can manage and query the `packed-refs` lock externally. Call `packed_refs_unlock()` from `commit_packed_refs()` and `rollback_packed_refs()`. Signed-off-by: Michael Haggerty --- refs/packed-ba

[PATCH 17/28] packed_read_raw_ref(): new function, replacing `resolve_packed_ref()`

2017-06-15 Thread Michael Haggerty
Add a new function, `packed_read_raw_ref()`, which is nearly a `read_raw_ref_fn`. Use it in place of `resolve_packed_ref()`. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 36 +--- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/refs/fi

[PATCH 18/28] packed-backend: new module for handling packed references

2017-06-15 Thread Michael Haggerty
Now that the interface between `files_ref_store` and `packed_ref_store` is relatively narrow, move the latter into a new module, "refs/packed-backend.h" and "refs/packed-backend.c". It still doesn't quite implement the `ref_store` interface, but it will soon. This commit moves code around and adju

[PATCH 26/28] commit_packed_refs(): remove call to `packed_refs_unlock()`

2017-06-15 Thread Michael Haggerty
Instead, change the callers of `commit_packed_refs()` to call `packed_refs_unlock()`. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 2 ++ refs/packed-backend.c | 18 -- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/refs/files-backend.c b/refs/fil

[PATCH 28/28] read_packed_refs(): die if `packed-refs` contains bogus data

2017-06-15 Thread Michael Haggerty
The old code ignored any lines that it didn't understand. This is dangerous. Instead, `die()` if the `packed-refs` file contains any lines that we don't know how to handle. Signed-off-by: Michael Haggerty --- refs/packed-backend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH 06/28] validate_packed_ref_cache(): take a `packed_ref_store *` parameter

2017-06-15 Thread Michael Haggerty
It only cares about the packed-refs part of the reference store. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 2b0db60b2b..f061506bf0 100644 --- a/refs/f

[PATCH 02/28] packed_ref_store: new struct

2017-06-15 Thread Michael Haggerty
Start extracting the packed-refs-related data structures into a new class, `packed_ref_store`. It doesn't yet implement `ref_store`, but it will. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 42 +- 1 file changed, 33 insertions(+), 9 deletion

[PATCH 27/28] repack_without_refs(): don't lock or unlock the packed refs

2017-06-15 Thread Michael Haggerty
Change `repack_without_refs()` to expect the packed-refs lock to be held already, and not to release the lock before returning. Change the callers to deal with lock management. This change makes it possible for callers to hold the packed-refs lock for a longer span of time, a possibility that will

[PATCH 12/28] rollback_packed_refs(): take a `packed_ref_store *` parameter

2017-06-15 Thread Michael Haggerty
It only cares about the packed-refs part of the reference store. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 5d159620f0..a08d3fbadf 100644 --- a/refs

[PATCH 05/28] clear_packed_ref_cache(): take a `packed_ref_store *` parameter

2017-06-15 Thread Michael Haggerty
It only cares about the packed-refs part of the reference store. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index de8293493f..2b0db60b2b 100644 --- a/ref

[PATCH 23/28] packed_refs_lock(): report errors via a `struct strbuf *err`

2017-06-15 Thread Michael Haggerty
That way the callers don't have to come up with error messages themselves. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 6 ++ refs/packed-backend.c | 17 +++-- refs/packed-backend.h | 6 +++--- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/refs

[PATCH 25/28] clear_packed_ref_cache(): don't protest if the lock is held

2017-06-15 Thread Michael Haggerty
The existing callers already check that the lock isn't held just before calling `clear_packed_ref_cache()`, and in the near future we want to be able to call this function when the lock is held. Signed-off-by: Michael Haggerty --- refs/packed-backend.c | 2 -- 1 file changed, 2 deletions(-) dif

Re: [PATCH] checkout: don't write merge results into the object database

2017-06-15 Thread René Scharfe
Am 15.06.2017 um 15:57 schrieb Jeff King: > On Thu, Jun 15, 2017 at 01:33:42PM +0200, René Scharfe wrote: > >> Merge results need to be written to the worktree, of course, but we >> don't necessarily need object entries for them, especially if they >> contain conflict markers. Use pretend_sha1_fi

Re: What's cooking in git.git (Jun 2017, #04; Tue, 13)

2017-06-15 Thread Junio C Hamano
Jonathan Nieder writes: >> It is not known if a simple "yes/no" is sufficient in the longer >> term, and what should happen when --recurse-submodules option starts >> taking "recurse into them how?" parameter, though. > > Any pointers for where this has been discussed, if anywhere (e.g. was I

Re: [PATCH 2/2] date: use localtime() for "-local" time formats

2017-06-15 Thread René Scharfe
Am 15.06.2017 um 15:52 schrieb Jeff King: But for the special case of the "-local" formats, we can just skip the adjustment and use localtime() instead of gmtime(). This makes --date=format-local:%Z work correctly, showing the local timezone instead of an empty string. Documentation/rev-list-op

git diff sometimes brings up buggy pager

2017-06-15 Thread Matthew Groth
When I do `git diff` sometimes I get this: ...skipping... ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ...skipping... ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ...skipping... ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ it goes on like this for about 10 times the length. Looks like this happens

Re: Which hash function to use, was Re: RFC: Another proposed hash function transition plan

2017-06-15 Thread Ævar Arnfjörð Bjarmason
On Thu, Jun 15 2017, Jeff King jotted: > On Thu, Jun 15, 2017 at 08:05:18PM +0900, Mike Hommey wrote: > >> On Thu, Jun 15, 2017 at 12:30:46PM +0200, Johannes Schindelin wrote: >> > Footnote *1*: SHA-256, as all hash functions whose output is essentially >> > the entire internal state, are suscept

[PATCH] diff-highlight: split code into module

2017-06-15 Thread Jeff King
The diff-so-fancy project is also written in perl, and most of its users pipe diffs through both diff-highlight and diff-so-fancy. It would be nice if this could be done in a single script. So let's pull most of diff-highlight's code into its own module which can be used by diff-so-fancy. In addit

Re: [PATCH v1] Configure Git contribution guidelines for github.com

2017-06-15 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > There are things we get out of this that would regress if > submitGit were changed this way: > > * Now when you submit a pull request you get a Travis build for > git/git, I don't get this if I push to any random branch in my > avar/git, and although I could pro

Re: [PATCH v2 1/2] git-compat-util: add a FREEZ() wrapper around free(ptr); ptr = NULL

2017-06-15 Thread Junio C Hamano
Jeff King writes: > On Sat, Jun 10, 2017 at 03:21:43AM +, Eric Wong wrote: > >> > So make Jonathan's freez_impl a public API and rename it to >> > free_and_null(), perhaps? >> >> Perhaps... I think it needs to take "void *" to avoid warnings: >> >> static inline void free_and_null(voi

Re: [PATCH v2 2/4] sha1_file: move delta base cache code up

2017-06-15 Thread Junio C Hamano
Jonathan Tan writes: > In a subsequent patch, packed_object_info() will be modified to use the > delta base cache, so move the relevant code to before > packed_object_info(). > > Signed-off-by: Jonathan Tan > --- > sha1_file.c | 226 > +++

Re: [PATCH v2 1/2] git-compat-util: add a FREEZ() wrapper around free(ptr); ptr = NULL

2017-06-15 Thread Ævar Arnfjörð Bjarmason
On Thu, Jun 15, 2017 at 6:48 PM, Junio C Hamano wrote: > Jeff King writes: > >> On Sat, Jun 10, 2017 at 03:21:43AM +, Eric Wong wrote: >> >>> > So make Jonathan's freez_impl a public API and rename it to >>> > free_and_null(), perhaps? >>> >>> Perhaps... I think it needs to take "void *" to

Re: [PATCH v1] Configure Git contribution guidelines for github.com

2017-06-15 Thread Andreas Heiduk
Am 15.06.2017 um 18:43 schrieb Junio C Hamano: > Another thing that may regress that you did not mention is that we > would lose a convenient way to _count_ proposed changes coming via > submitGit (i.e. you can simply go to the pull-request page), so that > the number can be compared with the numbe

Re: Which hash function to use, was Re: RFC: Another proposed hash function transition plan

2017-06-15 Thread Brandon Williams
On 06/15, Johannes Schindelin wrote: > Hi, > > I thought it better to revive this old thread rather than start a new > thread, so as to automatically reach everybody who chimed in originally. > > On Mon, 6 Mar 2017, Brandon Williams wrote: > > > On 03/06, brian m. carlson wrote: > > > > > On Sat

Re: git diff sometimes brings up buggy pager

2017-06-15 Thread Samuel Lijin
Any chance you can tell us what repo this happens on? + git version, OS, and what the triggering diff invocation is. On Thu, Jun 15, 2017 at 12:19 PM, Matthew Groth wrote: > When I do `git diff` sometimes I get this: > > > ...skipping... > ~ > ~ > ~ > ~ > ~ > ~ > ~ > ~ > ~ > ~ > ~ > ~ > ~ > ~ > ~

Re: [PATCH v2 3/4] sha1_file: consolidate storage-agnostic object fns

2017-06-15 Thread Junio C Hamano
Jonathan Tan writes: > Looking at the 3 primary functions (sha1_object_info_extended, > read_object, has_sha1_file_with_flags), they independently implement > mechanisms such as object replacement, retrying the packed store after > failing to find the object in the packed store then the loose sto

Re: [PATCH v1] Configure Git contribution guidelines for github.com

2017-06-15 Thread Junio C Hamano
Andreas Heiduk writes: > Am 15.06.2017 um 18:43 schrieb Junio C Hamano: >> Another thing that may regress that you did not mention is that we >> would lose a convenient way to _count_ proposed changes coming via >> submitGit (i.e. you can simply go to the pull-request page), so that >> the number

Re: [PATCH v2 3/4] sha1_file: consolidate storage-agnostic object fns

2017-06-15 Thread Jonathan Tan
On Thu, 15 Jun 2017 10:50:46 -0700 Junio C Hamano wrote: > Jonathan Tan writes: > > > Looking at the 3 primary functions (sha1_object_info_extended, > > read_object, has_sha1_file_with_flags), they independently implement > > mechanisms such as object replacement, retrying the packed store afte

Re: [PATCH v2 4/4] sha1_file, fsck: add missing blob support

2017-06-15 Thread Junio C Hamano
Jonathan Tan writes: > diff --git a/sha1_file.c b/sha1_file.c > index 98086e21e..75fe2174d 100644 > --- a/sha1_file.c > +++ b/sha1_file.c > @@ -27,6 +27,9 @@ > #include "list.h" > #include "mergesort.h" > #include "quote.h" > +#include "iterator.h" > +#include "dir-iterator.h" > +#include "sha

Re: [BUG] add_again() off-by-one error in custom format

2017-06-15 Thread Junio C Hamano
René Scharfe writes: > Am 13.06.2017 um 23:20 schrieb Junio C Hamano: > >> I think the real question is how likely people use more than one >> occurrence of the same thing in their custom format, and how deeply >> they care that --format='%h %h' costs more than --format='%h'. The >> cost won't o

[ANNOUNCE] Git for Windows 2.13.1(2)

2017-06-15 Thread Johannes Schindelin
Dear Git users, It is my pleasure to announce that Git for Windows 2.13.1(2) is available from: https://git-for-windows.github.io/ Changes since Git for Windows v2.13.1 (June 13th 2017) Bug Fixes * git commit and git status no longer randomly throw segmentation faults. Filename

Re: Which hash function to use, was Re: RFC: Another proposed hash function transition plan

2017-06-15 Thread Jonathan Nieder
Hi Dscho, Johannes Schindelin wrote: > From what I read, pretty much everybody who participated in the discussion > was aware that the essential question is: performance vs security. I don't completely agree with this framing. The essential question is: how to get the right security properties

Re: [PATCH] diff-highlight: split code into module

2017-06-15 Thread Junio C Hamano
Jeff King writes: > The diff-so-fancy project is also written in perl, and most > of its users pipe diffs through both diff-highlight and > diff-so-fancy. It would be nice if this could be done in a > single script. So let's pull most of diff-highlight's code > into its own module which can be us

Re: [PATCH] diff-highlight: split code into module

2017-06-15 Thread Junio C Hamano
Junio C Hamano writes: >> contrib/diff-highlight/.gitignore | 2 ++ >> .../{diff-highlight => DiffHighlight.pm} | 40 >> +- >> contrib/diff-highlight/Makefile| 21 ++-- >> contrib/diff-highlight/README

Re: Which hash function to use, was Re: RFC: Another proposed hash function transition plan

2017-06-15 Thread Junio C Hamano
Brandon Williams writes: >> It would make a whole of a lot of sense to make that knob not Boolean, >> but to specify which hash function is in use. > > 100% agree on this point. I believe the current plan is to have the > hashing function used for a repository be a repository format extension >

Re: Which hash function to use, was Re: RFC: Another proposed hash function transition plan

2017-06-15 Thread Johannes Schindelin
Hi, On Thu, 15 Jun 2017, Ævar Arnfjörð Bjarmason wrote: > On Thu, Jun 15 2017, Jeff King jotted: > > > On Thu, Jun 15, 2017 at 08:05:18PM +0900, Mike Hommey wrote: > > > >> On Thu, Jun 15, 2017 at 12:30:46PM +0200, Johannes Schindelin wrote: > >> > >> > Footnote *1*: SHA-256, as all hash functio

Re: [PATCH v4 6/6] Use the early config machinery to expand aliases

2017-06-15 Thread Junio C Hamano
Johannes Schindelin writes: > +struct config_alias_data > +{ Style: "struct config_alias_data {" which I can tweak while applying. Other than that, everything looks good. Thanks.

Re: [PATCH v4 6/6] Use the early config machinery to expand aliases

2017-06-15 Thread Johannes Schindelin
Hi Junio, On Thu, 15 Jun 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > > +struct config_alias_data > > +{ > > Style: "struct config_alias_data {" > > which I can tweak while applying. Please do. > Other than that, everything looks good. Thanks, Dscho

Re: [PATCH v3 0/6] config.h

2017-06-15 Thread Junio C Hamano
Brandon Williams writes: > Changes in v3: > > * tweaked the discover_git_directory function's API based on Peff's feedback > * reordered the last three patches so that they flowed a bit better > * renamed 'git_config_with_options' > * rebased ontop of v4 of Dscho's alias series > > https://pub

Re: [PATCH] diff-highlight: split code into module

2017-06-15 Thread Scott Baker
On 06/15/2017 12:15 PM, Junio C Hamano wrote: > Do you want +x bit for the last one? I could throw that bit in > while queuing if you want. > > Thanks. > Ya probably best.

Re: [WIP v2 2/2] pack-objects: support --blob-max-bytes

2017-06-15 Thread Jeff Hostetler
On 6/2/2017 6:26 PM, Jeff King wrote: On Fri, Jun 02, 2017 at 12:38:45PM -0700, Jonathan Tan wrote: ... We have a name-hash cache extension in the bitmap file, but it doesn't carry enough information to deduce the .git-ness of a file. I don't think it would be too hard to add a "flags" extens

Re: [PATCH v2 4/4] sha1_file, fsck: add missing blob support

2017-06-15 Thread Jonathan Tan
A reroll is coming soon, but there is an interesting discussion point here so I'll reply to this e-mail first. On Thu, 15 Jun 2017 11:34:45 -0700 Junio C Hamano wrote: > Jonathan Tan writes: > > > +struct missing_blob_manifest { > > + struct missing_blob_manifest *next; > > + const char *d

Re: [PATCH v3 0/6] config.h

2017-06-15 Thread Brandon Williams
On 06/15, Junio C Hamano wrote: > Brandon Williams writes: > > > Changes in v3: > > > > * tweaked the discover_git_directory function's API based on Peff's feedback > > * reordered the last three patches so that they flowed a bit better > > * renamed 'git_config_with_options' > > * rebased ontop

[PATCH v3 1/4] sha1_file: teach packed_object_info about typename

2017-06-15 Thread Jonathan Tan
In commit 46f0344 ("sha1_file: support reading from a loose object of unknown type", 2015-05-06), "struct object_info" gained a "typename" field that could represent a type name from a loose object file, whether valid or invalid, as opposed to the existing "typep" which could only represent valid t

[PATCH v3 4/4] sha1_file, fsck: add missing blob support

2017-06-15 Thread Jonathan Tan
Currently, Git does not support repos with very large numbers of blobs or repos that wish to minimize manipulation of certain blobs (for example, because they are very large) very well, even if the user operates mostly on part of the repo, because Git is designed on the assumption that every blob r

[PATCH v3 3/4] sha1_file: consolidate storage-agnostic object fns

2017-06-15 Thread Jonathan Tan
In sha1_file.c, there are a few functions that provide information on an object regardless of its storage (cached, loose, or packed). Looking through all non-static functions in sha1_file.c that take in an unsigned char * pointer, the relevant ones are: - sha1_object_info_extended - sha1_object_i

[PATCH v3 0/4] Improvements to sha1_file

2017-06-15 Thread Jonathan Tan
Thanks - this has been updated following Junio's comments. Patch 1 is unmodified from the previous version. Patch 2 has been modified to remove the extraneous code pointed out by Junio. I previously had an idea of populating those fields in packed_object_info(), but later changed my mind, but a r

[PATCH v3 2/4] sha1_file: move delta base cache code up

2017-06-15 Thread Jonathan Tan
In a subsequent patch, packed_object_info() will be modified to use the delta base cache, so move the relevant code to before packed_object_info(). Signed-off-by: Jonathan Tan --- sha1_file.c | 220 ++-- 1 file changed, 110 insertions(+), 1

Re: [PATCH v2 4/4] sha1_file, fsck: add missing blob support

2017-06-15 Thread Junio C Hamano
Jonathan Tan writes: > There is indeed no reason why we need to keep multiple ones separate for > an extended period of time - my thinking was to let fetch/clone be fast > by not needing to scan through the entire existing manifest (in order to > create the new one), letting GC take care of cons

Re: [WIP v2 2/2] pack-objects: support --blob-max-bytes

2017-06-15 Thread Jonathan Tan
On Thu, 15 Jun 2017 16:28:24 -0400 Jeff Hostetler wrote: > I agree with Peff here. I've been working on my partial/narrow/sparse > clone/fetch ideas since my original RFC and have come to the conclusion > that the server can do the size limiting efficiently, but we should > leave the pathname fi

[PATCH v3 0/2] Add a FREE_AND_NULL() wrapper macro

2017-06-15 Thread Ævar Arnfjörð Bjarmason
On Thu, Jun 15 2017, Ævar Arnfjörð Bjarmason jotted: > I'll change it to FREE_AND_NULL and submit my patch as-is, my reading > of the rest of this thread is that making it a function instead of a > macro would be interesting, but has its own caveats that are likely > better considered as part of it

[PATCH v3 1/2] git-compat-util: add a FREE_AND_NULL() wrapper around free(ptr); ptr = NULL

2017-06-15 Thread Ævar Arnfjörð Bjarmason
Add a FREE_AND_NULL() wrapper marco for the common pattern of freeing a pointer and assigning NULL to it right afterwards. The implementation is similar to the (currently unused) XDL_PTRFREE macro in xdiff/xmacros.h added in commit 3443546f6e ("Use a *real* built-in diff generator", 2006-03-24). T

[PATCH v3 2/2] *.[ch] refactoring: make use of the FREE_AND_NULL() macro

2017-06-15 Thread Ævar Arnfjörð Bjarmason
Replace occurrences of `free(ptr); ptr = NULL` with `FREE_AND_NULL(ptr)`. This introduces no functional changes, but reduces the line count and establishes this pattern as a common idiom with a wrapper macro. Signed-off-by: Ævar Arnfjörð Bjarmason --- alias.c | 6 ++ apply.

  1   2   >