Re: [PATCH v2 2/5] pretty: allow showing specific trailers

2018-11-05 Thread Anders Waldenborg
Eric Sunshine writes: > Should the code tolerate a trailing colon? (Genuine question; it's > easy to do and would be more user-friendly.) I would make sense to allow the trailing colon, it is easy enough to just strip that away when reading the argument. However I'm not sure how that would fit

Re: [PATCH v2 4/5] pretty: extract fundamental placeholders to separate function

2018-11-05 Thread Anders Waldenborg
Junio C Hamano writes: > I do not think "fundamental" is the best name for this, but I agree > that it would be useful to split the helpers into one that is > "constant across commits" and the other one that is "per commit". Any suggestions for a better name? standalone? simple? invariant?

Re: [PATCH v2 2/5] pretty: allow showing specific trailers

2018-11-05 Thread Eric Sunshine
On Mon, Nov 5, 2018 at 3:26 AM Anders Waldenborg wrote: > Eric Sunshine writes: > > Should the code tolerate a trailing colon? (Genuine question; it's > > easy to do and would be more user-friendly.) > > I would make sense to allow the trailing colon, it is easy enough to > just strip that away

RE: Failed stash caused untracked changes to be lost

2018-11-05 Thread Quinn, David
Hi, Thanks for the reply. Sorry I forgot the version number, completely slipped my mind. At the time of writing the report it was Git ~ 2.17 I believe. All of our software is updated centrally at my work, we have received an update since writing this to 2.19.1. Unfortunately because of it

Re: [PATCH v3 7/8] push: add DWYM support for "git push refs/remotes/...:"

2018-11-05 Thread Ævar Arnfjörð Bjarmason
I'll re-roll this. Hopefully sooner than later. I'll leave out the later part of this series as it's more controversial and we can discuss that later on its own. Meanwhile just some replies to this (while I remember): > Ævar Arnfjörð Bjarmason writes: > >>> On the other hand, I do not think I

Re: [PATCH v5 10/12] Add a base implementation of SHA-256 support

2018-11-05 Thread Ævar Arnfjörð Bjarmason
On Sun, Nov 04 2018, brian m. carlson wrote: > SHA-1 is weak and we need to transition to a new hash function. For > some time, we have referred to this new function as NewHash. Recently, > we decided to pick SHA-256 as NewHash. The reasons behind the choice of > SHA-256 are outlined in the

Re: [RFC v1] Add virtual file system settings and hook proc

2018-11-05 Thread Ævar Arnfjörð Bjarmason
On Sun, Nov 04 2018, Duy Nguyen wrote: > On Wed, Oct 31, 2018 at 9:53 PM Ben Peart wrote: >> >> +core.virtualFilesystem:: >> >> + If set, the value of this variable is used as a command which >> >> + will identify all files and directories that are present in >> >> + the

Re: [RFC/PATCH 0/5] stop installing old libexec aliases like "git-init"

2018-11-05 Thread Ævar Arnfjörð Bjarmason
On Sat, Nov 03 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> Although I'm on the fence with the approach in 1/5. Should this be a >> giant getopt switch statement like that in a helper script? >> >> An alternative would be to write out a shell file similar to >>

Re: [PATCH v3 7/8] push: add DWYM support for "git push refs/remotes/...:"

2018-11-05 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > After all sometimes "other" is just the repo on my laptop or server. I > shouldn't need to jump through hoops to re-push stuff from my "other" > repo anymore than from the local repo. > > Yes refs/remotes/* isn't guaranteed to be "other repo's branches" in the >

Re: if YOU use a Windows GUI for Git, i would appreciate knowing which one and why

2018-11-05 Thread Philip Oakley
Hi Gerry, I'll give my view, as someone approaching retirement, but who worked as an Engineer in a mainly Windows environment. On 04/11/2018 17:48, _g e r r y _ _l o w r y _ wrote: PREAMBLE [START] - please feel free to skip this first section Forgive me for asking this question on a mailing

Re: [RFC v1] Add virtual file system settings and hook proc

2018-11-05 Thread Duy Nguyen
On Sun, Nov 4, 2018 at 10:01 PM brian m. carlson wrote: > > On Sun, Nov 04, 2018 at 07:34:01AM +0100, Duy Nguyen wrote: > > On Wed, Oct 31, 2018 at 9:53 PM Ben Peart wrote: > > > It's more than a dynamic sparse-checkout because the same list is also > > > used to exclude any file/folder not

Re: [RFC v1] Add virtual file system settings and hook proc

2018-11-05 Thread Duy Nguyen
On Mon, Nov 5, 2018 at 12:40 PM Ævar Arnfjörð Bjarmason wrote: > > > On Sun, Nov 04 2018, Duy Nguyen wrote: > > > On Wed, Oct 31, 2018 at 9:53 PM Ben Peart wrote: > >> >> +core.virtualFilesystem:: > >> >> + If set, the value of this variable is used as a command which > >> >> + will

Re: "git checkout" safety feature

2018-11-05 Thread Duy Nguyen
On Mon, Nov 5, 2018 at 7:53 AM Jeff King wrote: > > On Mon, Nov 05, 2018 at 07:24:42AM +0100, Matthias Urlichs wrote: > > > Hi, > > > "git checkout " is a feature to overwrite local > > > changes. It is what you use when you make a mess editing the files > > > and want to go back to a known

Re: [PATCH/RFC v2] sequencer.c: record revert/cherry-pick commit with trailer lines

2018-11-05 Thread Duy Nguyen
On Sun, Nov 4, 2018 at 10:30 PM brian m. carlson wrote: > However, I do have concerns about breaking compatibility with existing > scripts. I wonder if we could add a long alias for git cherry-pick -x, > say "--notate" and have "--notate=text" mean "-x" and "--notate=trailer" > mean this new

Re: [PATCH] diff: differentiate error handling in parse_color_moved_ws

2018-11-05 Thread Stefan Beller
On Sun, Nov 4, 2018 at 10:12 PM Junio C Hamano wrote: > > Junio C Hamano writes: > > > Stefan Beller writes: > > > >> > >> -static int parse_color_moved_ws(const char *arg) > >> +static unsigned parse_color_moved_ws(const char *arg) > >> { > >> int ret = 0; > >> struct string_list l

[PATCH v2 01/16] git.c: mark more strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
One string is slightly updated to keep consistency with the rest: die() should with lowercase. Signed-off-by: Nguyễn Thái Ngọc Duy --- git.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/git.c b/git.c index adac132956..5fd30da093 100644 ---

[PATCH v2 07/16] read-cache.c: add missing colon separators

2018-11-05 Thread Nguyễn Thái Ngọc Duy
typechange_fmt and added_fmt should have a colon before "needs update". Align the statements to make it easier to read and see. Also drop the unnecessary (). Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH v2 08/16] reflog: mark strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
One string "nothing to delete?" is rephrased to be more helpful. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/reflog.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/builtin/reflog.c b/builtin/reflog.c index b5941c1ff3..5a74ccf7ab

[PATCH v2 12/16] parse-options: replace opterror() with optname()

2018-11-05 Thread Nguyễn Thái Ngọc Duy
There are a few issues with opterror() - it tries to assemble an English sentence from pieces. This is not great for translators because we give them pieces instead of a full sentence. - It's a wrapper around error() and needs some hack to let the compiler know it always returns -1. -

[PATCH v2 15/16] fsck: reduce word legos to help i18n

2018-11-05 Thread Nguyễn Thái Ngọc Duy
These messages will be marked for translation later. Reduce word legos and give translators almost full phrases. describe_object() is updated so that it can be called from printf() twice. While at there, remove \n from the strings to reduce a bit of work from translators. Signed-off-by: Nguyễn

[PATCH v2 13/16] parse-options.c: turn some die() to BUG()

2018-11-05 Thread Nguyễn Thái Ngọc Duy
These two strings are clearly not for the user to see. Reduce the violence in one string while at there. Signed-off-by: Nguyễn Thái Ngọc Duy --- parse-options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parse-options.c b/parse-options.c index 0bf817193d..3f5f985c1e

[PATCH v2 16/16] fsck: mark strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
Two die() are updated to start with lowercase to be consistent with the rest. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/fsck.c | 106 - t/t1410-reflog.sh | 6 +-- t/t1450-fsck.sh| 50 -

[PATCH v2 09/16] remote.c: turn some error() or die() to BUG()

2018-11-05 Thread Nguyễn Thái Ngọc Duy
The first error, "internal error", is clearly a BUG(). The second two are meant to catch calls with invalid parameters and should never happen outside the test suite. Signed-off-by: Nguyễn Thái Ngọc Duy --- remote.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v2 10/16] remote.c: mark messages for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
The two strings are slightly modified to be consistent with the rest: die() and error() start with a lowercase. Signed-off-by: Nguyễn Thái Ngọc Duy --- remote.c | 43 ++- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/remote.c b/remote.c

[PATCH v2 06/16] read-cache.c: mark more strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
There are a couple other improvements on these strings as well: - add missing colon (as separator) - quote paths - provide more information on error messages - keep first word in lowercase Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c| 57

[PATCH v2 11/16] repack: mark more strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
Two strings are slightly updated to be consistent with the rest: die() starts with lowercase. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/repack.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/builtin/repack.c b/builtin/repack.c index

[PATCH v2 00/16] Mark more strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
v2 splits non-trivial changes out to keep i18n patches simpler. A few more word legos in fsck are removed. v2 also fixes a bug in fsck that makes it print object id incorrectly. Nguyễn Thái Ngọc Duy (16): git.c: mark more strings for translation alias.c: mark split_cmdline_strerror() strings

[PATCH v2 05/16] read-cache.c: turn die("internal error") to BUG()

2018-11-05 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/read-cache.c b/read-cache.c index d57958233e..0c37f4885e 100644 --- a/read-cache.c +++ b/read-cache.c @@ -316,7 +316,7 @@ static int ce_match_stat_basic(const struct

[PATCH v2 02/16] alias.c: mark split_cmdline_strerror() strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
This function can be part of translated messages. To make sure we don't have a sentence with mixed languages, mark the strings for translation, but only use translated strings in places we know we will output translated strings. Signed-off-by: Nguyễn Thái Ngọc Duy --- alias.c | 4 ++--

[PATCH v2 03/16] archive.c: mark more strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
Two messages also print extra information to be more useful Signed-off-by: Nguyễn Thái Ngọc Duy --- archive.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/archive.c b/archive.c index 9d16b7fadf..d8f6e1ce30 100644 --- a/archive.c +++ b/archive.c @@ -385,12 +385,12

[PATCH v2 04/16] attr.c: mark more string for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- attr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/attr.c b/attr.c index 60d284796d..3770bc1a11 100644 --- a/attr.c +++ b/attr.c @@ -372,8 +372,8 @@ static struct match_attr *parse_attr_line(const char *line, const char *src,

Re: Design of multiple hash support

2018-11-05 Thread Duy Nguyen
On Mon, Nov 5, 2018 at 2:02 AM brian m. carlson wrote: > > I'm currently working on getting Git to support multiple hash algorithms > in the same binary (SHA-1 and SHA-256). In order to have a fully > functional binary, we'll need to have some way of indicating to certain > commands (such as

Re: [PATCH 0/13] parseopt fixes from -Wunused-parameters

2018-11-05 Thread Duy Nguyen
On Mon, Nov 5, 2018 at 7:39 AM Jeff King wrote: > > Continuing my exploration of what -Wunused-parameters can show us, here > are some bug-fixes related to parse-options callbacks. > > This is the last of the actual bug-fixes I've found. After this, I have > about 60 patches worth of cleanups

Re: Design of multiple hash support

2018-11-05 Thread Stefan Beller
On Sun, Nov 4, 2018 at 6:36 PM Junio C Hamano wrote: > > "brian m. carlson" writes: > > > I'm currently working on getting Git to support multiple hash algorithms > > in the same binary (SHA-1 and SHA-256). In order to have a fully > > functional binary, we'll need to have some way of

[PATCH v1] refresh_index: remove unnecessary calls to preload_index()

2018-11-05 Thread Ben Peart
From: Ben Peart With refresh_index() learning to utilize preload_index() to speed up its operation there is no longer any benefit to having the caller preload the index first. Remove those unneeded calls by calling read_index() instead of the preload variant. There is no measurable performance

Re: [PATCH 12/12] fsck: mark strings for translation

2018-11-05 Thread Duy Nguyen
On Mon, Oct 29, 2018 at 12:53 PM SZEDER Gábor wrote: > The contents of 'out': > > broken link fromtree be45bbd3809e0829297cefa576e699c134abacfd > (refs/heads/master@{1112912113}:caesar.t) > toblob be45bbd3809e0829297cefa576e699c134abacfd >

Re: [PATCH v2 5/5] pretty: add support for separator option in %(trailers)

2018-11-05 Thread Anders Waldenborg
Junio C Hamano writes: > Anders Waldenborg writes: > >> @@ -1352,6 +1353,17 @@ static size_t format_commit_one(struct strbuf *sb, /* >> in UTF-8 */ >> arg++; >> >> opts.only_trailers = 1; >> +

[PATCH v2 14/16] parse-options.c: mark more strings for translation

2018-11-05 Thread Nguyễn Thái Ngọc Duy
One error is updated to start with lowercase to be consistent with the rest. Signed-off-by: Nguyễn Thái Ngọc Duy --- parse-options.c | 14 +++--- t/t0040-parse-options.sh | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/parse-options.c b/parse-options.c

Re: [PATCH] multi-pack-index: make code -Wunused-parameter clean

2018-11-05 Thread Derrick Stolee
On 11/3/2018 10:27 PM, Jeff King wrote: On Sat, Nov 03, 2018 at 05:49:57PM -0700, Carlo Marcelo Arenas Belón wrote: introduced in 662148c435 ("midx: write object offsets", 2018-07-12) but included on all previous versions as well. midx.c:713:54: warning: unused parameter 'nr_objects'

Re: git-rebase is ignoring working-tree-encoding

2018-11-05 Thread Torsten Bögershausen
On Mon, Nov 05, 2018 at 05:24:39AM +0100, Adrián Gimeno Balaguer wrote: [] > https://github.com/git/git/pull/550 [] > This is covered in the mentioned PR above. Thanks for feedback. Thanks for the code, I will have a look (the next days) > > -- > Adrián

Re: [PATCH] parse-options: deprecate OPT_DATE

2018-11-05 Thread Jeff King
On Mon, Nov 05, 2018 at 10:34:02AM -0800, Carlo Marcelo Arenas Belón wrote: > Signed-off-by: Carlo Marcelo Arenas Belón > --- > Documentation/technical/api-parse-options.txt | 4 > 1 file changed, 4 deletions(-) > > diff --git a/Documentation/technical/api-parse-options.txt >

Re: [PATCH 0/13] parseopt fixes from -Wunused-parameters

2018-11-05 Thread Jeff King
On Mon, Nov 05, 2018 at 05:51:07PM +0100, Duy Nguyen wrote: > On Mon, Nov 5, 2018 at 7:39 AM Jeff King wrote: > > > > Continuing my exploration of what -Wunused-parameters can show us, here > > are some bug-fixes related to parse-options callbacks. > > > > This is the last of the actual

Re: [PATCH/RFC] sequencer.c: record revert/cherry-pick commit with trailer lines

2018-11-05 Thread Duy Nguyen
On Mon, Nov 5, 2018 at 1:56 AM Junio C Hamano wrote: > > Nguyễn Thái Ngọc Duy writes: > > > A reverted commit will have a new trailer > > > > Revert: > > Please don't, unless you are keeping the current "the effect of > commit X relative to its parent Y was reverted" writtein in prose, >

[PATCH] parse-options: deprecate OPT_DATE

2018-11-05 Thread Carlo Marcelo Arenas Belón
Signed-off-by: Carlo Marcelo Arenas Belón --- Documentation/technical/api-parse-options.txt | 4 1 file changed, 4 deletions(-) diff --git a/Documentation/technical/api-parse-options.txt b/Documentation/technical/api-parse-options.txt index 829b558110..2b036d7838 100644 ---

Re: [PATCH 0/13] parseopt fixes from -Wunused-parameters

2018-11-05 Thread Duy Nguyen
On Mon, Nov 5, 2018 at 7:49 PM Jeff King wrote: > > On Mon, Nov 05, 2018 at 05:51:07PM +0100, Duy Nguyen wrote: > > > On Mon, Nov 5, 2018 at 7:39 AM Jeff King wrote: > > > > > > Continuing my exploration of what -Wunused-parameters can show us, here > > > are some bug-fixes related to

[PATCH] doc: fix typos in release notes

2018-11-05 Thread orgads
From: Orgad Shaneh Signed-off-by: Orgad Shaneh --- Documentation/RelNotes/2.20.0.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/RelNotes/2.20.0.txt b/Documentation/RelNotes/2.20.0.txt index 4b546d025f..bc0f4e8237 100644 ---

[PATCH] range-diff: add a --no-patch option to show a summary

2018-11-05 Thread Ævar Arnfjörð Bjarmason
Add a --no-patch option which shows which changes got removed, added or moved etc., without showing the diff associated with them. This allows for using range-diff as a poor man's "shortlog" for force-pushed branches to see what changed without getting into the details of what specifically. E.g.

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-05 Thread Johannes Schindelin
Hi Hannes, On Mon, 5 Nov 2018, Johannes Sixt wrote: > Am 05.11.18 um 00:26 schrieb Junio C Hamano: > > OK, thanks. It seems that the relative silence after this message is > > a sign that the resulting patch after squashing is what everybody is > > happey with? > > I'm not 100% happy. I'll

Re: [PATCH v1] refresh_index: remove unnecessary calls to preload_index()

2018-11-05 Thread Duy Nguyen
On Mon, Nov 5, 2018 at 8:30 PM Ben Peart wrote: > > From: Ben Peart > > With refresh_index() learning to utilize preload_index() to speed up its > operation there is no longer any benefit to having the caller preload the > index first. Remove those unneeded calls by calling read_index() instead

Re: [RFC v1] Add virtual file system settings and hook proc

2018-11-05 Thread Ben Peart
On 11/4/2018 4:01 PM, brian m. carlson wrote: On Sun, Nov 04, 2018 at 07:34:01AM +0100, Duy Nguyen wrote: On Wed, Oct 31, 2018 at 9:53 PM Ben Peart wrote: It's more than a dynamic sparse-checkout because the same list is also used to exclude any file/folder not listed. That means any file

Re: [RFC v1] Add virtual file system settings and hook proc

2018-11-05 Thread Johannes Schindelin
Hi Ævar, On Mon, 5 Nov 2018, Ævar Arnfjörð Bjarmason wrote: > The only potential downside I see is that there's currently exactly one > implementation of this sort of thing in the wild, so we risk any such > API becoming too tied up with just what GVFS wants, and not what we'd > like to support

Re: Failed stash caused untracked changes to be lost

2018-11-05 Thread Thomas Gummerer
On 11/05, Quinn, David wrote: > Hi, > > Thanks for the reply. Sorry I forgot the version number, completely > slipped my mind. At the time of writing the report it was Git ~ 2.17 > I believe. All of our software is updated centrally at my work, we > have received an update since writing this to

Re: [RFC v1] Add virtual file system settings and hook proc

2018-11-05 Thread Ben Peart
On 11/4/2018 7:02 PM, Junio C Hamano wrote: Ben Peart writes: + if (*dtype == DT_UNKNOWN) + *dtype = get_dtype(NULL, istate, pathname, pathlen); We try to defer paying cost to determine unknown *dtype as late as possible by having this call in

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-05 Thread Johannes Sixt
Am 05.11.18 um 08:01 schrieb Johannes Sixt: Am 05.11.18 um 00:26 schrieb Junio C Hamano: OK, thanks.  It seems that the relative silence after this message is a sign that the resulting patch after squashing is what everybody is happey with? I'm not 100% happy. I see the patch is already in

Re: [PATCH] range-diff: add a --no-patch option to show a summary

2018-11-05 Thread Ævar Arnfjörð Bjarmason
On Mon, Nov 05 2018, Eric Sunshine wrote: > On Mon, Nov 5, 2018 at 3:07 PM Ævar Arnfjörð Bjarmason > wrote: >> Add a --no-patch option which shows which changes got removed, added >> or moved etc., without showing the diff associated with them. > > This option existed in the very first

Re: Git Slowness on Windows w/o Internet

2018-11-05 Thread Peter Kostyukov
Good point. I'll check it out. Thanks for the tip. Thanks, Peter Thanks, Peter Kostyukov Senior Systems Engineer Kohl's Department Stores - KIC Office: 262-703-6533 On Sat, Nov 3, 2018 at 6:48 PM Philip Oakley wrote: > > > On 03/11/2018 16:44, brian m. carlson wrote: > > On Fri, Nov 02, 2018

Re: [RFC v1] Add virtual file system settings and hook proc

2018-11-05 Thread Ben Peart
On 11/5/2018 10:26 AM, Duy Nguyen wrote: On Mon, Nov 5, 2018 at 12:40 PM Ævar Arnfjörð Bjarmason wrote: On Sun, Nov 04 2018, Duy Nguyen wrote: On Wed, Oct 31, 2018 at 9:53 PM Ben Peart wrote: +core.virtualFilesystem:: + If set, the value of this variable is used as a command

Re: [PATCH] range-diff: add a --no-patch option to show a summary

2018-11-05 Thread Eric Sunshine
On Mon, Nov 5, 2018 at 3:07 PM Ævar Arnfjörð Bjarmason wrote: > Add a --no-patch option which shows which changes got removed, added > or moved etc., without showing the diff associated with them. This option existed in the very first version[1] of range-diff (then called branch-diff)

Wildcard URL config matching

2018-11-05 Thread brian m. carlson
In a272b9e70a ("urlmatch: allow globbing for the URL host part", 2017-01-31), we added support for wildcard matching for URLs when reading from .git/config. Now it's possible to specify an option like http.http://*.example.com/.cookieFile and have it match for the URL http://foo.example.com.

Re: [RFC v1] Add virtual file system settings and hook proc

2018-11-05 Thread Ben Peart
On 11/5/2018 10:22 AM, Duy Nguyen wrote: On Sun, Nov 4, 2018 at 10:01 PM brian m. carlson wrote: On Sun, Nov 04, 2018 at 07:34:01AM +0100, Duy Nguyen wrote: On Wed, Oct 31, 2018 at 9:53 PM Ben Peart wrote: It's more than a dynamic sparse-checkout because the same list is also used to

Re: [PATCH/RFC] sequencer.c: record revert/cherry-pick commit with trailer lines

2018-11-05 Thread Johannes Schindelin
Hi, On Sun, 4 Nov 2018, Duy Nguyen wrote: > On Sun, Nov 4, 2018 at 5:45 PM Phillip Wood wrote: > > > > On 04/11/2018 07:22, Nguyễn Thái Ngọc Duy wrote: > > > When a commit is reverted (or cherry-picked with -x) we add an English > > > sentence recording that commit id in the new commit message.

Re: Design of multiple hash support

2018-11-05 Thread Jonathan Nieder
Hi, Duy Nguyen wrote: > On Mon, Nov 5, 2018 at 2:02 AM brian m. carlson > wrote: >> There are basically two approaches I can take. The first is to provide >> each command that needs to learn about this with its own --hash >> argument. So we'd have: >> >> git init --hash=sha256 >> git

Re: [PATCH v2 05/16] read-cache.c: turn die("internal error") to BUG()

2018-11-05 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > read-cache.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Makes sense; thanks. > > diff --git a/read-cache.c b/read-cache.c > index d57958233e..0c37f4885e 100644 > --- a/read-cache.c > +++

Re: [PATCH v2 07/16] read-cache.c: add missing colon separators

2018-11-05 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > typechange_fmt and added_fmt should have a colon before "needs > update". Align the statements to make it easier to read and see. Also > drop the unnecessary (). > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > read-cache.c | 10 +- > 1 file changed, 5

Re: [PATCH v2 09/16] remote.c: turn some error() or die() to BUG()

2018-11-05 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > The first error, "internal error", is clearly a BUG(). The second two > are meant to catch calls with invalid parameters and should never > happen outside the test suite. Sounds as if it would happen inside test suites. I guess by "inside the test suite" you

Re: [PATCH v2 13/16] parse-options.c: turn some die() to BUG()

2018-11-05 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > diff --git a/parse-options.c b/parse-options.c > index 0bf817193d..3f5f985c1e 100644 > --- a/parse-options.c > +++ b/parse-options.c > @@ -197,7 +197,7 @@ static int get_value(struct parse_opt_ctx_t *p, > return 0; > > default: > -

Re: [PATCH v2 15/16] fsck: reduce word legos to help i18n

2018-11-05 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > static const char *describe_object(struct object *obj) > { > - static struct strbuf buf = STRBUF_INIT; > - char *name = name_objects ? > - lookup_decoration(fsck_walk_options.object_names, obj) : NULL; > + static struct strbuf bufs[4] = {

Re: [PATCH v3 00/14] Reduce #ifdef NO_PTHREADS

2018-11-05 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Changes since v2 > > - more cleanups in grep.c, read-cache.c and index-pack.c > - the send-pack.c changes are back, but this time I just add > async_with_fork() to move NO_PTHREADS back in run-command.c The patches all looked sensible; I'll wait for a few more

Re: [PATCH] range-diff: add a --no-patch option to show a summary

2018-11-05 Thread Eric Sunshine
On Mon, Nov 5, 2018 at 11:17 PM Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > > This change doesn't update git-format-patch with a --no-patch > > option. That can be added later similar to how format-patch first > > learned --range-diff, and then --creation-factor in > > 8631bf1cdd

Re: [PATCH/RFC] sequencer.c: record revert/cherry-pick commit with trailer lines

2018-11-05 Thread Junio C Hamano
Duy Nguyen writes: > I think the intent of writing "This reverts " to encourage > writing "because ..." is good, but in practice many people just simply > not do it. And by not describing anything at all (footers don't count) > some commit hook can force people to actually write something.

Re: [PATCH v2 4/5] pretty: extract fundamental placeholders to separate function

2018-11-05 Thread Junio C Hamano
Anders Waldenborg writes: > Junio C Hamano writes: >> I do not think "fundamental" is the best name for this, but I agree >> that it would be useful to split the helpers into one that is >> "constant across commits" and the other one that is "per commit". > > Any suggestions for a better name? >

Re: [PATCH v2 12/16] parse-options: replace opterror() with optname()

2018-11-05 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > There are a few issues with opterror() > > - it tries to assemble an English sentence from pieces. This is not > great for translators because we give them pieces instead of a full > sentence. > > - It's a wrapper around error() and needs some hack to let the

Re: Design of multiple hash support

2018-11-05 Thread brian m. carlson
On Mon, Nov 05, 2018 at 10:03:21AM -0800, Stefan Beller wrote: > On Sun, Nov 4, 2018 at 6:36 PM Junio C Hamano wrote: > > > > "brian m. carlson" writes: > > > > > I'm currently working on getting Git to support multiple hash algorithms > > > in the same binary (SHA-1 and SHA-256). In order to

Re: Design of multiple hash support

2018-11-05 Thread brian m. carlson
On Mon, Nov 05, 2018 at 02:00:42PM -0800, Jonathan Nieder wrote: > Hi, > > Duy Nguyen wrote: > > On Mon, Nov 5, 2018 at 2:02 AM brian m. carlson > > wrote: > > >> There are basically two approaches I can take. The first is to provide > >> each command that needs to learn about this with its

Re: [PATCH] range-diff: add a --no-patch option to show a summary

2018-11-05 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > This change doesn't update git-format-patch with a --no-patch > option. That can be added later similar to how format-patch first > learned --range-diff, and then --creation-factor in > 8631bf1cdd ("format-patch: add --creation-factor tweak for > --range-diff",

Re: [PATCH v2 03/16] archive.c: mark more strings for translation

2018-11-05 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Two messages also print extra information to be more useful > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > archive.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/archive.c b/archive.c > index 9d16b7fadf..d8f6e1ce30 100644 >

Re: [PATCH] doc: fix typos in release notes

2018-11-05 Thread Junio C Hamano
org...@gmail.com writes: > From: Orgad Shaneh > > Signed-off-by: Orgad Shaneh > --- > Documentation/RelNotes/2.20.0.txt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Thanks. > > diff --git a/Documentation/RelNotes/2.20.0.txt > b/Documentation/RelNotes/2.20.0.txt > index

Re: [PATCH v2 5/5] pretty: add support for separator option in %(trailers)

2018-11-05 Thread Junio C Hamano
Anders Waldenborg writes: > AFAICU strbuf_expand doesn't suffer from the worst things that printf(3) > suffers from wrt untrusted format string (i.e no printf style %n which > can write to memory, and no vaargs on stack which allows leaking random > stuff). > > The separator option is part of

Re: [PATCH v2 08/16] reflog: mark strings for translation

2018-11-05 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > if (argc - i < 1) > - return error("Nothing to delete?"); > + return error(_("no reflog specified to delete")); Better. Thanks.

Re: [PATCH v2 01/16] git.c: mark more strings for translation

2018-11-05 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > One string is slightly updated to keep consistency with the rest: > die() should with lowercase. s/should/& begin/, I think, in which case I could locally touch up. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > git.c | 30 +++--- > 1

Re: Understanding pack format

2018-11-05 Thread Farhan Khan
On Fri, Nov 2, 2018 at 12:00 PM Duy Nguyen wrote: > > On Fri, Nov 2, 2018 at 7:19 AM Junio C Hamano wrote: > > > > Farhan Khan writes: > > > > > ...Where is this in the git code? That might > > > serve as a good guide. > > > > There are two major codepaths. One is used at runtime, giving us >

[PATCH 2/3] merge: handle --verify-signatures for unborn branch

2018-11-05 Thread Jeff King
When git-merge sees that we are on an unborn branch (i.e., there is no HEAD), it follows a totally separate code path than the usual merge logic. This code path does not know about verify_signatures, and so we fail to notice bad or missing signatures. This has been broken since

[PATCH 3/3] pull: handle --verify-signatures for unborn branch

2018-11-05 Thread Jeff King
We usually just forward the --verify-signatures option along to git-merge, and trust it to do the right thing. However, when we are on an unborn branch (i.e., there is no HEAD yet), we handle this case ourselves without even calling git-merge. And in this code path, we do not respect the

Re: Understanding pack format

2018-11-05 Thread Jeff King
On Mon, Nov 05, 2018 at 09:23:45PM -0500, Farhan Khan wrote: > I am trying to identify where the content from a pack comes from. I > traced it back to sha1-file.c:read_object(), which will return the > 'content'. I want to know where the 'content' comes from, which seems > to come from

Re: [PATCH] range-diff: add a --no-patch option to show a summary

2018-11-05 Thread Junio C Hamano
Eric Sunshine writes: >> Calling this --[no-]patch might make it harder to integrate it to >> format-patch later, though. I suspect that people would expect >> "format-patch --no-patch ..." to omit both the patch part of the >> range-diff output *AND* the patch that should be applied to the >>

[PATCH 0/3] fix pull/merge --verify-signature on an unborn branch

2018-11-05 Thread Jeff King
This bug was reported to the private security list, but I don't think it's easily exploitable, since merging or pulling into an unborn branch is pretty uncommon. The root of the issue in both commands is just that we handle unborn branches in a special code path that never learned about

[PATCH 1/3] merge: extract verify_merge_signature() helper

2018-11-05 Thread Jeff King
The logic to implement "merge --verify-signatures" is inline in cmd_merge(), but this site misses some cases. Let's extract the logic into a function so we can call it from more places. We'll move it to commit.[ch], since one of the callers (git-pull) is outside our source file. This function