[PATCH 23/29] t4000-t4999: fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t4001-diff-rename.sh | 2 +- t/t4025-hunk-header.sh | 8 t/t4041-diff-submodule-option.sh | 4 ++-- t/t4060-diff-submodule-option-diff-format.sh | 2 +- t/t4121-apply-diffs.sh

[PATCH 09/29] t7810: use test_expect_code() instead of hand-rolled comparison

2018-06-26 Thread Eric Sunshine
fore, replace the manual handling with test_expect_code() and a normal &&-chain. Signed-off-by: Eric Sunshine --- t/t7810-grep.sh | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh index 1797f632a3..fecee602c1 100755 --- a/t/t78

[PATCH 12/29] t9401: drop unnecessary nested subshell

2018-06-26 Thread Eric Sunshine
e test to link the subshell body directly into the parent's &&-chain. It employs heuristics to identify the extent of a subshell, however, closing two subshells on a single line like this will fool it. Rather than extending the heuristics even further for this one-off case, just drop the pointle

[PATCH 29/29] t/test-lib: teach --chain-lint to detect broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
The --chain-lint option detects broken &&-chains by forcing the test to exit early (as the very first step) with a sentinel value. If that sentinel is the test's overall exit code, then the &&-chain is intact; if not, then the chain is broken. Unfortunately, this detection does not extend to

[PATCH 24/29] t5000-t5999: fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t5300-pack-object.sh | 2 +- t/t5302-pack-index.sh | 2 +- t/t5401-update-hooks.sh| 4 ++-- t/t5406-remote-rejects.sh | 2 +- t/t5500-fetch-pack.sh | 2 +- t/t5505-remote.sh | 2 +- t/t5512-ls-remote.sh

[PATCH 20/29] t2000-t2999: fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t2103-update-index-ignore-missing.sh | 2 +- t/t2202-add-addremove.sh | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/t/t2103-update-index-ignore-missing.sh b/t/t2103-update-index-ignore-missing.sh index

[PATCH 14/29] t: drop subshell with missing &&-chain in favor of simpler construct

2018-06-26 Thread Eric Sunshine
These tests employ a noisy subshell (with missing &&-chain) to feed input into Git commands: (echo a; echo b; echo c) | git some-command ... Drop the subshell in favor of a simple 'printf': printf "%s\n" a b c | git some-command ... Signed-off-by: Eric Sunshine

[PATCH 18/29] t0000-t0999: fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t-basic.sh | 2 +- t/t0003-attributes.sh | 24 t/t0021-conversion.sh | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/t/t-basic.sh b/t/t-basic.sh index af61d083b4..34859fe4a5 100755 --- a/t

[PATCH 28/29] t9119: fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- t/t9119-git-svn-info.sh | 120 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/t/t9119-git-svn-info.sh b/t/t9119-git-svn-info.sh index 88241baee3..8201c3e808 100755 --- a/t/t9119-git-svn-info.sh +++ b/t

[PATCH 15/29] t: drop unnecessary terminating semicolons in subshell

2018-06-26 Thread Eric Sunshine
An upcoming change will teach --chain-lint to check the &&-chain inside subshells. The semicolons after the final commands in these subshells will trip up --chain-lint since they break the &&-chain. Since those semicolons are unnecessary, just drop them. Signed-off-by: Eric Sunshi

[PATCH 00/29] t: detect and fix broken &&-chains in subshells

2018-06-26 Thread Eric Sunshine
led "t: fix broken &&-chains in subshells" could be squashed into a single patch titled "t: fix broken &&-chains in subshells". [1]: https://public-inbox.org/git/20150320100429.ga17...@peff.net/ Eric Sunshine (29): t7508: use test_when_finished() instead of

[PATCH 04/29] t3303: use standard here-doc tag "EOF" to avoid fooling --chain-lint

2018-06-26 Thread Eric Sunshine
An upcoming change will teach --chain-lint to detect &&-chain breakage inside subshells. The check works by performing textual transformations on the test to link the subshell body directly into the parent's &&-chain. Special care is taken with the final statement in a subshell. For instance:

[PATCH 01/29] t7508: use test_when_finished() instead of managing exit code manually

2018-06-26 Thread Eric Sunshine
p;&-chain. While at it, drop the now-unnecessary subshell. Signed-off-by: Eric Sunshine --- Notes: This series is built atop 'master'. If the series is queued there, this patch is needed to avoid test-suite breakage. However, the issue fixed by this patch is already also fixed by

[PATCH 03/29] t1300: use sane_unset() to avoid breaking &&-chain

2018-06-26 Thread Eric Sunshine
nstead, use sane_unset() which can be safely linked into the &&-chain. Signed-off-by: Eric Sunshine --- t/t1300-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t1300-config.sh b/t/t1300-config.sh index 03c223708e..24706ba412 100755 --- a/t/t1300-config.sh +++ b

[PATCH 02/29] t0001: use "{...}" block around "||" expression rather than subshell

2018-06-26 Thread Eric Sunshine
exist (indeed, MacOS has no such command) which is not a valid use-case for test_might_fail(). Sidestep the issue by wrapping the "||" expression in a "{...}" block instead of a subshell since "{...}" blocks are not checked for &&-chain breakage. Signed-off-by: Eric Suns

Re: [PATCH v1 0/9] Introducing remote ODBs

2018-06-25 Thread Eric Sunshine
On Mon, Jun 25, 2018 at 5:49 PM Junio C Hamano wrote: > Christian Couder writes: > > This is a follow up from the patch series called "odb remote" [...] > > 5702.20 and 5702.21 seems to fail in standalone test, when these are > directly queued on top of Git v2.18.0; I haven't looked into the >

Re: [PATCH v2 11/24] midx: read pack names into array

2018-06-25 Thread Eric Sunshine
On Mon, Jun 25, 2018 at 10:35 AM Derrick Stolee wrote: > diff --git a/midx.c b/midx.c > @@ -210,6 +227,20 @@ static void sort_packs_by_name(char **pack_names, > uint32_t nr_packs, uint32_t *p > +static size_t write_midx_pack_lookup(struct hashfile *f, > +char

Re: [PATCH] Makefile: tweak sed invocation

2018-06-25 Thread Eric Sunshine
On Mon, Jun 25, 2018 at 3:18 PM Alejandro R. Sedeño wrote: > With GNU sed, the r command doesn't care if a space separates it and > the filename it reads from. > > With SunOS sed, the space is required. MacOS and the various BSD's ship with BSD 'sed', not GNU 'sed', so it seemed prudent to check

Re: [PATCH] Documentation: declare "core.ignorecase" as internal variable

2018-06-24 Thread Eric Sunshine
On Sun, Jun 24, 2018 at 6:05 AM Marc Strapetz wrote: > The current description of "core.ignorecase" reads like an option which > is intended to be changed by the user while it's actually expected to > be set by Git only [1]. > > [1] https://marc.info/?l=git=152972992729761=2 Thanks for following

Re: [PATCH v2 3/4] branch: deprecate "-l" option

2018-06-22 Thread Eric Sunshine
On Fri, Jun 22, 2018 at 05:24:14AM -0400, Jeff King wrote: > Let's deprecate "-l" in hopes of eventually re-purposing it > to "--list". > > Signed-off-by: Jeff King > --- > diff --git a/builtin/branch.c b/builtin/branch.c > @@ -36,6 +36,7 @@ static const char * const builtin_branch_usage[] = { >

Re: [PATCH] Documentation: Spelling and grammar fixes

2018-06-22 Thread Eric Sunshine
On Fri, Jun 22, 2018 at 2:50 AM Ville Skyttä wrote: > Signed-off-by: Ville Skyttä > --- > diff --git a/Documentation/config.txt b/Documentation/config.txt > @@ -354,7 +354,7 @@ advice.*:: > ignoredHook:: > - Advice shown if an hook is ignored because the hook is not > +

Re: [PATCH v3 3/7] t3422: new testcases for checking when incompatible options passed

2018-06-21 Thread Eric Sunshine
On Thu, Jun 21, 2018 at 4:05 PM Junio C Hamano wrote: > Elijah Newren writes: > > + # This is indented with HT SP HT. > > + echo " foo();" >>foo && > > I often wonder, whenever I see a need for a comment like this, if > saying the same thing in code to make it visible is cleaner

Re: t5562: gzip -k is not portable

2018-06-19 Thread Eric Sunshine
On Tue, Jun 19, 2018 at 2:06 PM Junio C Hamano wrote: > Torsten Bögershausen writes: > > t5562 fails here under MacOS: > > "gzip -k" is not portable. Very odd. Stock /usr/bin/gzip on my MacOS 10.12.6 _does_ recognize -k, and the test does pass. > Sigh. Perhaps -c would help. Or do BSD

Re: t5310 broken under Mac OS

2018-06-19 Thread Eric Sunshine
On Tue, Jun 19, 2018 at 1:33 PM Torsten Bögershausen wrote: > expecting success: > git repack -ad && > git rev-list --use-bitmap-index --count --all >expect && > bitmap=$(ls .git/objects/pack/*.bitmap) && > test_when_finished "rm -f $bitmap" && > head -c 512 <$bitmap

Re: [PATCH 2/6] git-p4: python3: replace dict.has_key(k) with "k in dict"

2018-06-19 Thread Eric Sunshine
On Tue, Jun 19, 2018 at 4:04 AM Luke Diamand wrote: > Python3 does not have the dict.has_key() function, so replace all > such calls with "k in dict". This will still work with python2.6 > and python2.7. > > Converted using 2to3 (plus some hand-editing) > > Signed-off-by: Luke Diamand > --- >

Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-17 Thread Eric Sunshine
On Sun, Jun 17, 2018 at 1:32 PM Kaartic Sivaraam wrote: > On Friday 15 June 2018 01:13 PM, Eric Sunshine wrote: > > On Fri, Jun 15, 2018 at 2:58 AM Simon Ruderich wrote: > >> Should we put the part about MacOS's make into the commit > >> message? Seems like rele

Re: [RFC PATCH v2 1/7] git-rebase.txt: document incompatible options

2018-06-17 Thread Eric Sunshine
On Sun, Jun 17, 2018 at 1:59 AM Elijah Newren wrote: > git rebase has many options that only work with one of its three backends. > It also has a few other pairs of incompatible options. Document these. > > Signed-off-by: Elijah Newren > --- > diff --git a/Documentation/git-rebase.txt

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

2018-06-16 Thread Eric Sunshine
On Sat, Jun 16, 2018 at 11:36 PM Karthikeyan wrote: > On Sun, Jun 17, 2018, 8:55 AM Eric Sunshine wrote: >> Please sign-off[1] your patch so it can be included in the project. > > Thanks. I am a beginner using Gmail and I have used SubmitToGit for > this. Is it possibl

Re: Is NO_ICONV misnamed or is it broken?

2018-06-16 Thread Eric Sunshine
On Sat, Jun 16, 2018 at 10:57 PM Christian Couder wrote: > On Fri, Jun 15, 2018 at 12:47 AM, Mahmoud Al-Qudsi > wrote: > > ~> make NO_ICONV=1 > > # ommitted > > LINK git-credential-store > > /usr/bin/ld: cannot find -liconv > I think 597c9cc540 (Flatten tools/ directory to make build

Re: [BUG] git-rebase: reword squashes commits in case of merge-conflicts

2018-06-16 Thread Eric Sunshine
On Sat, Jun 16, 2018 at 12:08 PM Elijah Newren wrote: > Subject: [PATCH] sequencer: do not squash 'reword' commits when we hit > conflicts > [...] > Signed-off-by: Elijah Newren > --- > diff --git a/t/t3423-rebase-reword.sh b/t/t3423-rebase-reword.sh > @@ -0,0 +1,44 @@ > +test_expect_success

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

2018-06-16 Thread Eric Sunshine
On Sat, Jun 16, 2018 at 2:08 PM Xtreak wrote: > doc: fix typos in documentation and release notes Thanks for the patch. All the fixes look "obviously correct". Please sign-off[1] your patch so it can be included in the project. [1]:

Re: What's cooking in git.git (Jun 2018, #04; Fri, 15)

2018-06-15 Thread Eric Sunshine
On Fri, Jun 15, 2018 at 4:27 PM Junio C Hamano wrote: > * es/make-no-iconv (2018-06-15) 1 commit > - Makefile: make NO_ICONV really mean "no iconv" > > "make NO_ICONV=NoThanks" did not override NEEDS_LIBICONV Nit: The double-negative is a bit confusing. s/NoThanks/YesPlease/ would be easier to

Re: [PATCH] tests: clean after SANITY tests

2018-06-15 Thread Eric Sunshine
On Fri, Jun 15, 2018 at 2:30 PM Junio C Hamano wrote: > Some of our tests try to make sure Git behaves sensibly in a > read-only directory, by dropping 'w' permission bit before doing a > test and then restoring it after it is done. The latter is needed > for the test framework to clean after

Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-15 Thread Eric Sunshine
On Fri, Jun 15, 2018 at 2:58 AM Simon Ruderich wrote: > On Thu, Jun 14, 2018 at 10:25:03PM -0400, Eric Sunshine wrote: > > This patch is extra noisy due to the indentation change. Viewing it with > > "git diff -w" helps. An alternative to re-indenting would h

Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-15 Thread Eric Sunshine
On Fri, Jun 15, 2018 at 12:20 AM Jeff King wrote: > We have OLD_ICONV, too, which should probably do nothing if NO_ICONV is > set. I think that works OK. We end up setting -DOLD_ICONV on the command > line, but that's only consider inside "#ifndef NO_ICONV" within the > code. Right, that was my

[PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-14 Thread Eric Sunshine
BICONV for platforms which require it. The adding of "-liconv" is done unconditionally, despite NO_ICONV. Work around this problem by making NO_ICONV take precedence over NEEDS_LIBICONV. Reported by: Mahmoud Al-Qudsi Signed-off-by: Eric Sunshine --- This patch is extra noisy due to t

Re: (Bug report + fix) gitk "IgnCase" search doesn't ignore case

2018-06-14 Thread Eric Sunshine
;regexp" option (which still only affects "containing" searches). A more complete "fix" would improve the user experience even more by making the UI more consistent; namely, by disabling options which don't make sense or are not easily implemented for non-"containing&quo

Re: [PATCH v2] packfile: Correct zlib buffer handling

2018-06-13 Thread Eric Sunshine
On Wed, Jun 13, 2018 at 2:32 PM Junio C Hamano wrote: > Eric Sunshine writes: > > On this project, the character mnemonic "NUL" is typically used, not > > "null" or "NULL" (which is typically reserved for pointers), so: > > s/null/NUL/g

Re: [RFC PATCH v2 2/4] git-credential-netrc: minor whitespace cleanup in test script

2018-06-13 Thread Eric Sunshine
On Wed, Jun 13, 2018 at 1:21 PM Todd Zullinger wrote: > Eric Sunshine wrote: > > Since you're touching all the tests in this script anyhow, perhaps > > modernize them [...] > > (Not necessarily worth a re-roll.) > > These tests were based on similar test_external t

Re: [PATCH v2] packfile: Correct zlib buffer handling

2018-06-13 Thread Eric Sunshine
A couple comments if you happen to re-roll... On Wed, Jun 13, 2018 at 10:22 AM Jeremy Linton wrote: > The buffer being passed to zlib includes a null terminator that On this project, the character mnemonic "NUL" is typically used, not "null" or "NULL" (which is typically reserved for pointers),

Re: [RFC PATCH v2 2/4] git-credential-netrc: minor whitespace cleanup in test script

2018-06-12 Thread Eric Sunshine
On Tue, Jun 12, 2018 at 11:10 PM, Todd Zullinger wrote: > Signed-off-by: Todd Zullinger > --- > diff --git a/contrib/credential/netrc/t-git-credential-netrc.sh > b/contrib/credential/netrc/t-git-credential-netrc.sh > index 58191a62f8..c5661087fe 100755 > ---

Re: [PATCHv2 0/6] git-p4: some small fixes updated

2018-06-12 Thread Eric Sunshine
On Tue, Jun 12, 2018 at 5:49 PM, Luke Diamand wrote: > Thanks. While on the subject of git-p4, I thought I should mention > that I've been looking at getting git-p4 to work with Python3. > > I've got some low risk easy (mostly automated) changes which get it to > the point where it compiles.

Re: [PATCH] t7400: encapsulate setup code in test_expect_success

2018-06-12 Thread Eric Sunshine
On Tue, Jun 12, 2018 at 5:25 PM, Stefan Beller wrote: > When running t7400 in a shell you observe more output than expected: > ... > ok 10 - submodule add > [master (root-commit) d79ce16] one > Author: A U Thor > 1 file changed, 1 insertion(+) > create mode 100644

Re: How to delete files and directories from git commit history?

2018-06-12 Thread Eric Sunshine
On Tue, Jun 12, 2018 at 4:26 PM, Christian Couder wrote: > On Tue, Jun 12, 2018 at 9:44 PM, Steve Litt wrote: > >> My project (call it myproject) had a directory (call it docs/propdir) >> that was unnecessary for the project, and I've decided I don't want to >> offer the files in that directory

Re: [PATCH v9] json_writer: new routines to create JSON data

2018-06-12 Thread Eric Sunshine
On Tue, Jun 12, 2018 at 4:22 PM, wrote: > Add "struct json_writer" and a series of jw_ routines to compose JSON > data into a string buffer. The resulting string may then be printed by > commands wanting to support a JSON-like output format. > > The json_writer is limited to correctly

Re: [PATCH] builtin/send-pack: populate the default configs

2018-06-12 Thread Eric Sunshine
On Tue, Jun 12, 2018 at 2:16 PM, Jonathan Nieder wrote: > Masaya Suzuki wrote: >> builtin/send-pack didn't call git_default_config, and because of this >> git push --signed didn't respect the username and email in gitconfig in >> the HTTP transport. >> >> Signed-off-by: Masaya Suzuki >> --- >

Re: [PATCH] builtin/send-pack: report gpg config errors

2018-06-12 Thread Eric Sunshine
On Tue, Jun 12, 2018 at 1:53 PM, Stefan Beller wrote: > Any caller except of git_gpg_config() except the one in send_pack_config() Drop the first "except"? Also: s/Any caller/All callers/ > handles the return value of git_gpg_config(). Also handle the return value > there. > > Signed-off-by:

Re: [PATCH 01/10] t: add tool to translate hash-related values

2018-06-12 Thread Eric Sunshine
On Mon, Jun 11, 2018 at 9:05 PM, brian m. carlson wrote: > On Mon, Jun 11, 2018 at 03:47:43AM -0400, Eric Sunshine wrote: >> The word "translate" is very generic and is (at least in my mind) >> strongly associated with i18n/l10n, so the name test_translate() may &g

Re: [PATCH] config.c: fix regression for core.safecrlf false

2018-06-11 Thread Eric Sunshine
[cc:+torsten] On Mon, Jun 11, 2018 at 9:46 PM, Anthony Sottile wrote: > On Wed, Jun 6, 2018 at 10:22 AM, Eric Sunshine > wrote: >> Thanks for pointing that out. In that case, it's following existing >> practice, thus certainly not worth a re-roll. > > Anything else f

Re: [PATCH 05/10] t0064: make hash size independent

2018-06-11 Thread Eric Sunshine
On Mon, Jun 4, 2018 at 7:52 PM, brian m. carlson wrote: > Compute test values of the appropriate size instead of hard-coding > 40-character values. Rename the echo20 function to echoid, since the > values may be of varying sizes. > > Signed-off-by: brian m. carlson > --- > diff --git

Re: [PATCH 03/10] t0002: abstract away SHA-1-specific constants

2018-06-11 Thread Eric Sunshine
On Mon, Jun 4, 2018 at 7:52 PM, brian m. carlson wrote: > Adjust the test so that it computes variables for object IDs instead of > using hard-coded hashes. > > Signed-off-by: brian m. carlson > --- > diff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh > @@ -89,14 +89,16 @@ test_expect_success

Re: [PATCH 01/10] t: add tool to translate hash-related values

2018-06-11 Thread Eric Sunshine
On Mon, Jun 04, 2018 at 11:52:20PM +, brian m. carlson wrote: > Add a test function helper, test_translate, that will produce its first > argument if the hash in use is SHA-1 and the second if its argument is > NewHash. Implement a mode that can read entries from a file as well for >

Re: [PATCH] fetch-pack: don't try to fetch peeled values with --all

2018-06-10 Thread Eric Sunshine
On Mon, Jun 11, 2018 at 12:47 AM, Jeff King wrote: > Subject: fetch-pack: don't try to fetch peeled values with --all > [...] > Original report and test from Kirill Smelkov. > > Signed-off-by: Kirill Smelkov > Signed-off-by: Jeff King > --- > diff --git a/t/t5500-fetch-pack.sh

Re: [PATCH] fsck: avoid looking at NULL blob->object

2018-06-09 Thread Eric Sunshine
On Sat, Jun 9, 2018 at 4:32 AM, Jeff King wrote: > Commit 159e7b080b (fsck: detect gitmodules files, > 2018-05-02) taught fsck to look at the content of > .gitmodules files. If the object turns out not to be a blob > at all, we just complain and punt on checking the content. > And since this was

Re: [PATCH v8 1/2] json_writer: new routines to create data in JSON format

2018-06-07 Thread Eric Sunshine
On Thu, Jun 7, 2018 at 10:12 AM, wrote: > Add a series of jw_ routines and "struct json_writer" structure to compose > JSON data. The resulting string data can then be output by commands wanting > to support a JSON output format. > [...] > Signed-off-by: Jeff Hostetler > --- > diff --git

Re: [PATCH v8 2/2] json-writer: t0019: add perl unit test

2018-06-07 Thread Eric Sunshine
On Thu, Jun 7, 2018 at 10:12 AM, wrote: > Test json-writer output using perl script. > > Signed-off-by: Jeff Hostetler > --- > diff --git a/t/t0019/parse_json.perl b/t/t0019/parse_json.perl > @@ -0,0 +1,52 @@ > +#!/usr/bin/perl > +use strict; > +use warnings; > +use JSON; This new script is

Re: [RFC PATCH 0/5] format-patch: automate cover letter range-diff

2018-06-07 Thread Eric Sunshine
On Wed, Jun 6, 2018 at 3:16 PM, Duy Nguyen wrote: > On Wed, May 30, 2018 at 10:03 AM, Eric Sunshine > wrote: >> Dscho recently implemented a 'tbdiff' replacement as a Git builtin named >> git-branch-diff[1] which computes differences between two versions of a >> patch

Re: [PATCH] config.c: fix regression for core.safecrlf false

2018-06-06 Thread Eric Sunshine
On Wed, Jun 6, 2018 at 1:18 PM, Anthony Sottile wrote: > On Wed, Jun 6, 2018 at 10:17 AM, Eric Sunshine > wrote: >> On Wed, Jun 6, 2018 at 1:15 PM, Eric Sunshine >> wrote: >>> On Mon, Jun 4, 2018 at 4:17 PM, Anthony Sottile wrote: >>>> + f

Re: [PATCH] config.c: fix regression for core.safecrlf false

2018-06-06 Thread Eric Sunshine
On Wed, Jun 6, 2018 at 1:15 PM, Eric Sunshine wrote: > On Mon, Jun 4, 2018 at 4:17 PM, Anthony Sottile wrote: >> + for w in I am all CRLF; do echo $w; done | append_cr >allcrlf && > > Simpler: printf "%s\n" I am all CRLF | append_cr >allcrlf &&a

Re: [PATCH] config.c: fix regression for core.safecrlf false

2018-06-06 Thread Eric Sunshine
On Mon, Jun 4, 2018 at 4:17 PM, Anthony Sottile wrote: > A regression introduced in 8462ff43e42ab67cecd16fdfb59451a53cc8a945 caused > autocrlf rewrites to produce a warning message despite setting safecrlf=false. > > Signed-off-by: Anthony Sottile > --- > diff --git a/t/t0020-crlf.sh

Re: [PATCHv1 1/1] git-p4: better error reporting when p4 fails

2018-06-05 Thread Eric Sunshine
On Tue, Jun 5, 2018 at 6:59 AM Luke Diamand wrote: > On 5 June 2018 at 11:49, Merland Romain wrote: > >> +# now check that we can actually talk to the server > >> +global p4_access_checked > >> +if not p4_access_checked: > >> +p4_access_checked = True > >> +

Re: [PATCHv1 1/3] git-p4: raise exceptions from p4CmdList based on error from p4 server

2018-06-05 Thread Eric Sunshine
On Tue, Jun 5, 2018 at 6:56 AM Luke Diamand wrote: > On 5 June 2018 at 10:54, Eric Sunshine wrote: > > On Tue, Jun 5, 2018 at 5:14 AM Luke Diamand wrote: > >> +m = re.search('Too many rows scanned \(over (\d+)\)', > >> data) > &g

Re: [PATCHv1 3/3] git-p4: auto-size the block

2018-06-05 Thread Eric Sunshine
On Tue, Jun 5, 2018 at 5:14 AM Luke Diamand wrote: > git-p4 originally would fetch changes in one query. On large repos this > could fail because of the limits that Perforce imposes on the number of > items returned and the number of queries in the database. > > To fix this, git-p4 learned to

Re: [PATCHv1 1/3] git-p4: raise exceptions from p4CmdList based on error from p4 server

2018-06-05 Thread Eric Sunshine
On Tue, Jun 5, 2018 at 5:14 AM Luke Diamand wrote: > This change lays some groundwork for better handling of rowcount errors > from the server, where it fails to send us results because we requested > too many. > > It adds an option to p4CmdList() to return errors as a Python exception. > > The

Re: [PATCHv1 2/2] git-p4: add option to disable syncing of p4/master with p4

2018-06-05 Thread Eric Sunshine
On Tue, Jun 5, 2018 at 4:29 AM Luke Diamand wrote: > Add an option to the git-p4 submit command to disable syncing > with Perforce. > > This is useful for the case where a git-p4 mirror has been setup > on a server somewhere, running from (e.g.) cron, and developers > then clone from this. Having

Re: [PATCH] add -p: fix counting empty context lines in edited patches

2018-06-04 Thread Eric Sunshine
On Mon, Jun 4, 2018 at 6:08 AM, Phillip Wood wrote: > On 01/06/18 21:03, Eric Sunshine wrote: >> On Fri, Jun 1, 2018 at 1:46 PM, Phillip Wood >> wrote: >>> + } elsif ($mode eq ' ' or $_ eq "\n") { >> >> Based upon a very cursory read

Re: [PATCH 19/22] sequencer.c: mark more strings for translation

2018-06-03 Thread Eric Sunshine
On Sun, Jun 3, 2018 at 11:14 AM, Duy Nguyen wrote: > On Sun, Jun 3, 2018 at 10:16 AM, Eric Sunshine > wrote: >> On Sat, Jun 2, 2018 at 12:32 AM, Nguyễn Thái Ngọc Duy >> wrote: >>> Signed-off-by: Nguyễn Thái Ngọc Duy >>> - fprintf(s

Re: [PATCH 03/22] builtin/config.c: mark more strings for translation

2018-06-03 Thread Eric Sunshine
On Sat, Jun 2, 2018 at 12:32 AM, Nguyễn Thái Ngọc Duy wrote: > There are also some minor adjustments in the strings. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/builtin/config.c b/builtin/config.c > @@ -746,7 +746,7 @@ int cmd_config(int argc, const char **argv, const char >

Re: [PATCH 09/22] connect.c: mark more strings for translation

2018-06-03 Thread Eric Sunshine
On Sat, Jun 2, 2018 at 12:32 AM, Nguyễn Thái Ngọc Duy wrote: > There are also some rephrasing and breaking sentences to help > translators. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/connect.c b/connect.c > @@ -921,7 +928,7 @@ static enum protocol parse_connect_url(const char

Re: [PATCH 08/22] config.c: mark more strings for translation

2018-06-03 Thread Eric Sunshine
On Sat, Jun 2, 2018 at 12:32 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/config.c b/config.c > @@ -461,7 +461,7 @@ int git_config_from_parameters(config_fn_t fn, void *data) > envw = xstrdup(env); > > if (sq_dequote_to_argv(envw, , ,

Re: [PATCH 11/22] dir.c: mark more strings for translation

2018-06-03 Thread Eric Sunshine
On Sat, Jun 2, 2018 at 12:32 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/dir.c b/dir.c > @@ -560,7 +560,7 @@ int report_path_error(const char *ps_matched, > - error("pathspec '%s' did not match any file(s) known to git.", > +

Re: [PATCH 10/22] convert.c: mark more strings for translation

2018-06-03 Thread Eric Sunshine
On Sat, Jun 2, 2018 at 12:32 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/convert.c b/convert.c > @@ -203,11 +203,11 @@ static void check_global_conv_flags_eol(const char > *path, enum crlf_action crlf_ > if (conv_flags &

Re: [PATCH 06/22] builtin/replace.c: mark more strings for translation

2018-06-03 Thread Eric Sunshine
On Sat, Jun 2, 2018 at 12:32 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/builtin/replace.c b/builtin/replace.c > @@ -456,10 +456,10 @@ static int create_graft(int argc, const char **argv, > int force, int gentle) > - if (remove_signature()) {

Re: [PATCH 22/22] transport-helper.c: mark more strings for translation

2018-06-03 Thread Eric Sunshine
On Sat, Jun 2, 2018 at 12:32 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh > @@ -196,13 +196,13 @@ static struct child_process *get_helper(struct > transport *transport) > -

Re: [PATCH 21/22] transport.c: mark more strings for translation

2018-06-03 Thread Eric Sunshine
On Sat, Jun 2, 2018 at 12:32 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/transport.c b/transport.c > @@ -875,7 +875,7 @@ struct transport *transport_get(struct remote *remote, > const char *url) > ret->progress = isatty(2); > > if

Re: [PATCH 19/22] sequencer.c: mark more strings for translation

2018-06-03 Thread Eric Sunshine
On Sat, Jun 2, 2018 at 12:32 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/sequencer.c b/sequencer.c > @@ -2597,15 +2597,17 @@ static int error_with_patch(struct commit *commit, > - fprintf(stderr, "You can amend the commit now, with\n"

Re: [PATCH 20/22] sha1-file.c: mark more strings for translation

2018-06-03 Thread Eric Sunshine
On Sat, Jun 2, 2018 at 12:32 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/sha1-file.c b/sha1-file.c > @@ -71,17 +71,17 @@ static void git_hash_sha1_final(unsigned char *hash, > git_hash_ctx *ctx) > static void git_hash_unknown_init(git_hash_ctx

Re: [PATCH 16/22] refs.c: mark more strings for translation

2018-06-03 Thread Eric Sunshine
On Sat, Jun 2, 2018 at 12:32 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/refs.c b/refs.c > @@ -1845,7 +1845,7 @@ int ref_update_reject_duplicates(struct string_list > *refnames, > if (!cmp) { >

Re: [PATCH v6 8/8] checkout & worktree: introduce checkout.defaultRemote

2018-06-03 Thread Eric Sunshine
On Sat, Jun 2, 2018 at 7:50 AM, Ævar Arnfjörð Bjarmason wrote: > Introduce a checkout.defaultRemote setting which can be used to > designate a remote to prefer (via checkout.defaultRemote=origin) when > running e.g. "git checkout master" to mean origin/master, even though > there's other remotes

Re: [PATCH v5 7/8] checkout: add advice for ambiguous "checkout "

2018-06-01 Thread Eric Sunshine
On Fri, Jun 1, 2018 at 5:10 PM, Ævar Arnfjörð Bjarmason wrote: > As the "checkout" documentation describes: > > If is not found but there does exist a tracking branch in > exactly one remote (call it ) with a matching name, treat > as equivalent to [...] / > This is a really useful

Re: [PATCH v5 4/8] checkout.[ch]: change "unique" member to "num_matches"

2018-06-01 Thread Eric Sunshine
On Fri, Jun 1, 2018 at 5:10 PM, Ævar Arnfjörð Bjarmason wrote: > checkout.[ch]: change "unique" member to "num_matches" checkout.c: change... > Internally track how many matches we find in the check_tracking_name() > callback. Nothing uses this now, but it will be made use of in a later >

Re: [PATCH v5 3/8] checkout.[ch]: introduce an *_INIT macro

2018-06-01 Thread Eric Sunshine
On Fri, Jun 1, 2018 at 5:10 PM, Ævar Arnfjörð Bjarmason wrote: > checkout.[ch]: introduce an *_INIT macro checkout.c: introduce... > Add an *_INIT macro for the tracking_name_data similar to what exists > elsewhere in the codebase, e.g. OID_ARRAY_INIT in sha1-array.h. This > will make it

Re: [PATCH] add -p: fix counting empty context lines in edited patches

2018-06-01 Thread Eric Sunshine
On Fri, Jun 1, 2018 at 1:46 PM, Phillip Wood wrote: > recount_edited_hunk() introduced in commit 2b8ea7f3c7 ("add -p: > calculate offset delta for edited patches", 2018-03-05) required all > context lines to start with a space, empty lines are not counted. This > was intended to avoid any

Re: [PATCH v4 9/9] checkout & worktree: introduce checkout.defaultRemote

2018-06-01 Thread Eric Sunshine
On Thu, May 31, 2018 at 5:49 PM, Stefan Beller wrote: >> I considered splitting this into checkout.defaultRemote and >> worktree.defaultRemote, but it's probably less confusing to break our >> own rules that anything shared between config should live in core.* >> than have two config settings,

Re: [PATCH v4 8/9] checkout: add advice for ambiguous "checkout "

2018-06-01 Thread Eric Sunshine
On Thu, May 31, 2018 at 3:52 PM, Ævar Arnfjörð Bjarmason wrote: > As the "checkout" documentation describes: > > If is not found but there does exist a tracking branch in > exactly one remote (call it ) with a matching name, treat > as equivalent to [...] / > This is a really useful

Re: [RFC PATCH 4/5] format-patch: teach --range-diff to respect -v/--reroll-count

2018-05-30 Thread Eric Sunshine
On Wed, May 30, 2018 at 5:03 PM, Stefan Beller wrote: > On Wed, May 30, 2018 at 1:44 PM, Eric Sunshine > wrote: >>> Unrelated to this patch: how does this series cope with range diffs >>> that are not in commit-ish but patches on the file system? >> >>

Re: [RFC PATCH 4/5] format-patch: teach --range-diff to respect -v/--reroll-count

2018-05-30 Thread Eric Sunshine
On Wed, May 30, 2018 at 3:03 PM, Stefan Beller wrote: > On Wed, May 30, 2018 at 1:03 AM, Eric Sunshine > wrote: >> The --range-diff option introduces the embedded range-diff generically >> as "Changes since previous version:", however, we can do better when &g

Re: [RFC PATCH 3/5] format-patch: extend --range-diff to accept revision range

2018-05-30 Thread Eric Sunshine
On Wed, May 30, 2018 at 2:58 PM, Stefan Beller wrote: > On Wed, May 30, 2018 at 1:03 AM, Eric Sunshine > wrote: >> When submitting a revised a patch series, the --range-diff option embeds >> a range-diff in the cover letter showing changes since the previous >> ver

Re: [PATCH] log: prevent error if line range ends past end of file

2018-05-30 Thread Eric Sunshine
On Tue, May 29, 2018 at 1:30 AM, wrote: > If the -L option is used to specify a line range in git log, and the end > of the range is past the end of the file, git will fail with a fatal > error. This commit prevents such behaviour - instead we perform the log > for existing lines within the

Re: [PATCH] blame: prevent error if range ends past end of file

2018-05-30 Thread Eric Sunshine
On Tue, May 29, 2018 at 1:30 AM, wrote: > If the -L option is used to specify a line range in git blame, and the > end of the range is past the end of the file, git will fail with a fatal > error. This commit prevents such behavior - instead we display the blame > for existing lines within the

[RFC PATCH 2/5] format-patch: add --range-diff option to embed diff in cover letter

2018-05-30 Thread Eric Sunshine
formatted must share a common base, however, a subsequent enhancement will make it possible to specify an explicit revision range for the previous attempt.) Signed-off-by: Eric Sunshine --- Documentation/git-format-patch.txt | 10 ++ builtin/log.c | 55

[RFC PATCH 5/5] format-patch: add --creation-weight tweak for --range-diff

2018-05-30 Thread Eric Sunshine
generating a range-diff for a cover-letter. Signed-off-by: Eric Sunshine --- Documentation/git-format-patch.txt | 8 +++- builtin/log.c | 19 +++ 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Documentation/git-format-patch.txt b

[RFC PATCH 4/5] format-patch: teach --range-diff to respect -v/--reroll-count

2018-05-30 Thread Eric Sunshine
The --range-diff option introduces the embedded range-diff generically as "Changes since previous version:", however, we can do better when --reroll-count is specified by emitting "Changes since v{n}:" instead. Signed-off-by: Eric Sunshine --- builtin/log.c | 6 +

[RFC PATCH 3/5] format-patch: extend --range-diff to accept revision range

2018-05-30 Thread Eric Sunshine
-patch --cover-letter --range-diff=v1~3..v1 -3 v2 Signed-off-by: Eric Sunshine --- Documentation/git-format-patch.txt | 8 +--- builtin/log.c | 16 +--- t/t7910-branch-diff.sh | 1 + 3 files changed, 19 insertions(+), 6 deletions(-) diff --git

[RFC PATCH 1/5] format-patch: allow additional generated content in make_cover_letter()

2018-05-30 Thread Eric Sunshine
without otherwise inhibiting normal control flow. Signed-off-by: Eric Sunshine --- builtin/log.c | 43 +++ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index 71f68a3e4f..e01a256c11 100644 --- a/builtin/log.c

[RFC PATCH 0/5] format-patch: automate cover letter range-diff

2018-05-30 Thread Eric Sunshine
-ct.c.googlers.com/ Eric Sunshine (5): format-patch: allow additional generated content in make_cover_letter() format-patch: add --range-diff option to embed diff in cover letter format-patch: extend --range-diff to accept revision range format-patch: teach --range-diff to respect -v

Re: [PATCH v2 04/11] help: add --config to list all available config

2018-05-27 Thread Eric Sunshine
On Sat, May 26, 2018 at 9:55 AM, Nguyễn Thái Ngọc Duy wrote: > Sometimes it helps to list all available config vars so the user can > search for something they want. The config man page can also be used > but it's harder to search if you want to focus on the variable name, >

Re: [PATCH v2 1/4] diff: ignore --ita-[in]visible-in-index when diffing worktree-to-tree

2018-05-27 Thread Eric Sunshine
On Sat, May 26, 2018 at 8:08 AM, Nguyễn Thái Ngọc Duy wrote: > This option is supposed to fix the diff of "diff-files" (not reporting > ita entries as new files) and "diff-index --cached " ( showing s/(\s/(/ > ita entries as present in the index with empty content) but not >

Re: [PATCH] packfile: Correct zlib buffer handling

2018-05-25 Thread Eric Sunshine
On Fri, May 25, 2018 at 7:17 PM, Jeremy Linton wrote: > The buffer being passed to zlib includes a null terminator that > git needs to keep in place. unpack_compressed_entry() attempts to > detect the case that the source buffer hasn't been fully consumed > by checking to

Re: [PATCH v2 3/5] config doc: elaborate on what transfer.fsckObjects does

2018-05-25 Thread Eric Sunshine
On Fri, May 25, 2018 at 3:28 PM, Ævar Arnfjörð Bjarmason wrote: > The existing documentation led the user to believe that all we were > doing were basic reachability sanity checks, but that hasn't been true > for a very long time. Update the description to match reality, and >

<    1   2   3   4   5   6   7   8   9   10   >