On Mon, Jan 23, 2017 at 12:27 AM, Junio C Hamano wrote:
> Giuseppe Bilotta writes:
>> +static int allow_or_skip_empty(struct replay_opts *opts, struct commit
>> *commit)
>> {
>> int index_unchanged, empty_commit;
>>
>> /*
>> - * Three cases:
>> + * Four cases:
>>*
When we clone/ pull with : config core.sparsecheckout true
We can specify paths to include. Would be good to explicitly specify
paths to exclude too. So I can include want/
but exclude want/bin/
Similar to .git/info/sparse-checkout can we have a
.git/info/sparse-ignore-checkout optional file?
Lo
Hi,
On Sat, 21 Jan 2017, Philip Oakley wrote:
> From: "Thomas Braun" Friday, January 20, 2017 11:35 PM
> > Am 20.01.2017 um 23:28 schrieb Philip Oakley:
> > > A recent question on stackoverflow
> > > http://stackoverflow.com/questions/41753252/drop-commits-by-commit-message-in-git-rebase
> > > s
Hi,
Short disclaimer: this patch results from work for a client at my
day job at elego Software Solutions GmbH. As such, I'm using my
work mail address and added a new mailmap entry. I wasn't exactly
certain if the mailmap entry should've been created in a separate
commit series, as it has nothing
Signed-off-by: Patrick Steinhardt
---
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index 9c87a3840..ea59205b9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -177,6 +177,7 @@ Paolo Bonzini
Pascal Obry
Pascal Obry
Pat Notz
+Patrick Steinhardt
Paul Mackerra
The URL matching function computes for two URLs whether they match not.
The match is performed by splitting up the URL into different parts and
then doing an exact comparison with the to-be-matched URL.
The main user of `urlmatch` is the configuration subsystem. It allows to
set certain configurat
Attention:
I have to inform you again, that we are not playing over this, I know my reason
for the continuous sending of this
notification to you, the fact is that you can’t seem to trust any one again
over this payment for what you have been in
cantered in many months ago, but I want you to
Good day!
I am contacting you regarding a special cargo that has been abandoned here at
our warehouse for over a period of 2 years and when scanned, it revealed an
undisclosed sum of money in it. From my findings, the cargo originated from
Europe and the content was not declared as money by th
Hi,
The Google Summer of Code 2017 program is launched
(https://summerofcode.withgoogle.com/).
Last year, Pranit Bauva worked on porting "git bisect" from shell to C,
mentored by Christian and Lars (I didn't follow closely, but essentially
many preparatory steps, cleanups and tests were merged in
Hi,
On Mon, 23 Jan 2017, Tushar Kapila wrote:
> When we clone/ pull with : config core.sparsecheckout true
>
> We can specify paths to include. Would be good to explicitly specify
> paths to exclude too.
That is already possible by using "negative patterns", i.e. patterns
preceded by an exclama
On Mon, Jan 9, 2017 at 12:18 PM, Duy Nguyen wrote:
> On Sun, Jan 8, 2017 at 4:38 AM, Junio C Hamano wrote:
>> Christian Couder writes:
>>
>>> It feels strange that when I do things one way, you suggest another
>>> way, and the next time in a similar situation when I do things the way
>>> you sug
Hey Junio,
On Mon, Jan 23, 2017 at 5:05 AM, Junio C Hamano wrote:
> That is too early to tell. At this point we only know there are me
> who won't use it and you who will, among all the other people in the
> world.
We can probably make it useful with some extended efforts. I use
git-blame and I
Previously, when --verify was specified, show-ref would use a separate
code path which did not handle HEAD and treated it as an invalid
ref. Thus, "git show-ref --verify HEAD" (where "--verify" is used
because the user is not interested in seeing refs/remotes/origin/HEAD)
did not work as expected.
Move detection of dangling refs into show_one, so that they are
detected when --verify is present as well as when it is absent.
Signed-off-by: Vladimir Panteleev
---
builtin/show-ref.c | 16
t/t1403-show-ref.sh | 22 ++
2 files changed, 30 insertions(+), 8 d
Third iteration, according to Junio's comments. This time we keep
show_ref and show_one separate, accept HEAD with --verify even without
--head, and add tests for dangling ref validation with --verify.
Move handling of -d into show_one, so that it takes effect when
--verify is present as well as when it is absent. This is useful when
the user wishes to avoid the costly iteration of refs.
Signed-off-by: Vladimir Panteleev
---
builtin/show-ref.c | 23 ---
t/t1403-show-ref.sh
Do the same with --quiet as was done with -d, to remove the need to
perform this check at show_one's call site from the --verify branch.
Signed-off-by: Vladimir Panteleev
---
builtin/show-ref.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/builtin/show-ref.c b/buil
As show_ref is only ever called on the path where --verify is not
specified, `verify' can never possibly be true here.
Signed-off-by: Vladimir Panteleev
---
builtin/show-ref.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index 107d05fe0..2dfcb5634
On 01/18, Brandon Williams wrote:
> On 01/13, Junio C Hamano wrote:
> > Brandon Williams writes:
> >
> > > The last big hurdle towards a thread-safe API for the attribute system
> > > is the reliance on a global attribute stack that is modified during each
> > > call into the attribute system.
>
Giuseppe Bilotta writes:
> Signed-off-by: Giuseppe Bilotta
> ---
> Documentation/git-rebase.txt | 5 +
> git-rebase.sh| 3 ++-
> 2 files changed, 7 insertions(+), 1 deletion(-)
Should we plan to extend this to the interactive backend that is
shared between rebase -i and reb
On Thu, Jan 19, 2017 at 8:00 PM, Junio C Hamano wrote:
> Duy Nguyen writes:
>
>> On Mon, Jan 9, 2017 at 9:34 PM, Junio C Hamano wrote:
>>> Duy Nguyen writes:
>>>
On Sun, Jan 8, 2017 at 4:46 AM, Junio C Hamano wrote:
> Christian Couder writes:
>
>> So what should we do if fres
Giuseppe Bilotta writes:
> By the way, I noticed going over the code that the -allow options are
> not stored, so that in case of interruption they will be reset, is
> this intentional or a bug?
I do not know offhand, but given the history of the two commands, I
would guess it was a bug simply o
larsxschnei...@gmail.com writes:
> Could you fast track the patch to `maint` if it works without trouble on
> `next` (as it should!)?
>
> Notes:
> Base Commit: 787f75f056 (master)
I do not think there is any difference between 'maint' and 'master'
for this file right now, but I still would ha
Thomas Gummerer writes:
> + stash_msg="$*"
> +
> + if test -z stash_msg
A dollar-sign is missing here, I think.
> + then
> + push_stash $push_options
> + else
> + push_stash $push_options -m "$stash_msg"
> + fi
> +}
> On 23 Jan 2017, at 19:22, Junio C Hamano wrote:
>
> larsxschnei...@gmail.com writes:
>
>> Could you fast track the patch to `maint` if it works without trouble on
>> `next` (as it should!)?
>>
>> Notes:
>>Base Commit: 787f75f056 (master)
>
> I do not think there is any difference betwee
Dakota Hawkins writes:
> Apologies for the delayed bump. I think because we're talking about
> affecting the behavior of .gitattributes that it would be better to
> have a distinct .gitattributes option, whether or not you also have a
> similar config option.
As I know I am on the To: line of th
Pranit Bauva writes:
> We can probably make it useful with some extended efforts. I use
> git-blame and I sometimes find that I don't need things like the name
> of the author, time, timezone and not even the file name and I have to
> use a bigger terminal. If we could somehow remove those fields
Lars Schneider writes:
> The `perforce` and `perforce-server` package were moved from brew [1][2]
> to cask [3]. Teach TravisCI the new location.
>
> Perforce updates their binaries without version bumps. That made the
> brew install (legitimately!) fail due to checksum mismatches. The
> workarou
> On 23 Jan 2017, at 19:35, Junio C Hamano wrote:
>
> Dakota Hawkins writes:
>
>> Apologies for the delayed bump. I think because we're talking about
>> affecting the behavior of .gitattributes that it would be better to
>> have a distinct .gitattributes option, whether or not you also have a
Thomas Gummerer writes:
> diff --git a/git-stash.sh b/git-stash.sh
> index d6b4ae3290..7dcce629bd 100755
> --- a/git-stash.sh
> +++ b/git-stash.sh
> @@ -41,7 +41,7 @@ no_changes () {
> untracked_files () {
> excl_opt=--exclude-standard
> test "$untracked" = "all" && excl_opt=
> -
Christian Couder writes:
> Also in general the split-index mode is useful when you often write
> new indexes, and in this case shared index files that are used will
> often be freshened, so the risk of deleting interesting shared index
> files should be low.
> ...
>> Not that I think freshening w
"brian m. carlson" writes:
> There are two major processors of AsciiDoc: AsciiDoc itself, and Asciidoctor.
> Both have advantages and disadvantages, but traditionally the documentation
> has
> been built with AsciiDoc, leading to some surprising breakage when building
> with
> Asciidoctor. Par
René Scharfe writes:
> Implement qsort_s() as a wrapper to the GNU version of qsort_r(1) and
> use it on Linux. Performance increases slightly:
>
> Test HEAD^ HEAD
>
> 0071.2: sort(1)
Lars Schneider writes:
> Problem:
> Git attributes for path names are generally case sensitive. However, on
> a case insensitive file system (e.g. macOS/Windows) they appear to be
> case insensitive (`*.bar` would match `foo.bar` and `foo.BAR`). That
> works great until a Git users joins the pa
Junio C Hamano writes:
> So you are worried about the case where somebody on a case
> insensitive but case preserving system would do
>
> $ edit file.txt
> $ edit .gitattributes
> $ git add file.txt .gitattributes
>
> and adds "*.TXT someattr=true" to the attributes file, which
Patrick Steinhardt writes:
> This patch is mostly a request for comments. The use case is to
> be able to configure an HTTP proxy for all subdomains of a
> certain domain where there are hundreds of subdomains. The most
> flexible way I could imagine was by using regular expressions for
> the mat
Christian Couder writes:
>>> Perhaps we should declare that config will be the one and only way
>>> in the future and start deprecating the command line option way.
>>> That will remove the need for two to interact with each other.
>
> That would be my preferred solution as I think it is the simp
On Mon, Jan 23, 2017 at 7:13 PM, Junio C Hamano wrote:
>
> Should we plan to extend this to the interactive backend that is
> shared between rebase -i and rebase -m, too? Or is this patch
> already sufficient to cover them?
AFAIK this is sufficient for both, in the sense that I've used it with
g
Vladimir Panteleev writes:
> Third iteration, according to Junio's comments. This time we keep
> show_ref and show_one separate, accept HEAD with --verify even without
> --head, and add tests for dangling ref validation with --verify.
I am no longer a neutral judge but to me the resulting code l
On Mon, Jan 23, 2017 at 7:15 PM, Junio C Hamano wrote:
> Giuseppe Bilotta writes:
>
>> By the way, I noticed going over the code that the -allow options are
>> not stored, so that in case of interruption they will be reset, is
>> this intentional or a bug?
>
> I do not know offhand, but given the
Giuseppe Bilotta writes:
> ... I still don't see how to force a complete reread of the index
> after running a git reset (which I need for the --skip command), ...
Do you mean discard_index() or discard_cache() followed by
read_index() or read_cache(), or do you mean something more
elaborate?
Giuseppe Bilotta writes:
> On Mon, Jan 23, 2017 at 7:13 PM, Junio C Hamano wrote:
>>
>> Should we plan to extend this to the interactive backend that is
>> shared between rebase -i and rebase -m, too? Or is this patch
>> already sufficient to cover them?
>
> AFAIK this is sufficient for both, i
From: Junio C Hamano
When 82dce998 (attr: more matching optimizations from .gitignore,
2012-10-15) changed a pointer to a string "*pattern" into an
embedded "struct pattern" in struct match_attr, it forgot to update
the comment that describes the structure.
Signed-off-by: Junio C Hamano
Signed-
From: Junio C Hamano
Signed-off-by: Junio C Hamano
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
commit.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/commit.c b/commit.c
index 2cf85158b..0c4ee3de4 100644
--- a/commit.c
+++ b/commit.c
@@ -415,8 +415
From: Junio C Hamano
The double-loop wants to do an early return immediately when one
matching macro is found. Eliminate the extra variable 'a' used for
that purpose and rewrite the "assign the found item to 'a' to make
it non-NULL and force the loop(s) to terminate" with a direct return
from th
From: Junio C Hamano
Signed-off-by: Junio C Hamano
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
attr.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/attr.c b/attr.c
index 007f1a299..6b55a57ef 100644
--- a/attr.c
+++ b/attr.c
@@ -183,6 +183,12 @@ static const ch
From: Junio C Hamano
Signed-off-by: Junio C Hamano
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
attr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/attr.c b/attr.c
index 6b55a57ef..9bdf87a6f 100644
--- a/attr.c
+++ b/attr.c
@@ -300,7 +300,7 @@ static
From: Nguyễn Thái Ngọc Duy
Full pattern must be quoted. So 'pat"t"ern attr' will give exactly
'pat"t"ern', not 'pattern'. Also clarify that leading whitespaces are
not part of the pattern and document comment syntax.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
Signed-off-
From: Stefan Beller
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
Documentation/gitattributes.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 3173dee7e..a53d093ca 100644
--- a/Doc
From: Junio C Hamano
Signed-off-by: Junio C Hamano
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
attr.c | 40 +++-
1 file changed, 39 insertions(+), 1 deletion(-)
diff --git a/attr.c b/attr.c
index 8026d68bd..50e5ee393 100644
--- a/attr.
From: Junio C Hamano
If any error is noticed after the match_attr structure is allocated,
we shouldn't just return NULL from this function.
Add a fail_return label that frees the allocated structure and
returns NULL, and consistently jump there when we want to return
NULL after cleaning up.
Sig
From: Junio C Hamano
Signed-off-by: Junio C Hamano
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
attr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/attr.c b/attr.c
index 1fcf042b8..04d24334e 100644
--- a/attr.c
+++ b/attr.c
@@ -402,8 +402,8 @@ st
Changes in v2:
* surround the mutex initializer calls by #ifdef
* mark file-local symbol static
* handling of attribute stacks. Instead of storing each stack frame in a
hashmap, there is a stack per attr_check instance. This will allow for
easier optimizing of the stack in future patches as w
From: Junio C Hamano
There are too many repetitious "I have this new attr_stack element;
push it at the top of the stack" sequence. The new helper function
push_stack() gives us a way to express what is going on at these
places, and as a side effect, halves the number of times we mention
the att
From: Junio C Hamano
Convert 'invalid_attr_name()' to 'attr_name_valid()' and use positive
logic for the return value. In addition create a helper function that
prints out an error message when an invalid attribute name is used.
We could later update the message to exactly spell out what the
ru
From: Junio C Hamano
The traditional API to check attributes is to prepare an N-element
array of "struct git_attr_check" and pass N and the array to the
function "git_check_attr()" as arguments.
In preparation to revamp the API to pass a single structure, in
which these N elements are held, rena
Currently there is a reliance on 'check_all_attr' which is a global
array of 'attr_check_item' items which is used to store the value of
each attribute during the collection process.
This patch eliminates this global and instead creates an array per
'attr_check' instance which is then used in the
Signed-off-by: Brandon Williams
---
attr.c | 14 +++---
attr.h | 2 +-
builtin/check-attr.c | 3 ++-
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/attr.c b/attr.c
index ed9ba3756..95456503e 100644
--- a/attr.c
+++ b/attr.c
@@ -209,7 +209,7 @
Whether or not a git attribute is real or a macro isn't a property of
the attribute but rather it depends on the attribute stack (which
.gitattribute files were read).
This patch removes the 'maybe_real' and 'maybe_macro' fields in a
git_attr and instead adds the 'macro' field to a attr_check_item
From: Junio C Hamano
This updates the other two ways the attribute check is done via an
array of "struct attr_check_item" elements. These two niches
appear only in "git check-attr".
* The caller does not know offhand what attributes it wants to ask
about and cannot use attr_check_initl() to
The current implementation of the attribute dictionary uses a custom
hashtable. This modernizes the dictionary by converting it to the builtin
'hashmap' structure.
Also, in order to enable a threaded API in the future add an
accompanying mutex which must be acquired prior to accessing the
diction
From: Junio C Hamano
It holds an interned string, and git_attr_name() is a way to peek
into it. Make sure the involved pointer types are pointer-to-const.
Signed-off-by: Junio C Hamano
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
attr.c | 2 +-
attr.h | 4 ++--
2 files c
From: Junio C Hamano
Since nobody uses the old API, make it file-scope static, and update
the documentation to describe the new API.
Signed-off-by: Junio C Hamano
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
Documentation/technical/api-gitattributes.txt | 86 +
From: Junio C Hamano
A common pattern to check N attributes for many paths is to
(1) prepare an array A of N attr_check_item items;
(2) call git_attr() to intern the N attribute names and fill A;
(3) repeatedly call git_check_attrs() for path with N and A;
A look-up for these N attributes fo
From: Junio C Hamano
Signed-off-by: Junio C Hamano
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
attr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/attr.c b/attr.c
index 9bdf87a6f..17297fffe 100644
--- a/attr.c
+++ b/attr.c
@@ -469,7 +469,7 @@ static
From: Junio C Hamano
The remaining callers are all simple "I have N attributes I am
interested in. I'll ask about them with various paths one by one".
After this step, no caller to git_check_attrs() remains. After
removing it, we can extend "struct attr_check" struct with data
that can be used
The old callchain used to take an array of attr_check_item items.
Instead pass the 'attr_check' container object to 'collect_some_attrs()'
and access the fields in the data structure directly.
Signed-off-by: Brandon Williams
---
attr.c | 33 +
1 file changed, 13 i
Move the 'git_attr_set_direction()' up to be closer to the variables
that it modifies as well as a small formatting by renaming the variable
'new' to 'new_direction' so that it is more descriptive.
Update the comment about how 'direction' is used to read the state of
the world. It should be noted
Push the bare repository check into the 'read_attr()' function. This
avoids needing to have extra logic which creates an empty stack frame
when inside a bare repo as a similar bit of logic already exists in the
'read_attr()' function.
Signed-off-by: Brandon Williams
---
attr.c | 114 +++
The last big hurdle towards a thread-safe API for the attribute system
is the reliance on a global attribute stack that is modified during each
call into the attribute system.
This patch removes this global stack and instead a stack is stored
locally in each attr_check instance. This opens up the
Brandon Williams writes:
> Currently there is a reliance on 'check_all_attr' which is a global
> array of 'attr_check_item' items which is used to store the value of
> each attribute during the collection process.
>
> This patch eliminates this global and instead creates an array per
> 'attr_chec
Brandon Williams writes:
> The last big hurdle towards a thread-safe API for the attribute system
> is the reliance on a global attribute stack that is modified during each
> call into the attribute system.
The same comment as 22/27 applies here.
It is not an immediate problem we need to solv
On 01/23, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > The last big hurdle towards a thread-safe API for the attribute system
> > is the reliance on a global attribute stack that is modified during each
> > call into the attribute system.
>
> The same comment as 22/27 applies here.
>
On Mon, Jan 23, 2017 at 9:10 PM, Junio C Hamano wrote:
> Giuseppe Bilotta writes:
>
>> ... I still don't see how to force a complete reread of the index
>> after running a git reset (which I need for the --skip command), ...
>
> Do you mean discard_index() or discard_cache() followed by
> read_in
On Mon, Jan 23, 2017 at 9:16 PM, Junio C Hamano wrote:
> Giuseppe Bilotta writes:
>
>> On Mon, Jan 23, 2017 at 7:13 PM, Junio C Hamano wrote:
>>>
>>> Should we plan to extend this to the interactive backend that is
>>> shared between rebase -i and rebase -m, too? Or is this patch
>>> already su
This allows cherry-picking a set of commits, some of which may be
redundant, without stopping to ask for the user intervention.
Signed-off-by: Giuseppe Bilotta
---
Documentation/git-cherry-pick.txt | 4
builtin/revert.c | 1 +
sequencer.c | 45 ++
This series introduces a few options to the sequencer,
to allow skipping unwanted/unnecessary commits.
The first patch is just cleanup. The second fixes a potential issue
about sequencing options not being correctly remembered across
interruptions.
The next two introduce cherry-pick options to sk
Add the missing replay_opts to save_opts and populate_opts, so that an
interrupted cherry-pick will continue with the same setup it had before
the interruption.
Signed-off-by: Giuseppe Bilotta
---
sequencer.c | 16
1 file changed, 16 insertions(+)
diff --git a/sequencer.c b/seq
No functional change. The order in which options are serialized and
reloaded is now the same in which they appear in the replay_opts
structure. This makes it easier to spot when we forget to
serialize/reload an option value.
Signed-off-by: Giuseppe Bilotta
---
sequencer.c | 24 --
If a sequencing gets interrupted (by a conflict or an empty commit or
whatever), the user can now opt to just skip it passing the `--skip`
command line option, which acts like a `--continue`, except that the
current commit gets skipped.
Signed-off-by: Giuseppe Bilotta
---
Documentation/sequencer
This allows the preservation of originally empty commits with the
combination of flags --allow-empty --skip-redundant-commits.
Signed-off-by: Giuseppe Bilotta
---
Documentation/git-cherry-pick.txt | 8 -
builtin/revert.c | 18 +++-
sequencer.c
Giuseppe Bilotta writes:
> On Mon, Jan 23, 2017 at 9:16 PM, Junio C Hamano wrote:
>> Giuseppe Bilotta writes:
>>
>>> On Mon, Jan 23, 2017 at 7:13 PM, Junio C Hamano wrote:
Should we plan to extend this to the interactive backend that is
shared between rebase -i and rebase -m, to
On Sun, Jan 22, 2017 at 06:47:18PM +0100, René Scharfe wrote:
> Use qsort_s() from C11 Annex K to make string_list_sort() safer, in
> particular when called from parallel threads.
>
> Changes from v1:
> * Renamed HAVE_QSORT_S to HAVE_ISO_QSORT_S in Makefile to disambiguate.
> * Added basic perf t
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.
You can find the changes described
As I've mentioned before, I have some alternates repositories with
absurd numbers of refs, most of which are duplicates of each other[1].
There are a couple of problems I've seen:
1. the way that for_each_alternate_ref() works has very high peak memory
usage for this case
2. the way that re
In older versions of git, if real_path() failed to resolve
the alternate object store path, we would die() with an
error. However, since 4ac9006f8 (real_path: have callers use
real_pathdup and strbuf_realpath, 2016-12-12) we use the
real_pathdup() function, which may return NULL. Since we
don't che
The real_pathdup() function will have removed extra slashes
for us already (on top of the normalize_path() done when we
created the alternate_object_database struct in the first
place).
Incidentally, this also fixes the case where the path is
just "/", which would read off the start of the array.
We have a string with ".../objects" pointing to the
alternate object store, and overwrite bits of it to look at
other paths in the (potential) git repository holding it.
This works because the only path we care about is "refs",
which is shorter than "objects".
Using a strbuf to hold the path lets
Breaking down the fields in the interface makes it easier to
change the backend of for_each_alternate_ref to something
that doesn't use "struct ref" internally.
The only field that callers actually look at is the oid,
anyway. The refname is kept in the interface as a plausible
thing for future cod
The current method for getting the refs from an alternate is
to run upload-pack in the alternate and parse its output
using the normal transport code. This works and is
reasonably short, but it has a very bad memory footprint
when there are a lot of refs in the alternate. There are two
problems:
Normally git caches the raw commit object contents in
"struct commit". This makes it fast to run parse_commit()
followed by a pretty-print operation.
For commands which don't actually pretty-print the commits,
the caching is wasteful (and may use quite a lot of memory
if git accesses a large numbe
We may run for_each_alternate_ref() twice, once in
find_common() and once in everything_local(). This operation
can be expensive, because it involves running a sub-process
which must freshly load all of the alternate's refs from
disk.
Let's cache and reuse the results between the two calls. We
can
This is similar to many of our uses of sha1-array, but it
overcomes one limitation of a sha1-array: when you are
de-duplicating a large input with relatively few unique
entries, sha1-array uses 20 bytes per non-unique entry.
Whereas this set will use memory linear in the number of
unique entries (a
If you have an alternate object store with a very large
number of refs, the peak memory usage of the sha1_array can
grow high, even if most of them are duplicates that end up
not being printed at all.
The similar for_each_alternate_ref() code-paths in
fetch-pack solve this by using flags in "struc
The comment claims that we handle alternate ".have" lines
through this function, but that hasn't been the case since
85f251045 (write_head_info(): handle "extra refs" locally,
2012-01-06).
Signed-off-by: Jeff King
---
builtin/receive-pack.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(
Namely, de-duplicate them. We use the same set as the
alternates, since we call them both ".have" (i.e., there is
no value in showing one versus the other).
Signed-off-by: Jeff King
---
builtin/receive-pack.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/builtin/
We de-duplicate ".have" refs among themselves, but never
check if they are duplicates of our local refs. It's not
unreasonable that they would be if we are a "--shared" or
"--reference" clone of a similar repository; we'd have all
the same tags.
We can handle this by inserting our local refs into
On 01/23, Brandon Williams wrote:
> As we discussed off-line I'll also do the rework to break up the
> question and result. That way two threads can be executing using the
> same attr_check structure.
Thinking about this I don't really see what we would gain by breaking
them up.
Right now most c
On Sun, Jan 22, 2017 at 08:30:21PM +0100, Benjamin Fuchs wrote:
> Fixing wrong git diff line.
This patch says 3/3, but I don't see 1 and 2. Also, this description
doesn't tell me what the problem is, or why this fix is useful. Such
information helps us down the line when looking at the history,
On 01/23, Jeff King wrote:
>
> A brief overview of the patches:
>
> [01/12]: for_each_alternate_ref: handle failure from real_pathdup()
> [02/12]: for_each_alternate_ref: stop trimming trailing slashes
> [03/12]: for_each_alternate_ref: use strbuf for path allocation
>
> Bugfixes and c
1 - 100 of 108 matches
Mail list logo