Re: [PATCH 3/7] worktree move: new command

2018-02-14 Thread Duy Nguyen
On Wed, Feb 14, 2018 at 10:16 AM, Jeff King wrote: > Hmm. That is not too bad, but somehow it feels funny to me to be > polluting each test script with these annotations. And to be driving it > from inside the test scripts. > > It seems like: > > make SANITIZE=leak test

[PATCH] t/: correct obvious typo "detahced"

2018-02-14 Thread Robert P. J. Day
Signed-off-by: Robert P. J. Day --- diff --git a/t/t7409-submodule-detached-work-tree.sh b/t/t7409-submodule-detached-work-tree.sh index c20717181..fc018e363 100755 --- a/t/t7409-submodule-detached-work-tree.sh +++ b/t/t7409-submodule-detached-work-tree.sh @@ -6,7 +6,7

Re: [PATCH v3 06/42] completion: use __gitcomp_builtin in _git_am

2018-02-14 Thread SZEDER Gábor
On Fri, Feb 9, 2018 at 12:01 PM, Nguyễn Thái Ngọc Duy wrote: > The new completable options are: > > --directory > --exclude > --gpg-sign > --include > --keep-cr > --keep-non-patch > --message-id > --no-keep-cr > --patch-format > --quiet > --reject > --resolvemsg= > >

Regression in memory consumption of git fsck

2018-02-14 Thread Dominic Sacré
Hi, I've noticed that recent versions of git consume a lot of memory during "git fsck", to the point where I've regularly had git fall victim to Linux's OOM killer. For example, if I clone torvalds/linux.git, and then run "git fsck --connectivity-only" in the newly cloned repository, git will

Re: Regression in memory consumption of git fsck

2018-02-14 Thread SZEDER Gábor
> I've noticed that recent versions of git consume a lot of memory during > "git fsck", to the point where I've regularly had git fall victim to > Linux's OOM killer. > > For example, if I clone torvalds/linux.git, and then run "git fsck > --connectivity-only" in the newly cloned repository, git

Re: What's cooking in git.git (Feb 2018, #02; Tue, 13)

2018-02-14 Thread Derrick Stolee
On 2/13/2018 8:51 PM, Junio C Hamano wrote: Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding

[PATCH] am: support --quit

2018-02-14 Thread Nguyễn Thái Ngọc Duy
Among the "in progress" commands, only git-am and git-merge do not support --quit. Support --quit in git-am too. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-am.txt | 6 +- builtin/am.c | 12 ++--

Re: Regression in memory consumption of git fsck

2018-02-14 Thread Jeff King
On Wed, Feb 14, 2018 at 01:48:28PM +0100, SZEDER Gábor wrote: > > If I revert that commit (on top of current master) the memory > > consumption goes down to 2GB again. The change looks relatively harmless > > to me, so does anyone know what's going on here? > > I could reproduce the increased

Re: [PATCH 2/2] init-db: change --template type to OPTION_FILENAME

2018-02-14 Thread Jeff King
On Wed, Feb 14, 2018 at 05:51:49PM +0700, Nguyễn Thái Ngọc Duy wrote: > OPTION_FILENAME has some magic behind the scene, like prefixing which is > useless for init-db. The $HOME expansion though does come handy and > makes --template more consistent with the rest (both env and config var > get

ipad air 2

2018-02-14 Thread mostafa shahdadi
Sent from my iPad

Re: [PATCH 1/2] parse-options: expand $HOME on filename options

2018-02-14 Thread Jeff King
On Wed, Feb 14, 2018 at 05:51:48PM +0700, Nguyễn Thái Ngọc Duy wrote: > When you specify "--path ~/foo", the shell will automatically expand > ~/foo to $HOME/foo before it's passed to git. The expansion is not done > on "--path=~/foo". An experienced user sees the difference but it could > still

Re: What's cooking in git.git (Feb 2018, #02; Tue, 13)

2018-02-14 Thread Duy Nguyen
On Wed, Feb 14, 2018 at 8:51 AM, Junio C Hamano wrote: > * nd/parseopt-completion (2018-02-09) 42 commits > - git-completion.bash: add GIT_COMPLETION_OPTIONS=all config > - completion: use __gitcomp_builtin in _git_worktree > - completion: use __gitcomp_builtin in _git_tag >

[PATCH 1/2] parse-options: expand $HOME on filename options

2018-02-14 Thread Nguyễn Thái Ngọc Duy
When you specify "--path ~/foo", the shell will automatically expand ~/foo to $HOME/foo before it's passed to git. The expansion is not done on "--path=~/foo". An experienced user sees the difference but it could still be confusing for others (especially when tab-completion still works on

[PATCH 2/2] init-db: change --template type to OPTION_FILENAME

2018-02-14 Thread Nguyễn Thái Ngọc Duy
OPTION_FILENAME has some magic behind the scene, like prefixing which is useless for init-db. The $HOME expansion though does come handy and makes --template more consistent with the rest (both env and config var get $HOME expansion). Noticed-by: Doron Behar Signed-off-by:

Re: [PATCH v2] dir.c: ignore paths containing .git when invalidating untracked cache

2018-02-14 Thread Junio C Hamano
On Tue, Feb 13, 2018 at 5:24 PM, Duy Nguyen wrote: > I am worried that always doing the right thing may carry performance > penalty (this is based purely on reading verify_path() code, no actual > benchmarking). For safety, you can always set safe_path to zero. But > if you do

[BUG] git init doesn't respect `--template` like configuration variable init.templateDir and $GIT_TEMPLATE_DIR

2018-02-14 Thread Doron Behar
The title says it all. If I run `git init --template=~/path/to/my/template` I get the following message: warning: templates not found ~/path/to/my/template But, if I run: $ env GIT_TEMPLATE_DIR=~/path/to/my/template git init I don't get a warning and the template is used just

RE: git-bashe.exe fails to launch

2018-02-14 Thread greenwood9
This appears to be covered by https://github.com/git-for-windows/git/issues/1473. In particular, avih's comment about git-bash working without a .minttyrc file applies to me. Apologize for the noise; should have fully reading bug reporting instructions. -Original Message- From:

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

2018-02-14 Thread Ævar Arnfjörð Bjarmason
On Fri, Jan 5, 2018 at 7:36 PM, Matthieu Moy wrote: > create mode 100644 perl/Git/FromCPAN/Mail/Address.pm > create mode 100755 perl/Git/Mail/Address.pm I didn't notice this in my initial review, but just now when it's landed in master and it's shiny-green in my

Re: [PATCH v3 04/42] git-completion.bash: introduce __gitcomp_builtin

2018-02-14 Thread SZEDER Gábor
Thanks for working on this. I anticipated that the completion script lack some options, but wow, I didn't expect that there are so many missing. On Fri, Feb 9, 2018 at 12:01 PM, Nguyễn Thái Ngọc Duy wrote: > This is a __gitcomp wrapper that will execute > > git ...

Re: [PATCH v3 29/42] completion: use __gitcomp_builtin in _git_notes

2018-02-14 Thread SZEDER Gábor
On Fri, Feb 9, 2018 at 12:02 PM, Nguyễn Thái Ngọc Duy wrote: > diff --git a/contrib/completion/git-completion.bash > b/contrib/completion/git-completion.bash > index c7b8b37f19..60127daebf 100644 > --- a/contrib/completion/git-completion.bash > +++

[PATCH] CodeAI fixes 1 Allocator sizeof() operand mismatch, 2 Null Pointer Dereference, and 2 Dead Code

2018-02-14 Thread Code AI
Hi my name is Benjamin Bales. I am the founder and creator of CodeAI, the first non-human contributor to your software project. CodeAI finds and fixes security defects for you. It fixed 18. It wants to merge 5 commits - 1 Allocator sizeof() operand mismatch, 2 Null Pointer Dereference issues and

git-bashe.exe fails to launch

2018-02-14 Thread greenwood9
Resending as Plain Text. After upgrading to 2.16.1.windows.4, I have been unable to launch “C:\Program Files\Git\git-bash.exe” from installed shortcut or from command line (cmd). In both cases, the bash console flashes and closes immediately. I am able to invoke “C:\Program

Re: [PATCH v3 29/42] completion: use __gitcomp_builtin in _git_notes

2018-02-14 Thread SZEDER Gábor
On Fri, Feb 9, 2018 at 12:02 PM, Nguyễn Thái Ngọc Duy wrote: > diff --git a/contrib/completion/git-completion.bash > b/contrib/completion/git-completion.bash > index c7b8b37f19..60127daebf 100644 > --- a/contrib/completion/git-completion.bash > +++

[PATCH v1] fsmonitor: update documentation to remove reference to invalid config settings

2018-02-14 Thread Ben Peart
Remove the reference to setting core.fsmonitor to `true` (or `false`) as those are not valid settings. Signed-off-by: Ben Peart --- Notes: Base Ref: master Web-Diff: https://github.com/benpeart/git/commit/4b7ec2c11e Checkout: git fetch

[PATCH 0/6] minor test-hashmap fixes

2018-02-14 Thread Jeff King
This series started with me fixing the sizeof() mismatch discussed in https://public-inbox.org/git/20180214164628.ga...@sigill.intra.peff.net/ but I found a number of minor irritations. Most of them are cosmetic in practice, but I think it's important for test-helper code like this to model

Re: What's cooking in git.git (Feb 2018, #02; Tue, 13)

2018-02-14 Thread Junio C Hamano
Derrick Stolee writes: > There have been a few "What's cooking" emails since I submitted v1 of > "Serialized Git Commit Graph" and it has not appeared with a tracking > branch. Is this a mistake, or is it something about the state of the > review? The latter. Once I pick up a

Re: Bug? Error during commit

2018-02-14 Thread Junio C Hamano
Jeff King writes: > Here's the patch to make "show -B --stat" work. I'll give some more > thought to whether this is a good idea and prepare a series. > > One downside is that in the common case it causes us to look up each > object twice (once to get its size, and then again to

Re: [PATCH v3 11/14] commit: integrate commit graph with commit parsing

2018-02-14 Thread Derrick Stolee
On 2/13/2018 7:12 PM, Jonathan Tan wrote: On Thu, 8 Feb 2018 15:37:35 -0500 Derrick Stolee wrote: | Command | Before | After | Rel % | |--|||---| | log --oneline --topo-order -1000 | 5.9s |

[PATCH 6/6] test-hashmap: use "unsigned int" for hash storage

2018-02-14 Thread Jeff King
The hashmap API always use an unsigned value for storing and comparing hashes. Whereas this test code uses "int". This works out in practice since one can typically round-trip between "int" and "unsigned int". But since this is essentially reference code for the hashmap API, we should model using

Re: [PATCH] CodeAI fixes 1 Allocator sizeof() operand mismatch, 2 Null Pointer Dereference, and 2 Dead Code

2018-02-14 Thread Jeff King
On Wed, Feb 14, 2018 at 10:50:12AM -0500, Code AI wrote: > Hi my name is Benjamin Bales. > > I am the founder and creator of CodeAI, > the first non-human contributor to your software project. CodeAI finds > and fixes security defects for you. It fixed 18. It wants to merge 5 > commits - 1

Re: What's cooking in git.git (Feb 2018, #02; Tue, 13)

2018-02-14 Thread Brandon Williams
On 02/13, Junio C Hamano wrote: > > * bw/c-plus-plus (2018-01-30) 37 commits > - replace: rename 'new' variables > - trailer: rename 'template' variables > - tempfile: rename 'template' variables > - wrapper: rename 'template' variables > - environment: rename 'namespace' variables > -

Re: [PATCH v3 00/14] Serialized Git Commit Graph

2018-02-14 Thread Derrick Stolee
There has been a lot of interesting discussion on this topic. Some of that involves some decently significant changes from v3, so I wanted to summarize my understanding of the feedback and seek out more feedback from reviewers before rolling v4. If we have consensus on these topics, then I'll

Re: What's cooking in git.git (Feb 2018, #02; Tue, 13)

2018-02-14 Thread Stefan Beller
On Wed, Feb 14, 2018 at 10:11 AM, Brandon Williams wrote: > On 02/13, Junio C Hamano wrote: >> >> * bw/c-plus-plus (2018-01-30) 37 commits >> - replace: rename 'new' variables >> - trailer: rename 'template' variables >> - tempfile: rename 'template' variables >> - wrapper:

Re: [PATCH] color.h: document and modernize header

2018-02-14 Thread Stefan Beller
On Tue, Feb 13, 2018 at 11:23 PM, Eric Sunshine wrote: > On Mon, Feb 12, 2018 at 10:55 PM, Eric Sunshine > wrote: >> On Mon, Feb 12, 2018 at 8:41 PM, Stefan Beller wrote: >>> + * Output the formatted string in the specified

[PATCH 5/6] test-hashmap: simplify alloc_test_entry

2018-02-14 Thread Jeff King
This function takes two ptr/len pairs, which implies that they can be arbitrary buffers. But internally, it assumes that each "ptr" is NUL-terminated at "len" (because we memcpy an extra byte to pick up the NUL terminator). In practice this works because each caller only ever passes strlen(ptr)

Re: [PATCH 14/26] sha1_file: allow prepare_alt_odb to handle arbitrary repositories

2018-02-14 Thread Brandon Williams
On 02/14, Duy Nguyen wrote: > On Tue, Feb 13, 2018 at 8:22 AM, Stefan Beller wrote: > > Signed-off-by: Stefan Beller > > --- > > object-store.h | 3 +-- > > sha1_file.c| 21 +++-- > > 2 files changed, 12 insertions(+), 12 deletions(-)

Re: linux-next: unnecessary merge in the v4l-dvb tree

2018-02-14 Thread Junio C Hamano
Linus Torvalds writes: > On Tue, Feb 13, 2018 at 9:18 AM, Junio C Hamano wrote: >> >> That makes me wonder if another heuristic I floated earlier is more >> appropriate. When merging a tag object T, if refs/tags/T exists and >> it is that tag

Re: [PATCH 1/2] parse-options: expand $HOME on filename options

2018-02-14 Thread Junio C Hamano
Jeff King writes: >> Support $HOME expansion for all filename options. There are about seven >> of them. > > I think this probably makes sense. > >> parse-options.c | 9 ++--- >> 1 file changed, 6 insertions(+), 3 deletions(-) > > Should this be mentioned in the comment

Re: [PATCH v6 5/7] convert: add 'working-tree-encoding' attribute

2018-02-14 Thread Lars Schneider
> On 10 Feb 2018, at 10:48, Torsten Bögershausen wrote: > > On Fri, Feb 09, 2018 at 02:28:28PM +0100, lars.schnei...@autodesk.com wrote: >> From: Lars Schneider >> >> ... >> >> +Please note that using the `working-tree-encoding` attribute may have a

Re: [PATCH v2 06/37] diff: rename 'this' variables

2018-02-14 Thread Junio C Hamano
Brandon Williams writes: > Rename C++ keyword in order to bring the codebase closer to being able > to be compiled with a C++ compiler. > > Signed-off-by: Brandon Williams > --- The patch is not as bad as renaming "this" and leaving "that" behind but in

Re: [PATCH v2 06/37] diff: rename 'this' variables

2018-02-14 Thread Brandon Williams
On 02/14, Junio C Hamano wrote: > Brandon Williams writes: > > > Rename C++ keyword in order to bring the codebase closer to being able > > to be compiled with a C++ compiler. > > > > Signed-off-by: Brandon Williams > > --- > > The patch is not as bad as

Re: [PATCH 3/8] perl: generalize the Git::LoadCPAN facility

2018-02-14 Thread Jonathan Nieder
Ævar Arnfjörð Bjarmason wrote: > Change the two wrappers to load from CPAN (local OS) or our own copy > to do so via the same codepath. nit: I think with s/to load/that load/ this will be easier to read. > I added the Error.pm wrapper in 20d2a30f8f ("Makefile: replace > perl/Makefile.PL with

Re: [PATCH 4/8] perl: update our ancient copy of Error.pm

2018-02-14 Thread Jonathan Nieder
Ævar Arnfjörð Bjarmason wrote: > The Error.pm shipped with Git as a fallback if there was no Error.pm > on the system was released in April 2006, there's been dozens of > releases since then, the latest at August 7, 2017, let's update to > that. Comma splices: s/, there's/. There's/ s/,

Re: [PATCH 5/8] perl: update our copy of Mail::Address

2018-02-14 Thread Jonathan Nieder
Ævar Arnfjörð Bjarmason wrote: > Update our copy of Mail::Address from 2.19 (Aug 22, 2017) to 2.20 (Jan > 23, 2018). This should be a trivial update[1] but it seems the version > Matthieu Moy imported in bd869f67b9 ("send-email: add and use a local > copy of Mail::Address", 2018-01-05) doesn't

Re: [PATCH 6/8] git-send-email: unconditionally use Net::{SMTP,Domain}

2018-02-14 Thread Jonathan Nieder
Ævar Arnfjörð Bjarmason wrote: > The Net::SMTP and Net::Domain were both first released with perl > v5.7.3, since my d48b284183 ("perl: bump the required Perl version to > 5.8 from 5.6.[21]", 2010-09-24) we've depended on 5.8, so there's no > reason to conditionally require this anymore. > > This

Re: [PATCH 7/8] gitweb: hard-depend on the Digest::MD5 5.8 module

2018-02-14 Thread Jonathan Nieder
Ævar Arnfjörð Bjarmason wrote: > Signed-off-by: Ævar Arnfjörð Bjarmason > --- > gitweb/INSTALL | 3 +-- > gitweb/gitweb.perl | 17 + > 2 files changed, 6 insertions(+), 14 deletions(-) Makes sense, and I like the diffstat. [...] > +++

Re: [PATCH 8/8] perl: hard-depend on the File::{Temp,Spec} modules

2018-02-14 Thread Jonathan Nieder
Ævar Arnfjörð Bjarmason wrote: > --- a/perl/Git.pm > +++ b/perl/Git.pm > @@ -1324,8 +1324,9 @@ sub _temp_cache { > } > > sub _verify_require { > - eval { require File::Temp; require File::Spec; }; > - $@ and throw Error::Simple($@); > + require File::Temp; > + require

Re: What's cooking in git.git (Feb 2018, #02; Tue, 13)

2018-02-14 Thread Junio C Hamano
Duy Nguyen writes: >> Will see another reroll. >> cf.

Re: [PATCH 3/7] worktree move: new command

2018-02-14 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Feb 14, 2018 at 10:16 AM, Jeff King wrote: >> Hmm. That is not too bad, but somehow it feels funny to me to be >> polluting each test script with these annotations. And to be driving it >> from inside the test scripts. >> >> It

Re: What's cooking in git.git (Feb 2018, #02; Tue, 13)

2018-02-14 Thread Derrick Stolee
On 2/14/2018 12:23 PM, Junio C Hamano wrote: Derrick Stolee writes: There have been a few "What's cooking" emails since I submitted v1 of "Serialized Git Commit Graph" and it has not appeared with a tracking branch. Is this a mistake, or is it something about the state of

[PATCH 1/6] test-hashmap: use ALLOC_ARRAY rather than bare malloc

2018-02-14 Thread Jeff King
These two array allocations have several minor flaws: - they use bare malloc, rather than our error-checking xmalloc - they do a bare multiplication to determine the total size (which in theory can overflow, though in this case the sizes are all constants) - they use

[PATCH 2/6] test-hashmap: check allocation computation for overflow

2018-02-14 Thread Jeff King
When we allocate the test_entry flex-struct, we have to add up all of the elements that go into the flex array. If these were to overflow a size_t, this would allocate a too-small buffer, which we would then overflow in our memcpy steps. Since this is just a test-helper, it probably doesn't

[PATCH 4/6] test-hashmap: use strbuf_getline rather than fgets

2018-02-14 Thread Jeff King
Using fgets() with a fixed-size buffer can lead to lines being accidentally split across two calls if they are larger than the buffer size. As this is just a test helper, this is unlikely to be a problem in practice. But since people may look at test helpers as reference code, it's a good idea

[PATCH 3/6] test-hashmap: use xsnprintf rather than snprintf

2018-02-14 Thread Jeff King
In general, using a bare snprintf can truncate the resulting buffer, leading to confusing results. In this case we know that our buffer is sized large enough to accommodate our loop, so there's no bug. However, we should use xsnprintf() to document (and check) that assumption, and to model good

Re: What's cooking in git.git (Feb 2018, #02; Tue, 13)

2018-02-14 Thread Junio C Hamano
Elijah Newren writes: >> Rename detection logic in "diff" family that is used in "merge" has >> learned to guess when all of x/a, x/b and x/c have moved to z/a, >> z/b and z/c, it is likely that x/d added in the meantime would also >> want to move to z/d by taking the hint

Re: [PATCH v3 00/14] Serialized Git Commit Graph

2018-02-14 Thread Stefan Beller
On Wed, Feb 14, 2018 at 10:15 AM, Derrick Stolee wrote: > There has been a lot of interesting discussion on this topic. Some of that > involves some decently significant changes from v3, so I wanted to summarize > my understanding of the feedback and seek out more feedback from

Re: [PATCH 0/6] minor test-hashmap fixes

2018-02-14 Thread Stefan Beller
On Wed, Feb 14, 2018 at 10:03 AM, Jeff King wrote: > This series started with me fixing the sizeof() mismatch discussed in > > https://public-inbox.org/git/20180214164628.ga...@sigill.intra.peff.net/ > > but I found a number of minor irritations. Most of them are cosmetic in >

[PATCH v8 02/29] directory rename detection: directory splitting testcases

2018-02-14 Thread Elijah Newren
Reviewed-by: Stefan Beller 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

[PATCH v8 17/29] merge-recursive: make a helper function for cleanup for handle_renames

2018-02-14 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

[PATCH v8 23/29] merge-recursive: apply necessary modifications for directory renames

2018-02-14 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. Reviewed-by: Stefan Beller Signed-off-by: Elijah Newren --- merge-recursive.c

[PATCH v8 07/29] directory rename detection: more involved edge/corner testcases

2018-02-14 Thread Elijah Newren
Reviewed-by: Stefan Beller 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

[PATCH v8 29/29] merge-recursive: ensure we write updates for directory-renamed file

2018-02-14 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,

[PATCH v8 22/29] merge-recursive: when comparing files, don't include trees

2018-02-14 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

[PATCH v8 14/29] merge-recursive: fix leaks of allocated renames and diff_filepairs

2018-02-14 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.

[PATCH v8 24/29] merge-recursive: avoid clobbering untracked files with directory renames

2018-02-14 Thread Elijah Newren
Reviewed-by: Stefan Beller 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

[PATCH v8 08/29] directory rename detection: testcases exploring possibly suboptimal merges

2018-02-14 Thread Elijah Newren
Reviewed-by: Stefan Beller 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

[PATCH v8 25/29] merge-recursive: fix overwriting dirty files involved in renames

2018-02-14 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 dirty files that are involved in directory rename detection will be added in a

[PATCH v8 28/29] merge-recursive: avoid spurious rename/rename conflict from dir renames

2018-02-14 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

[PATCH v8 21/29] merge-recursive: check for file level conflicts then get new name

2018-02-14 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. Reviewed-by: Stefan Beller Signed-off-by: Elijah

[PATCH v8 27/29] directory rename detection: new testcases showcasing a pair of bugs

2018-02-14 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

[PATCH v8 10/29] directory rename detection: tests for handling overwriting untracked files

2018-02-14 Thread Elijah Newren
Reviewed-by: Stefan Beller 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

[PATCH v8 03/29] directory rename detection: testcases to avoid taking detection too far

2018-02-14 Thread Elijah Newren
Reviewed-by: Stefan Beller 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

[PATCH v8 13/29] merge-recursive: introduce new functions to handle rename logic

2018-02-14 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

[PATCH v8 20/29] merge-recursive: add computation of collisions due to dir rename & merging

2018-02-14 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.

[PATCH v2 35/37] tempfile: rename 'template' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- tempfile.c | 12 ++-- tempfile.h | 34 +- 2 files changed, 23 insertions(+), 23 deletions(-)

[PATCH v2 13/37] remote: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- builtin/remote.c | 66 1 file changed, 33 insertions(+), 33 deletions(-) diff --git

[PATCH v2 07/37] apply: rename 'try' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- apply.c | 68 - 1 file changed, 34 insertions(+), 34 deletions(-) diff --git

[PATCH v2 36/37] trailer: rename 'template' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- trailer.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/trailer.c b/trailer.c index

[PATCH v2 37/37] replace: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- builtin/replace.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git

[PATCH v2 17/37] diff: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- diff.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/diff.c

[PATCH v2 14/37] combine-diff: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- combine-diff.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/combine-diff.c b/combine-diff.c index

[PATCH v2 08/37] apply: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- apply.c | 54 +++--- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git

Re: [PATCH v3 00/14] Serialized Git Commit Graph

2018-02-14 Thread Derrick Stolee
On 2/14/2018 1:27 PM, Stefan Beller wrote: On Wed, Feb 14, 2018 at 10:15 AM, Derrick Stolee wrote: There has been a lot of interesting discussion on this topic. Some of that involves some decently significant changes from v3, so I wanted to summarize my understanding of the

Re: should "--recurse-submodule" be "--recurse-submodules"?

2018-02-14 Thread Stefan Beller
On Tue, Feb 13, 2018 at 4:30 PM, Robert P. J. Day wrote: > > also just noticed the following: > > Documentation/RelNotes/2.13.0.txt:489: * A few commands that recently learned > the "--recurse-submodule" > Documentation/RelNotes/2.12.0.txt:226: * "git push --dry-run >

Re: Can we make git clone --recurse-submodules --shallow-submodules work for commits that are not on tags or branches

2018-02-14 Thread Stefan Beller
On Tue, Feb 13, 2018 at 9:06 PM, Ciro Santilli wrote: > I have a git repo with large submodules, notably the Linux kernel, and > shallow clone saves a lot of time. > > However, QEMU is also a submodule, which I don't control, and QEMU has > submodules which don't point to

Re: [PATCH] am: support --quit

2018-02-14 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Among the "in progress" commands, only git-am and git-merge do not > support --quit. Support --quit in git-am too. That's a strange way to phrase it, when the number of commands that know and do not know it are about the same. > --abort:: >

Re: "git add" with several pathspecS and one doesn't match

2018-02-14 Thread Junio C Hamano
Goffredo Baroncelli writes: > I am facing this issue: I am ADDing some file with several > pathspec, and one of these fails. The results is that no file is > added at all. This is a good example of a pretty conscious design decision to keep operations atomic/a-o-n when

"git add" with several pathspecS and one doesn't match

2018-02-14 Thread Goffredo Baroncelli
Hi All, I am facing this issue: I am ADDing some file with several pathspec, and one of these fails. The results is that no file is added at all. Simple test case: $ git init . $ touch 123.txt $ git add "*.txt" "*.doc" fatal: pathspec '*.doc' did not match any files $ git status [...]

Re: [PATCH 0/6] minor test-hashmap fixes

2018-02-14 Thread Jeff King
On Wed, Feb 14, 2018 at 10:41:35AM -0800, Stefan Beller wrote: > I have lost track of the hashmap improvements lately, but with > such a good test helper, we could reduce the amount of > commented code in hashmap.h and just link to the test helper? > (as an extra step after this series, I thought

[PATCH v2 01/37] object_info: change member name from 'typename' to 'type_name'

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- builtin/cat-file.c | 2 +- cache.h| 2 +- packfile.c | 6 +++--- sha1_file.c| 10 +- 4 files

[PATCH v2 00/37] removal of some c++ keywords

2018-02-14 Thread Brandon Williams
One person was interested enough for me to go back through and also rename all the paired 'old' variables to match the new names for the variables which were named 'new'. Brandon Williams (37): object_info: change member name from 'typename' to 'type_name' object: rename function 'typename'

[PATCH v2 34/37] wrapper: rename 'template' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- git-compat-util.h | 4 ++-- wrapper.c | 40 2 files changed, 22 insertions(+), 22

Re: [PATCH] t/: correct obvious typo "detahced"

2018-02-14 Thread Stefan Beller
On Wed, Feb 14, 2018 at 1:08 AM, Robert P. J. Day wrote: > > Signed-off-by: Robert P. J. Day Thanks, Stefan > > --- > > diff --git a/t/t7409-submodule-detached-work-tree.sh > b/t/t7409-submodule-detached-work-tree.sh > index c20717181..fc018e363

[PATCH v2 18/37] diffcore-delta: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- diffcore-delta.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/diffcore-delta.c

[PATCH v2 19/37] entry: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- entry.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/entry.c

[PATCH v2 26/37] split-index: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- split-index.c | 16 split-index.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git

[PATCH v2 16/37] diff-lib: rename 'new' variable

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- diff-lib.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/diff-lib.c

[PATCH v2 30/37] init-db: rename 'template' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- builtin/init-db.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git

[PATCH v2 33/37] environment: rename 'namespace' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- environment.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/environment.c b/environment.c index

[PATCH v2 28/37] trailer: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams --- trailer.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/trailer.c

  1   2   >