[PATCH] ref-filter: resolve HEAD when parsing %(HEAD) atom

2017-05-18 Thread Jeff King
If the user asks to display (or sort by) the %(HEAD) atom, ref-filter has to compare each refname to the value of HEAD. We do so by resolving HEAD fresh when calling populate_value() on each ref. If there are a large number of refs, this can have a measurable impact on runtime. Instead, let's reso

Re: [PATCH 11/23] files_transaction_cleanup(): new helper function

2017-05-18 Thread Michael Haggerty
On 05/17/2017 03:19 PM, Jeff King wrote: > On Wed, May 17, 2017 at 02:05:34PM +0200, Michael Haggerty wrote: > >> Extract function from `files_transaction_commit()`. It will soon have >> another caller. >> [...] >> @@ -2868,10 +2889,8 @@ static int files_transaction_commit(struct ref_store >> *re

Re: [PATCH 11/23] files_transaction_cleanup(): new helper function

2017-05-18 Thread Michael Haggerty
On 05/17/2017 07:26 PM, Stefan Beller wrote: > On Wed, May 17, 2017 at 5:05 AM, Michael Haggerty > wrote: >> Extract function from `files_transaction_commit()`. It will soon have >> another caller. > > This sounds odd to me. Maybe it is missing words? > of s/function/the functionality to cleanup

Re: [PATCH 10/23] files_ref_store: put the packed files lock directly in this struct

2017-05-18 Thread Michael Haggerty
On 05/17/2017 07:18 PM, Stefan Beller wrote: > On Wed, May 17, 2017 at 6:17 AM, Jeff King wrote: >> On Wed, May 17, 2017 at 02:05:33PM +0200, Michael Haggerty wrote: >> >>> Instead of using a global `lock_file` instance for the main >>> "packed-refs" file and using a pointer in `files_ref_store` t

Re: [PATCH 01/23] t3600: clean up permissions test properly

2017-05-18 Thread Michael Haggerty
On 05/18/2017 06:10 AM, Junio C Hamano wrote: > Michael Haggerty writes: > >> The test of failing `git rm -f` removes the write permissions on the >> test directory, but fails to restore them if the test fails. This >> means that the test temporary directory cannot be cleaned up, which >> means t

[PATCH] config.txt: add an entry for log.showSignature

2017-05-18 Thread Kyle Meyer
The configuration variable log.showSignature is mentioned in git-log's manpage. Document it in git-config's manpage as well. Signed-off-by: Kyle Meyer --- Documentation/config.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 9

Re: [PATCH 0/2] Demonstrate and partially work around a gitattributes problem

2017-05-18 Thread Jeff King
On Thu, May 18, 2017 at 09:23:17PM +0200, Johannes Schindelin wrote: > So you drive this forward? That would really help me a lot. Please make my > 1/2 part of your patches to that end. Yes, sorry, I haven't gotten a chance to polish the patches yet. -Peff

Re: [PATCHv3 04/20] diff.c: teach emit_line_0 to accept sign parameter

2017-05-18 Thread Jonathan Tan
On Thu, 18 May 2017 12:37:30 -0700 Stefan Beller wrote: > Teach emit_line_0 take a "sign" parameter specifically intended > to hold the sign of the line instead of a separate "first" parameter > representing the first character of the line to be printed. Callers > that store the sign and line se

git merges of tags

2017-05-18 Thread Stephen Rothwell
Hi all, Just a reminder that if you are merging Linus' tree (or any tree really) via a tag, git was changed some time ago so that merging a tag will not do a fast forward (there is a good reason for this - I just can't recall it ATM). This is a problem when your current head of branch has been me

[WIP/RFC 21/23] repo: add repo_read_gitmodules

2017-05-18 Thread Brandon Williams
Add ability for a repository to poulate its own submodule_cache by reading the repository's gitmodules file. Signed-off-by: Brandon Williams --- repo.c | 26 ++ repo.h | 3 +++ 2 files changed, 29 insertions(+) diff --git a/repo.c b/repo.c index 223adf4c8..5449eb212 100

[WIP/RFC 17/23] repo: introduce new repository object

2017-05-18 Thread Brandon Williams
Introduce 'struct repo' an object used to represent a repository. Signed-off-by: Brandon Williams --- Makefile | 1 + repo.c | 42 ++ repo.h | 15 +++ 3 files changed, 58 insertions(+) create mode 100644 repo.c create mode 100644 repo.h

[WIP/RFC 22/23] submodule: add is_submodule_active

2017-05-18 Thread Brandon Williams
Add method which checks if a submodule is active given the provided repository object. NOTE: this is almost a copy-paste of is_submodule_initialized. I tried to convert is_submodule_initialized to take a submodule_cache and config_set parameters but that turned out to break some other code paths

[WIP/RFC 18/23] repo: add index_state to struct repo

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- repo.c | 19 +++ repo.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/repo.c b/repo.c index d47e98d95..7e5c03ac5 100644 --- a/repo.c +++ b/repo.c @@ -2,6 +2,20 @@ #include "repo.h" int +repo_read_index(struct repo *repo, const cha

[WIP/RFC 13/23] ls-files: convert prune_cache to take an index

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index de02819c6..8448b04e8 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -380,30 +380,31 @@ static void

[WIP/RFC 23/23] ls-files: use repository object

2017-05-18 Thread Brandon Williams
Convert ls-files to use a repository struct and recurse submodules inprocess. Signed-off-by: Brandon Williams --- builtin/ls-files.c | 217 +++-- git.c | 2 +- t/t3007-ls-files-recurse-submodules.sh | 39 ++

[WIP/RFC 04/23] convert: convert convert_to_git to take an index

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- apply.c | 2 +- builtin/blame.c | 2 +- combine-diff.c | 2 +- convert.c | 7 --- convert.h | 8 +--- diff.c | 6 +++--- dir.c | 2 +- sha1_file.c | 4 ++-- 8 files changed, 18 insertions(+), 15 deletions(-)

[WIP/RFC 11/23] ls-files: convert show_ru_info to take an index

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 3d4e497cc..755dfc8d6 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -292,14 +292,14 @@ static void show_ce_

[WIP/RFC 00/23] repository object

2017-05-18 Thread Brandon Williams
When I first started working on the git project I found it very difficult to understand parts of the code base because of the inherently global nature of our code. It also made working on submodules very difficult. Since we can only open up a single repository per process, you need to launch a ch

[WIP/RFC 02/23] convert: convert crlf_to_git to take an index

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- convert.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/convert.c b/convert.c index b1b90d6e6..f5773cfe1 100644 --- a/convert.c +++ b/convert.c @@ -217,13 +217,13 @@ static void check_safe_crlf(const char *path, enum crlf_a

[WIP/RFC 06/23] tree: convert read_tree to take an index parameter

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 2 +- tree.c | 28 ++-- tree.h | 3 ++- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 770d8774a..a4ced5a9c 100644 --- a/built

[WIP/RFC 15/23] ls-files: factor out debug info into a function

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 56fd6644f..6603538ec 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -93,6 +93,19 @@ static

[WIP/RFC 10/23] ls-files: convert show_other_files to take an index

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 7cdee2359..3d4e497cc 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -108,13 +108,14 @@ static void show_dir_

[WIP/RFC 14/23] ls-files: convert show_files to take an index

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 8448b04e8..56fd6644f 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -328,7 +328,7 @@ sta

[WIP/RFC 05/23] convert: convert renormalize_buffer to take an index

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- convert.c | 6 -- convert.h | 3 ++- ll-merge.c| 2 +- merge-recursive.c | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/convert.c b/convert.c index 3d1c7e2b6..e4c8e6ad3 100644 --- a/convert.c +++ b/convert.c

[WIP/RFC 20/23] submodule-config: refactor to allow for multiple submodule_cache's

2017-05-18 Thread Brandon Williams
A repository object will have its own submodule cache so lay the ground work for allowing multiple submodule cache structs. Signed-off-by: Brandon Williams --- submodule-config.c | 40 submodule-config.h | 10 ++ 2 files changed, 42 insertions(+),

[WIP/RFC 19/23] repo: add per repo config

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- cache.h | 1 + config.c | 2 +- repo.c | 27 ++- repo.h | 2 ++ 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/cache.h b/cache.h index 175e58f01..af9ae1173 100644 --- a/cache.h +++ b/cache.h @@ -2015,6 +2015,7 @@

[WIP/RFC 12/23] ls-files: convert ce_excluded to take an index

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 755dfc8d6..de02819c6 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -321,10 +321,11 @@ static void show_ru

[WIP/RFC 07/23] ls-files: convert overlay_tree_on_cache to take an index

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/commit.c | 3 ++- builtin/ls-files.c | 15 --- cache.h| 3 ++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index 1d805f5da..38993bd24 100644 --- a/builtin/commit.c +++ b

[WIP/RFC 03/23] convert: convert convert_to_git_filter_fd to take an index

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- convert.c | 5 +++-- convert.h | 3 ++- sha1_file.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/convert.c b/convert.c index f5773cfe1..d50e7f7aa 100644 --- a/convert.c +++ b/convert.c @@ -1203,7 +1203,8 @@ int convert_to_git(const

[WIP/RFC 01/23] convert: convert get_cached_convert_stats_ascii to take an index

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 3 ++- convert.c | 5 +++-- convert.h | 5 - 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 89b3ce8e5..770d8774a 100644 --- a/builtin/ls-files.c +++ b/built

[WIP/RFC 16/23] ls-files: factor out tag calculation

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 41 + 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 6603538ec..456df61e4 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -93

[WIP/RFC 08/23] ls-files: convert write_eolinfo to take an index

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 7d306f418..9313452e3 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -53,17 +53,16 @@ static const cha

[WIP/RFC 09/23] ls-files: convert show_killed_files to take an index

2017-05-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 9313452e3..7cdee2359 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -120,7 +120,8 @@ static

[PATCH 2/3] sha1dc: use sha1collisiondetection as a submodule

2017-05-18 Thread Ævar Arnfjörð Bjarmason
Replace the forked sha1dc directory with a copy of the upstream code imported as a submodule. This is the exact same code as now exists in the sha1dc/ directory. The initial reason for copy/pasting the code into sha1dc and locally modifying it was that it needed to be altered to work with the git

[PATCH 1/3] sha1dc: update from upstream

2017-05-18 Thread Ævar Arnfjörð Bjarmason
Update sha1dc from the latest version by the upstream maintainer[1]. This version includes a commit of mine which allows for replacing the local modifications done to the upstream files in git.git with macro definitions to monkeypatch it in place. It also brings in a change[2] upstream made for t

[PATCH 3/3] sha1dc: remove the unused sha1dc/ directory

2017-05-18 Thread Ævar Arnfjörð Bjarmason
This has been made obsolete by the sha1collisiondetection submodule. See the preceding change for details. Signed-off-by: Ævar Arnfjörð Bjarmason --- sha1dc/LICENSE.txt | 30 - sha1dc/sha1.h | 110 sha1dc/ubc_check.c | 372 --

[PATCH 0/3] Update sha1dc from upstream & optionally make it a submodule

2017-05-18 Thread Ævar Arnfjörð Bjarmason
This series: Ævar Arnfjörð Bjarmason (3): sha1dc: update from upstream * Fixes the Big-Endian detection on Solaris SPARC (and probably others) which broke the build as of 2.13.0 due to sha1dc being the dauflt. * Includes a patch from upstream fixing unaligned access, whic

Re: [PATCH] rebase -i: Add missing newline to end of message

2017-05-18 Thread Johannes Schindelin
Hi Phillip, On Thu, 18 May 2017, Phillip Wood wrote: > From: Phillip Wood > > The message that's printed when auto-stashed changes are successfully > restored was missing '\n' at the end. > --- Please add your Signed-off-by:, and my Acked-by: Thanks, Johannes

Re: [PATCH 2/2] rebase -i: silence stash apply

2017-05-18 Thread Johannes Schindelin
Hi Phillip, On Thu, 18 May 2017, Phillip Wood wrote: > The shell version prints it's own error message if there's an error, the > C version does this as well > > Shell version: > apply_autostash () { > if test -f "$state_dir/autostash" > then > stash_sha1=$(cat "$state_

Re: [PATCH v2 1/2] refs: Add for_each_worktree_ref for iterating over all worktree HEADs

2017-05-18 Thread Brandon Williams
On 05/18, Samuel Lijin wrote: > On Thu, May 18, 2017 at 5:40 AM, Simon Ruderich wrote: > > On Wed, May 17, 2017 at 06:45:31PM -0700, Manish Goregaokar wrote: > >> Hm, my invocation of git-send-email keeps getting the threading wrong. > >> Is there a recommended set of arguments to the command? > >

Dr. Serravalle

2017-05-18 Thread Dr. Serravalle
Vereinte Nationen Palais des Nations CH-1211 Genf 10. Schweiz. Attention Fund Begünstigter / E-Mail-Inhaber. IRREVOCABLE ZAHLUNGS-AUFTRAG ÜBER ATM-KARTE Wir sind von der Vereinten Nation tatsächlich zugelassen worden, um die unnötige Verzögerung der zu Ihren Gunsten genehmigten Zahlung zu unter

Re: [PATCH v2 1/2] refs: Add for_each_worktree_ref for iterating over all worktree HEADs

2017-05-18 Thread Samuel Lijin
On Thu, May 18, 2017 at 5:40 AM, Simon Ruderich wrote: > On Wed, May 17, 2017 at 06:45:31PM -0700, Manish Goregaokar wrote: >> Hm, my invocation of git-send-email keeps getting the threading wrong. >> Is there a recommended set of arguments to the command? > > The threading looks fine here (for bo

[PATCH v2 5/6] fsmonitor: add documentation for the fsmonitor extension.

2017-05-18 Thread Ben Peart
This includes the core.fsmonitor setting, the query-fsmonitor hook, and the fsmonitor index extension. Signed-off-by: Ben Peart --- Documentation/config.txt | 7 +++ Documentation/githooks.txt | 23 +++ Documentation/technical/index-format.t

[PATCH v2 1/6] bswap: add 64 bit endianness helper get_be64

2017-05-18 Thread Ben Peart
Add a new get_be64 macro to enable 64 bit endian conversions on memory that may or may not be aligned. Signed-off-by: Ben Peart --- compat/bswap.h | 4 1 file changed, 4 insertions(+) diff --git a/compat/bswap.h b/compat/bswap.h index d47c003544..f89fe7f4b5 100644 --- a/compat/bswap.h +++

[PATCH v2 6/6] fsmonitor: add a sample query-fsmonitor hook script for Watchman

2017-05-18 Thread Ben Peart
This hook script integrates the new fsmonitor capabilities of git with the cross platform Watchman file watching service. To use the script: Download and install Watchman from https://facebook.github.io/watchman/ and instruct Watchman to watch your working directory for changes ('watchman watch-pr

[PATCH v2 4/6] fsmonitor: add test cases for fsmonitor extension

2017-05-18 Thread Ben Peart
Add test cases that ensure status results are correct when using the new fsmonitor extension. Test untracked, modified, and new files by ensuring the results are identical to when not using the extension. Add a test to ensure updates to the index properly mark corresponding entries in the index e

[PATCH v2 2/6] dir: make lookup_untracked() available outside of dir.c

2017-05-18 Thread Ben Peart
Remove the static qualifier from lookup_untracked() and make it available to other modules by exporting it from dir.h. This will be used later when we need to find entries to mark 'fsmonitor dirty.' Signed-off-by: Ben Peart --- dir.c | 2 +- dir.h | 3 +++ 2 files changed, 4 insertions(+), 1 de

[PATCH v2 3/6] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-05-18 Thread Ben Peart
When the index is read from disk, the query-fsmonitor index extension is used to flag the last known potentially dirty index and untracked cach entries. If git finds out some entries are 'fsmonitor-dirty', but are really unchanged (e.g. the file was changed, then reverted back), then Git will clea

[PATCH v2 0/6] Fast git status via a file system watcher

2017-05-18 Thread Ben Peart
Changes from V1 include: - add 64 bit endianness helper get_be64 in compat/bswap.h - switch to using get_be helpers when reading index extension - fix leak of strbuf in refresh_by_fsmonitor - rename update_istate and clean up parameter list - make t/t7519-status-fsmonitor.sh executable - upd

[PATCHv3 04/20] diff.c: teach emit_line_0 to accept sign parameter

2017-05-18 Thread Stefan Beller
Teach emit_line_0 take a "sign" parameter specifically intended to hold the sign of the line instead of a separate "first" parameter representing the first character of the line to be printed. Callers that store the sign and line separately can use the "sign" parameter like they used the "first" p

[PATCHv3 05/20] diff.c: emit_line_0 can handle no color setting

2017-05-18 Thread Stefan Beller
In later patches we may pass lines that are not colored to the central function emit_line_0, so we need to emit the color only when it is non-NULL. We could have chosen to pass "" instead of NULL, but that would be more work. Signed-off-by: Stefan Beller --- diff.c | 6 -- 1 file changed, 4

[PATCHv3 06/20] diff.c: emit_line_0 takes parameter whether to output line prefix

2017-05-18 Thread Stefan Beller
In later patches we'll make extensive use of emit_line_0, as we'd want to funnel all output through this function such that we can add buffering there. Signed-off-by: Stefan Beller --- diff.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/diff.c b/diff.c inde

[PATCHv3 08/20] diff.c: convert fn_out_consume to use emit_line

2017-05-18 Thread Stefan Beller
In a later patch, I want to propose an option to detect&color moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines (+ and -) that got moved. So to prepare the

[PATCHv3 07/20] diff.c: inline emit_line_0 into emit_line

2017-05-18 Thread Stefan Beller
The argument list of emit_line_0 is just 2 more arguments that are hard-coded in emit_line. Eliminate this intermediate function and rename the remaining function by dropping the '_0'. Signed-off-by: Stefan Beller --- diff.c | 34 ++ 1 file changed, 14 insertions(

[PATCHv3 14/20] diff.c: convert show_stats to use emit_line_*

2017-05-18 Thread Stefan Beller
In a later patch, I want to propose an option to detect&color moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines (+ and -) that got moved. So to prepare the

[PATCHv3 20/20] diff.c: color moved lines differently

2017-05-18 Thread Stefan Beller
When there is a lot of code moved around such as in 11979b9 (2005-11-18, "http.c: reorder to avoid compilation failure.") for example, the review process is quite hard, as it is not mentally challenging. It is a rather tedious process, that gets boring quickly. However you still need to read throu

[PATCHv3 18/20] diff.c: emit_line includes whitespace highlighting

2017-05-18 Thread Stefan Beller
Currently any whitespace highlighting happens outside the emit_line function. Teach the highlighting to emit_line, triggered by a new parameter. Signed-off-by: Stefan Beller --- diff.c | 106 ++--- diff.h | 2 ++ 2 files changed, 64 i

[PATCHv3 19/20] diff: buffer all output if asked to

2017-05-18 Thread Stefan Beller
Introduce a new option 'use_buffer' in the struct diff_options which controls whether all output is buffered up until all output is available. We'll have a new struct 'buffered_patch_line' in diff.h which will be used to buffer each line. The buffered_patch_line will duplicate the memory of the l

[PATCHv3 15/20] diff.c: convert word diffing to use emit_line_*

2017-05-18 Thread Stefan Beller
In a later patch, I want to propose an option to detect&color moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines (+ and -) that got moved. So to prepare the

[PATCHv3 16/20] diff.c: convert diff_flush to use emit_line_*

2017-05-18 Thread Stefan Beller
In a later patch, I want to propose an option to detect&color moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines (+ and -) that got moved. So to prepare the

[PATCHv3 01/20] diff: readability fix

2017-05-18 Thread Stefan Beller
We already have dereferenced 'p->two' into a local variable 'two'. Use that. Signed-off-by: Stefan Beller --- diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diff.c b/diff.c index 74283d9001..3f5bf8b5a4 100644 --- a/diff.c +++ b/diff.c @@ -3283,8 +3283,8 @@ static

[PATCHv3 12/20] submodule.c: convert show_submodule_summary to use emit_line_fmt

2017-05-18 Thread Stefan Beller
In a later patch, I want to propose an option to detect&color moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines (+ and -) that got moved. So to prepare the

[PATCHv3 00/20] Diff machine: highlight moved lines.

2017-05-18 Thread Stefan Beller
v3: * see interdiff below. * fixing one invalid computation (Thanks Junio!) * I reasoned more about submodule and word diffing, see the commit message of the last patch: A note on the options '--submodule=diff' and '--color-words/--word-diff': In the conversion to use emit_line in the

[PATCHv3 17/20] diff.c: convert diff_summary to use emit_line_*

2017-05-18 Thread Stefan Beller
In a later patch, I want to propose an option to detect&color moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines (+ and -) that got moved. So to prepare the

[PATCHv3 02/20] diff: move line ending check into emit_hunk_header

2017-05-18 Thread Stefan Beller
The emit_hunk_header() function is responsible for assembling a hunk header and calling emit_line() to send the hunk header to the output file. Its only caller fn_out_consume() needs to prepare for a case where the function emits an incomplete line and add the terminating LF. Instead make sure em

[PATCHv3 11/20] diff.c: convert emit_rewrite_lines to use emit_line_*

2017-05-18 Thread Stefan Beller
In a later patch, I want to propose an option to detect&color moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines (+ and -) that got moved. So to prepare the

[PATCHv3 09/20] diff.c: convert builtin_diff to use emit_line_*

2017-05-18 Thread Stefan Beller
In a later patch, I want to propose an option to detect&color moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines (+ and -) that got moved. So to prepare the

[PATCHv3 10/20] diff.c: convert emit_rewrite_diff to use emit_line_*

2017-05-18 Thread Stefan Beller
In a later patch, I want to propose an option to detect&color moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines (+ and -) that got moved. So to prepare the

[PATCHv3 13/20] diff.c: convert emit_binary_diff_body to use emit_line_*

2017-05-18 Thread Stefan Beller
In a later patch, I want to propose an option to detect&color moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines (+ and -) that got moved. So to prepare the

[PATCHv3 03/20] diff.c: factor out diff_flush_patch_all_file_pairs

2017-05-18 Thread Stefan Beller
In a later patch we want to do more things before and after all filepairs are flushed. So factor flushing out all file pairs into its own function that the new code can be plugged in easily. Signed-off-by: Stefan Beller --- diff.c | 17 - 1 file changed, 12 insertions(+), 5 delet

Re: [PATCH 0/2] Demonstrate and partially work around a gitattributes problem

2017-05-18 Thread Johannes Schindelin
Hi Peff, On Tue, 16 May 2017, Jeff King wrote: > On Wed, May 17, 2017 at 10:38:36AM +0900, Junio C Hamano wrote: > > > > - add_pending_object(revs, a_obj, this); > > > - add_pending_object(revs, b_obj, next); > > > + add_pending_object_with_path(re

Re: [PATCH 1/3] submodule.c: add has_submodules to check if we have any submodules

2017-05-18 Thread Stefan Beller
On Thu, May 18, 2017 at 12:00 PM, Brandon Williams wrote: > On 05/18, Stefan Beller wrote: >> >> +static enum { >> >> + SUBMODULE_CONFIG_NOT_READ = 0, >> >> + SUBMODULE_CONFIG_NO_CONFIG, >> >> + SUBMODULE_CONFIG_EXISTS, >> >> +} submodule_config_reading; >> > >> > Any way we can have t

Re: [PATCH 0/3] Add option to recurse into submodules

2017-05-18 Thread Brandon Williams
On 05/17, Stefan Beller wrote: > In a submodule heavy workflow it becomes tedious to pass in > --recurse-submodules all the time, so make an option for it. I'm all for adding the config which applies to multiple commands. I think its probably necessary as we increase the number of commands which

Re: [PATCH 1/3] submodule.c: add has_submodules to check if we have any submodules

2017-05-18 Thread Brandon Williams
On 05/18, Stefan Beller wrote: > >> +static enum { > >> + SUBMODULE_CONFIG_NOT_READ = 0, > >> + SUBMODULE_CONFIG_NO_CONFIG, > >> + SUBMODULE_CONFIG_EXISTS, > >> +} submodule_config_reading; > > > > Any way we can have this not be a global, but rather a parameter? You > > could pass in

RE: [PATCH 0/1] Preserve the untracked cache across checkout, reset --hard, etc

2017-05-18 Thread David Turner
> -Original Message- > From: Ben Peart [mailto:peart...@gmail.com] > Sent: Thursday, May 18, 2017 12:58 PM > To: Junio C Hamano ; David Turner > > Cc: 'Christian Couder' ; Johannes Schindelin > ; git ; Nguyễn Thái Ngọc > Duy ; Ben Peart > Subject: Re: [PATCH 0/1] Preserve the untracked ca

Re: [PATCH 00/23] Prepare to separate out a packed_ref_store

2017-05-18 Thread Jeff King
On Thu, May 18, 2017 at 07:14:38PM +0200, Johannes Sixt wrote: > Am 17.05.2017 um 14:05 schrieb Michael Haggerty: > > This patch series is the next leg on a journey towards reading > > `packed-refs` using `mmap()`, the most interesting aspect of which is > > that we will often be able to avoid hav

Re: [PATCH 00/23] Prepare to separate out a packed_ref_store

2017-05-18 Thread Johannes Sixt
Am 17.05.2017 um 14:05 schrieb Michael Haggerty: This patch series is the next leg on a journey towards reading `packed-refs` using `mmap()`, the most interesting aspect of which is that we will often be able to avoid having to read the whole `packed-refs` file if we only need a subset of referen

Re: [PATCHv2 12/20] submodule.c: convert show_submodule_summary to use emit_line_fmt

2017-05-18 Thread Stefan Beller
On Wed, May 17, 2017 at 8:25 PM, Junio C Hamano wrote: > Stefan Beller writes: > +static void show_submodule_header(struct diff_options *o, const char *path, struct object_id *one, struct object_id *two, unsigned dirty_submodule, const char *meta,

Re: [PATCH 17/23] get_packed_ref_cache(): assume "packed-refs" won't change while locked

2017-05-18 Thread Stefan Beller
On Wed, May 17, 2017 at 6:15 PM, Jeff King wrote: > On Wed, May 17, 2017 at 10:57:34AM -0700, Stefan Beller wrote: > >> On Wed, May 17, 2017 at 5:05 AM, Michael Haggerty >> wrote: >> > If we've got the "packed-refs" file locked, then it can't change; >> > there's no need to keep calling `stat_va

Re: [PATCH 0/1] Preserve the untracked cache across checkout, reset --hard, etc

2017-05-18 Thread Ben Peart
On 5/9/2017 8:51 AM, Ben Peart wrote: On 5/9/2017 1:02 AM, Junio C Hamano wrote: David Turner writes: Can you actually keep the email address as my Twopensource one? I want to make sure that Twitter, my employer at the time, gets credit for this work (just as I want to make sure that my c

Re: [PATCH 1/3] submodule.c: add has_submodules to check if we have any submodules

2017-05-18 Thread Stefan Beller
>> +static enum { >> + SUBMODULE_CONFIG_NOT_READ = 0, >> + SUBMODULE_CONFIG_NO_CONFIG, >> + SUBMODULE_CONFIG_EXISTS, >> +} submodule_config_reading; > > Any way we can have this not be a global, but rather a parameter? You > could pass in a pointer to this value via the callback data p

Re: [PATCH 1/3] submodule.c: add has_submodules to check if we have any submodules

2017-05-18 Thread Stefan Beller
On Wed, May 17, 2017 at 10:38 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> diff --git a/builtin/fetch.c b/builtin/fetch.c >> index 4ef7a08afc..510ef1c9de 100644 >> --- a/builtin/fetch.c >> +++ b/builtin/fetch.c >> @@ -1344,7 +1344,7 @@ int cmd_fetch(int argc, const char **argv, const ch

Re: [PATCH 3/3] Introduce submodule.recurse option

2017-05-18 Thread Stefan Beller
On Thu, May 18, 2017 at 8:39 AM, Brandon Williams wrote: > On 05/17, Stefan Beller wrote: >> Any command that understands the boolean --recurse-submodule=[true/false] >> can have its default changed to true, by setting the submodule.recurse >> option. >> >> git-push takes a --recurse-submodule arg

Re: [PATCH] doc: explain default option for rev-parse --short

2017-05-18 Thread Jeff King
On Thu, May 18, 2017 at 11:03:00AM -0300, André Werlang wrote: > Git 2.11 introduced a computation to guess the default length > for commit short hashes. The documentation isn't updated. Thanks for the patch. I think this is going in the right direction, but I have a few minor comments. > From 2

Re: git-scm.com status report

2017-05-18 Thread Jeff King
On Thu, May 18, 2017 at 02:06:16PM +0200, Lars Schneider wrote: > > I haven't ever tried to do this in the local development environment. > > The production site currently just use a cloud-hosted ES (Bonsai). They > > have free "Sandbox" plans for testing, so you could probably use that as > > a t

Re: [PATCH 10/23] files_ref_store: put the packed files lock directly in this struct

2017-05-18 Thread Brandon Williams
On 05/17, Jeff King wrote: > On Wed, May 17, 2017 at 05:17:17PM -0700, Brandon Williams wrote: > > > > This made me wonder how we handle the locking for ref_stores besides the > > > main one (e.g., for submodules). The lockfile structs have to remain > > > valid for the length of the program. Prev

Re: [PATCH 3/3] Introduce submodule.recurse option

2017-05-18 Thread Brandon Williams
On 05/17, Stefan Beller wrote: > Any command that understands the boolean --recurse-submodule=[true/false] > can have its default changed to true, by setting the submodule.recurse > option. > > git-push takes a --recurse-submodule argument but it is not boolean, > hence it is not included (yet?).

Re: [PATCH 1/3] submodule.c: add has_submodules to check if we have any submodules

2017-05-18 Thread Brandon Williams
On 05/17, Stefan Beller wrote: > When submodules are involved, it often slows down the process, as most > submodule related handling is either done via a child process or by > iterating over the index finding all gitlinks. > > For most commands that may interact with submodules, we need have a > q

Re: [PATCH] rebase -i: Add missing newline to end of message

2017-05-18 Thread Phillip Wood
On 18/05/17 14:48, Ævar Arnfjörð Bjarmason wrote: On Thu, May 18, 2017 at 3:41 PM, Phillip Wood wrote: From: Phillip Wood The message that's printed when auto-stashed changes are successfully restored was missing '\n' at the end. Both this and your reflog message really seem like the sort o

Re: [PATCH 2/2] rebase -i: silence stash apply

2017-05-18 Thread Phillip Wood
Hi Johannes Thanks for your reply On 18/05/17 11:49, Johannes Schindelin wrote: Hi Phillip, On Thu, 18 May 2017, Phillip Wood wrote: diff --git a/sequencer.c b/sequencer.c index f8bc18badf1a3fb1b39656501c5a316e229968d2..311728a145dfc66e230334221a2610468239932d 100644 --- a/sequencer.c +++ b

[PATCH] doc: explain default option for rev-parse --short

2017-05-18 Thread André Werlang
>From 2b1c229153a89c7608e64b87d2f933704c18b7ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Werlang?= Date: Thu, 18 May 2017 10:50:11 -0300 Subject: [PATCH] doc: explain default option for rev-parse --short MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encodin

Re: [PATCH] rebase -i: Add missing newline to end of message

2017-05-18 Thread Ævar Arnfjörð Bjarmason
On Thu, May 18, 2017 at 3:41 PM, Phillip Wood wrote: > From: Phillip Wood > > The message that's printed when auto-stashed changes are successfully > restored was missing '\n' at the end. Both this and your reflog message really seem like the sort of tricky edge cases we should have tests for.

[PATCH] rebase -i: Add missing newline to end of message

2017-05-18 Thread Phillip Wood
From: Phillip Wood The message that's printed when auto-stashed changes are successfully restored was missing '\n' at the end. --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 311728a14..4dcf9c8be 100644 --- a/sequencer.c +++ b/s

Re: [PATCH 2/2] rebase -i: silence stash apply

2017-05-18 Thread Johannes Schindelin
Hi Phillip, On Thu, 18 May 2017, Phillip Wood wrote: > diff --git a/sequencer.c b/sequencer.c > index > f8bc18badf1a3fb1b39656501c5a316e229968d2..311728a145dfc66e230334221a2610468239932d > 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -1914,6 +1914,8 @@ static int apply_autostash(struct r

Re: git-scm.com status report

2017-05-18 Thread Lars Schneider
> On 17 May 2017, at 04:03, Jeff King wrote: > > On Tue, May 16, 2017 at 09:56:37PM -0400, Samuel Lijin wrote: > >> So I've finally found the time to get everything set up (in the >> process discovering that remote_genbook2 consistently induces a >> segfault in VirtualBox's networking driver, i

Re: Is it possible to use new conditional includes outside of git dir?

2017-05-18 Thread Mihails Strasuns
On 05/15/2017 11:00 PM, Ævar Arnfjörð Bjarmason wrote: > It's intentional, but in the "that's how this works" sense, not "we'll > never add what you just asked for". > > This came up on list last week: > https://public-inbox.org/git/f55dc360-9c1e-45b9-b8ba-39e1001bd...@gmail.com/T/#u > > So I'd l

[PATCH] send-email: Add tocmd option to suppress-cc

2017-05-18 Thread Viresh Kumar
This adds tocmd option to suppress-cc command which already supports cccmd and others. Signed-off-by: Viresh Kumar --- Documentation/git-send-email.txt | 1 + git-send-email.perl | 8 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Documentation/git-send-emai

Re: ~Building Charity Foundation .

2017-05-18 Thread Sarah.Edward,
Peace be with you, I sincerely seek for your help in setting up a Charitable Organization to help the less privileged, old aged and vulnerable people under your care, It is my desire to use my late husband wealth of $3,000,000.00 to set up a charity foundation to help the needy and the less

[PATCH 2/2] rebase -i: silence stash apply

2017-05-18 Thread Phillip Wood
From: Phillip Wood The shell version of rebase -i silences the status output from 'git stash apply' when restoring the autostashed changes. The C version does not. Having the output from git stash apply on the screen is distracting as it makes it difficult to find the message from git rebase say

[PATCH 0/2] Fix a couple of minor rebase -i regressions

2017-05-18 Thread Phillip Wood
From: Phillip Wood These patches fix a regression in the reflog message written when rebase -i finishes and supresses the status output from applying any autostashed changes to match the shell version of rebase -i. Phillip Wood (2): rebase -i: fix reflog message rebase -i: silence stash appl

  1   2   >