Re: [PATCH v8 00/41] libify apply and use lib in am, part 2

2016-07-26 Thread Christian Couder
On Tue, Jul 26, 2016 at 11:18 PM, Junio C Hamano wrote: > Christian Couder writes: > >> Sorry if this patch series is still long. I can split it into two or >> more series if it is prefered. >> ... >> Christian Couder (41): >> apply: make some names more specific >> apply: move 'struct apply_

Re: [PATCH v10 12/12] bisect--helper: `get_terms` & `bisect_terms` shell function in C

2016-07-26 Thread Pranit Bauva
Hey Junio, On Tue, Jul 26, 2016 at 11:02 PM, Junio C Hamano wrote: > Torsten Bögershausen writes: > >> On 07/25/2016 06:53 PM, Junio C Hamano wrote: >>> Pranit Bauva writes: >>> >> >>> +enum terms_defined { >> >>> + TERM_BAD = 1, >> >>> + TERM_GOOD = 2, >> >>> +

Re: [PATCH v4 3/4] submodule: support running in multiple worktree setup

2016-07-26 Thread Max Kirillov
Hi. On Wed, Jul 20, 2016 at 07:24:18PM +0200, Nguyễn Thái Ngọc Duy wrote: > + - `remote.*` added by submodules may be per working directory as > + well, unless you are sure remotes from all possible submodules in > + history are consistent. ... > @@ -1114,7 +1114,7 @@ cmd_sync() >

Re: [PATCH v2 4/5] convert: generate large test files only once

2016-07-26 Thread Torsten Bögershausen
On 07/27/2016 02:06 AM, larsxschnei...@gmail.com wrote: From: Lars Schneider Generate a more interesting large test file with random characters in between and reuse this test file in multiple tests. Run tests formerly marked as EXPENSIVE every time but with a smaller test file. Signed-off-by

Re: [PATCH v2 5/5] convert: add filter..process option

2016-07-26 Thread Jeff King
On Wed, Jul 27, 2016 at 02:06:05AM +0200, larsxschnei...@gmail.com wrote: > +static off_t multi_packet_read(struct strbuf *sb, const int fd, const size_t > size) > +{ > + off_t bytes_read; > + off_t total_bytes_read = 0; I haven't looked carefully at the whole patch yet, but there seems

[PATCH v2 3/3] subtree: adjust style to match CodingGuidelines

2016-07-26 Thread David Aguilar
Prefer "test" over "[ ... ]", use double-quotes around variables, break long lines, and properly indent "case" statements. Helped-by: Johannes Sixt Signed-off-by: David Aguilar --- This is a replacement patch that addresses the notes from Hannes' review. contrib/subtree/git-subtree.sh | 570 ++

Re: [PATCH v2 3/5] pkt-line: extract and use `set_packet_header` function

2016-07-26 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > From: Lars Schneider > > `set_packet_header` converts an integer to a 4 byte hex string. Make > this function publicly available so that other parts of Git can easily > generate a pkt-line. I think that having to do this is a strong sign that the design of this

[PATCH v2 0/5] Git filter protocol

2016-07-26 Thread larsxschneider
From: Lars Schneider Hi, thanks a lot for the extensive reviews. I tried to address all mentioned concerns and summarized them below. The most prominent changes since v1 are the following: * pipe communication uses a packet format (pkt-line) based protocol * a long running filter application is

[PATCH v2 2/5] convert: modernize tests

2016-07-26 Thread larsxschneider
From: Lars Schneider Use `test_config` to set the config, check that files are empty with `test_must_be_empty`, compare files with `test_cmp`, and remove spaces after ">". Signed-off-by: Lars Schneider --- t/t0021-conversion.sh | 62 +-- 1 file c

[PATCH v2 1/5] convert: quote filter names in error messages

2016-07-26 Thread larsxschneider
From: Lars Schneider Git filter with spaces (e.g. `filter.sh foo`) are hard to read in error messages. Quote them to improve the readability. Signed-off-by: Lars Schneider --- convert.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/convert.c b/convert.c index

[PATCH v2 4/5] convert: generate large test files only once

2016-07-26 Thread larsxschneider
From: Lars Schneider Generate a more interesting large test file with random characters in between and reuse this test file in multiple tests. Run tests formerly marked as EXPENSIVE every time but with a smaller test file. Signed-off-by: Lars Schneider --- t/t0021-conversion.sh | 35 ++

[PATCH v2 5/5] convert: add filter..process option

2016-07-26 Thread larsxschneider
From: Lars Schneider Git's clean/smudge mechanism invokes an external filter process for every single blob that is affected by a filter. If Git filters a lot of blobs then the startup time of the external filter processes can become a significant part of the overall Git execution time. This patc

[PATCH v2 3/5] pkt-line: extract and use `set_packet_header` function

2016-07-26 Thread larsxschneider
From: Lars Schneider `set_packet_header` converts an integer to a 4 byte hex string. Make this function publicly available so that other parts of Git can easily generate a pkt-line. Signed-off-by: Lars Schneider --- pkt-line.c | 15 ++- pkt-line.h | 1 + 2 files changed, 11 insert

Re: [PATCH 1/2] fix passing a name for config from submodules

2016-07-26 Thread Junio C Hamano
Stefan Beller writes: >> @@ -425,8 +432,9 @@ static const struct submodule *config_from(struct >> submodule_cache *cache, >> parameter.commit_sha1 = commit_sha1; >> parameter.gitmodules_sha1 = sha1; >> parameter.overwrite = 0; >> - git_config_from_mem(parse_config,

Re: [PATCH 1/2] pack-objects: break out of want_object loop early

2016-07-26 Thread Junio C Hamano
Jeff King writes: > I got side-tracked by adding a t/perf test to show off the improvement. > It's rather tricky to get right and takes a long time to run. I _think_ > I have it now, but am waiting for results. :) Well, then I'd stop here and wait for the reroll to requeue. Thanks. -- To unsub

Re: [PATCH v2 2/3] push: add shorthand for --force-with-lease branch creation

2016-07-26 Thread Junio C Hamano
John Keeping writes: > Thanks. I'm about to send v3 anyway to pull a test forward to address > Jakub's comment. I also used oidclr() for the last two changes below. Will replace with v3. I think v3 is ready to advance to 'next'. Let's see if we get further comments from others for a few days

Re: [PATCH v8 00/41] libify apply and use lib in am, part 2

2016-07-26 Thread Junio C Hamano
Christian Couder writes: > Sorry if this patch series is still long. I can split it into two or > more series if it is prefered. > ... > Christian Couder (41): > apply: make some names more specific > apply: move 'struct apply_state' to apply.h > builtin/apply: make apply_patch() return -1

[PATCH v3 4/8] status: per-file data collection for --porcelain=v2

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler The output of `git status --porcelain` leaves out many details about the current status that clients might like to have. This can force them to be less efficient as they may need to launch secondary commands (and try to match the logic within git) to accumulate this extra in

[PATCH v3 5/8] status: print per-file porcelain v2 status data

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler Print per-file information in porcelain v2 format. Signed-off-by: Jeff Hostetler Signed-off-by: Jeff Hostetler --- wt-status.c | 283 +++- 1 file changed, 282 insertions(+), 1 deletion(-) diff --git a/wt-status.c b/

[PATCH v3 7/8] status: update git-status.txt for --porcelain=v2

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler Update status manpage to include information about porcelain v2 format. Signed-off-by: Jeff Hostetler Signed-off-by: Jeff Hostetler --- Documentation/git-status.txt | 93 ++-- 1 file changed, 90 insertions(+), 3 deletions(-) diff -

[PATCH v3 8/8] status: tests for --porcelain=v2

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler Unit tests for porcelain v2 status format. Signed-off-by: Jeff Hostetler Signed-off-by: Jeff Hostetler --- t/t7064-wtstatus-pv2.sh | 585 1 file changed, 585 insertions(+) create mode 100755 t/t7064-wtstatus-pv2.sh diff -

[PATCH v3 6/8] status: print branch info with --porcelain=v2 --branch

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler Expand porcelain v2 output to include branch and tracking branch information. This includes the commit SHA, the branch, the upstream branch, and the ahead and behind counts. Signed-off-by: Jeff Hostetler Signed-off-by: Jeff Hostetler --- builtin/commit.c | 5 wt-st

[PATCH v3 1/8] status: rename long-format print routines

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler Renamed the various wt_status_print*() routines to be wt_longstatus_print*() to make it clear that these routines are only concerned with the normal/long status output. This will hopefully reduce confusion as other status formats are added in the future. Signed-off-by: Jeff

[PATCH v3 2/8] status: cleanup API to wt_status_print

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler Refactor the API between builtin/commit.c and wt-status.[ch]. Hide details of the various wt_*status_print() routines inside wt-status.c behind a single (new) wt_status_print() routine and eliminate the switch statements from builtin/commit.c This will allow us to more easil

[PATCH v3 3/8] status: support --porcelain[=]

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler Update --porcelain argument to take optional version parameter to allow multiple porcelain formats to be supported in the future. The token "v1" is the default value and indicates the traditional porcelain format. (The token "1" is an alias for that.) Signed-off-by: Jeff H

[PATCH v3 0/8] status: V2 porcelain status

2016-07-26 Thread Jeff Hostetler
This patch series adds porcelain V2 format to status. This provides detailed information about file changes and about the current branch. The new output is accessed via: git status --porcelain=v2 [--branch] Relative to the v2 patch series, in this v3 patch series I have changed the format of

Re: [PATCH] merge: Run commit-msg hook

2016-07-26 Thread Junio C Hamano
Johannes Schindelin writes: > FWIW I dug out the original submission: > http://thread.gmane.org/gmane.comp.version-control.git/151297/focus=151435 > > It seems that there was no discussion about the commit-msg. Which makes me > wonder why nobody thought of this. I actually think it was a mistake

Re: [PATCH] merge: Run commit-msg hook

2016-07-26 Thread Junio C Hamano
Orgad Shaneh writes: >> Hmm. This is not very convincing to me, as >> >> - if you call commit-msg in `git merge` now, why not `prepare-commit-msg`? > > prepare-commit-msg is already called, a few lines above this addition. I do not see such call in contrib/example/git-merge.sh; could it be a rec

Re: [PATCH 3/3] subtree: adjust style to match CodingGuidelines

2016-07-26 Thread Junio C Hamano
Johannes Sixt writes: > These caught my eye browsing through my inbox. I'm not a subtree user. All good comments. Let's queue 1/3 and 2/3 and fast-track them down to 'master'. Style fixes can come independently later. Thanks. > Am 26.07.2016 um 06:14 schrieb David Aguilar: >> @@ -50,87 +51,1

Re: [PATCH]submodule deinit: remove outdated comment

2016-07-26 Thread Junio C Hamano
Stefan Beller writes: > Signed-off-by: Stefan Beller > --- > > This is logically part of origin/sb/submodule-deinit-all, but this change > failed to be there on time. Thanks; let's queue it there and fast-track it down to 'master'. -- To unsubscribe from this list: send the line "unsubscrib

Re: [PATCH 1/2] pack-objects: break out of want_object loop early

2016-07-26 Thread Jeff King
On Tue, Jul 26, 2016 at 01:38:47PM -0700, Junio C Hamano wrote: > Jeff King writes: > > >> I do not mind too much about having to check two bools twice. But > >> given that the reason why I was confused was because I didn't see > >> why we need to pass the two "return 0" conditions at least onc

[PATCH v3 0/3] push: allow pushing new branches with --force-with-lease

2016-07-26 Thread John Keeping
Changes in v3: - Use hashclr() and oidclr() where appropriate instead of memset() - Pull a test forward from patch 3 to patch 2 John Keeping (3): Documentation/git-push: fix placeholder formatting push: add shorthand for --force-with-lease branch creation push: allow pushing new branches wi

[PATCH v3 1/3] Documentation/git-push: fix placeholder formatting

2016-07-26 Thread John Keeping
Format the placeholder as monospace to match other occurrences in this file and obey CodingGuidelines. Signed-off-by: John Keeping --- No changes in v3. Documentation/git-push.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-push.txt b/Documentation/git-

[PATCH v3 3/3] push: allow pushing new branches with --force-with-lease

2016-07-26 Thread John Keeping
If there is no upstream information for a branch, it is likely that it is newly created and can safely be pushed under the normal fast-forward rules. Relax the --force-with-lease check so that we do not reject these branches immediately but rather attempt to push them as new branches, using the nu

[PATCH v3 2/3] push: add shorthand for --force-with-lease branch creation

2016-07-26 Thread John Keeping
Allow the empty string to stand in for the null SHA-1 when pushing a new branch, like we do when deleting branches. This means that the following command ensures that `new-branch` is created on the remote (that is, is must not already exist): git push --force-with-lease=new-branch: origin

Re: [PATCH v2] commit: Fix description of no-verify

2016-07-26 Thread Junio C Hamano
org...@gmail.com writes: > Subject: Re: [PATCH v2] commit: Fix description of no-verify Following the prevailing style from "git shortlog --no-merges -100" would make it "commit: fix description of no-verify", but "fix" is too generic a word and does not convey as much information as it wastes bi

Re: git cherry-pick conflict error message is deceptive when cherry-picking multiple commits

2016-07-26 Thread Stephen Morton
On Tue, Jul 26, 2016 at 4:30 PM, Jeff King wrote: > On Tue, Jul 26, 2016 at 01:18:55PM -0700, Stefan Beller wrote: > >> > Would it be possible to expand the hint message to tell users to run >> > 'git cherry-pick --continue' >> >> Instead of expanding I'd go for replacing? >> >> I'd say the user i

Re: [PATCH v2 2/3] push: add shorthand for --force-with-lease branch creation

2016-07-26 Thread John Keeping
On Tue, Jul 26, 2016 at 12:59:04PM -0700, Junio C Hamano wrote: > John Keeping writes: > > >> > @@ -2294,6 +2294,8 @@ int parse_push_cas_option(struct push_cas_option > >> > *cas, const char *arg, int unse > >> > entry = add_cas_entry(cas, arg, colon - arg); > >> > if (!*colon)

Re: [PATCH v1 2/3] convert: modernize tests

2016-07-26 Thread Junio C Hamano
On Tue, Jul 26, 2016 at 8:18 AM, Remi Galan Alfonso wrote: > Considering how close it is to your patch, you might also want to > remove spaces after '<'. > > There is only one occurrence in this file and it's in a line you are > already modifying. Good eyes. -- To unsubscribe from this list: send

Re: [PATCH 1/2] pack-objects: break out of want_object loop early

2016-07-26 Thread Junio C Hamano
Jeff King writes: >> I do not mind too much about having to check two bools twice. But >> given that the reason why I was confused was because I didn't see >> why we need to pass the two "return 0" conditions at least once >> before we decide that we do not need the "return 0" thing at all, >> a

Re: git cherry-pick conflict error message is deceptive when cherry-picking multiple commits

2016-07-26 Thread Jeff King
On Tue, Jul 26, 2016 at 01:18:55PM -0700, Stefan Beller wrote: > > Would it be possible to expand the hint message to tell users to run > > 'git cherry-pick --continue' > > Instead of expanding I'd go for replacing? > > I'd say the user is tempted for 2 choices, > a) aborting (for various reason

Re: git cherry-pick conflict error message is deceptive when cherry-picking multiple commits

2016-07-26 Thread Stefan Beller
> Would it be possible to expand the hint message to tell users to run > 'git cherry-pick --continue' Instead of expanding I'd go for replacing? I'd say the user is tempted for 2 choices, a) aborting (for various reasons) b) fix and continue. So we'd want to point out the way for those two ways

Re: [PATCH] t5510: skip tests under GETTEXT_POISON build

2016-07-26 Thread Ævar Arnfjörð Bjarmason
On Tue, Jul 26, 2016 at 6:53 PM, Junio C Hamano wrote: > [...] Back when 5e9637c6 (i18n: add infrastructure for > translating Git with gettext, 2011-11-18) introduced the former, > test_have_prereq did not support a negated prerequisite, so the > commit added GETTEXT_POISON prerequisite; if we had

Re: [PATCH v1 0/3] Git filter protocol

2016-07-26 Thread Jeff King
On Sun, Jul 24, 2016 at 01:24:29PM +0200, Lars Schneider wrote: > What if we would keep the config option "protocol" and make it an "int"? > Undefined or version "1" would describe the existing clean/smudge > protocol via command line and pipe. Version "2" would be the new protocol? FWIW, that

Re: [PATCH v1 3/3] convert: add filter..useProtocol option

2016-07-26 Thread Jeff King
On Sat, Jul 23, 2016 at 07:27:21AM +, Eric Wong wrote: > Jakub Narębski wrote: > > W dniu 2016-07-22 o 17:49, larsxschnei...@gmail.com pisze: > > > +use strict; > > > +use warnings; > > > +use autodie; > > > > autodie? > > "set -e" for Perl (man autodie) > > It's been a part of Perl for ag

Re: [PATCH v2 2/3] push: add shorthand for --force-with-lease branch creation

2016-07-26 Thread Junio C Hamano
John Keeping writes: >> > @@ -2294,6 +2294,8 @@ int parse_push_cas_option(struct push_cas_option >> > *cas, const char *arg, int unse >> >entry = add_cas_entry(cas, arg, colon - arg); >> >if (!*colon) >> >entry->use_tracking = 1; >> > + else if (!colon[1]) >> > + me

Re: [PATCH v8 40/41] builtin/am: use apply api in run_apply()

2016-07-26 Thread Junio C Hamano
Christian Couder writes: > static int run_apply(const struct am_state *state, const char *index_file) > { > - struct child_process cp = CHILD_PROCESS_INIT; > + struct argv_array apply_paths = ARGV_ARRAY_INIT; > + struct argv_array apply_opts = ARGV_ARRAY_INIT; > + struct apply_s

Re: [PATCH v2 7/8] status: update git-status.txt for --porcelain=v2

2016-07-26 Thread Jeff Hostetler
On 07/25/2016 06:43 PM, Jakub Narębski wrote: W dniu 2016-07-25 o 21:25, Jeff Hostetler pisze: +Porcelain Format Version 2 +~~ + +Version 2 format adds more detailed information about the state of +the worktree and the changed items. I think it should be "and changed

Re: [PATCH v8 36/41] apply: don't print on stdout when be_silent is set

2016-07-26 Thread Junio C Hamano
Christian Couder writes: > This variable should prevent anything to be printed on both stderr > and stdout. You have to mention that skipping the entire callchain, not just the "printing" part, is safe. I can see numstat_patch_list() is probably safe as it does not do any computation other than

git cherry-pick conflict error message is deceptive when cherry-picking multiple commits

2016-07-26 Thread Stephen Morton
When I cherry-pick n commits and one of the first (n-1), fails, what I should do is resolve the conflict, 'git add' it, and then run 'git cherry-pick --continue'. However git advises me to error: could not apply d0fb756... Commit message for test commit hint: after resolving the conflicts, mark th

Re: [PATCH v8 35/41] apply: make 'be_silent' incompatible with 'apply_verbosely'

2016-07-26 Thread Junio C Hamano
Christian Couder writes: > It should be an error to have both be_silent and apply_verbosely set, > so let's check that in check_apply_state(). Doesn't that suggest that we do not want to have a new be_silent field at all? Perhaps we used to have apply_verbosely = resulting in only two verbosit

Re: [PATCH v8 34/41] apply: add 'be_silent' variable to 'struct apply_state'

2016-07-26 Thread Junio C Hamano
Christian Couder writes: > This variable should prevent anything to be printed on both stderr > and stdout. It is far more important to describe "why" this is needed than what it does, the latter of which can be read from the patch text. And I do not see any "why" here. Is this "when the curre

Re: [PATCH v8 32/41] environment: add set_index_file()

2016-07-26 Thread Junio C Hamano
Christian Couder writes: > Introduce set_index_file() to be able to temporarily change the index file. > > It should be used like this: > > /* Save current index file */ > old_index_file = get_index_file(); > set_index_file((char *)tmp_index_file); > > /* Do stuff that will use tm

Re: [PATCH v2 5/6] date: document and test "raw-local" mode

2016-07-26 Thread Jeff King
On Sat, Jul 23, 2016 at 12:15:37PM +0200, Jakub Narębski wrote: > > diff --git a/Documentation/rev-list-options.txt > > b/Documentation/rev-list-options.txt > > index 5d1de06..3ec75d4 100644 > > --- a/Documentation/rev-list-options.txt > > +++ b/Documentation/rev-list-options.txt > > @@ -725,8 +7

Re: [RFC] A Change to Commit IDs Too Ridiculous to Consider?

2016-07-26 Thread Philip Oakley
From: "Jon Forrest" On 7/24/2016 11:51 AM, Rodrigo Campos wrote: And what is the problem with that, if you are doing it with instructional purposes? Let's assume that this helps and not confuses later when the commits *do* change. What is the problem you face? A lot of instructional materia

Re: [PATCH v4 3/4] submodule: support running in multiple worktree setup

2016-07-26 Thread Stefan Beller
On Tue, Jul 26, 2016 at 10:20 AM, Duy Nguyen wrote: > On Tue, Jul 26, 2016 at 1:25 AM, Stefan Beller wrote: >> So what is the design philosophy in worktrees? How much independence does >> one working tree have? > > git-worktree started out as an alternative for git-stash: hmm.. i need > to make s

Re: [PATCH v10 12/12] bisect--helper: `get_terms` & `bisect_terms` shell function in C

2016-07-26 Thread Junio C Hamano
Torsten Bögershausen writes: > On 07/25/2016 06:53 PM, Junio C Hamano wrote: >> Pranit Bauva writes: >> > >>> +enum terms_defined { > >>> + TERM_BAD = 1, > >>> + TERM_GOOD = 2, > >>> + TERM_NEW = 4, > >>> + TERM_OLD = 8 > >>> +}; > >>> + >

Re: [PATCH 2/2] submodule-config: combine error checking if clauses

2016-07-26 Thread Stefan Beller
On Tue, Jul 26, 2016 at 2:49 AM, Heiko Voigt wrote: > So we have less return handling code. > > Signed-off-by: Heiko Voigt Thanks, Stefan -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.ke

Re: [PATCH 1/2] fix passing a name for config from submodules

2016-07-26 Thread Stefan Beller
On Tue, Jul 26, 2016 at 2:49 AM, Heiko Voigt wrote: Thanks for continuing on the submodule cache! > In commit 959b5455 we implemented the initial version of the submodule Usually we refer to the commit by a triple of "abbrev. sha1 (date, subject). See d201a1ecd (2015-05-21, test_bitmap_walk: fr

Re: [PATCH v4 3/4] submodule: support running in multiple worktree setup

2016-07-26 Thread Duy Nguyen
On Tue, Jul 26, 2016 at 1:25 AM, Stefan Beller wrote: > So what is the design philosophy in worktrees? How much independence does > one working tree have? git-worktree started out as an alternative for git-stash: hmm.. i need to make some changes in another branch, okay let's leave this worktree

Re: [PATCH v4 11/16] am -3: use merge_recursive() directly again

2016-07-26 Thread Junio C Hamano
Johannes Schindelin writes: > If you want, I can break out the subsequent patches into a separate > series. I do not think that would help anybody, as we'll have to review them anyway. If some of the the later ones were "oops, this earlier step did an incomplete job and here is a fix-up", then

Re: [PATCH v2] i18n: notes: mark comment for translation

2016-07-26 Thread Junio C Hamano
Vasco Almeida writes: > A Seg, 25-07-2016 às 10:49 -0700, Junio C Hamano escreveu: >> Vasco Almeida writes: >> >> > >> >  static const char note_template[] = >> > - "\nWrite/edit the notes for the following object:\n"; >> > + N_("Write/edit the notes for the following object:"); >> >> I do

Re: [PATCH v3] i18n: notes: mark comment for translation

2016-07-26 Thread Junio C Hamano
Vasco Almeida writes: > + strbuf_add_commented_lines(&buf, "\n", strlen("\n")); > + strbuf_add_commented_lines(&buf, _(note_template), > strlen(_(note_template))); > + strbuf_add_commented_lines(&buf, "\n", strlen("\n")); Hmm, do we really need to make three

Re: [PATCH] t5510: skip tests under GETTEXT_POISON build

2016-07-26 Thread Junio C Hamano
Vasco Almeida writes: > Skip tests when running under GETTEXT_POISON build and run them with > C_LOCALE_OUTPUT prerequisite. > > These tests are irrelevant under GETTEXT_POISON because they test text > output alignment which GETTEXT_POISON turns useless. > > Signed-off-by: Vasco Almeida > --- >

[PATCH v5 16/16] merge-recursive: flush output buffer even when erroring out

2016-07-26 Thread Johannes Schindelin
Ever since 66a155b (Enable output buffering in merge-recursive., 2007-01-14), we had a problem: When the merge failed in a fatal way, all regular output was swallowed because we called die() and did not get a chance to drain the output buffers. To fix this, several modifications were necessary: -

[PATCH v5 13/16] merge-recursive: write the commit title in one go

2016-07-26 Thread Johannes Schindelin
In 66a155b (Enable output buffering in merge-recursive., 2007-01-14), we changed the code such that it prints the output in one go, to avoid interfering with the progress output. Let's make sure that the same holds true when outputting the commit title: previously, we used several printf() stateme

[PATCH v5 11/16] am -3: use merge_recursive() directly again

2016-07-26 Thread Johannes Schindelin
Last October, we had to change this code to run `git merge-recursive` in a child process: git-am wants to print some helpful advice when the merge failed, but the code in question was not prepared to return, it die()d instead. We are finally at a point when the code *is* prepared to return errors,

[PATCH v5 10/16] merge-recursive: switch to returning errors instead of dying

2016-07-26 Thread Johannes Schindelin
The recursive merge machinery is supposed to be a library function, i.e. it should return an error when it fails. Originally the functions were part of the builtin "merge-recursive", though, where it was simpler to call die() and be done with error handling. The existing callers were already prepa

[PATCH v5 15/16] Ensure that the output buffer is released after calling merge_trees()

2016-07-26 Thread Johannes Schindelin
The recursive merge machinery accumulates its output in an output buffer, to be flushed at the end of merge_recursive(). At this point, we forgot to release the output buffer. When calling merge_trees() (i.e. the non-recursive part of the recursive merge) directly, the output buffer is never flush

[PATCH v5 12/16] merge-recursive: flush output buffer before printing error messages

2016-07-26 Thread Johannes Schindelin
The data structure passed to the recursive merge machinery has a feature where the caller can ask for the output to be buffered into a strbuf, by setting the field 'buffer_output'. Previously, we simply swallowed the buffered output when showing error messages. With this patch, we show the output

[PATCH v5 00/16] Use merge_recursive() directly in the builtin am

2016-07-26 Thread Johannes Schindelin
This is the fifth iteration of the long-awaited re-roll of the attempt to avoid spawning merge-recursive from the builtin am and use merge_recursive() directly instead. The *real* reason for the reroll is that I need a libified recursive merge to accelerate the interactive rebase by teaching the s

[PATCH v5 04/16] merge-recursive: clarify code in was_tracked()

2016-07-26 Thread Johannes Schindelin
It can be puzzling to see that was_tracked() asks to get an index entry by name, but does not take a negative return value for an answer. The reason we have to do this is that cache_name_pos() only looks for entries in stage 0, even if nobody asked for any stage in particular. Let's rewrite the l

[PATCH v5 08/16] merge-recursive: allow write_tree_from_memory() to error out

2016-07-26 Thread Johannes Schindelin
It is possible that a tree cannot be written (think: disk full). We will want to give the caller a chance to clean up instead of letting the program die() in such a case. Signed-off-by: Johannes Schindelin --- merge-recursive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

[PATCH v5 14/16] merge-recursive: offer an option to retain the output in 'obuf'

2016-07-26 Thread Johannes Schindelin
Since 66a155b (Enable output buffering in merge-recursive., 2007-01-14), we already accumulate the output in a buffer. The idea was to avoid interfering with the progress output that goes to stderr, which is unbuffered, when we write to stdout, which is buffered. We extend that buffering to allow

Re: [PATCH v2 8/8] status: tests for --porcelain=v2

2016-07-26 Thread Johannes Schindelin
Hi Jeff, On Mon, 25 Jul 2016, Jeff Hostetler wrote: > +## > +## Confirm VVP output prior to initial commit. > +## s/VVP/porcelain v2/... Ciao, Dscho -- To unsubscribe

[PATCH v5 05/16] Prepare the builtins for a libified merge_recursive()

2016-07-26 Thread Johannes Schindelin
Previously, callers of merge_trees() or merge_recursive() expected that code to die() with an error message. This used to be okay because we called those commands from scripts, and had a chance to print out a message in case the command failed fatally (read: with exit code 128). As scripting incur

[PATCH v5 09/16] merge-recursive: handle return values indicating errors

2016-07-26 Thread Johannes Schindelin
We are about to libify the recursive merge machinery, where we only die() in case of a bug or memory contention. To that end, we must heed negative return values as indicating errors. This requires our functions to be careful to pass through error conditions in call chains, and for quite a few fun

[PATCH v5 06/16] merge_recursive: abort properly upon errors

2016-07-26 Thread Johannes Schindelin
There are a couple of places where return values never indicated errors before, as wie simply died instead of returning. But now negative return values mean that there was an error and we have to abort the operation. Let's do exactly that. Signed-off-by: Johannes Schindelin --- merge-recursive.

[PATCH v5 07/16] merge-recursive: avoid returning a wholesale struct

2016-07-26 Thread Johannes Schindelin
It is technically allowed, as per C89, for functions' return type to be complete structs (i.e. *not* just pointers to structs). However, it was just an oversight of this developer when converting Python code to C code in 6d297f8 (Status update on merge-recursive in C, 2006-07-08) which introduced

[PATCH v5 01/16] t5520: verify that `pull --rebase` shows the helpful advice when failing

2016-07-26 Thread Johannes Schindelin
It was noticed by Brendan Forster last October that the builtin `git am` regressed on that. Our hot fix reverted to spawning the recursive merge instead of using it as a library function. As we are about to revert that hot fix, after making the recursive merge a true library function (i.e. a funct

[PATCH v5 03/16] Avoid translating bug messages

2016-07-26 Thread Johannes Schindelin
While working on the patch series that avoids die()ing in recursive merges, the issue came up that bug reports (i.e. die("BUG: ...") constructs) should never be translated, as the target audience is the Git developer community, not necessarily the current user, and hence a translated message would

[PATCH v5 02/16] Report bugs consistently

2016-07-26 Thread Johannes Schindelin
The vast majority of error messages in Git's source code which report a bug use the convention to prefix the message with "BUG:". As part of cleaning up merge-recursive to stop die()ing except in case of detected bugs, let's just make the remainder of the bug reports consistent with the de facto r

Re: [PATCH v2 7/8] status: update git-status.txt for --porcelain=v2

2016-07-26 Thread Johannes Schindelin
Hi Kuba, On Tue, 26 Jul 2016, Jakub Narębski wrote: > W dniu 2016-07-25 o 21:25, Jeff Hostetler pisze: > > > +Field Meaning > > + > > +A 2 character field describing the conflict type > > +as descri

[PATCH v2] merge: Run commit-msg hook

2016-07-26 Thread orgads
From: Orgad Shaneh commit-msg is needed to either validate the commit message or edit it. Gerrit for instance uses this hook to append its Change-Id footer. The hook is installed on the user's machine, and it is expected to append the footer for each commit that the user creates. This is releva

[PATCH] merge: Run commit-msg hook

2016-07-26 Thread Orgad Shaneh
Hi again, On Tue, Jul 26, 2016 at 5:54 PM, Johannes Schindelin wrote: > > Hi Orgad, > > On Tue, 26 Jul 2016, Orgad Shaneh wrote: > > > On Tue, Jul 26, 2016 at 4:02 PM, Johannes Schindelin > > wrote: > > > > > > On Tue, 26 Jul 2016, Orgad Shaneh wrote: > > > > > >> commit-msg is needed to either

Re: [PATCH v1 2/3] convert: modernize tests

2016-07-26 Thread Remi Galan Alfonso
Hi Lars, Sorry, minor nit that I noticed a couple of days ago but didn't comment on the moment and forgot until now. Lars Schneider wrote: > Use `test_config` to set the config, check that files are empty with > `test_must_be_empty`, compare files with `test_cmp`, and remove spaces > after ">".

Re: [PATCH v4 1/4] worktree: add per-worktree config files

2016-07-26 Thread Duy Nguyen
On Tue, Jul 26, 2016 at 2:59 AM, Stefan Beller wrote: > I like the user facing design, but how am I supposed to use it internally? > > Say I want to read a value preferably from the worktree I'd do a > /* > * maybe I don't even have to set it to 1 as > * the user is supposed to do th

Re: [PATCH] merge: Run commit-msg hook

2016-07-26 Thread Johannes Schindelin
Hi Orgad, On Tue, 26 Jul 2016, Orgad Shaneh wrote: > On Tue, Jul 26, 2016 at 4:02 PM, Johannes Schindelin > wrote: > > > > On Tue, 26 Jul 2016, Orgad Shaneh wrote: > > > >> commit-msg is needed to either validate the commit message or edit it. > >> Gerrit for instance uses this hook to append it

Re: [ANN] Pro Git Reedited 2nd Edition

2016-07-26 Thread Jon Forrest
On 7/26/2016 2:15 AM, Manlio Perillo wrote: I have noted a problem when reading the PDF with Chromium: the anchors/links do not work. I see what you mean. I was able to replicate the problem with Acrobat Reader on Windows 10. This seems to happen only with internal links - links to external

Re: [PATCH v1 3/3] convert: add filter..useProtocol option

2016-07-26 Thread Jakub Narębski
W dniu 2016-07-25 o 22:09, Lars Schneider pisze: > On 24 Jul 2016, at 22:14, Jakub Narębski wrote: >> W dniu 2016-07-24 o 20:36, Lars Schneider pisze: >>> On 23 Jul 2016, at 02:11, Jakub Narębski wrote: W dniu 2016-07-22 o 17:49, larsxschnei...@gmail.com pisze: > From: Lars Schneider >>

[PATCH v2] commit: Fix description of no-verify

2016-07-26 Thread orgads
From: Orgad Shaneh include also commit-msg hook. This brings the short help in line with the documentation. Signed-off-by: Orgad Shaneh --- builtin/commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/commit.c b/builtin/commit.c index 163dbca..2725712 100644 --

Re: [PATCH v2 5/8] status: print per-file porcelain v2 status data

2016-07-26 Thread Jeff Hostetler
On 07/25/2016 04:23 PM, Junio C Hamano wrote: Jeff Hostetler writes: +static void wt_porcelain_v2_print(struct wt_status *s); + There is no point in this forward declaration, if you just place the implementation of these functions here, no? Right. I just did it that way to make the diffs

Re: [PATCH] merge: Run commit-msg hook

2016-07-26 Thread Orgad Shaneh
Hi, On Tue, Jul 26, 2016 at 4:02 PM, Johannes Schindelin wrote: > Hi Orgad, > > On Tue, 26 Jul 2016, Orgad Shaneh wrote: > >> From: Orgad Shaneh > > Again, this is unnecessary if you already send the mail from the same > address. > >> commit-msg is needed to either validate the commit message or

Re: [PATCH] commit: Fix description of no-verify

2016-07-26 Thread Johannes Schindelin
Hi Orgad, On Tue, 26 Jul 2016, Orgad Shaneh wrote: > On Tue, Jul 26, 2016 at 3:55 PM, Johannes Schindelin > wrote: > > > > On Tue, 26 Jul 2016, Orgad Shaneh wrote: > > > >> include also commit-msg hook. > > > > This comment was a bit cryptic, until I read the patch. Now I find that > > comment r

Re: LARGE_PACKET_MAX wrong?

2016-07-26 Thread Jeff King
On Tue, Jul 26, 2016 at 03:07:41PM +0200, Lars Schneider wrote: > I am reading the pkt-line code and stumbled across this oddity: > > LARGE_PACKET_MAX is defined as 65520 > https://github.com/git/git/blob/8c6d1f9807c67532e7fb545a944b064faff0f70b/pkt-line.h#L79 > > In `format_packet` we check tha

Re: [PATCH v2 4/8] status: per-file data collection for --porcelain=v2

2016-07-26 Thread Jeff Hostetler
On 07/25/2016 04:14 PM, Junio C Hamano wrote: Jeff Hostetler writes: +static void aux_updated_entry_porcelain_v2( + struct wt_status *s, + struct wt_status_change_data *d, + struct diff_filepair *p) +{ + switch (p->status) { + case DIFF_STATUS_ADDED: +

Re: [PATCH] commit: Fix description of no-verify

2016-07-26 Thread Orgad Shaneh
Hi and thanks for your reply. On Tue, Jul 26, 2016 at 3:55 PM, Johannes Schindelin wrote: > Hi Orgad > > On Tue, 26 Jul 2016, Orgad Shaneh wrote: > >> From: Orgad Shaneh > > This is unnecessary, as it matches your email address. > >> include also commit-msg hook. > > This comment was a bit crypt

Re: [PATCH] merge: Run commit-msg hook

2016-07-26 Thread Johannes Schindelin
Hi Orgad, On Tue, 26 Jul 2016, Orgad Shaneh wrote: > From: Orgad Shaneh Again, this is unnecessary if you already send the mail from the same address. > commit-msg is needed to either validate the commit message or edit it. > Gerrit for instance uses this hook to append its Change-Id footer. >

[PATCH] t5510: skip tests under GETTEXT_POISON build

2016-07-26 Thread Vasco Almeida
Skip tests when running under GETTEXT_POISON build and run them with C_LOCALE_OUTPUT prerequisite. These tests are irrelevant under GETTEXT_POISON because they test text output alignment which GETTEXT_POISON turns useless. Signed-off-by: Vasco Almeida --- t/t5510-fetch.sh | 4 ++-- 1 file chang

Re: [PATCH] commit: Fix description of no-verify

2016-07-26 Thread Johannes Schindelin
Hi Orgad On Tue, 26 Jul 2016, Orgad Shaneh wrote: > From: Orgad Shaneh This is unnecessary, as it matches your email address. > include also commit-msg hook. This comment was a bit cryptic, until I read the patch. Now I find that comment redundant with the patch. However, I think that... >

  1   2   >