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 =
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
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
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
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
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
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
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
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
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
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
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
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
---
In a later patch, I want to propose an option to detect
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 diff
In a later patch, I want to propose an option to detect
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 diff
In a later patch, I want to propose an option to detect
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 diff
In a later patch, I want to propose an option to detect
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 diff
In a later patch, I want to propose an option to detect
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 diff
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
In a later patch, I want to propose an option to detect
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 diff
In a later patch, I want to propose an option to detect
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 diff
In a later patch, I want to propose an option to detect
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 diff
In a later patch, I want to propose an option to detect
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 diff
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
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
In a later patch, I want to propose an option to detect
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 diff
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
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
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
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
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
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()
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
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
>
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
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
Æ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
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
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,
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
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
---
> 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;
>>
> 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
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
+++
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
>
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
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 =
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.
>
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
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
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
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
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
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(+),
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
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
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
*
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
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
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:
(+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
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
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
> -
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
---
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
---
Just because the files backend can't retain reflogs for deleted
references is no reason that they shouldn't be supported by the
virtual method interface. Also, `delete_ref()` and `refs_delete_ref()`
have already gained `msg` parameters. Now let's add them to
`delete_refs()` and
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
In the future, compound reference stores will sometimes need to modify
references in two different reference stores at the same time, meaning
that a single logical reference transaction might have to be
implemented as two internal sub-transactions. They won't want to call
Eliminate a theoretical risk of integer overflow if the two types have
different sizes.
Signed-off-by: Michael Haggerty
---
refs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refs.c b/refs.c
index beb49fb297..143936a9c3 100644
--- a/refs.c
+++
Eliminate any chance of integer overflow on platforms where the two
types have different sizes.
Signed-off-by: Michael Haggerty
---
refs.c | 2 +-
refs/files-backend.c | 6 --
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/refs.c b/refs.c
1 - 100 of 129 matches
Mail list logo