On Mon, Jun 04 2018, Derrick Stolee wrote:
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 11f027194e..d2eb3c8e9b 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -900,7 +900,8 @@ the `GIT_NOTES_REF` environment variable. See
>
On 06/06/18 08:39, Nguyễn Thái Ngọc Duy wrote:
> Make the attr API take an index_state instead of assuming the_index in
> attr code. All call sites are converted blindly to keep the patch
> simple and retain current behavior. Individual call sites may receive
> further updates to use the right
When 7fb6aefd2a (Merge branch 'nd/parseopt-completion' - 2018-03-14)
is merged, the completion for negative form is left out because the
series is alread long and it could be done in a follow up series. This
is it.
--git-completion-helper now provides --no-xxx so that git-completion.bash
can drop
The commands that make use of --git-completion-helper feature could
now produce a lot of --no-xxx options that a command can take. This in
many case could nearly double the amount of completable options, using
more screen estate and also harder to search for the wanted option.
This patch attempts
On 6/6/2018 4:13 AM, Ævar Arnfjörð Bjarmason wrote:
On Mon, Jan 08 2018, Derrick Stolee wrote:
On 1/7/2018 5:42 PM, Ævar Arnfjörð Bjarmason wrote:
On Sun, Jan 07 2018, Derrick Stolee jotted:
git log --oneline --raw --parents
Num Packs | Before MIDX | After MIDX | Rel % | 1 pack %
The commit-graph file stores parents in a two-column portion of the
commit data chunk. If there is only one parent, then the second column
stores 0x to indicate no second parent.
The 'verify' subcommand checks the parent list for the commit loaded
from the commit-graph and the one parsed
The 'verify' subcommand must compare the commit content parsed from the
commit-graph against the content in the object database. Use
lookup_commit() and parse_commit_in_graph_one() to parse the commits
from the graph and compare against a commit that is loaded separately
and parsed directly from
The GRAPH_MIN_SIZE macro should be the smallest size of a parsable
commit-graph file. However, the minimum number of chunks was wrong.
It is possible to write a commit-graph file with zero commits, and
that violates this macro's value.
Rewrite the macro, and use extra macros to better explain the
The commit-graph file requires the following three chunks:
* OID Fanout
* OID Lookup
* Commit Data
If any of these are missing, then the 'verify' subcommand should
report a failure. This includes the chunk IDs malformed or the
chunk count is truncated.
Signed-off-by: Derrick Stolee
---
Signed-off-by: Derrick Stolee
---
builtin/commit-graph.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c
index 37420ae0fd..f0875b8bf3 100644
--- a/builtin/commit-graph.c
+++ b/builtin/commit-graph.c
@@ -51,8 +51,11 @@ static
If the commit-graph file becomes corrupt, we need a way to verify
that its contents match the object database. In the manner of
'git fsck' we will implement a 'git commit-graph verify' subcommand
to report all issues with the file.
Add the 'verify' subcommand to the 'commit-graph' builtin and its
In anticipation of verifying commit-graph file contents against the
object database, create parse_commit_internal() to allow side-stepping
the commit-graph file and parse directly from the object database.
Due to the use of generation numbers, this method should not be called
unless the intention
On Wed, Jun 06 2018, Derrick Stolee wrote:
> Signed-off-by: Derrick Stolee
> ---
> builtin/commit-graph.c | 39 +--
> commit-graph.c | 15 +++
> commit-graph.h | 7 +++
> 3 files changed, 23 insertions(+), 38 deletions(-)
>
Most --no- options do have some use, even if rarely to negate some
option that's specified in an alias.
These options --no-ours and --no-theirs however have no clear
semantics. If I specify "--ours --no-theirs", the second will reset
writeout stage and is equivalent of "--no-ours --no-theirs"
v3 fixes an annoying bug in 3/3. If you do "git commit --fi"
then the "fi" part is eaten up by bash and you got back to
"git commit --" on the command line.
This is because we give COMPREPLY with two options "--fixup" and
"--no-...". The second one forces the common prefix "--" for both
of them,
On Wed, Jun 06 2018, Ævar Arnfjörð Bjarmason wrote:
> On Mon, Jan 08 2018, Derrick Stolee wrote:
>
>> On 1/7/2018 5:42 PM, Ævar Arnfjörð Bjarmason wrote:
>>>
>>> On Sun, Jan 07 2018, Derrick Stolee jotted:
>>>
git log --oneline --raw --parents
Num Packs | Before MIDX | After
Since Linus added auto-sizing for abbreviations in
e6c587c733 ("abbrev: auto size the default abbreviation", 2016-09-30)
we've been less likely to produce a short SHA-1 today that'll collide
on the same repository tomorrow, since before we'd always pick the
bare minimum we could get away with.
On 6 June 2018 at 13:41, SZEDER Gábor wrote:
>
>> On 4 June 2018 at 05:40, Junio C Hamano wrote:
>> Rick van Hattem writes:
>>
>> > > The `git-completion.zsh` unsets the `$ZSH_VERSION` which makes this
>> > > check moot. The result (at least for me) is that zsh segfaults because
>> > > of
On Mon, Jun 04 2018, Derrick Stolee wrote:
> + prepare_alt_odb();
> + for (alt = alt_odb_list; alt; alt = alt->next) {
> + verify_argv[2] = "--object-dir";
> + verify_argv[3] = alt->path;
> + if
> On 4 June 2018 at 05:40, Junio C Hamano wrote:
> Rick van Hattem writes:
>
> > > The `git-completion.zsh` unsets the `$ZSH_VERSION` which makes this check
> > > moot. The result (at least for me) is that zsh segfaults because of all
> > > the variables it's unsetting.
> > > ---
> >
> >
On 6/6/2018 8:11 AM, Ævar Arnfjörð Bjarmason wrote:
On Wed, Jun 06 2018, Derrick Stolee wrote:
Signed-off-by: Derrick Stolee
---
builtin/commit-graph.c | 39 +--
commit-graph.c | 15 +++
commit-graph.h | 7 +++
3 files
On Wed, Jun 06 2018, Derrick Stolee wrote:
> On 6/6/2018 8:11 AM, Ævar Arnfjörð Bjarmason wrote:
>> On Wed, Jun 06 2018, Derrick Stolee wrote:
>>
>>> Signed-off-by: Derrick Stolee
>>> ---
>>> builtin/commit-graph.c | 39 +--
>>> commit-graph.c |
On 6/6/2018 7:08 AM, Ævar Arnfjörð Bjarmason wrote:
On Mon, Jun 04 2018, Derrick Stolee wrote:
+ prepare_alt_odb();
+ for (alt = alt_odb_list; alt; alt = alt->next) {
+ verify_argv[2] = "--object-dir";
+ verify_argv[3] =
On 6/6/2018 8:26 AM, Ævar Arnfjörð Bjarmason wrote:
On Wed, Jun 06 2018, Derrick Stolee wrote:
On 6/6/2018 8:11 AM, Ævar Arnfjörð Bjarmason wrote:
On Wed, Jun 06 2018, Derrick Stolee wrote:
Signed-off-by: Derrick Stolee
---
builtin/commit-graph.c | 39
--
I am Susan Patrick. I have a lucrative/confidential proposal that may
interest you worth (35,000,000.00 GBP), I find it pleasurable to offer
you my partnership contact me for more information:
susanpatr...@consultant.com
Adjust this code that'll be modified in a subsequent change per the
CodingGuidelines.
Signed-off-by: Ævar Arnfjörð Bjarmason
---
config.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config.c b/config.c
index fbbf0f8e9f..12f762ad92 100644
--- a/config.c
+++ b/config.c
The commit-graph file is a very helpful feature for speeding up git
operations. In order to make it more useful, make it possible to
write the commit-graph file during standard garbage collection
operations.
Add a 'gc.commitGraph' config setting that triggers writing a
commit-graph file after any
While iterating through the commit parents, perform the generation
number calculation and compare against the value stored in the
commit-graph.
The tests demonstrate that having a different set of parents affects
the generation number calculation, and this value propagates to
descendants. Hence,
Before verifying a commit-graph file against the object database, we
need to parse all commits from the given commit-graph file. Create
parse_commit_in_graph_one() to target a given struct commit_graph.
Signed-off-by: Derrick Stolee
---
commit-graph.c | 18 +++---
1 file changed, 15
In the 'verify' subcommand, load commits directly from the object
database to ensure they exist. Parse by skipping the commit-graph.
Signed-off-by: Derrick Stolee
---
commit-graph.c | 17 +
t/t5318-commit-graph.sh | 7 +++
2 files changed, 24 insertions(+)
diff
When writing commit-graph files, it can be convenient to ask for all
reachable commits (starting at the ref set) in the resulting file. This
is particularly helpful when writing to stdin is complicated, such as a
future integration with 'git gc'.
Signed-off-by: Derrick Stolee
---
Signed-off-by: Derrick Stolee
---
builtin/commit-graph.c | 39 +--
commit-graph.c | 15 +++
commit-graph.h | 7 +++
3 files changed, 23 insertions(+), 38 deletions(-)
diff --git a/builtin/commit-graph.c
Signed-off-by: Derrick Stolee
---
commit-graph.c | 6 ++
t/t5318-commit-graph.sh | 6 ++
2 files changed, 12 insertions(+)
diff --git a/commit-graph.c b/commit-graph.c
index b97fa05ec9..d83f0ce5d5 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -985,6 +985,12 @@ int
The commit-graph file ends with a SHA1 hash of the previous contents. If
a commit-graph file has errors but the checksum hash is correct, then we
know that the problem is a bug in Git and not simply file corruption
after-the-fact.
Compute the checksum right away so it is the first error that
This is the first of several commits that add a test to check that
'git commit-graph verify' catches corruption in the commit-graph
file. The first test checks that the command catches an error in
the file signature. This is a check that exists in the existing
commit-graph reading code.
Add a
In the commit-graph file, the OID fanout chunk provides an index into
the OID lookup. The 'verify' subcommand should find incorrect values
in the fanout.
Similarly, the 'verify' subcommand should find out-of-order values in
the OID lookup.
Signed-off-by: Derrick Stolee
---
commit-graph.c
Thanks, Ævar, for pointing out that I forgot to rebase onto 'next'.
There were a few collisions with the object-store refactoring. Junio
even pointed them out, so I'm sorry to forget that. I also did a test
merge with 'pu' and it seems the only conflicts are with the earlier
version of this
When lazy-loading a tree for a commit, it will be important to select
the tree from a specific struct commit_graph. Create a new method that
specifies the commit-graph file and use that in
get_commit_tree_in_graph().
Signed-off-by: Derrick Stolee
---
commit-graph.c | 12 +---
1 file
The commit-graph file has an extra chunk to store the parent int-ids for
parents beyond the first parent for octopus merges. Our test repo has a
single octopus merge that we can manipulate to demonstrate the 'verify'
subcommand detects incorrect values in that chunk.
Signed-off-by: Derrick Stolee
The commit-graph feature is now integrated with 'fsck' and 'gc',
so remove those items from the "Future Work" section of the
commit-graph design document.
Also remove the section on lazy-loading trees, as that was completed
in an earlier patch series.
Signed-off-by: Derrick Stolee
---
If core.commitGraph is true, verify the contents of the commit-graph
during 'git fsck' using the 'git commit-graph verify' subcommand. Run
this check on all alternates, as well.
We use a new process for two reasons:
1. The subcommand decouples the details of loading and verifying a
On Wed, Jun 6, 2018 at 12:27 PM, Ævar Arnfjörð Bjarmason
wrote:
> +This setting changes that to `O(1)`, but with the trade-off that
> +depending on the value of `core.abbrev` way may be printing
s/way may be printing/we may be printing/
> +abbreviated hashes that collide. Too see how likely
On Wed, Jun 06 2018, Derrick Stolee wrote:
> diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh
> index c0c1ff09b9..846396665e 100755
> --- a/t/t5318-commit-graph.sh
> +++ b/t/t5318-commit-graph.sh
> @@ -249,6 +249,15 @@ test_expect_success 'git commit-graph verify' '
>
>
Signed-off-by: Nguyễn Thái Ngọc Duy
---
unpack-trees.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/unpack-trees.c b/unpack-trees.c
index 3a85a02a77..5d06aa9c98 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -1545,6 +1545,17 @@ static int verify_uptodate_sparse(const
Signed-off-by: Nguyễn Thái Ngọc Duy
---
unpack-trees.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/unpack-trees.h b/unpack-trees.h
index c2b434c606..534358fcc5 100644
--- a/unpack-trees.h
+++ b/unpack-trees.h
@@ -82,8 +82,8 @@ struct unpack_trees_options {
checkout-index.c needs update because if checkout->istate is NULL,
ie_match_stat() will crash. Previously this is ie_match_stat(_index, ..)
so it will not crash, but it is not technically correct either.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/checkout-index.c | 1 +
entry.c
Since attr checking API now take the index, there's no need to set an
index in advance with this call. Most call sites are straightforward
because they either pass the_index or NULL (which defaults back to
the_index previously). There's only one suspicious call site in
unpack-trees.c where it sets
Signed-off-by: Nguyễn Thái Ngọc Duy
---
attr.h | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/attr.h b/attr.h
index 442d464db6..46340010bb 100644
--- a/attr.h
+++ b/attr.h
@@ -42,31 +42,31 @@ struct attr_check {
struct attr_stack *stack;
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/grep.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/grep.c b/builtin/grep.c
index 2eae397e92..a8cef2b159 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -497,7 +497,7 @@ static int grep_cache(struct grep_opt
Signed-off-by: Nguyễn Thái Ngọc Duy
---
preload-index.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/preload-index.c b/preload-index.c
index d61d7662d5..cc2b579791 100644
--- a/preload-index.c
+++ b/preload-index.c
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2008 Linus
Make the convert API take an index_state instead of assuming the_index
in convert.c. All external call sites are converted blindly to keep
the patch simple and retain current behavior. Individual call sites
may receive further updates to use the right index instead of
the_index.
Signed-off-by:
Make the attr API take an index_state instead of assuming the_index in
attr code. All call sites are converted blindly to keep the patch
simple and retain current behavior. Individual call sites may receive
further updates to use the right index instead of the_index.
There is one ugly temporary
Make the match_patchspec API and friends take an index_state instead
of assuming the_index in dir.c. All external call sites are converted
blindly to keep the patch simple and retain current behavior.
Individual call sites may receive further updates to use the right
index instead of the_index.
On Wed, Jun 6, 2018 at 7:02 AM, Nguyễn Thái Ngọc Duy wrote:
> v2 fixes an incorrect patch splitting (I should have built one more
> time :P) between 3/5 and 4/5. v1's 6/6 is dropped. Brandon suggested a
> better way of doing it which may happen later.
I started looking into Brandon's suggestion,
Prior to fba92be8f7, this code implicitly (and incorrectly) assumes
the_index when running the exclude machinery. fba92be8f7 helps show
this problem clearer because unpack-trees operation is supposed to
work on whatever index the caller specifies... not specifically
the_index.
Update the code to
Signed-off-by: Nguyễn Thái Ngọc Duy
---
submodule.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/submodule.c b/submodule.c
index 955560bdbb..3aed76e3ee 100644
--- a/submodule.c
+++ b/submodule.c
@@ -93,7 +93,7 @@ int update_path_in_gitmodules(const char *oldpath,
Signed-off-by: Nguyễn Thái Ngọc Duy
---
resolve-undo.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/resolve-undo.c b/resolve-undo.c
index 9c45fe5d1d..a4918546c3 100644
--- a/resolve-undo.c
+++ b/resolve-undo.c
@@ -1,3 +1,4 @@
+#define NO_THE_INDEX_COMPATIBILITY_MACROS
Signed-off-by: Nguyễn Thái Ngọc Duy
---
pathspec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pathspec.c b/pathspec.c
index 897cb9cbbe..6f005996fd 100644
--- a/pathspec.c
+++ b/pathspec.c
@@ -37,7 +37,7 @@ void add_pathspec_matches_against_index(const struct pathspec
Signed-off-by: Nguyễn Thái Ngọc Duy
---
convert.h | 56 ---
1 file changed, 29 insertions(+), 27 deletions(-)
diff --git a/convert.h b/convert.h
index 01385d9288..0a0fa15b58 100644
--- a/convert.h
+++ b/convert.h
@@ -57,35 +57,36 @@ struct
While the_index is not actually a macro, its use throughout the code
base is dangerous because developers sometimes may not see that some
function is using the_index (instead of some other index that the devs
are interested in).
By keeping the_index part of this NO_ macro, we try to reduce its
Make some index API take an index_state instead of assuming the_index
in read-cache.c. All external call sites are converted blindly to keep
the patch simple and retain current behavior. Individual call sites
may receive further updates to use the right index instead of the_index.
Signed-off-by:
This function mark_new_skip_worktree() has an argument named the_index
which is also the name of a global variable. While they have different
types (the global the_index is not a pointer) mistakes can easily
happen and it's also confusing for readers. Rename the function
argument to something
Both functions that are updated in this commit are called by
verify_absent(), which is part of the "unpack-trees" operation that is
supposed to work on any index file specified by the caller. Thanks to
Brandon [1] [2], an implicit dependency on the_index is exposed. This
commit fixes it.
In both
write_eolinfo() does take an istate as function argument and it should
be used instead of the_index.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/ls-files.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index
On Mon, Jun 04, 2018 at 11:52:23PM +, brian m. carlson wrote:
> Use the ZERO_OID variable to express the all-zeros object ID so that it
> works with hash algorithms of all sizes.
>
> Signed-off-by: brian m. carlson
> ---
> t/t0027-auto-crlf.sh | 14 +++---
> 1 file changed, 7
Some style nite inline
On Mon, Jun 04, 2018 at 11:52:20PM +, brian m. carlson wrote:
> Add a test function helper, test_translate, that will produce its first
> argument if the hash in use is SHA-1 and the second if its argument is
> NewHash. Implement a mode that can read entries from a
On Mon, Jan 08 2018, Derrick Stolee wrote:
> On 1/7/2018 5:42 PM, Ævar Arnfjörð Bjarmason wrote:
>>
>> On Sun, Jan 07 2018, Derrick Stolee jotted:
>>
>>> git log --oneline --raw --parents
>>>
>>> Num Packs | Before MIDX | After MIDX | Rel % | 1 pack %
>>>
Hi everyone,
We've got a small rebase problem; I'm curious for thoughts about the
best course of action. I'll provide several options below.
In short, while interactive-based and merge-based rebases handle
directory rename detection fine, am-based rebases do not. This
inconsistency may
Test 8 in t5407 appears to be an accidental exact duplicate of of test 5;
the testcode is identical and has identical repo state, but the test
description is different and suggests that rebase -m followed by rebase
--skip was what was actually supposed to be tested. Modify the test to
include the
Signed-off-by: Elijah Newren
---
apply.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apply.c b/apply.c
index d79e61591b..85f2c92740 100644
--- a/apply.c
+++ b/apply.c
@@ -4053,7 +4053,7 @@ static int preimage_oid_in_gitlink_patch(struct patch *p,
struct object_id *oid)
Add a simple directory rename testcase, in conjunction with each of the
types of rebases:
git-rebase--interactive
git-rebase--am
git-rebase--merge
and also use the same testcase for
git am --3way
This demonstrates an inconsistency between the different rebase backends
and which can detect
Am a United State Army here in Afghanistan, am seeking your help to evacuate
the sum of $ 7,000,000 to you as long as I am assured it will be safe That in
your care Until I complete my service here in Afghanistan. This is not stolen
money and there are no dangers involved. I count on your
On Thu, Jun 07, 2018 at 01:16:14AM +0100, Ramsay Jones wrote:
> > Probably. We may want to go the same route as we did for perl in
> > a0e0ec9f7d (t: provide a perl() function which uses $PERL_PATH,
> > 2013-10-28) so that test writers don't have to remember this.
> >
> > That said, I wonder if
On Wed, Jun 06, 2018 at 09:49:09PM -0400, Todd Zullinger wrote:
> Ramsay Jones wrote:
> [...]
> > I don't run the p4 or svn tests, so ... :-D
>
> Heh, lucky you. :)
>
> I try to run them all as part of the fedora builds since
> they cover much more than I'd ever use. That's the main
> reason I
On Thu, Jun 07, 2018 at 12:57:04AM +, brian m. carlson wrote:
> > > Unless I'm wrong, we don't use the "local" keyword ?
> >
> > We've got a test balloon out; see 01d3a526ad (t: check whether the
> > shell supports the "local" keyword, 2017-10-26). I think it's reasonable
> > to consider
On Wed, Jun 06, 2018 at 10:23:53PM -0400, Jeff King wrote:
> Though maybe I am wrong that the remote-svn stuff requires python. I
> thought it did, but poking around, it looks like it's all C, and just
> the "svnrdump_sim" helper is python.
I think I was getting this mixed up with the
On Wed, Jun 06, 2018 at 09:02:23AM +0200, Torsten Bögershausen wrote:
> Nothing wrong with the patch.
> There is, however, a trick in t0027 to transform the different IDs back to a
> bunch of '0'.
> The content of the file use only uppercase letters, and all lowercase ad
> digits
> are converted
I'm going to take the risk of inserting actual real-world data into the mix
rather than just speculation :-)
Here is an example of that the Rsyslog project is doing (main developers based
in Germany). I'll say as someone who's day job has been very involved with GDPR
stuff recently, this
Ramsay Jones wrote:
[...]
> I don't run the p4 or svn tests, so ... :-D
Heh, lucky you. :)
I try to run them all as part of the fedora builds since
they cover much more than I'd ever use. That's the main
reason I noticed the bare python. That would trip me up
when it came time to build on a
On Tuesday 05 June 2018 04:54 PM, SZEDER Gábor wrote:
>
> Though arguably the test name could be more descriptive and tell why
> it should fail.
>
That's arguable, indeed. I was about to send a patch that gives a better
description for the test. I didn't do it as I started wondering, Is it
even
On Wed, Jun 6, 2018 at 6:50 PM, Brandon Williams wrote:
> On 06/06, Nguyễn Thái Ngọc Duy wrote:
>> Make the attr API take an index_state instead of assuming the_index in
>> attr code. All call sites are converted blindly to keep the patch
>> simple and retain current behavior. Individual call
On 06/06, Nguyễn Thái Ngọc Duy wrote:
> Make some index API take an index_state instead of assuming the_index
> in read-cache.c. All external call sites are converted blindly to keep
> the patch simple and retain current behavior. Individual call sites
> may receive further updates to use the
On Wed, Jun 6, 2018 at 1:15 PM, Eric Sunshine wrote:
> On Mon, Jun 4, 2018 at 4:17 PM, Anthony Sottile wrote:
>> + for w in I am all CRLF; do echo $w; done | append_cr >allcrlf &&
>
> Simpler: printf "%s\n" I am all CRLF | append_cr >allcrlf &&
Or even simpler:
printf "%s\r\n" I am all
On 06/06, Nguyễn Thái Ngọc Duy wrote:
> Make the attr API take an index_state instead of assuming the_index in
> attr code. All call sites are converted blindly to keep the patch
> simple and retain current behavior. Individual call sites may receive
> further updates to use the right index
Signed-off-by: Nguyễn Thái Ngọc Duy
---
unpack-trees.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/unpack-trees.c b/unpack-trees.c
index 3a85a02a77..5d06aa9c98 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -1545,6 +1545,17 @@ static int verify_uptodate_sparse(const
Prior to fba92be8f7, this code implicitly (and incorrectly) assumes
the_index when running the exclude machinery. fba92be8f7 helps show
this problem clearer because unpack-trees operation is supposed to
work on whatever index the caller specifies... not specifically
the_index.
Update the code to
v4 fixes some commit messages and killed a couple more the_index
references after I tried to merge this with 'pu'
diff --git a/apply.c b/apply.c
index 811ff2ad5e..82f681972f 100644
--- a/apply.c
+++ b/apply.c
@@ -4090,9 +4090,9 @@ static int build_fake_ancestor(struct apply_state *state,
struct
Signed-off-by: Nguyễn Thái Ngọc Duy
---
unpack-trees.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/unpack-trees.h b/unpack-trees.h
index c2b434c606..534358fcc5 100644
--- a/unpack-trees.h
+++ b/unpack-trees.h
@@ -82,8 +82,8 @@ struct unpack_trees_options {
This function mark_new_skip_worktree() has an argument named the_index
which is also the name of a global variable. While they have different
types (the global the_index is not a pointer) mistakes can easily
happen and it's also confusing for readers. Rename the function
argument to something
Both functions that are updated in this commit are called by
verify_absent(), which is part of the "unpack-trees" operation that is
supposed to work on any index file specified by the caller. Thanks to
Brandon [1] [2], an implicit dependency on the_index is exposed. This
commit fixes it.
In both
On Wed, Jun 6, 2018 at 10:17 AM, Eric Sunshine wrote:
> On Wed, Jun 6, 2018 at 1:15 PM, Eric Sunshine wrote:
>> On Mon, Jun 4, 2018 at 4:17 PM, Anthony Sottile wrote:
>>> + for w in I am all CRLF; do echo $w; done | append_cr >allcrlf &&
>>
>> Simpler: printf "%s\n" I am all CRLF |
On 06/06, Nguyễn Thái Ngọc Duy wrote:
> Since attr checking API now take the index, there's no need to set an
> index in advance with this call. Most call sites are straightforward
> because they either pass the_index or NULL (which defaults back to
> the_index previously). There's only one
On Mon, Jun 4, 2018 at 4:17 PM, Anthony Sottile wrote:
> A regression introduced in 8462ff43e42ab67cecd16fdfb59451a53cc8a945 caused
> autocrlf rewrites to produce a warning message despite setting safecrlf=false.
>
> Signed-off-by: Anthony Sottile
> ---
> diff --git a/t/t0020-crlf.sh
On Wed, Jun 6, 2018 at 1:18 PM, Anthony Sottile wrote:
> On Wed, Jun 6, 2018 at 10:17 AM, Eric Sunshine
> wrote:
>> On Wed, Jun 6, 2018 at 1:15 PM, Eric Sunshine
>> wrote:
>>> On Mon, Jun 4, 2018 at 4:17 PM, Anthony Sottile wrote:
+ for w in I am all CRLF; do echo $w; done |
On Tuesday 05 June 2018 09:01 PM, Duy Nguyen wrote:
> I'll leave it to submodule people to fix this :)
>
I'm Ccing the only one I know to gain attention.
--
Sivaraam
QUOTE:
“The three principal virtues of a programmer are Laziness, Impatience,
and Hubris.”
- Camel book
Sivaraam?
Make some index API take an index_state instead of assuming the_index
in read-cache.c. All external call sites are converted blindly to keep
the patch simple and retain current behavior. Individual call sites
may receive further updates to use the right index instead of the_index.
Signed-off-by:
Signed-off-by: Nguyễn Thái Ngọc Duy
---
apply.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apply.c b/apply.c
index fc42a0eadf..82f681972f 100644
--- a/apply.c
+++ b/apply.c
@@ -4090,7 +4090,7 @@ static int build_fake_ancestor(struct apply_state *state,
struct patch
Signed-off-by: Nguyễn Thái Ngọc Duy
---
resolve-undo.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/resolve-undo.c b/resolve-undo.c
index 383231b011..2377995d6d 100644
--- a/resolve-undo.c
+++ b/resolve-undo.c
@@ -1,3 +1,4 @@
+#define NO_THE_INDEX_COMPATIBILITY_MACROS
Since attr checking API now take the index, there's no need to set an
index in advance with this call. Most call sites are straightforward
because they either pass the_index or NULL (which defaults back to
the_index previously). There's only one suspicious call site in
unpack-trees.c where it sets
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/grep.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/grep.c b/builtin/grep.c
index 2eae397e92..a8cef2b159 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -497,7 +497,7 @@ static int grep_cache(struct grep_opt
1 - 100 of 163 matches
Mail list logo