Stefan Beller writes:
> diff --git a/t/t2013-checkout-submodule.sh b/t/t2013-checkout-submodule.sh
> index e8f70b806f..2672f104cf 100755
> --- a/t/t2013-checkout-submodule.sh
> +++ b/t/t2013-checkout-submodule.sh
> @@ -65,9 +65,9 @@ test_expect_success '"checkout " honors
> submodule.*.ignore fr
On Mon, May 22, 2017 at 9:45 PM, Andreas Heiduk wrote:
> The manual for "git interpret-trailers" mentioned a non-existing
> literal `overwrite` for its config option `trailer.ifexists`. Fixed
> by using `replace` instead.
Yeah, I forgot to change it to `replace` there.
> Signed-off-by: Andreas H
Stefan Beller writes:
> diff --git a/submodule.c b/submodule.c
> index d3299e29c0..428c996c97 100644
> --- a/submodule.c
> +++ b/submodule.c
> ...
> @@ -547,15 +543,16 @@ void show_submodule_inline_diff(FILE *f, const char
> *path,
> if (right)
> new = two;
>
> - fflush
Thanks. I'll fix s/is/if/ on the title (no need to resend to fix
only the subject).
Thanks.
Lars Schneider writes:
>>> + sigchain_pop(SIGPIPE);
>>> +
>>> + if (err || errno == EPIPE) {
>>
>> This looks strange, at first glance.
>> Do we set errno to 0 before ?
>> Or is there a trick that EPIPE can only be reached,
>> if it is "our" error ?
>
> You are right and I'll fix it!
> Than
Jonathan Nieder writes:
> Junio C Hamano wrote:
>> Jonathan Nieder writes:
>>> Junio C Hamano wrote:
>
* bw/forking-and-threading (2017-05-15) 14 commits
> [...]
The "run-command" API implementation has been made more robust
against dead-locking in a threaded environment.
>
Junio C Hamano wrote:
> Jonathan Nieder writes:
>> Junio C Hamano wrote:
>>> * bw/forking-and-threading (2017-05-15) 14 commits
[...]
>>> The "run-command" API implementation has been made more robust
>>> against dead-locking in a threaded environment.
>>>
>>> Will merge to 'next'.
>>
>> What'
Félix Saparelli writes:
> I created a git repository that, for joke reasons, has a single branch
> called MASTER (in uppercase). Upon cloning this repo, git attempts to
> checkout the master branch (in lowercase), which does not exist.
See what Git told you carefully and you can guess, I think.
Jonathan Nieder writes:
> Junio, how do you prefer to handle this in git.git? Would you need to
> amend the patch to remove the git-gui/.gitattributes change and wait
> to get it from Pat, or is getting the same change twice okay?
Yes, getting the same change twice should be fine. I'll see
con
Jonathan Nieder writes:
> Junio C Hamano wrote:
>
>> * bw/forking-and-threading (2017-05-15) 14 commits
>> - usage.c: drop set_error_handle()
>> - run-command: restrict PATH search to executable files
>> - run-command: expose is_executable function
>> - run-command: block signals between fork
Ramsay Jones writes:
> Having said that, I rarely run sparse over just one file (except
> when fixing a sparse error/warning). On each branch (master->next->pu)
> I do
>
> $ make sparse >sp-out 2>&1 # nsp-out on 'next', psp-out on 'pu'
>
> ... so that I can diff the files from branch to branc
Stefan Beller writes:
> On Mon, May 22, 2017 at 3:27 PM, Junio C Hamano wrote:
>> Ævar Arnfjörð Bjarmason writes:
>>
>>> I liked the suggestion to make the URL a relative path, but this would
>>> require you to maintain a mirror in the same places you push git.git
>>> to, is that something you
Junio C Hamano writes:
> Jeff King writes:
>
>> I suspect that's more work because we'd need to refactor pretty.c a bit
>> to make the right functionality available. But the end result would be
>> much more maintainable.
>
> I actually think the entire codeflow of "find positions and length
> of
On Mon, May 22, 2017 at 2:17 AM, Junio C Hamano wrote:
> Samuel Lijin writes:
>
>>> By the way, instead of putting NULL, it may be easier to follow if
>>> you used two pointers, src and dst, into dir.entries[], just like
>>> you did in your latest version of [PATCH 4/6]. That way, you do not
>>>
When a patch consists mostly of moving blocks of code around, it can
be quite tedious to ensure that the blocks are moved verbatim, and not
undesirably modified in the move. To that end, color blocks that are
moved within the same patch differently. For example (OM, del, add,
and NM are different c
In a later patch we want to do more things before and after all filepairs
are flushed. So factor flushing out all file pairs into its own function
that the new code can be plugged in easily.
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 17 -
1 file cha
In a later patch, I want to propose an option to detect&color
moved lines in a diff, which cannot be done in a one-pass over
the diff. Instead we need to go over the whole diff twice,
because we cannot detect the first line of the two corresponding
lines (+ and -) that got moved.
So to prepare the
In a later patch, I want to propose an option to detect&color
moved lines in a diff, which cannot be done in a one-pass over
the diff. Instead we need to go over the whole diff twice,
because we cannot detect the first line of the two corresponding
lines (+ and -) that got moved.
So to prepare the
In a later patch, I want to propose an option to detect&color
moved lines in a diff, which cannot be done in a one-pass over
the diff. Instead we need to go over the whole diff twice,
because we cannot detect the first line of the two corresponding
lines (+ and -) that got moved.
So to prepare the
In a later patch, I want to propose an option to detect&color
moved lines in a diff, which cannot be done in a one-pass over
the diff. Instead we need to go over the whole diff twice,
because we cannot detect the first line of the two corresponding
lines (+ and -) that got moved.
So to prepare the
In a later patch, I want to propose an option to detect&color
moved lines in a diff, which cannot be done in a one-pass over
the diff. Instead we need to go over the whole diff twice,
because we cannot detect the first line of the two corresponding
lines (+ and -) that got moved.
So to prepare the
Currently, diff output is written either through the emit_line_0
function or through the FILE * in struct diff_options directly. To
make it easier to teach diff to buffer its output (which will be done
in a subsequent commit), introduce a more flexible emit_line() function.
In this commit, direct u
In a later patch, I want to propose an option to detect&color
moved lines in a diff, which cannot be done in a one-pass over
the diff. Instead we need to go over the whole diff twice,
because we cannot detect the first line of the two corresponding
lines (+ and -) that got moved.
So to prepare the
In a later patch, I want to propose an option to detect&color
moved lines in a diff, which cannot be done in a one-pass over
the diff. Instead we need to go over the whole diff twice,
because we cannot detect the first line of the two corresponding
lines (+ and -) that got moved.
So to prepare the
In a later patch, I want to propose an option to detect&color
moved lines in a diff, which cannot be done in a one-pass over
the diff. Instead we need to go over the whole diff twice,
because we cannot detect the first line of the two corresponding
lines (+ and -) that got moved.
So to prepare the
In a later patch, I want to propose an option to detect&color
moved lines in a diff, which cannot be done in a one-pass over
the diff. Instead we need to go over the whole diff twice,
because we cannot detect the first line of the two corresponding
lines (+ and -) that got moved.
So to prepare the
Introduce a new option 'use_buffer' in the struct diff_options which
controls whether all output is buffered up until all output is available.
We'll have a new struct 'diff_line' in diff.h which will be used to buffer
each line. The diff_line will duplicate the memory of the line to buffer
as tha
Currently any whitespace highlighting happens outside the emit_line
function. Teach the highlighting to emit_line, triggered by a new
parameter.
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 107 ++---
diff.h
In a later patch, I want to propose an option to detect&color
moved lines in a diff, which cannot be done in a one-pass over
the diff. Instead we need to go over the whole diff twice,
because we cannot detect the first line of the two corresponding
lines (+ and -) that got moved.
So to prepare the
The emit_hunk_header() function is responsible for assembling a
hunk header and calling emit_line() to send the hunk header
to the output file. Its only caller fn_out_consume() needs
to prepare for a case where the function emits an incomplete
line and add the terminating LF.
Instead make sure em
We already have dereferenced 'p->two' into a local variable 'two'. Use
that.
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
diff.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/diff.c b/diff.c
index 74283d9001..3f5bf8b5a4 100644
--- a/diff.c
+++ b/diff.
v4:
* interdiff to v3 (what is currently origin/sb/diff-color-move) below.
* renamed the "buffered_patch_line" to "diff_line". Originally I planned
to not carry the "line" part as it can be a piece of a line as well.
But for the intended functionality it is best to keep the name.
If we'd want
Jeff King writes:
> I suspect that's more work because we'd need to refactor pretty.c a bit
> to make the right functionality available. But the end result would be
> much more maintainable.
I actually think the entire codeflow of "find positions and length
of threeparts" using find_subpos() and
Jeff King writes:
> On Mon, May 22, 2017 at 10:19:52AM +0900, Junio C Hamano wrote:
>
>> However.
>>
>> If you look at how `git branch -v` before that problematic change
>> removed the extra CR, you would notice that pretty_print_commit()
>> was used for that, which eventually called format_subj
On Tue, May 16, 2017 at 5:02 AM, Jeff King wrote:
> On Tue, May 16, 2017 at 02:11:40AM +0100, Ramsay Jones wrote:
>
>>
>> If you need to re-roll your 'jk/bug-to-abort' branch, could you please
>> squash this into the relevant patch (commit d8193743e0 "usage.c: add
>> BUG() function", 12-05-2017).
Hi,
I'm using git bundles to create (incremental) backups of my local repositories.
This works quite well but for certain repositories I'm getting unexpectedly big
incremental bundles. I did some testing and from what I can tell it seems
git-bundle-create has issues processing revs passed via std
On Thu, May 18, 2017 at 4:33 PM, Jonathan Tan wrote:
> I know I suggested the paragraph above, but after rereading your patch
> set, I think I finally understand what you're trying to accomplish.
> I think it's better to combine patches 4/20, 5/20, and 6/20, with the
> following commit message:
What work is remaining for prune-in-worktree? Link to the relevant discussions?
I might be able to take it over the finish line. (No guarantees)
-Manish Goregaokar
On Mon, May 22, 2017 at 4:17 AM, Duy Nguyen wrote:
> On Sat, May 20, 2017 at 5:30 PM, Junio C Hamano wrote:
>> By the way, doesn't
On Mon, May 22, 2017 at 3:27 PM, Junio C Hamano wrote:
> Ævar Arnfjörð Bjarmason writes:
>
>> I liked the suggestion to make the URL a relative path, but this would
>> require you to maintain a mirror in the same places you push git.git
>> to, is that something you'd be willing to do?
>
> After
Ævar Arnfjörð Bjarmason writes:
> I liked the suggestion to make the URL a relative path, but this would
> require you to maintain a mirror in the same places you push git.git
> to, is that something you'd be willing to do?
After thinking about this a bit more, I know what I think we want a
bit
Hi,
I created a git repository that, for joke reasons, has a single branch
called MASTER (in uppercase). Upon cloning this repo, git attempts to
checkout the master branch (in lowercase), which does not exist.
Checking out the MASTER branch manually afterwards works.
$ git clone g...@github.com:p
On Mon, May 22, 2017 at 7:17 AM, Michael Haggerty wrote:
> This is the second iteration of a patch series that prepares the
> ground for separating out a `packed_ref_store` and then for changing
> `packed-refs` to be read using `mmap()`. Thanks to Peff, Junio,
> Stefan, Brandon, and Johannes for t
On Sun, May 21, 2017 at 5:27 AM, Prathamesh Chavan wrote:
> This aims to make git-submodule status a builtin. 'status' is ported
> to submodule--helper, and submodule--helper is called from
> git-submodule.sh.
>
> For the purpose of porting cmd_status, the code is split up such that
> one function
A missing space messed up formatting of the `%(trailers)` format.
---
Documentation/pretty-formats.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 47b286b33..38040e95b 100644
--- a/Documentation/prett
> On 22 May 2017, at 21:58, Torsten Bögershausen wrote:
>
> On 2017-05-22 15:50, Lars Schneider wrote:
>> +
>> +int async_query_available_blobs(const char *cmd, struct string_list
>> *delayed_paths)
>> +{
>> +int err;
>> +char *line;
>> +struct cmd2process *entry;
>> +struct chi
> On 22 May 2017, at 21:52, Torsten Bögershausen wrote:
>
> On 2017-05-22 15:50, Lars Schneider wrote:
>> +After Git received the pathnames, it will request the corresponding
>> +blobs again. These requests contain a pathname and an empty content
>> +section. The filter is expected to respond wi
Am 22.05.2017 um 21:53 schrieb Jeff King:
On Mon, May 22, 2017 at 09:47:59PM +0200, Johannes Sixt wrote:
Am 22.05.2017 um 19:10 schrieb DOAN Tran Cong Danh:
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
index 5778c0afe..fa4441868 100755
--- a/t/t3203-branch-output.sh
+++ b/t
On Mon, May 22, 2017 at 10:19:52AM +0900, Junio C Hamano wrote:
> However.
>
> If you look at how `git branch -v` before that problematic change
> removed the extra CR, you would notice that pretty_print_commit()
> was used for that, which eventually called format_subject() with
> "one\r\n\r\nlin
On Sun, May 21, 2017 at 5:58 AM, Prathamesh Chavan wrote:
> I have also made some changes in git-submodule.sh for correcting
> the $path variable. And hence made the corresponding changes in
> the new test introduced in t7407-submodule-foreach as well.
> I have push this work at:
> https://github
On 2017-05-22 15:50, Lars Schneider wrote:
> +
> +int async_query_available_blobs(const char *cmd, struct string_list
> *delayed_paths)
> +{
> + int err;
> + char *line;
> + struct cmd2process *entry;
> + struct child_process *process;
> + struct strbuf filter_status = STRBUF_I
On Mon, May 22, 2017 at 09:47:59PM +0200, Johannes Sixt wrote:
> Am 22.05.2017 um 19:10 schrieb DOAN Tran Cong Danh:
> > diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
> > index 5778c0afe..fa4441868 100755
> > --- a/t/t3203-branch-output.sh
> > +++ b/t/t3203-branch-output.sh
> >
On 2017-05-22 15:50, Lars Schneider wrote:
> +After Git received the pathnames, it will request the corresponding
> +blobs again. These requests contain a pathname and an empty content
> +section. The filter is expected to respond with the smudged content
> +in the usual way as explained above.
> +
When submodules are involved, it often slows down the process, as most
submodule related handling is either done via a child process or by
iterating over the index finding all gitlinks.
For most commands that may interact with submodules, we need have a
quick check if we do have any submodules at
Signed-off-by: Stefan Beller
---
submodule.c | 1 +
t/t5526-fetch-submodules.sh | 10 ++
2 files changed, 11 insertions(+)
diff --git a/submodule.c b/submodule.c
index 5d7aa711c8..0bf268b196 100644
--- a/submodule.c
+++ b/submodule.c
@@ -94,6 +94,7 @@ static int submodul
v2:
* this applies on sb/reset-recurse-submodules
* grep and push are also respecting submodule.recurse now.
* Brandon seemed to disagree with the first patch as it may
hurt with his 'RFC repo object' series [1], but I explained
a possible way out in [2] and Brandon seemed to agree that this
The closest mapping from the boolean 'submodule.recurse' set to "yes"
to the variety of submodule push modes is "on-demand", so implement that.
Signed-off-by: Stefan Beller
---
builtin/push.c | 4
t/t5531-deep-submodule-push.sh | 21 +
2 files changed, 2
Signed-off-by: Stefan Beller
---
t/lib-submodule-update.sh | 6 --
t/t1013-read-tree-submodule.sh | 4 ++--
t/t2013-checkout-submodule.sh | 4 ++--
t/t7112-reset-submodule.sh | 4 ++--
4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/t/lib-submodule-update.sh b/t/lib-
Am 22.05.2017 um 19:10 schrieb DOAN Tran Cong Danh:
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
index 5778c0afe..fa4441868 100755
--- a/t/t3203-branch-output.sh
+++ b/t/t3203-branch-output.sh
@@ -13,7 +13,8 @@ test_expect_success 'make commits' '
test_expect_success 'mak
In builtin/grep.c we parse the config before evaluating the command line
options. This makes the task of teaching grep to respect the new config
option 'submodule.recurse' very easy by just parsing that option.
As an alternative I had implemented a similar structure to treat
submodules as the fetc
Any command that understands '--recurse-submodules' can have its
default changed to true, by setting the submodule.recurse
option.
This patch includes read-tree/checkout/reset for working tree
manipulating commands. Later patches will cover other commands.
Signed-off-by: Stefan Beller
---
Docum
The manual for "git interpret-trailers" mentioned a non-existing
literal `overwrite` for its config option `trailer.ifexists`. Fixed
by using `replace` instead.
Signed-off-by: Andreas Heiduk
---
Documentation/git-interpret-trailers.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
On Mon, May 22, 2017 at 8:34 PM, Stefan Beller wrote:
> The Git community considers using submodules for some parts of the
> code (a third party lib, SHA1DC, computing SHA1s that warn about
> potential attachs, see shattered.io) [1].
>
> We are also concerned about single point of failure there, s
On Thu, May 18, 2017 at 04:21:11PM -0700, Brandon Williams wrote:
> When I first started working on the git project I found it very difficult to
> understand parts of the code base because of the inherently global nature of
> our code. It also made working on submodules very difficult. Since we
I have no remaining concerns about the protocol specification in terms of
implementing a filter with this capability.
The description of the test was not enclosed in single quotes, which
broke the coloring scheme that I am used to. Upon closer inspection
the test is good, but the description is a bit vague. So extend the
description of the first test.
While at it align the description of the file to match what w
Fetching from a remote using a native Windows path produces these warnings:
C:\Temp\gittest>git fetch C:\Temp\gittest
warning: unable to access '.git/remotes/C:\Temp\gittest': Invalid argument
warning: unable to access '.git/branches/C:\Temp\gittest': Invalid argument
>From C:\Temp\gittest
* bran
Taking git-compat-util.h's cue (which uses an inline function to back
is_dir_sep()), let's use an inline function to back also the Windows
version of is_dir_sep(). This avoids problems when calling the function
with arguments that do more than just provide a single character, e.g.
incrementing a po
Hi,
The Git community considers using submodules for some parts of the
code (a third party lib, SHA1DC, computing SHA1s that warn about
potential attachs, see shattered.io) [1].
We are also concerned about single point of failure there, so a repo
at kernel.org
mirroring the potential submodule[2]
When I was adding the sha1collisiondetection submodule to git.git I
noticed that building git would dirty the submodule.
This is because our own Makefile adds .depend/ directories. I hacked
around it by just getting the upstream project accept carrying an
ignore rule for that around:
https://githu
(+cc: Pat Thoyts, git-gui maintainer)
Hi,
Johannes Schindelin wrote:
> On Windows, the default line endings are denoted by a Carriage Return
> byte followed by a Line Feed byte, while Linux and MacOSX use a single
> Line Feed byte to denote a line ending.
>
> To help with this situation, Git intr
SUMMARY OF MY PROJECT:
Git submodule subcommands are currently implemented by using shell script
'git-submodule.sh'. There are several reasons why we'll prefer not to
use the shell script. My project intends to convert the subcommands into
C code, thus making them builtins. This will increase Git'
Hi,
Junio C Hamano wrote:
> * bw/forking-and-threading (2017-05-15) 14 commits
> - usage.c: drop set_error_handle()
> - run-command: restrict PATH search to executable files
> - run-command: expose is_executable function
> - run-command: block signals between fork and execve
> - run-command:
On Mon, May 22, 2017 at 6:18 PM, Ben Peart wrote:
> On 5/20/2017 8:10 AM, Ævar Arnfjörð Bjarmason wrote:
>>>
>>> +== File System Monitor cache
>>> +
>>> + The file system monitor cache tracks files for which the
>>> query-fsmonitor
>>> + hook has told us about changes. The signature for this ex
From: ĐOÀN Trần Công Danh
Commit 949af0684 ("branch: use ref-filter printing APIs", 2017-01-10)
make `git branch -v` stops trimming end-whitespace in subject,
and it stops treating next all-whitespace-line as an empty line.
Quote from git mailing-list:
> Here is a recipe to reproduce the error:
On Sat, May 20, 2017 at 4:37 PM, Ramsay Jones
wrote:
>
> Signed-off-by: Ramsay Jones
> ---
>
> Hi Stefan,
>
> If you need to re-roll your 'sb/diff-color-move' branch, could you
> please squash this into to the relevant patches. (Each hunk would
> be squashed into a separate commit, thus:
> - co
Am 22.05.2017 um 13:59 schrieb Johannes Schindelin:
On Sat, 20 May 2017, Johannes Sixt wrote:
This small series fixes these warnings on Windows:
C:\Temp\gittest>git fetch C:\Temp\gittest
warning: unable to access '.git/remotes/C:\Temp\gittest': Invalid argument
warning: unable to access '.git/b
Am 22.05.2017 um 16:01 schrieb Johannes Schindelin:
On Mon, 22 May 2017, stefan.na...@atlas-elektronik.com wrote:
Am 20.05.2017 um 08:28 schrieb Johannes Sixt:
This small series fixes these warnings on Windows:
C:\Temp\gittest>git fetch C:\Temp\gittest
warning: unable to access '.git/remotes/C
On 5/20/2017 8:10 AM, Ævar Arnfjörð Bjarmason wrote:
+== File System Monitor cache
+
+ The file system monitor cache tracks files for which the query-fsmonitor
+ hook has told us about changes. The signature for this extension is
+ { 'F', 'S', 'M', 'N' }.
+
+ The extension starts with
+
+
Hi Konst,
On Mon, 22 May 2017, Konstantin Khomoutov wrote:
> On Fri, May 12, 2017 at 09:55:04AM -0400, Rabii Elguermouni wrote:
>
> > Just wondering if someone can send me the instructions for an
> > unattended/silent install for Git 2.13.
>
> This guide [1] is outdated but should be applicabl
From: ĐOÀN Trần Công Danh
Commit 949af0684 ("branch: use ref-filter printing APIs", 2017-01-10)
make `git branch -v` stops trimming end-whitespace in subject,
and it stops treating next all-whitespace-line as an empty line.
Quote from git mailing-list:
> Here is a recipe to reproduce the error:
Move the check that `transaction->state` is valid from
`files_transaction_commit()` to `ref_transaction_commit()`, where
other future reference backends can benefit from it as well.
Signed-off-by: Michael Haggerty
---
refs.c | 12
refs/files-backend.c | 3 ---
2 files
Extract a function for deciding whether a reference should be packed.
It is a self-contained bit of logic, so splitting it out improves
readability.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 42 --
1 file changed, 28 insertions(+), 14 dele
The old code ignored any errors encountered when trying to fopen the
"packed-refs" file, treating all such failures as if the file didn't
exist. But it could be that there is some other error opening the
file (e.g., permissions problems), and we don't want to silently
ignore such problems. So repor
Only one caller was using it, so move the check to that caller.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 12
refs/ref-cache.c | 6 +-
refs/ref-cache.h | 3 +--
3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/refs/files-backend.c b/ref
From: Jeff King
When we are matching refnames against a pattern, then we know that the
beginning of any refname that can match the pattern has to match the
part of the pattern up to the first glob character. For example, if
the pattern is `refs/heads/foo*bar`, then it can only match a
reference t
When iterating over references, reference priming is used to make sure
that loose references are read into the ref-cache before packed
references, to avoid races. It used to be that the prefix passed to
reference iterators almost always ended in `/`, for example
`refs/heads/`. In that case, the pri
If we've got the "packed-refs" file locked, then it can't change;
there's no need to keep calling `stat_validity_check()` on it.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/refs/files-backend.c b/r
It will soon have some other users.
Signed-off-by: Michael Haggerty
---
refs.c | 17 +
refs/files-backend.c | 17 -
refs/refs-internal.h | 8
3 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/refs.c b/refs.c
index b3860a9e33.
Instead of handling `GIT_REF_PARANOIA` in
`files_ref_iterator_begin()`, handle it in
`refs_ref_iterator_begin()`, where it will cover all reference stores.
Signed-off-by: Michael Haggerty
---
refs.c | 5 +
refs/files-backend.c | 11 ---
2 files changed, 9 insertions(+)
It's pretty cheap to make sure that the caller didn't pass us an
unsorted list by accident, so do so.
Signed-off-by: Michael Haggerty
---
refs.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/refs.c b/refs.c
index 143936a9c3..d1c781d94e 100644
--- a/refs.c
+++ b/r
Teach `read_packed_refs()` to also
* Allocate and initialize the new `packed_ref_cache`
* Open and close the `packed-refs` file
* Update the `validity` field of the new object
This decreases the coupling between `packed_refs_cache` and
`files_ref_store` by a little bit.
Signed-off-by: Michael Ha
This is the second iteration of a patch series that prepares the
ground for separating out a `packed_ref_store` and then for changing
`packed-refs` to be read using `mmap()`. Thanks to Peff, Junio,
Stefan, Brandon, and Johannes for their feedback about v1 [1]. I think
I have addressed all of your c
Instead of using a global `lock_file` instance for the main
"packed-refs" file and using a pointer in `files_ref_store` to keep
track of whether it is locked, embed the `lock_file` instance directly
in the `files_ref_store` struct and use the new
`is_lock_file_locked()` function to keep track of wh
Move the `lock` member from `packed_ref_cache` to `files_ref_store`,
since at most one cache can have a locked "packed-refs" file
associated with it. Rename it to `packed_refs_lock` to make its
purpose clearer in its new home. More changes are coming here shortly.
Signed-off-by: Michael Haggerty
The `trim` parameter can be set independently of `prefix`. So if some
caller were to set `trim` to be greater than `strlen(prefix)`, we
could end up pointing the `refname` field of the iterator past the NUL
of the actual reference name string.
That can't happen currently, because `trim` is always
The former is by far more common in our codebase.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index cb1f528cbe..fa5d2b6f08 100644
--- a/refs/files-backend.c
+++ b/
In particular, make it clear that they make copies of the sha1
arguments.
Signed-off-by: Michael Haggerty
---
refs.h | 13 +
1 file changed, 13 insertions(+)
diff --git a/refs.h b/refs.h
index 685a979a0e..ec8c6bfbbb 100644
--- a/refs.h
+++ b/refs.h
@@ -427,6 +427,19 @@ struct ref_tr
The test of failing `git rm -f` removes the write permissions on the
test directory, but fails to restore them if the test fails. This
means that the test temporary directory cannot be cleaned up, which
means that subsequent attempts to run the test fail mysteriously.
Instead, do the cleanup in a
Extract the cleanup functionality from `files_transaction_commit()`
into a new function. It will soon have another caller.
Use the common cleanup code even on early exit if the transaction is
empty, to reduce code duplication.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 33 ++
1 - 100 of 130 matches
Mail list logo