Re: [PATCH] rebase -p: avoid grep on potentailly non-ASCII data

2016-03-09 Thread Torsten Bögershausen
On 09.03.16 21:26, Junio C Hamano wrote: > Anders Kaseorg writes: [] > sane_grep () { > - GREP_OPTIONS= LC_ALL=C grep "$@" > + GREP_OPTIONS= LC_ALL=C grep @@SANE_TEXT_GREP@@ "$@" > } > > sane_egrep () { > - GREP_OPTIONS= LC_ALL=C egrep "$@" > + GREP_OPTIONS=

[PATCH v3 1/2] mergetool: support delete/delete conflicts

2016-03-09 Thread David Aguilar
If two branches each move a file into different directories then mergetool will fail because it assumes that the file being merged, and its parent directory, are present in the worktree. Create the merge file's parent directory to allow using the deleted base version of the file for merge

[PATCH v3 2/2] mergetool: honor tempfile configuration when resolving delete conflicts

2016-03-09 Thread David Aguilar
Teach resolve_deleted_merge() to honor the mergetool.keepBackup and mergetool.keepTemporaries configuration knobs. This ensures that the worktree is kept pristine when resolving deletion conflicts with the variables both set to false. Signed-off-by: David Aguilar --- Rebased

行藏固有期

2016-03-09 Thread 行藏固有期
你的老朋友邀你来Q群:343257759

Re: git smudge filter fails

2016-03-09 Thread Jeff King
On Wed, Mar 09, 2016 at 01:29:31PM -0500, Stephen Morton wrote: > git config --local filter.dater.smudge 'myDate=`git log > --pretty=format:"%cd" --date=iso -1 -- %f`; sed -e > "s/\(\\$\)Date[^\\$]*\\$/\1Date: $myDate \\$/g"' Your filter is running "git log" without a revision parameter, which

Re: Change in .gitignore handling: intended or bug?

2016-03-09 Thread Junio C Hamano
Junio C Hamano writes: > Duy Nguyen writes: > >> A bit off topic, but these two paragraphs may need rephrasing, I don't >> really understand what it's trying to say >> >> - If the pattern does not contain a slash '/', Git treats it as >>a shell glob

Re: [RFC/PATCH 01/48] builtin/apply: avoid parameter shadowing 'p_value' global

2016-03-09 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 6:27 AM, Junio C Hamano wrote: > Christian Couder writes: > >> Signed-off-by: Christian Couder >> --- >> builtin/apply.c | 24 >> 1 file changed, 12 insertions(+), 12

Re: [PATCH] dir.c: fix dir re-inclusion rules with "NODIR" and "MUSTBEDIR"

2016-03-09 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 12:55 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> Side note, it's probably a bad idea to use basename matching on a >> negative rule (ie. no slashes in the pattern) because what the pattern >> says is "re-include

Re: Change in .gitignore handling: intended or bug?

2016-03-09 Thread Junio C Hamano
Duy Nguyen writes: > A bit off topic, but these two paragraphs may need rephrasing, I don't > really understand what it's trying to say > > - If the pattern does not contain a slash '/', Git treats it as >a shell glob pattern and checks for a match against the >

Re: Change in .gitignore handling: intended or bug?

2016-03-09 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 1:02 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Wed, Mar 9, 2016 at 1:10 AM, Junio C Hamano wrote: >>> diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt >>> index 3ded6fd..91d1ce2

Re: [PATCH 04/19] index-helper: new daemon for caching index and related stuff

2016-03-09 Thread David Turner
On Wed, 2016-03-09 at 15:09 -0800, Junio C Hamano wrote: > David Turner writes: > > > From: Nguyễn Thái Ngọc Duy > > > > Instead of reading the index from disk and worrying about disk > > corruption, the index is cached in memory (memory bit-flips

Re: [PATCH 03/19] read-cache: allow to keep mmap'd memory after reading

2016-03-09 Thread David Turner
On Wed, 2016-03-09 at 15:02 -0800, Junio C Hamano wrote: > David Turner writes: > > > From: Nguyễn Thái Ngọc Duy > > > > Signed-off-by: Nguyễn Thái Ngọc Duy > > --- > > As usual in Duy's patches, this one seriously lacks "why".

Re: [PATCH 01/19] trace.c: add GIT_TRACE_PACK_STATS for pack usage statistics

2016-03-09 Thread David Turner
On Wed, 2016-03-09 at 14:58 -0800, Junio C Hamano wrote: > David Turner writes: ... > > trace_stats() is intended for GIT_TRACE_*_STATS variable group and > > GIT_TRACE_PACK_STATS is more like an example how new vars can be > > added. ... > > + pack_access_nr++; > >

Re: [PATCH 04/19] index-helper: new daemon for caching index and related stuff

2016-03-09 Thread David Turner
On Wed, 2016-03-09 at 15:21 -0800, Junio C Hamano wrote: > Junio C Hamano writes: > > > David Turner writes: > > > > > From: Nguyễn Thái Ngọc Duy > > > > > > Instead of reading the index from disk and worrying about disk > > >

What's cooking in git.git (Mar 2016, #03; Wed, 9)

2016-03-09 Thread Junio C Hamano
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 onto them. Hopefully 2.8-rc2 tomorrow.

Re: [RFC/PATCH 01/48] builtin/apply: avoid parameter shadowing 'p_value' global

2016-03-09 Thread Junio C Hamano
Christian Couder writes: > Signed-off-by: Christian Couder > --- > builtin/apply.c | 24 > 1 file changed, 12 insertions(+), 12 deletions(-) To be honest, I have to say that I do not like this change from

Re: [PATCH 04/19] index-helper: new daemon for caching index and related stuff

2016-03-09 Thread Junio C Hamano
Junio C Hamano writes: > David Turner writes: > >> From: Nguyễn Thái Ngọc Duy >> >> Instead of reading the index from disk and worrying about disk >> corruption, the index is cached in memory (memory bit-flips happen >> too, but

Re: [PATCH 04/19] index-helper: new daemon for caching index and related stuff

2016-03-09 Thread Junio C Hamano
David Turner writes: > From: Nguyễn Thái Ngọc Duy > > Instead of reading the index from disk and worrying about disk > corruption, the index is cached in memory (memory bit-flips happen > too, but hopefully less often). The result is faster read.

Re: [PATCH 03/19] read-cache: allow to keep mmap'd memory after reading

2016-03-09 Thread Junio C Hamano
David Turner writes: > From: Nguyễn Thái Ngọc Duy > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- As usual in Duy's patches, this one seriously lacks "why". And also makes the reader wonder if the memory region is ever unmapped()

Re: [PATCH 01/19] trace.c: add GIT_TRACE_PACK_STATS for pack usage statistics

2016-03-09 Thread Junio C Hamano
David Turner writes: > From: Nguyễn Thái Ngọc Duy > > trace_stats() is intended for GIT_TRACE_*_STATS variable group and > GIT_TRACE_PACK_STATS is more like an example how new vars can be added. > > Signed-off-by: Nguyễn Thái Ngọc Duy

Re: [RFC/PATCH 04/48] builtin/apply: extract line_by_line_fuzzy_match() from match_fragment()

2016-03-09 Thread Stefan Beller
On Wed, Mar 9, 2016 at 9:48 AM, Christian Couder wrote: Some words in the commit message would be nice here as this is one of the patches, which isn't "obviously" a good thing to to. This comment also applies to "builtin/apply: introduce 'struct apply_state' to start

Re: [PATCH] Disown ssh+git and git+ssh

2016-03-09 Thread Junio C Hamano
Eric Sunshine writes: > It might be helpful to cite some reference to support the claim that > they are "silly" since it's not necessarily obvious to readers who did > not following the discussion. > ... >> || starts_with(url, "ssh://") >> +

Re: [PATCH] add a commit.verbose config variable

2016-03-09 Thread Matthieu Moy
Hi, This is v2, right? Then call it [PATCH v2] in the title, and summarize the diff wrt v1. As much as possible, Cc people who participated in the review of v1. Pranit Bauva writes: > Since many people always run the command with this option, and would > prefer not to

Re: [PATCH] t7610-mergetool: add test cases for tempfile behavior

2016-03-09 Thread Junio C Hamano
David Aguilar writes: > Ensure that mergetool.keepTemporaries is honored when resolving > delete/delete conflicts. > > Ensure that stderr stays empty, and that worktree directories > created by mergetool to are removed. > > Signed-off-by: David Aguilar > ---

Re: [PATCH] add a commit.verbose config variable

2016-03-09 Thread Pranit Bauva
A previous version of this patch can be found at http://news.gmane.org/gmane.comp.version-control.git/287540 . The changes in the patch are :- - Fix typo "git config" to "git commit" - Use a better commit message - Drop a paragraph in commit message so as to not misguide readers - Consider

Re: [PATCH v4 0/7] replacing strbuf_getline_lf() by strbuf_getline()

2016-03-09 Thread Junio C Hamano
Moritz Neeb writes: > What I can imagine could lead towards finding regessions, though > maybe a bit aimless: Go through the list of changes/patches that > are supposed to be included in v2.8.0 and confirm they are working > as expected. This would be like a post-review.

Re: [PATCH] rebase -p: avoid grep on potentailly non-ASCII data

2016-03-09 Thread Junio C Hamano
Anders Kaseorg writes: > The autoconf support you committed as 67f1790a has a small bug (the else > cause should omit -a): Thanks. To summarize the discussion, here is what I ended up with. -- >8 -- Subject: [PATCH] sane_grep: pass "-a" if grep accepts it Newer versions of

Re: [PATCH] Also read SQUASH_MSG if a conflict on a merge squash occurred

2016-03-09 Thread Junio C Hamano
Junio C Hamano writes: > Junio C Hamano writes: > >> The duplicated code to read the same file bothers me somewhat. >> >> I wondered if it makes the result easier to follow (and easier to >> update) if this part of the code is restructured like this: >> >>

Re: Git has been accepted as a GSoC 2016 mentor organization!

2016-03-09 Thread Jeff King
On Tue, Mar 08, 2016 at 05:46:25PM -0500, Jeff King wrote: > Most of the resources are just pointers to our GSoC stuff. This does > mean I've effectively signed our mentors up to participate in this > program. I hope that's OK, as it's effectively the same commitment as > GSoC (and obviously we

[PATCH] add a commit.verbose config variable

2016-03-09 Thread Pranit Bauva
Since many people always run the command with this option, and would prefer not to use the argument again and again but instead specify it in the configuration file. Also add a override-verbose option in git-commit if no verbose is required when the commit.verbose is true in the configuration

Re: libcurl dependency for implementing RFC3161 timestamps

2016-03-09 Thread Junio C Hamano
"Anton Wuerfel" writes: > Is there any best-practice how to introduce this libcurl dependency? There > are several options: > > -As git tag is a builtin part of the main git executable, introduce a > libcurl dependency for the main executable (maybe not best-practice). > >

[PATCH 00/19] index-helper, watchman

2016-03-09 Thread David Turner
This is a rebase and extension of Duy's work on git index-helper and watchman support. Patches 1-14 and are more-or-less just Duy's patches, rebased. I fixed up a race condition with signal handling, but otherwise didn't change much. Patch 15 preserves the untracked cache and watchman extensions

[PATCH 01/19] trace.c: add GIT_TRACE_PACK_STATS for pack usage statistics

2016-03-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy trace_stats() is intended for GIT_TRACE_*_STATS variable group and GIT_TRACE_PACK_STATS is more like an example how new vars can be added. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git.txt | 3 +++ cache.h

[PATCH 02/19] read-cache.c: fix constness of verify_hdr()

2016-03-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/read-cache.c b/read-cache.c index d9fb78b..16cc487 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1345,7

[PATCH 03/19] read-cache: allow to keep mmap'd memory after reading

2016-03-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy Signed-off-by: Nguyễn Thái Ngọc Duy --- cache.h | 3 +++ read-cache.c | 13 - 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/cache.h b/cache.h index 7e01403..c43ef3d 100644 --- a/cache.h +++

[PATCH 19/19] hack: watchman/untracked cache mashup

2016-03-09 Thread David Turner
DO NOT APPLY THIS This is a hack to add untracked cache info to the watchman WAMA extension. The idea is that we don't have to stat directories if watchman hasn't told us of any changes in those dirs. If this is the right idea, I can go back and add it to the relevant patch(es). But I want to

[PATCH 15/19] unpack-trees: preserve index extensions

2016-03-09 Thread David Turner
Make git checkout (and other unpack_tree operations) preserve the untracked cache and watchman status. This is valuable for two reasons: 1. Often, an unpack_tree operation will not touch large parts of the working tree, and thus most of the untracked cache will continue to be valid. 2. Even if

[PATCH 12/19] read-cache: allow index-helper to prepare shm before git reads it

2016-03-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy If index-helper puts 'W' before pid in $GIT_DIR/index-helper.pid, then git will sleep for a while, expecting to be waken up by SIGUSR1 when index-helper has done shm preparation, or after the timeout. Signed-off-by: Nguyễn Thái Ngọc Duy

[PATCH 17/19] index-helper: process management

2016-03-09 Thread David Turner
Don't start index-helper when it is already running for a repository. Keep the index-helper pid file's mtime up-to-date. Before starting index-helper, check that (a) the pid file's mtime is recent and (b) there is some process with that pid. Of course, it's possible that the mtime is recent but

[PATCH 14/19] update-index: enable/disable watchman support

2016-03-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/update-index.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/builtin/update-index.c b/builtin/update-index.c index 1c94ca5..7c08e1c 100644 ---

[PATCH 18/19] index-helper: autorun

2016-03-09 Thread David Turner
Introduce a new config option, indexhelper.autorun, to automatically run git index-helper before starting up a builtin git command. This enables users to keep index-helper running without manual intervention. Signed-off-by: David Turner --- git.c |

[PATCH 05/19] trace.c: add GIT_TRACE_INDEX_STATS for index statistics

2016-03-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git.txt | 1 + cache.h | 1 + read-cache.c | 16 trace.c | 5 - 4 files changed, 22 insertions(+), 1 deletion(-)

[PATCH 11/19] Add watchman support to reduce index refresh cost

2016-03-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy The previous patch has the logic to clear bits in 'WAMA' bitmap. This patch has logic to set bits as told by watchman. The missing bit, _using_ these bits, are not here yet. A lot of this code is written by David Turner originally, mostly from [1].

[PATCH 07/19] daemonize(): set a flag before exiting the main process

2016-03-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy This allows signal handlers and atexit functions to realize this situation and not clean up. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/gc.c | 2 +- cache.h | 2 +- daemon.c | 2 +- setup.c | 4 +++- 4 files

[PATCH 13/19] index-helper: use watchman to avoid refreshing index with lstat()

2016-03-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy Watchman is hidden behind index-helper. Before git tries to read the index from shm, it notifies index-helper with SIGHUP and sleep, waiting for index-helper to prepare shm. index-helper then contacts watchman, updates 'WAMA' extension and put it in

[PATCH 10/19] read-cache: add watchman 'WAMA' extension

2016-03-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy The extension contains a bitmap, one bit for each entry in the index. If the n-th bit is zero, the n-th entry is considered unchanged, we can ce_mark_uptodate() it without refreshing. If the bit is non-zero and we found out the corresponding file is

[PATCH 16/19] index-helper: rewrite pidfile after daemonizing

2016-03-09 Thread David Turner
When we daemonize, our pid changes, so we need to rewrite the pid file. Signed-off-by: David Turner --- index-helper.c | 48 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/index-helper.c b/index-helper.c

[PATCH 09/19] index-helper: add Windows support

2016-03-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy Windows supports shared memory, but the semantics is a bit different than POSIX shm. The most noticeable thing is there's no way to get the shared memory's size by the reader, and wrapping fstat to do that would be hell. So the shm size is added near

[PATCH 08/19] index-helper: add --detach

2016-03-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-index-helper.txt | 3 +++ index-helper.c | 10 -- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git

[PATCH 04/19] index-helper: new daemon for caching index and related stuff

2016-03-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy Instead of reading the index from disk and worrying about disk corruption, the index is cached in memory (memory bit-flips happen too, but hopefully less often). The result is faster read. Read time is reduced by 70%. The biggest gain is not having

[PATCH 06/19] index-helper: add --strict

2016-03-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy There's are "holes" in the index-helper approach because the shared memory is not verified again by git. If $USER is compromised, shared memory could be modified. But then they can already modify $GIT_DIR/index. A more realistic risk is some bugs in

git smudge filter fails

2016-03-09 Thread Stephen Morton
A git smudge filter, at least one that relies on the results from 'git log' does not seem to work on file A when doing a 'git update' from a revision where file A doesn't exist to a revision where it does exist. Below is a simple recipe to reproduce. This appears to me to be a bug. If not, why

[PATCH 1/2] gitk: alter the ordering for the "Tags and heads" view

2016-03-09 Thread Michael Rappazzo
In the "Tags and heads" view, the list of refs is globally sorted. Because of this, the list of local refs (heads) can be interrupted by the list of remote refs. This change re-orders the view to be: local refs, remote refs tracked by local refs, remote refs, tags, and then other refs.

[PATCH 2/2] gitk: add an option to enable sorting the "Tags and heads" view by ref type

2016-03-09 Thread Michael Rappazzo
Signed-off-by: Michael Rappazzo --- gitk | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gitk b/gitk index 32fbc50..c933233 100755 --- a/gitk +++ b/gitk @@ -158,6 +158,7 @@ proc parseviewargs {n arglist} { global vdatemode vmergeonly

[PATCH 0/2] gitk: alter the ordering for the "Tags and heads" view

2016-03-09 Thread Michael Rappazzo
In a codebase with a large number of remote branches, the "Tags and heads" view can split the local refs around the name "remotes". I wanted to make this view more useful as a quick view of the refs that are important to me at the moment (the branches that I am actively working on). This patch

Possible bug: --ext-diff ignored with --cc in git log

2016-03-09 Thread Vadim Zeitlin
Hello, I use a combination of git attributes and a custom diff driver to ignore the changes to the generated files (that we unfortunately need to keep in our repository) from appearing in "git diff" and "git log" output, i.e.: % cat .gitattributes # Use a custom diff driver for

Re: [RFC/PATCH 00/48] Libifying git apply

2016-03-09 Thread Junio C Hamano
Christian Couder writes: > One point I'd especially welcome feedback about is the fact that there > are many boolean options that are using OPT_BOOL(...), so they use an > int. And there are a few others that are using OPT_BIT(...), so they > use just a bit. I wonder

Re: [PATCH] Also read SQUASH_MSG if a conflict on a merge squash occurred

2016-03-09 Thread Junio C Hamano
Junio C Hamano writes: > The duplicated code to read the same file bothers me somewhat. > > I wondered if it makes the result easier to follow (and easier to > update) if this part of the code is restructured like this: > > if (file_exists(git_path_merge_msg()) || >

Re: Change in .gitignore handling: intended or bug?

2016-03-09 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Mar 9, 2016 at 1:10 AM, Junio C Hamano wrote: >> diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt >> index 3ded6fd..91d1ce2 100644 >> --- a/Documentation/gitignore.txt >> +++ b/Documentation/gitignore.txt

Re: GIT_CEILING_DIRECTORY

2016-03-09 Thread Barry Warsaw
On Mar 09, 2016, at 09:29 AM, Junio C Hamano wrote: >Let me understand the use case. You have $HOME/.git that governs >everything under $HOME, but there are parts of $HOME/, such as >$HOME/projects/*, that will never be controled by $HOME/.git? Correct. >Two obvious reactions are: > > -

[RFC/PATCH 45/48] builtin/apply: move 'symlink_changes' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 50 -- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 8fda1bd..66ebc9b 100644 --- a/builtin/apply.c +++

Re: [PATCH] dir.c: fix dir re-inclusion rules with "NODIR" and "MUSTBEDIR"

2016-03-09 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Side note, it's probably a bad idea to use basename matching on a > negative rule (ie. no slashes in the pattern) because what the pattern > says is "re-include _any_ directory named 'dir'", not just the directory > "dir" at right below this

[RFC/PATCH 47/48] builtin/apply: move 'state' check into check_apply_state()

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 52 +--- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 1676ce1..3f76469 100644 --- a/builtin/apply.c +++

[RFC/PATCH 46/48] builtin/apply: move 'state' init into init_apply_state()

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 43 --- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 66ebc9b..1676ce1 100644 --- a/builtin/apply.c +++

[RFC/PATCH 43/48] builtin/apply: move 'linenr' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 75 ++--- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 79224fd..3808d60 100644 --- a/builtin/apply.c +++

[RFC/PATCH 48/48] builtin/apply: move applying patches into apply_all_patches()

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 128 ++-- 1 file changed, 69 insertions(+), 59 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 3f76469..9611b1a 100644 --- a/builtin/apply.c +++

[RFC/PATCH 41/48] builtin/apply: move 'ws_ignore_action' into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 37 - 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index d427c3c..dbb9f0b 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@

[RFC/PATCH 44/48] builtin/apply: move 'fn_table' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 45 +++-- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 3808d60..8fda1bd 100644 --- a/builtin/apply.c +++

[RFC/PATCH 37/48] builtin/apply: remove whitespace_option arg from set_default_whitespace_mode()

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 63eb031..3c00551 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -148,10 +148,9 @@ static void

[RFC/PATCH 32/48] builtin/apply: move 'p_value' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 151 +--- 1 file changed, 99 insertions(+), 52 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index fa2940d..8d4a900 100644 --- a/builtin/apply.c +++

[RFC/PATCH 42/48] builtin/apply: move 'max_change' and 'max_len' into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 49 + 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index dbb9f0b..79224fd 100644 --- a/builtin/apply.c +++

[RFC/PATCH 29/48] builtin/apply: move 'patch_input_file' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 70bb51a..e94594d 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -69,6

[RFC/PATCH 30/48] builtin/apply: move 'limit_by_name' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index e94594d..186e451 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -71,6 +71,8 @@

[RFC/PATCH 38/48] builtin/apply: move 'squelch_whitespace_errors' into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 3c00551..a2e1e51 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -81,6 +81,7 @@

[RFC/PATCH 35/48] builtin/apply: move 'whitespace_error' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 8571646..1d665c2 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -78,6

[RFC/PATCH 36/48] builtin/apply: move 'whitespace_option' into 'struct apply_state'

2016-03-09 Thread Christian Couder
This will enable further refactoring. Signed-off-by: Christian Couder --- builtin/apply.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 1d665c2..63eb031 100644 --- a/builtin/apply.c +++

[RFC/PATCH 34/48] builtin/apply: move 'root' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 82 ++--- 1 file changed, 49 insertions(+), 33 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index cb995c8..8571646 100644 --- a/builtin/apply.c +++

[RFC/PATCH 28/48] builtin/apply: move 'lock_file' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 44fdb9d..70bb51a 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -67,6 +67,8 @@ struct

[RFC/PATCH 40/48] builtin/apply: move 'ws_error_action' into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 62 +++-- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 9a2b8af..d427c3c 100644 --- a/builtin/apply.c +++

[RFC/PATCH 33/48] builtin/apply: move 'p_value_known' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 8d4a900..cb995c8 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -67,6 +67,7 @@ struct

[RFC/PATCH 39/48] builtin/apply: move 'applied_after_fixing_ws' into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index a2e1e51..9a2b8af 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -82,6 +82,7 @@ struct

[RFC/PATCH 31/48] builtin/apply: move 'has_include' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 186e451..fa2940d 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -73,6 +73,7 @@ struct apply_state

[RFC/PATCH 06/48] builtin/apply: introduce 'struct apply_state' to start libifying

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 94 ++--- 1 file changed, 56 insertions(+), 38 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 838e46a..462e28f 100644 --- a/builtin/apply.c +++

[RFC/PATCH 11/48] builtin/apply: move 'apply_in_reverse' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 51 --- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 9bc01a8..6bf3024 100644 --- a/builtin/apply.c +++

[RFC/PATCH 23/48] builtin/apply: move 'line_termination' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 0c2fa2e..cc90773 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -60,6 +60,8 @@ struct

[RFC/PATCH 07/48] builtin/apply: move 'newfd' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 462e28f..d56dd9f 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -24,6 +24,7 @@ struct

[RFC/PATCH 14/48] builtin/apply: move 'update_index' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 46 +++--- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 4e0737c..a6026cc 100644 --- a/builtin/apply.c +++

[RFC/PATCH 18/48] builtin/apply: move 'numstat' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index fd5cb7d..0378465 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -37,6 +37,9 @@ struct

[RFC/PATCH 19/48] builtin/apply: move 'summary' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 0378465..1542dcf 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -40,6 +40,8 @@ struct

[RFC/PATCH 09/48] builtin/apply: move 'check' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index d5bc30f..37879de 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -26,12 +26,15 @@ struct

[RFC/PATCH 26/48] builtin/apply: move 'apply' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 6e347e2..6342b61 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -26,6

[RFC/PATCH 27/48] builtin/apply: move 'read_stdin' global into cmd_apply()

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/apply.c b/builtin/apply.c index 6342b61..44fdb9d 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -95,7 +95,6 @@ static enum ws_ignore {

[RFC/PATCH 24/48] builtin/apply: move 'fake_ancestor' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
By the way remove comment about '--index-info' that was renamed '--build-fake-ancestor' in commit 26b28007689d27a921ea90e5a29fc8eb74b0d297 (apply: get rid of --index-info in favor of --build-fake-ancestor, Sep 17 2007). Signed-off-by: Christian Couder ---

[RFC/PATCH 05/48] builtin/apply: move 'options' variable into cmd_apply()

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/apply.c b/builtin/apply.c index 7d7a8ab..838e46a 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -79,7 +79,6 @@ static enum ws_ignore {

[RFC/PATCH 04/48] builtin/apply: extract line_by_line_fuzzy_match() from match_fragment()

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 125 1 file changed, 71 insertions(+), 54 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index c99c859..7d7a8ab 100644 --- a/builtin/apply.c +++

[RFC/PATCH 21/48] builtin/apply: move 'no-add' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index fab731f..ae734cf 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -44,6 +44,8 @@ struct apply_state

[RFC/PATCH 17/48] builtin/apply: move 'diffstat' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 85aa817..fd5cb7d 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -34,6 +34,9 @@ struct

[RFC/PATCH 13/48] builtin/apply: move 'apply_verbosely' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index fcb3c14..4e0737c 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -28,6 +28,7

[RFC/PATCH 15/48] builtin/apply: move 'allow_overlap' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index a6026cc..e3ca5c9 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -26,6 +26,7 @@ struct

[RFC/PATCH 16/48] builtin/apply: move 'cached' global into 'struct apply_state'

2016-03-09 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/apply.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index e3ca5c9..85aa817 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@

  1   2   >