Re: Git clone and case sensitivity

2018-07-28 Thread Duy Nguyen
On Sat, Jul 28, 2018 at 11:57 AM Jeff King wrote: > > +static int has_duplicate_icase_entries(struct index_state *istate) > > +{ > > + struct string_list list = STRING_LIST_INIT_NODUP; > > + int i; > > + int found = 0; > > + > > + for (i = 0; i < istate->cache_nr; i++) > > +

Re: [PATCH] t5562: avoid non-portable "export FOO=bar" construct

2018-07-28 Thread Eric Sunshine
On Sat, Jul 28, 2018 at 6:51 PM Ramsay Jones wrote: > Commit 6c213e863a ("http-backend: respect CONTENT_LENGTH for > receive-pack", 2018-07-27) adds a test which uses the non-portable > export construct. Replace it with "FOO=bar && export FOO" instead. > > Signed-off-by: Ramsay Jones > --- >

[PATCH v4 1/4] t7501: add coverage for flags which imply dry runs

2018-07-28 Thread Samuel Lijin
The behavior of git commit, when doing a dry run, changes if there are unresolved/resolved merge conflicts, but the test suite currently only asserts that `git commit --dry-run` succeeds when all merge conflicts are resolved. Add tests to document the behavior of all flags (i.e. `--dry-run`,

[PATCH v4 0/4] Rerolling patch series to fix t7501

2018-07-28 Thread Samuel Lijin
Following up on Junio's review from last time. Samuel Lijin (4): t7501: add coverage for flags which imply dry runs wt-status: rename commitable to committable wt-status: teach wt_status_collect about merges in progress commit: fix exit code when doing a dry run builtin/commit.c | 32

[PATCH v4 2/4] wt-status: rename commitable to committable

2018-07-28 Thread Samuel Lijin
Fix a typo in the name of the committable bit in wt_status_state. Signed-off-by: Samuel Lijin --- builtin/commit.c | 18 +- wt-status.c | 10 +- wt-status.h | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/builtin/commit.c

[PATCH v4 4/4] commit: fix exit code when doing a dry run

2018-07-28 Thread Samuel Lijin
In wt-status.c, the s->committable bit is set only in the call tree of wt_longstatus_print(), and it is not always set correctly. This means that in normal cases, if there are changes to be committed, or if there is a merge in progress and all conflicts have been resolved, `--dry-run` and `--long`

[PATCH v4 3/4] wt-status: teach wt_status_collect about merges in progress

2018-07-28 Thread Samuel Lijin
To fix the breakages documented by t7501, the next patch in this series will teach wt_status_collect() how to set the committable bit, instead of having wt_longstatus_print_updated() and show_merge_in_progress() set it (which is what currently happens). To set the committable bit correctly,

[PATCH] t5562: avoid non-portable "export FOO=bar" construct

2018-07-28 Thread Ramsay Jones
Commit 6c213e863a ("http-backend: respect CONTENT_LENGTH for receive-pack", 2018-07-27) adds a test which uses the non-portable export construct. Replace it with "FOO=bar && export FOO" instead. Signed-off-by: Ramsay Jones --- Hi Junio, Could you please put this on top of the

[PATCH] doc: fix want-capability separator

2018-07-28 Thread Masaya Suzuki
Unlike ref advertisement, client capabilities and the first want are separated by SP, not NUL, in the implementation. Fix the documentation to align with the implementation. pack-protocol.txt is already fixed. Signed-off-by: Masaya Suzuki --- Documentation/technical/http-protocol.txt | 4 ++--

Re: Proposed approaches to supporting HTTP remotes in "git archive"

2018-07-28 Thread brian m. carlson
On Fri, Jul 27, 2018 at 02:47:00PM -0700, Josh Steadmon wrote: > ## Use git-upload-archive > > This approach requires adding support for the git-upload-archive > endpoint to the HTTP backend. Clients will connect to the remote > server's git-upload-archive service and the server will generate the

Re: Git clone and case sensitivity

2018-07-28 Thread brian m. carlson
On Sat, Jul 28, 2018 at 05:56:59AM -0400, Jeff King wrote: > strcasecmp() will only catch a subset of the cases. We really need to > follow the same folding rules that the filesystem would. > > For the case of clone, I actually wonder if we could detect during the > checkout step that a file

Re: [PATCH v3 05/10] config doc: elaborate on fetch.fsckObjects security

2018-07-28 Thread Ævar Arnfjörð Bjarmason
On Fri, Jul 27 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> +For now, the paranoid need to find some way to emulate the quarantine >> +environment if they'd like the same protection as "push". E.g. in the > > We probably should mention that you can immediately prune, as

Re: [PATCH v3 10/10] fsck: test and document unknown fsck. values

2018-07-28 Thread Ævar Arnfjörð Bjarmason
On Fri, Jul 27 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> When fsck. is set to an unknown value it'll cause "fsck" to >> die, but the same is not rue of the "fetch" and "receive" >> variants. Document this and test for it. > > Interesting. Before documenting and

Re: [RFC PATCH v5 0/4] add -p: select individual hunk lines

2018-07-28 Thread Ævar Arnfjörð Bjarmason
On Thu, Jul 26 2018, Phillip Wood wrote: > Unfortuantely v4 had test failures due to a suprious brace from a last > minute edit to a comment that I forgot to test. This version fixes > that, my applogies for the patch churn. > > I've updated this series based on Ævar's feedback on v3 (to

Re: [RFC PATCH 3/5] pack-objects: add delta-islands support

2018-07-28 Thread Christian Couder
On Sat, Jul 28, 2018 at 11:00 AM, Jeff King wrote: > > On Fri, Jul 27, 2018 at 10:22:09AM -0700, Stefan Beller wrote: > > > > That would solve the problem that fetching torvalds/linux from GitHub > > > yields a bigger pack than fetching it from kernel.org. But again, it's > > > making that root

Re: [PATCH] config: fix case sensitive subsection names on writing

2018-07-28 Thread Jeff King
On Fri, Jul 27, 2018 at 08:52:59PM -0700, Stefan Beller wrote: > > > + for key in "v.a.r" "V.A.r" "v.A.r" "V.a.r" > > > + do > > > + cp testConfig testConfig_actual && > > > + git config -f testConfig_actual v.a.r value2 && > > > + test_cmp

Re: [RFC PATCH v5 0/4] add -p: select individual hunk lines

2018-07-28 Thread Phillip Wood
On 27/07/18 19:27, Ævar Arnfjörð Bjarmason wrote: > > On Thu, Jul 26 2018, Phillip Wood wrote: > >> From: Phillip Wood >> >> Unfortuantely v4 had test failures due to a suprious brace from a last >> minute edit to a comment that I forgot to test. This version fixes >> that, my applogies for the

Re: Git clone and case sensitivity

2018-07-28 Thread Jeff King
On Sat, Jul 28, 2018 at 07:11:05AM +0200, Duy Nguyen wrote: > > It might be enough to just issue a warning and give an advise() hint > > that tells the user what's going on. Then they can decide what to do > > (hide both paths, or just work in the index, or move to a different fs, > > or complain

Re: Git clone and case sensitivity

2018-07-28 Thread Simon Ruderich
On Sat, Jul 28, 2018 at 07:11:05AM +0200, Duy Nguyen wrote: > static int checkout(int submodule_progress) > { > struct object_id oid; > @@ -761,6 +785,11 @@ static int checkout(int submodule_progress) > if (write_locked_index(_index, _file, COMMIT_LOCK)) > die(_("unable

Re: [PATCH v3 1/4] automatically ban strcpy()

2018-07-28 Thread Jeff King
On Fri, Jul 27, 2018 at 10:34:20AM -0700, Junio C Hamano wrote: > Jeff King writes: > > >> $ git rebase --onto HEAD @{-1}~3 @{-1}^0 > > > > Interesting. I'd have probably done it with an interactive rebase: > > > > $ git rebase -i HEAD~4 > > [change first "pick" to "edit"; after

Re: [RFC PATCH 3/5] pack-objects: add delta-islands support

2018-07-28 Thread Jeff King
On Fri, Jul 27, 2018 at 10:22:09AM -0700, Stefan Beller wrote: > > That would solve the problem that fetching torvalds/linux from GitHub > > yields a bigger pack than fetching it from kernel.org. But again, it's > > making that root fork weirdly magical. People who fetch solely from > > other

Re: [PATCH v4 01/21] linear-assignment: a function to solve least-cost assignment problems

2018-07-28 Thread Thomas Gummerer
On 07/21, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin > > The problem solved by the code introduced in this commit goes like this: > given two sets of items, and a cost matrix which says how much it > "costs" to assign any given item of the first set to any given item

Re: [PATCH 8/8] diff.c: rewrite emit_line_0 more understandably

2018-07-28 Thread Eric Sunshine
On Fri, Jul 27, 2018 at 11:05 PM Stefan Beller wrote: > emit_line_0 has no nested conditions, but puts out all its arguments > (if set) in order. There is still a slight confusion with set > and set_sign, but let's defer that to a later patch. > > 'first' used be output always no matter if it was

Re: [PATCH 5/8] diff.c: add set_sign to emit_line_0

2018-07-28 Thread Eric Sunshine
On Fri, Jul 27, 2018 at 11:05 PM Stefan Beller wrote: > For now just change the signature, we'll reason about the actual > change in a follow up patch. > > Pass set_sign (which is output before the sign) and set that is setting > the color after the sign. Hence, promote any 'set's to set_sign as

Re: [PATCH 2/8] t3206: add color test for range-diff --dual-color

2018-07-28 Thread Eric Sunshine
On Fri, Jul 27, 2018 at 11:05 PM Stefan Beller wrote: > The 'expect'ed outcome is taken by running the 'range-diff |decode'; > it is not meant as guidance, rather as a documentation of the current > situation. I'm not really sure what this is trying to say. It seems _too_ brief. Did you want a