[PATCH v3 7/7] perf/run: read GIT_PERF_REPO_NAME from perf.repoName

2018-01-05 Thread Christian Couder
The GIT_PERF_REPO_NAME env variable is used in the `aggregate.perl` script to set the 'environment' field in the JSON Codespeed output. Let's make it easy to set this variable by setting it in a config file. Signed-off-by: Christian Couder --- t/perf/run | 3 +++ 1 file changed, 3 insertions(+)

[PATCH v3 2/7] perf/aggregate: refactor printing results

2018-01-05 Thread Christian Couder
As we want to implement another kind of output than the current output for the perf test results, let's refactor the existing code that outputs the results in its own print_default_results() function. Signed-off-by: Christian Couder --- t/perf/aggregate.perl | 96 +++-

[PATCH v3 0/7] Codespeed perf results

2018-01-05 Thread Christian Couder
This patch series is built on top of cc/perf-run-config which recently graduated to master. It makes it possible to send perf results to a Codespeed server. See https://github.com/tobami/codespeed/ and web sites like http://speed.pypy.org/ which are using Codespeed. The end goal would be to have

[PATCH v3 5/7] perf/run: learn about perf.codespeedOutput

2018-01-05 Thread Christian Couder
Let's make it possible to set in a config file the output format (regular or codespeed) of the perf tests. Signed-off-by: Christian Couder --- t/perf/run | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/perf/run b/t/perf/run index 214d658172..4e62d6bb3f 100755 --- a/t/

[PATCH v3 1/7] perf/aggregate: fix checking ENV{GIT_PERF_SUBSECTION}

2018-01-05 Thread Christian Couder
The way we check ENV{GIT_PERF_SUBSECTION} could trigger comparison between undef and "" that may be flagged by use of strict & warnings. Let's fix that. Signed-off-by: Christian Couder --- t/perf/aggregate.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/perf/aggregate.

[PATCH v3 3/7] perf/aggregate: implement codespeed JSON output

2018-01-05 Thread Christian Couder
Codespeed (https://github.com/tobami/codespeed/) is an open source project that can be used to track how some software performs over time. It stores performance test results in a database and can show nice graphs and charts on a web interface. As it can be interesting to use Codespeed to see how G

[PATCH v3 4/7] perf/run: add conf_opts argument to get_var_from_env_or_config()

2018-01-05 Thread Christian Couder
Let's make it possible to use `git config` type specifiers like `--int` or `--bool`, so that config values are converted to the canonical form and easier to use. This additional argument is now the fourth argument of get_var_from_env_or_config() instead of the fifth because we want the default val

[PATCH v3 6/7] perf/run: learn to send output to codespeed server

2018-01-05 Thread Christian Couder
Let's make it possible to set in a config file the URL of a codespeed server. And then let's make the `run` script send the perf test results to this URL at the end of the tests. This should make is possible to easily automate the process of running perf tests and having their results available in

Re: [RFC PATCH 2/2] Remove now useless email-address parsing code

2018-01-05 Thread Matthieu Moy
Alex Bennée writes: > Matthieu Moy writes: > >> We now use Mail::Address unconditionaly, hence parse_mailboxes is now >> dead code. Remove it and its tests. >> >> Signed-off-by: Matthieu Moy >> --- >> perl/Git.pm | 71 >> >> t/t900

[PATCH] send-email: add test for Linux's get_maintainer.pl

2018-01-05 Thread Matthieu Moy
From: Alex Bennée We had a regression that broke Linux's get_maintainer.pl. Using Mail::Address to parse email addresses fixed it, but let's protect against future regressions. Patch-edited-by: Matthieu Moy Signed-off-by: Alex Bennée Signed-off-by: Matthieu Moy --- t/t9001-send-email.sh | 22

Re: Bug report: git clone with dest

2018-01-05 Thread Johannes Schindelin
Hi Isaac, On Thu, 4 Jan 2018, Isaac Shabtay wrote: > I cloned git's codebase, applied the four patches on master, built and > tested on Ubuntu Trusty. (After verifying that master indeed exhibits > this behaviour on Linux as well. Just checking). > Seems to work fine. > I also looked at the code.

Re: [PATCH v2 3/3] travis: run tests with GIT_TEST_SPLIT_INDEX

2018-01-05 Thread Lars Schneider
> On 04 Jan 2018, at 21:13, Thomas Gummerer wrote: > > On 12/18, Lars Schneider wrote: >> >>> On 17 Dec 2017, at 23:51, Thomas Gummerer wrote: >>> >>> Split index mode only has a few dedicated tests, but as the index is >>> involved in nearly every git operation, this doesn't quite cover all

Re: [PATCH] send-email: add test for Linux's get_maintainer.pl

2018-01-05 Thread Alex Bennée
Matthieu Moy writes: > From: Alex Bennée > > We had a regression that broke Linux's get_maintainer.pl. Using > Mail::Address to parse email addresses fixed it, but let's protect > against future regressions. > > Patch-edited-by: Matthieu Moy > Signed-off-by: Alex Bennée > Signed-off-by: Matth

Re: GSoC 2018 Org applications. Deadline = January 23, 2018 at 18:00 (CET)

2018-01-05 Thread Johannes Schindelin
Hi, On Fri, 5 Jan 2018, Matthieu Moy wrote: > If we go for it, we need: > > * Admins > > * Potential mentors Count me in as a potential mentor. > * List of microproject and project ideas > (https://git.github.io/SoC-2017-Ideas/ and > https://git.github.io/SoC-2017-Microprojects/ are good

Re: [PATCH] send-email: add test for Linux's get_maintainer.pl

2018-01-05 Thread Matthieu Moy
Alex Bennée writes: > I think you need to apply Eric's suggestions from: > > From: Eric Sunshine > Date: Sat, 18 Nov 2017 21:54:46 -0500 > Message-ID: > Indeed. I'm squashing this into the patch: diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index f126177..d13d8c3 100755 -

RE

2018-01-05 Thread Mrs Alice Walton
my name is Mrs. Alice Walton, a business woman an America Citizen and the heiress to the fortune of Walmart stores, born October 7, 1949. I have a mission for you worth $100,000,000.00(Hundred Million United State Dollars) which I intend using for CHARITY

Re: [PATCH] git-archive: accept --owner and --group like GNU tar

2018-01-05 Thread René Scharfe
Am 04.01.2018 um 19:22 schrieb Junio C Hamano: > René Scharfe writes: > >> I don't know if it's a good idea, but perhaps we don't even need a new >> option. We could change how pathspecs of untracked files are handled: >> Instead of aborting we could include them in the archive. (Sounds like >>

Re: [RFC PATCH 1/2] add a local copy of Mail::Address from CPAN

2018-01-05 Thread Ævar Arnfjörð Bjarmason
On Thu, Jan 04 2018, Matthieu Moy jotted: > I looked at the perl/Git/Error.pm wrapper, and ended up writting a > different, much simpler version. I'm not sure the same approach would > apply to Error.pm, but my straightforward version does the job for > Mail/Address.pm. Yeah, yours is much simpl

Re: [PATCH v5 13/34] directory rename detection: tests for handling overwriting untracked files

2018-01-05 Thread SZEDER Gábor
On Thu, Jan 4, 2018 at 10:10 PM, Elijah Newren wrote: > On Wed, Jan 3, 2018 at 5:52 PM, SZEDER Gábor wrote: > >>> + test $(git rev-parse :0:y/b) = $(git rev-parse O:z/b) && >> >> There is a test helper for that :) >> >> test_cmp_rev :0:y/b O:z/b >> >> Note, that this is not only a m

Re: [PATCH 5/5] convert: add support for 'checkout-encoding' attribute

2018-01-05 Thread Johannes Schindelin
Hi, On Sun, 31 Dec 2017, tbo...@web.de wrote: > diff --git a/t/t0028-checkout-encoding.sh b/t/t0028-checkout-encoding.sh > new file mode 100755 > index 00..1a329ab933 > --- /dev/null > +++ b/t/t0028-checkout-encoding.sh > @@ -0,0 +1,197 @@ > +#!/bin/sh > + > +test_description='checkout-en

Re: [PATCH v3 2/5] status: add --[no-]ahead-behind to status and commit for V2 format.

2018-01-05 Thread Jeff Hostetler
On 1/4/2018 5:05 PM, Junio C Hamano wrote: Jeff Hostetler writes: + sti = stat_tracking_info(branch, &nr_ahead, &nr_behind, +&base, s->ahead_behind_flags); if (base) { base = shorten_unambiguous_ref

Re: [PATCH v4 7/7] wildmatch test: create & test files on disk in addition to in-memory

2018-01-05 Thread Johannes Schindelin
Hi Ævar, I spent the last 3.5 hours chasing down a bug in your patch series that seems to be Windows specific, so please forgive me if the following might leak a bit of my frustration into the open... On Thu, 4 Jan 2018, Ævar Arnfjörð Bjarmason wrote: > t/t3070-wildmatch.sh | 301 > +++

Re: [PATCH v3 0/5] Add --no-ahead-behind to status

2018-01-05 Thread Jeff Hostetler
On 1/4/2018 6:06 PM, Jeff King wrote: On Wed, Jan 03, 2018 at 09:47:28PM +, Jeff Hostetler wrote: Config values of true and false control non-porcelain formats for compatibility reasons as previously discussed. In the last commit I added a new value of 2 for the config setting to allow p

[PATCH v2 1/3] send-email: add and use a local copy of Mail::Address

2018-01-05 Thread Matthieu Moy
We used to have two versions of the email parsing code. Our parse_mailboxes (in Git.pm), and Mail::Address which we used if installed. Unfortunately, both versions have different sets of bugs, and changing the behavior of git depending on whether Mail::Address is installed was a bad idea. A first

[PATCH v2 3/3] send-email: add test for Linux's get_maintainer.pl

2018-01-05 Thread Matthieu Moy
From: Alex Bennée We had a regression that broke Linux's get_maintainer.pl. Using Mail::Address to parse email addresses fixed it, but let's protect against future regressions. Patch-edited-by: Matthieu Moy Signed-off-by: Alex Bennée Signed-off-by: Matthieu Moy --- Change since v1: fixed prop

[PATCH v2 2/3] Remove now useless email-address parsing code

2018-01-05 Thread Matthieu Moy
We now use Mail::Address unconditionaly, hence parse_mailboxes is now dead code. Remove it and its tests. Signed-off-by: Matthieu Moy --- perl/Git.pm | 71 t/t9000-addresses.sh | 27 t/t9000/test.pl | 67

prepare-commit-msg hook no longer run for cherry-pick?

2018-01-05 Thread Dmitry Torokhov
Hi, I had prepare-commit-msg hook that would scrub "Patchwork-ID: " tags form commit messages and would update input mailing list patchwork to mark corresponding patches as "accepted" when I cherry pick form WIP/review queue into branches that I publish, but that recently stopped working if I

Re: [PATCH 4/4] clone: do not clean up directories we didn't create

2018-01-05 Thread Junio C Hamano
Jeff King writes: > Oops. The second one should be "wt" (since the idea was to flip the > logic from the previous). Like so: > > diff --git a/t/t5600-clone-fail-cleanup.sh b/t/t5600-clone-fail-cleanup.sh > index 5cd94d5558..4a1a912e03 100755 > --- a/t/t5600-clone-fail-cleanup.sh > +++ b/t/t5600-c

Re: [PATCH v2 2/2] Windows: stop supplying BLK_SHA1=YesPlease by default

2018-01-05 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: >> So I would like to ask to skip this patch for now, and take Jeff >> Hostetler's patch as part of the MSVC patches later, once they have been >> matured in Git for Windows? > > Sounds good to me. Junio, could you please drop this one and just take > 1/2? Done. T

Re: Bug report: git clone with dest

2018-01-05 Thread Isaac Shabtay
Done: https://github.com/git-for-windows/git/pull/1421 I added credit to Jeff in the PR's description. Note that I tried compiling master, but failed due to a reason unrelated to this patch: builtin/checkout.c:24:10: fatal error: fscache.h: No such file or directory Maybe I wasn't building it r

Re: [PATCH v2 3/3] send-email: add test for Linux's get_maintainer.pl

2018-01-05 Thread Eric Sunshine
On Fri, Jan 5, 2018 at 1:36 PM, Matthieu Moy wrote: > From: Alex Bennée > > We had a regression that broke Linux's get_maintainer.pl. Using > Mail::Address to parse email addresses fixed it, but let's protect > against future regressions. > > Patch-edited-by: Matthieu Moy > Signed-off-by: Alex B

Re: [PATCH v3 1/1] convert_to_git(): checksafe becomes int conv_flags

2018-01-05 Thread Lars Schneider
> On 01 Jan 2018, at 22:59, tbo...@web.de wrote: > > From: Torsten Bögershausen > > When calling convert_to_git(), the checksafe parameter has been used to > check if commit would give a non-roundtrip conversion of EOL. > > When checksafe was introduced, 3 values had been in use: > SAFE_CRLF_F

Re: [PATCH v4 7/7] wildmatch test: create & test files on disk in addition to in-memory

2018-01-05 Thread Ævar Arnfjörð Bjarmason
On Fri, Jan 05 2018, Johannes Schindelin jotted: > I spent the last 3.5 hours chasing down a bug in your patch series that > seems to be Windows specific, so please forgive me if the following might > leak a bit of my frustration into the open... Thanks for looking into this. > On Thu, 4 Jan 20

Re: [PATCH] git-archive: accept --owner and --group like GNU tar

2018-01-05 Thread Junio C Hamano
René Scharfe writes: >> One practical problem is that users who do this >> >> $ git archive HEAD Documentation/ | tar tf - >> >> would be expecting (at least) two different things, depending on the >> situation they are in. >> >> So at least you'd need an "--include-untracked" option, I g

Re: [PATCH 3/4] clone: factor out dir_exists() helper

2018-01-05 Thread Junio C Hamano
Jeff King writes: > On Thu, Jan 04, 2018 at 06:54:12PM -0500, Jeff King wrote: > >> > If we really want to be anal, perhaps a new helper path_exists() >> > that cares only about existence of paths (i.e. the implementation of >> > these two helpers they currently have), together with update to >>

Re: [PATCH v3 1/1] convert_to_git(): checksafe becomes int conv_flags

2018-01-05 Thread Torsten Bögershausen
On 2018-01-05 20:00, Lars Schneider wrote: > >> On 01 Jan 2018, at 22:59, tbo...@web.de wrote: >> >> From: Torsten Bögershausen >> >> When calling convert_to_git(), the checksafe parameter has been used to >> check if commit would give a non-roundtrip conversion of EOL. >> >> When checksafe was i

Re: [PATCH v3] run-command: add hint when a hook is ignored

2018-01-05 Thread Junio C Hamano
Jeff King writes: > The problem is that I was bisecting an unrelated change in old code, and > I built a commit which predates f98f8cbac0 (Ship sample hooks with .sample > suffix, 2008-06-24). That wrote a bare "update" file into templates/blt > (without the ".sample" suffix). After that, the cru

Re: Bug report: git clone with dest

2018-01-05 Thread Junio C Hamano
Jeff King writes: > On Wed, Jan 03, 2018 at 02:42:51PM -0800, Isaac Shabtay wrote: > >> Indeed interesting... this one's for the books... >> Thanks for the patches. Any idea when these are going to make it to the >> official Git client builds? (specifically the Windows one) > > They haven't even

Re: [PATCH v3 0/5] Add --no-ahead-behind to status

2018-01-05 Thread Junio C Hamano
Jeff Hostetler writes: > I kinda trying to serve 2 masters here. As we discussed earlier, we > don't want config options to change porcelain formats, hence the > true/false thing only affecting non-porcelain formats. On the other > hand, VS and git.exe are on different release schedules. Norma

Re: Bug report: git clone with dest

2018-01-05 Thread Jeff King
On Fri, Jan 05, 2018 at 11:53:50AM -0800, Junio C Hamano wrote: > > They haven't even been reviewed yet. If they get good feedback, then the > > maintainer will pick them up, then merge them to 'next', and then > > eventually to 'master', after which they'd become part of the next > > major releas

Can't squash merge with merge.ff set to false

2018-01-05 Thread Robert Dailey
Not sure if this is intended or a bug, but with the following configuration: $ git config --global merge.ff false I am not able to merge my topic branch into master with squash option: $ git checkout master $ git merge --squash topic fatal: You cannot combine --squash with --no-ff. I'm not sure

Re: Apparent bug in 'git stash push ' loses untracked files

2018-01-05 Thread Thomas Gummerer
On 12/18, Junio C Hamano wrote: > Thomas Gummerer writes: > > > Ah interesting, what you have below looks good to me indeed, it > > matches what I'd expect it to do and fixes the bug that was reported. > > Thanks! > > > > I've taken the liberty to take what you have below and turned into a > > p

[PATCHv4 0/4] Fix --recurse-submodules for submodule worktree changes

2018-01-05 Thread Stefan Beller
v4: * dropped the patch "t/helper/test-lazy-name-hash: fix compilation" (that snuck into v3 by accident, it is already present at remotes/origin/jh/memihash-opt, but I am carrying it locally in most branches currently.) * Junio pointed out the micro-optimisation below, both in terms of read

[PATCHv4 1/4] t/lib-submodule-update.sh: clarify test

2018-01-05 Thread Stefan Beller
Keep the local branch name as the upstream branch name to avoid confusion. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- t/lib-submodule-update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh index

[PATCHv4 2/4] t/lib-submodule-update.sh: Fix test ignoring ignored files in submodules

2018-01-05 Thread Stefan Beller
It turns out that the test replacing a submodule with a file with the submodule containing an ignored file is incorrectly titled, because the test put the file in place, but never ignored that file. When having an untracked file Instead of an ignored file in the submodule, git should refuse to remo

[PATCHv4 3/4] unpack-trees: oneway_merge to update submodules

2018-01-05 Thread Stefan Beller
When there is a one way merge, each submodule needs to be one way merged as well, if we're asked to recurse into submodules. In case of a submodule, check if it is up-to-date, otherwise set the flag CE_UPDATE, which will trigger an update of it in the phase updating the tree later. Signed-off-by:

[PATCHv4 4/4] submodule: submodule_move_head omits old argument in forced case

2018-01-05 Thread Stefan Beller
When using hard reset or forced checkout with the option to recurse into submodules, the submodules need to be reset, too. It turns out that we need to omit the duplicate old argument to read-tree in all forced cases to omit the 2 way merge and use the more assertive behavior of reading the specif

Re: Bring together merge and rebase

2018-01-05 Thread Junio C Hamano
Martin Fick writes: > These scenarios seem to come up most for me at Gerrit hack- > a-thons where we collaborate a lot in short time spans on > changes. We (the Gerrit maintainers) too have wanted and > sometimes discussed ways to track the relation of "amended" > commits (which is generally

Re: Can't squash merge with merge.ff set to false

2018-01-05 Thread Bryan Turner
On Fri, Jan 5, 2018 at 11:59 AM, Robert Dailey wrote: > Not sure if this is intended or a bug, but with the following configuration: > > $ git config --global merge.ff false > > I am not able to merge my topic branch into master with squash option: > > $ git checkout master > $ git merge --squash

Re: [PATCH] send-email: add test for Linux's get_maintainer.pl

2018-01-05 Thread Junio C Hamano
Matthieu Moy writes: > Alex Bennée writes: > >> I think you need to apply Eric's suggestions from: >> >> From: Eric Sunshine >> Date: Sat, 18 Nov 2017 21:54:46 -0500 >> Message-ID: >> > > Indeed. I'm squashing this into the patch: > > diff --git a/t/t9001-send-email.sh b/t/t9001-send-em

[PATCH 3/3] merge-recursive: add explanation for src_entry and dst_entry

2018-01-05 Thread Elijah Newren
If I have to walk through the debugger and inspect the values found in here in order to figure out their meaning, despite having known these things inside and out some years back, then they probably need a comment for the casual reader to explain their purpose. Reviewed-By: Stefan Beller Signed-o

[PATCH 1/3] Tighten and correct a few testcases for merging and cherry-picking

2018-01-05 Thread Elijah Newren
t3501 had a testcase originally added in 05f2dfb965 (cherry-pick: demonstrate a segmentation fault, 2016-11-26) to ensure cherry-pick wouldn't segfault when working with a dirty file involved in a rename. While the segfault was fixed, there was another problem this test demonstrated: namely, that g

Re: Bug report: git clone with dest

2018-01-05 Thread Johannes Schindelin
Hi Isaac, On Fri, 5 Jan 2018, Isaac Shabtay wrote: > Done: https://github.com/git-for-windows/git/pull/1421 > > I added credit to Jeff in the PR's description. Sadly, the PR's description won't make it into the commit history, and the authorship really should have been retained. I found Peff's

[PATCH 2/3] merge-recursive: fix logic ordering issue

2018-01-05 Thread Elijah Newren
merge_trees() did a variety of work, including: * Calling get_unmerged() to get unmerged entries * Calling record_df_conflict_files() with all unmerged entries to do some work to ensure we could handle D/F conflicts correctly * Calling get_renames() to check for renames. An easily overlo

[PATCH 0/3] Some small fixes to merge-recursive and tests

2018-01-05 Thread Elijah Newren
These three patches were the first three from en/rename-directory-detection[1], but as Stefan suggested[2], I'm submitting them separately as they are independent fixes. Change from PATCHv5-rename-directory-detection: * Split from the rest of the series. * Added Stefan's Reviewed-By. [1] http

Re: Git 2.15.0 on OSX 10.12.6: gui multi-select stage

2018-01-05 Thread Matthew Orres
I'd be glad to give it a try - but am unfamiliar with how portable a manual build of Git can be used along side the version I have installed via Homebrew - do I just use full paths to reference the compiled executable from within my repository folder? Thanks! On Wed, Nov 1, 2017 at 5:58 PM, Johan

[PATCHv6 30/31] merge-recursive: avoid spurious rename/rename conflict from dir renames

2018-01-05 Thread Elijah Newren
If a file on one side of history was renamed, and merely modified on the other side, then applying a directory rename to the modified side gives us a rename/rename(1to2) conflict. We should only apply directory renames to pairs representing either adds or renames. Making this change means that a

[PATCHv6 01/31] directory rename detection: basic testcases

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 442 1 file changed, 442 insertions(+) create mode 100755 t/t6043-merge-rename-directories.sh diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh new f

[PATCHv6 28/31] merge-recursive: fix remaining directory rename + dirty overwrite cases

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- merge-recursive.c | 26 +++--- t/t6043-merge-rename-directories.sh | 8 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index 2b8a5ca03..fe42cabad 100644 --- a/me

[PATCHv6 08/31] directory rename detection: testcases exploring possibly suboptimal merges

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 404 1 file changed, 404 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 38ca791e9..470c9a79f 100755 --- a/t/t6043-merge-rename-

[PATCHv6 07/31] directory rename detection: more involved edge/corner testcases

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 396 1 file changed, 396 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index dc3fc66e5..38ca791e9 100755 --- a/t/t6043-merge-rename-

[PATCHv6 00/31] Add directory rename detection to git

2018-01-05 Thread Elijah Newren
This patchset introduces directory rename detection to merge-recursive. See https://public-inbox.org/git/20171110190550.27059-1-new...@gmail.com/ for the first series (including design considerations, etc.), and follow-up series can be found at https://public-inbox.org/git/20171120220209.15111

[PATCHv6 05/31] directory rename detection: files/directories in the way of some renames

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 330 1 file changed, 330 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index c61ecb9b7..f9d75c83c 100755 --- a/t/t6043-merge-rename-

[PATCHv6 26/31] merge-recursive: avoid clobbering untracked files with directory renames

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- merge-recursive.c | 42 +++-- t/t6043-merge-rename-directories.sh | 6 +++--- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index cdf8588c7..e77d2b043 100644

[PATCHv6 29/31] directory rename detection: new testcases showcasing a pair of bugs

2018-01-05 Thread Elijah Newren
Add a testcase showing spurious rename/rename(1to2) conflicts occurring due to directory rename detection. Also add a pair of testcases dealing with moving directory hierarchies around that were suggested by Stefan Beller as "food for thought" during his review of an earlier patch series, but whic

[PATCHv6 24/31] merge-recursive: when comparing files, don't include trees

2018-01-05 Thread Elijah Newren
get_renames() would look up stage data that already existed (populated in get_unmerged(), taken from whatever unpack_trees() created), and if it didn't exist, would call insert_stage_data() to create the necessary entry for the given file. The insert_stage_data() fallback becomes much more importa

[PATCHv6 19/31] merge-recursive: add get_directory_renames()

2018-01-05 Thread Elijah Newren
This populates a list of directory renames for us. The list of directory renames is not yet used, but will be in subsequent commits. Signed-off-by: Elijah Newren --- merge-recursive.c | 155 -- 1 file changed, 152 insertions(+), 3 deletions(-)

[PATCHv6 15/31] merge-recursive: make !o->detect_rename codepath more obvious

2018-01-05 Thread Elijah Newren
Previously, if !o->detect_rename then get_renames() would return an empty string_list, and then process_renames() would have nothing to iterate over. It seems more straightforward to simply avoid calling either function in that case. Signed-off-by: Elijah Newren --- merge-recursive.c | 11 +

[PATCHv6 25/31] merge-recursive: apply necessary modifications for directory renames

2018-01-05 Thread Elijah Newren
This commit hooks together all the directory rename logic by making the necessary changes to the rename struct, it's dst_entry, and the diff_filepair under consideration. Signed-off-by: Elijah Newren --- merge-recursive.c | 187 +++- t/t6043-merg

[PATCHv6 17/31] merge-recursive: add a new hashmap for storing directory renames

2018-01-05 Thread Elijah Newren
This just adds dir_rename_entry and the associated functions; code using these will be added in subsequent commits. Signed-off-by: Elijah Newren --- merge-recursive.c | 35 +++ merge-recursive.h | 8 2 files changed, 43 insertions(+) diff --git a/merge-

[PATCHv6 18/31] merge-recursive: make a helper function for cleanup for handle_renames

2018-01-05 Thread Elijah Newren
In anticipation of more involved cleanup to come, make a helper function for doing the cleanup at the end of handle_renames. Rename the already existing cleanup_rename[s]() to final_cleanup_rename[s](), name the new helper initial_cleanup_rename(), and leave the big comment in the code about why w

[PATCHv6 27/31] merge-recursive: fix overwriting dirty files involved in renames

2018-01-05 Thread Elijah Newren
This fixes an issue that existed before my directory rename detection patches that affects both normal renames and renames implied by directory rename detection. Additional codepaths that only affect overwriting of directy files that are involved in directory rename detection will be added in a su

[PATCHv6 20/31] merge-recursive: check for directory level conflicts

2018-01-05 Thread Elijah Newren
Before trying to apply directory renames to paths within the given directories, we want to make sure that there aren't conflicts at the directory level. There will be additional checks at the individual file level too, which will be added later. Signed-off-by: Elijah Newren --- merge-recursive.

[PATCHv6 21/31] merge-recursive: add a new hashmap for storing file collisions

2018-01-05 Thread Elijah Newren
Directory renames with the ability to merge directories opens up the possibility of add/add/add/.../add conflicts, if each of the N directories being merged into one target directory all had a file with the same name. We need a way to check for and report on such collisions; this hashmap will be u

[PATCHv6 22/31] merge-recursive: add computation of collisions due to dir rename & merging

2018-01-05 Thread Elijah Newren
directory renaming and merging can cause one or more files to be moved to where an existing file is, or to cause several files to all be moved to the same (otherwise vacant) location. Add checking and reporting for such cases, falling back to no-directory-rename handling for such paths. Signed-of

[PATCHv6 31/31] merge-recursive: ensure we write updates for directory-renamed file

2018-01-05 Thread Elijah Newren
When a file is present in HEAD before the merge and the other side of the merge does not modify that file, we try to avoid re-writing the file and making it stat-dirty. However, when a file is present in HEAD before the merge and was in a directory that was renamed by the other side of the merge,

[PATCHv6 23/31] merge-recursive: check for file level conflicts then get new name

2018-01-05 Thread Elijah Newren
Before trying to apply directory renames to paths within the given directories, we want to make sure that there aren't conflicts at the file level either. If there aren't any, then get the new name from any directory renames. Signed-off-by: Elijah Newren --- merge-recursive.c

Re: [PATCH v5 13/34] directory rename detection: tests for handling overwriting untracked files

2018-01-05 Thread Thomas Gummerer
On 01/04, Elijah Newren wrote: > On Wed, Jan 3, 2018 at 5:52 PM, SZEDER Gábor wrote: > > >> + test $(git rev-parse :0:y/b) = $(git rev-parse O:z/b) && > > > > There is a test helper for that :) > > > > test_cmp_rev :0:y/b O:z/b > > > > Note, that this is not only a matter of useful

[PATCHv6 06/31] directory rename detection: testcases checking which side did the rename

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 336 1 file changed, 336 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index f9d75c83c..dc3fc66e5 100755 --- a/t/t6043-merge-rename-

[PATCHv6 10/31] directory rename detection: tests for handling overwriting untracked files

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 367 1 file changed, 367 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 717cf1483..5a2a4449d 100755 --- a/t/t6043-merge-rename-

[PATCHv6 16/31] merge-recursive: split out code for determining diff_filepairs

2018-01-05 Thread Elijah Newren
Create a new function, get_diffpairs() to compute the diff_filepairs between two trees. While these are currently only used in get_renames(), I want them to be available to some new functions. No actual logic changes yet. Signed-off-by: Elijah Newren --- merge-recursive.c | 86

[PATCHv6 09/31] directory rename detection: miscellaneous testcases to complete coverage

2018-01-05 Thread Elijah Newren
I came up with the testcases in the first eight sections before coding up the implementation. The testcases in this section were mostly ones I thought of while coding/debugging, and which I was too lazy to insert into the previous sections because I didn't want to re-label with all the testcase re

[PATCHv6 14/31] merge-recursive: fix leaks of allocated renames and diff_filepairs

2018-01-05 Thread Elijah Newren
get_renames() has always zero'ed out diff_queued_diff.nr while only manually free'ing diff_filepairs that did not correspond to renames. Further, it allocated struct renames that were tucked away in the return string_list. Make sure all of these are deallocated when we are done with them. Signed-

[PATCHv6 12/31] merge-recursive: move the get_renames() function

2018-01-05 Thread Elijah Newren
I want to re-use some other functions in the file without moving those other functions or dealing with a handful of annoying split function declarations and definitions. Signed-off-by: Elijah Newren --- merge-recursive.c | 139 +++--- 1 file change

Re: [PATCH] rebase -p: fix quoting when calling `git merge`

2018-01-05 Thread Junio C Hamano
Johannes Schindelin writes: > git-rebase--interactive.sh | 9 ++--- > t/t3418-rebase-continue.sh | 14 ++ > 2 files changed, 20 insertions(+), 3 deletions(-) > > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh > index e3f5a0abf3c..085aa068cbb 100644 > --- a/

[PATCHv6 04/31] directory rename detection: partially renamed directory testcase/discussion

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 107 1 file changed, 107 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 239819f2d..c61ecb9b7 100755 --- a/t/t6043-merge-rename-

[PATCHv6 02/31] directory rename detection: directory splitting testcases

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 143 1 file changed, 143 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index c68ae87f1..f36493289 100755 --- a/t/t6043-merge-rename-

[PATCH] upload-pack: fix some sparse warnings

2018-01-05 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Brandon, If you need to re-roll your 'bw/protocol-v2' branch, could you please squash this (or something like it) into the relevant patches. The first hunk would go in commit 6ec1105192, "upload-pack: convert to a builtin", 2018-01-02), whereas the second hunk

[PATCHv6 13/31] merge-recursive: introduce new functions to handle rename logic

2018-01-05 Thread Elijah Newren
The amount of logic in merge_trees() relative to renames was just a few lines, but split it out into new handle_renames() and cleanup_renames() functions to prepare for additional logic to be added to each. No code or logic changes, just a new place to put stuff for when the rename detection gains

[PATCHv6 11/31] directory rename detection: tests for handling overwriting dirty files

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 458 1 file changed, 458 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 5a2a4449d..d69d26951 100755 --- a/t/t6043-merge-rename-

[PATCHv6 03/31] directory rename detection: testcases to avoid taking detection too far

2018-01-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 153 1 file changed, 153 insertions(+) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index f36493289..239819f2d 100755 --- a/t/t6043-merge-rename-

Re: [PATCH v5 13/34] directory rename detection: tests for handling overwriting untracked files

2018-01-05 Thread Elijah Newren
On Fri, Jan 5, 2018 at 12:31 PM, Thomas Gummerer wrote: > On 01/04, Elijah Newren wrote: >> On Wed, Jan 3, 2018 at 5:52 PM, SZEDER Gábor wrote: >> >> >> + test $(git rev-parse :0:y/b) = $(git rev-parse O:z/b) && >> > >> > There is a test helper for that :) >> > >> > test_cmp_rev :0:

Re: Can't squash merge with merge.ff set to false

2018-01-05 Thread Robert Dailey
On Fri, Jan 5, 2018 at 2:26 PM, Paul Smith wrote: > On Fri, 2018-01-05 at 12:12 -0800, Bryan Turner wrote: >> On Fri, Jan 5, 2018 at 11:59 AM, Robert Dailey >> wrote: >> > Not sure if this is intended or a bug, but with the following >> > configuration: >> > >> > $ git config --global merge.ff f

Re: Bug report: git clone with dest

2018-01-05 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Isaac, > > On Fri, 5 Jan 2018, Isaac Shabtay wrote: > >> Done: https://github.com/git-for-windows/git/pull/1421 >> >> I added credit to Jeff in the PR's description. > > Sadly, the PR's description won't make it into the commit history, and the > authorship reall

Re: Bug report: git clone with dest

2018-01-05 Thread Jeff King
On Fri, Jan 05, 2018 at 09:22:07PM +0100, Johannes Schindelin wrote: > On Fri, 5 Jan 2018, Isaac Shabtay wrote: > > > Done: https://github.com/git-for-windows/git/pull/1421 > > > > I added credit to Jeff in the PR's description. > > Sadly, the PR's description won't make it into the commit hist

Re: Bug report: git clone with dest

2018-01-05 Thread Junio C Hamano
Jeff King writes: > Out of curiosity, did this change at some point? I thought the process > used to be to merge to maint, and then pick up topics in master by > merging maint to master. If you look at "Sync with maint" merges made to 'master', you'd notice that most of them are only updating Do

Re: [PATCH v4 7/7] wildmatch test: create & test files on disk in addition to in-memory

2018-01-05 Thread Johannes Schindelin
Hi Ævar, On Fri, 5 Jan 2018, Ævar Arnfjörð Bjarmason wrote: > On Fri, Jan 05 2018, Johannes Schindelin jotted: > > > [...] > > > > In short: the Unix shell script t3070 manages to write what it thinks is a > > file called 'foo*', but Git only sees 'foo'. > > > > I tried to address this problem w

Re: Bug report: git clone with dest

2018-01-05 Thread Jeff King
On Fri, Jan 05, 2018 at 12:45:03PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > Out of curiosity, did this change at some point? I thought the process > > used to be to merge to maint, and then pick up topics in master by > > merging maint to master. > > If you look at "Sync with main

Re: Can't squash merge with merge.ff set to false

2018-01-05 Thread Bryan Turner
On Fri, Jan 5, 2018 at 12:35 PM, Robert Dailey wrote: > On Fri, Jan 5, 2018 at 2:26 PM, Paul Smith wrote: >> On Fri, 2018-01-05 at 12:12 -0800, Bryan Turner wrote: >>> On Fri, Jan 5, 2018 at 11:59 AM, Robert Dailey >>> wrote: >>> >>> As for why the two aren't allowed together, my assumption wou

Re: Bug report: git clone with dest

2018-01-05 Thread Johannes Schindelin
Hi, On Fri, 5 Jan 2018, Junio C Hamano wrote: > Jeff King writes: > > > On Wed, Jan 03, 2018 at 02:42:51PM -0800, Isaac Shabtay wrote: > > > >> Indeed interesting... this one's for the books... > >> Thanks for the patches. Any idea when these are going to make it to the > >> official Git clien

  1   2   >