On 16 December 2017 at 13:12, René Scharfe wrote:
> prepare_revision_walk() allows callers to take ownership of the array of
> pending objects by setting the rev_info flag "leak_pending" and copying
> the object_array "pending". They use it to clear commit marks after
> setup is
`test_expect_failure` to document that we currently
respect the pager-configuration with `--edit-description`. The current
behavior is buggy since the pager interferes with the editor and makes
the end result completely broken. See also b3ee740c8 (t7006: add tests
for how git tag paginates, 2017-08-02).
S
h this commit reuses for
git-branch.txt.
This fixes the failing test added in the previous commit. Also adapt the
test for whether `git branch --set-upstream-to` respects `pager.branch`.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
Documentation/git-branch.txt | 6 ++
t/t700
escription` as it would have before the previous commit.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
Documentation/git-branch.txt | 2 +-
t/t7006-pager.sh | 10 +-
builtin/branch.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/D
On 17 November 2017 at 17:07, Daniel Bensoussan
wrote:
> The documentation about triangular workflow was not clear enough.
I think you would be able to `git rebase -i` these two patches into a
single, perfect patch. ;-) Maybe in collaboration with Albertin?
>
On 17 November 2017 at 17:07, Daniel Bensoussan
wrote:
> +- If the maintainer accepts the changes, he merges them into the
> + **UPSTREAM** repository.
Personally, I would prefer "they" and "their" over "he" and "his". I'm
not sure how universal this preference
On 16 November 2017 at 11:43, Phillip Wood <phillip.w...@talktalk.net> wrote:
> On 15/11/17 18:44, Martin Ågren wrote:
>>
>> On 15 November 2017 at 11:41, Phillip Wood <phillip.w...@talktalk.net>
>> wrote:
>>
>> From the commit message, I would have
On 16 November 2017 at 08:46, Todd Zullinger wrote:
> Support for the --set-upstream option was removed in 52668846ea
> (builtin/branch: stop supporting the "--set-upstream" option,
> 2017-08-17), after a long deprecation period.
>
> Remove the option from the command synopsis for
On 15 November 2017 at 11:41, Phillip Wood wrote:
> From: Phillip Wood
>
> Return an error instead of dying if the index cannot be locked in
> do_recursive_merge() as if the commit cannot be picked it needs to be
> rescheduled when
On 11 November 2017 at 00:13, Joel Teichroeb wrote:
> If the merge does not have anything to do, it does not unlock the index,
> causing any further index operations to fail. Thus, always unlock the index
> regardless of outcome.
> if (clean < 0)
>
On 5 November 2017 at 09:42, Michael Haggerty wrote:
> Callers shouldn't be passing disallowed flags into
> `ref_transaction_update()`. So instead of masking them off, treat it
> as a bug if any are set.
>
> Signed-off-by: Michael Haggerty
> ---
>
On 6 November 2017 at 11:48, Jeff King <p...@peff.net> wrote:
> On Sun, Nov 05, 2017 at 12:58:18PM +0100, Martin Ågren wrote:
>> In particular, they do not teach `--paginate` to use the pager
>> configured by `pager.foo.command`. It is already now possible to use
>>
're here and
reuse the `revs`-variable instead. That matches several other users of
`reduce_heads()`. The memory-leak that this hides will be addressed in
the next commit.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
v3: Like v2 but s/UNLEAK/free_commit_list/ and rebased onto maint
leaks using `free_commit_list()`.
While we're here, document `reduce_heads()` and mark it as `extern`.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
v3: Like v2 but rebased onto maint.
commit.h
leaks using `free_commit_list()`.
While we're here, document `reduce_heads()` and mark it as `extern`.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
commit.h| 18 +-
builtin/commit.c| 2 +-
builtin/fmt-merge-msg.c | 2 +-
builtin/merge-
`reduce_heads()`. The memory-leak that this hides will be addressed in
the next commit.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
builtin/merge-base.c | 36 ++--
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/builtin/merge-bas
with UNLEAK in them, I'm all ears.
Martin
[1] https://public-inbox.org/git/20171101090326.8091-1-martin.ag...@gmail.com/
Martin Ågren (2):
builtin/merge-base: UNLEAK commit lists
reduce_heads: fix memory leaks
commit.h| 18 +-
builtin/commit.c| 2
When `find_bisection()` returns a single list entry, it leaks the other
entries. Move the to-be-returned item to the front and free the
remainder.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
bisect.c | 6 +-
1 fil
d.
Do not update `p` the very last round in the loop. This ensures that
after the loop, `p->next` points to the remainder of the list, and we
can set it to NULL. While we're here, free that remainder to fix a
memory leak.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by:
`find_bisection()` rebuilds the commit list it is given by reversing it
and skipping uninteresting commits. The uninteresting list entries are
leaked. Free them to fix the leak.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
bisect.c | 4 +++-
1 file changed, 3 insertions
and has void
return type. That should make it harder to misuse this function.
While we're here, document this function.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
bisect.h | 12 +---
bisect.c | 16 +++-
builtin/rev-list.c | 3 +--
3 files c
ical to v1.
Martin
[1]
https://public-inbox.org/git/4795556016c25e4a78241362547c5468877f808d.1509557518.git.martin.ag...@gmail.com/
Martin Ågren (4):
bisect: change calling-convention of `find_bisection()`
bisect: fix memory leak in `find_bisection()`
bisect: fix off-by
es it easy to look for other remainders in the next patch.
While at it, before assigning to `value`, free any old value we might
already have picked up.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
pager.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/p
that might have
been configured with `pager.foo`, do the same for `pager.foo.command`.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
Documentation/config.txt | 17 +++
Documentation/git-tag.txt | 3 +-
Documentation/git.txt | 2 +-
t/t7
If `pager.foo.command` gets configured and there is no configuration
(yet) saying whether we should page, act as if `pager.foo.enable=true`.
This means that a lone `pager.foo` can always be written as a lone
`pager.foo.command` or `pager.foo.enable`.
Signed-off-by: Martin Ågren <martin
foo` can be
configured. Those commits mustn't change how `pager.foo` behaves, so add
tests for these two cases.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
t/t7006-pager.sh | 18 ++
1 file changed, 18 insertions(+)
diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
If someone wants to pick these up and bring them to completion, great!
If not and if I or someone else feels confident about which way to go,
then I can revisit these.
Martin
Martin Ågren (4):
t7006: document that `pager.foo` can be partially preserved
pager: refactor `pager_command_config()`
On 2 November 2017 at 05:54, Junio C Hamano <gits...@pobox.com> wrote:
> Martin Ågren <martin.ag...@gmail.com> writes:
>
>> `find_bisection()` rebuilds the commit list it is given by reversing it
>> and skipping uninteresting commits. The uninteresting list entries a
On 2 November 2017 at 04:11, Junio C Hamano <gits...@pobox.com> wrote:
> Martin Ågren <martin.ag...@gmail.com> writes:
>
>> diff --git a/builtin/merge-base.c b/builtin/merge-base.c
>> index 6dbd167d3..b1b7590c4 100644
>> --- a/builtin/merge-base.c
>> ++
thread is reading in the list through
`read_sha1_file()`.
Take the grep read-lock while adding the submodule. The lock is used to
serialize uses of non-thread-safe parts of Git's API, including
`read_sha1_file()`.
Helped-by: Brandon Williams <bmw...@google.com>
Signed-off-by: Martin
d.
Do not update `p` the very last round in the loop. This ensures that
after the loop, `p->next` points to the remainder of the list, and we
can set it to NULL. While we're here, free that remainder to fix a
memory leak.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
bisect.c
When `find_bisection()` returns a single list entry, it leaks the other
entries. Move the to-be-returned item to the front and free the
remainder.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
bisect.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/bise
that the original list should not
be examined by the caller.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
bisect.c | 4 +++-
bisect.h | 7 +++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/bisect.c b/bisect.c
index 96beeb5d1..f9de4f2e8 100644
--- a/bisect.c
+++ b/bi
leaks using `free_commit_list()`.
While we're here, document `reduce_heads()` and mark it as `extern`.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
builtin/commit.c| 2 +-
builtin/fmt-merge-msg.c | 2 +-
builtin/merge-base.c| 6 +-
builtin/merge.c
On 28 October 2017 at 11:49, Michael Haggerty wrote:
> The constants used for `ref_update::flags` were rather disorganized:
> * The documentation wasn't very consistent and partly still referred
> to sha1s rather than oids.
> @@ -478,22 +462,23 @@ struct ref_transaction
On 27 October 2017 at 17:06, Pranit Bauva wrote:
> + for (i = 0; i < argc; i++) {
> + if (!strcmp(argv[i], "--term-good"))
> + printf(_("%s\n"), terms->term_good);
> + else if (!strcmp(argv[i], "--term-bad"))
> +
On 27 October 2017 at 17:06, Pranit Bauva wrote:
> + /*
> +* have bad (or new) but not good (or old). We could bisect
> +* although this is less optimum.
> +*/
> + fprintf(stderr, _("Warning:
mmer than `FREE_AND_NULL` and has a
slightly larger potential for misuse. Document that `FREE_AND_NULL`
should be preferred.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
argv-array.c | 3 +--
git-compat-util.h | 8
submodule.c | 3 +--
3 files changed, 10 insertion
On 24 October 2017 at 18:45, Eric Sunshine wrote:
> On Tue, Oct 24, 2017 at 12:28 PM, Stefan Beller wrote:
>> On Tue, Oct 24, 2017 at 8:27 AM, Andrey Okoshkin
>> wrote:
>>> Add check of 'GIT_MERGE_VERBOSITY' environment
On 19 October 2017 at 21:34, Jeff King wrote:
> On Thu, Oct 19, 2017 at 12:26:18PM -0700, Brandon Williams wrote:
>
>> One alternative to turning off threading would be to employ proper
>> locking (like I failed to do) by wrapping the call the
>> 'add_to_alternates_memory()' in
threading.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
This is a simple, stupid solution. I'm posting this in patch-form so
that I can do one better than just mailing about the race and waving my
hands. Maybe threading is common enough that reverting could be a better
ap
ression by turning off internal handling of -h for repository setup,
> and option parsing, as well as the corresponding test in t0012.
>
> Reported-by: Thomas Rikl <tr...@online.de>
> Analyzed-by: Martin Ågren <martin.ag...@gmail.com>
> Signed-off-by: Rene Scharfe <
On 17 October 2017 at 17:39, René Scharfe wrote:
> Stop advertising -h as the short equivalent of --heads, because it's
> used for showing a short help text for almost all other git commands.
> Since the ba5f28bf79 (ls-remote: use parse-options api) it has only
> been working when
On 15 October 2017 at 12:02, Thomas Rikl wrote:
> Example:
>
> tom1 ~/emacs/spacemacs/.emacs.d $ export LANG=en_US.utf8
>
> tom1 ~/emacs/spacemacs/.emacs.d $ git ls-remote -h
> usage: git ls-remote [--heads] [--tags] [--refs] [--upload-pack=]
> [-q | --quiet]
On 11 October 2017 at 20:36, Kevin Daudt <m...@ikke.info> wrote:
> On Wed, Oct 11, 2017 at 08:12:35PM +0200, Martin Ågren wrote:
>> On 11 October 2017 at 19:23, Kevin Daudt <m...@ikke.info> wrote:
>> I wonder if it's useful to set COLUMNS a bit lower so that this has t
On 11 October 2017 at 19:23, Kevin Daudt wrote:
> finalize_colopts in column.c only checks whether the output is a TTY to
> determine if columns should be enabled with columns set to auto. Also check
> if the pager is active.
Maybe you could say something about the difficulties
On 10 October 2017 at 04:35, Changwoo Ryu wrote:
> 2017-10-10 10:26 GMT+09:00 Junio C Hamano :
>> Jean-Noël AVILA writes:
>>
>>> On Monday, 9 October 2017, 09:47:26 CEST Stefan Beller wrote:
>>>
I always assumed that translators are
On 10 October 2017 at 16:29, Jeff King wrote:
> On Tue, Oct 10, 2017 at 10:10:19AM -0400, Jeff King wrote:
>
> it will randomly succeed or fail, depending on whether sed manages to
> read the input before the stdin terminal is closed.
>
> I'm not sure of an easy way to fix
On 10 October 2017 at 16:01, Jeff King <p...@peff.net> wrote:
> On Tue, Oct 10, 2017 at 12:30:49PM +0200, Martin Ågren wrote:
>> On 9 October 2017 at 23:45, Kevin Daudt <m...@ikke.info> wrote:
>> > Since ff1e72483 (tag: change default of `pager.tag` to "on&quo
On 9 October 2017 at 23:45, Kevin Daudt wrote:
> When columns are set to automatic for git tag and the output is
> paginated by git, the output is a single column instead of multiple
> columns.
>
> Standard behaviour in git is to honor auto values when the pager is
> active, which
On 9 October 2017 at 03:30, Junio C Hamano <gits...@pobox.com> wrote:
> On Mon, Oct 9, 2017 at 9:51 AM, brian m. carlson
> <sand...@crustytoothpaste.net> wrote:
>> On Sun, Oct 08, 2017 at 10:32:35AM +0100, Philip Oakley wrote:
>>> From: "Martin Ågren
On 6 October 2017 at 11:40, Junio C Hamano wrote:
> Simon Ruderich writes:
>
>> Did you consider Stefan Beller's suggestion regarding a
>> (white)list of allowed versions?
>>
>> On Mon, Sep 18, 2017 at 01:06:59PM -0700, Stefan Beller wrote:
>>> Thinking
On 6 October 2017 at 22:27, Stefan Beller wrote:
>> I might be naive in thinking that protocol.version could be removed or
>> redefined at our discretion just because it's marked as "experimental".
>
> Well the redefinition might very well occur, when we now say "set to v1
>
On 8 October 2017 at 13:56, Robert P. J. Day wrote:
> but as i asked in my earlier post, if i wanted to remove *all* files
> with names of "Makefile*", why can't i use:
>
> $ git rm 'Makefile*'
>
> just as i used:
>
> $ git rm '*.c'
>
> are those not both acceptable
On 8 October 2017 at 11:32, Philip Oakley <philipoak...@iee.org> wrote:
> From: "Martin Ågren" <martin.ag...@gmail.com>
>
>> We currently build an error message like "entry is a %s, not a commit",
>> where the placeholder will be replaced with
and pick one of three different error messages. We might still
want a `default` and maybe more tests. So go for this simpler approach
instead.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
I browsed the diff of the .pot and found an addition that looked a bit
translat
in the next patch.)
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
apply.c | 14 +-
apply.h | 5 ++---
builtin/am.c| 3 +--
builtin/apply.c | 4 +---
4 files changed, 9 insertions(+),
ining flag, `COMMIT_LOCK`.
This means we neither have nor suggest that we have a mode to write the
index and leave the file open. Whatever extra contents we might
eventually want to write, we should probably write it from within
`write_locked_index()` itself anyway.
Signed-off-by: Martin Ågren <martin.ag
`is_lock_file_locked()`.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
apply.c | 17 ++---
apply.h | 3 +--
2 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/apply.c b/apply.c
index 5a6ca10a7..d676
in cache.h.
If `write_locked_index(..., COMMIT_LOCK)` fails, it will roll back the
lock for us (see the previous commit).
Noticed-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
cache.h
The next patches will tweak the behavior of this function. Document it
in order to establish a basis for those patches.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
cache.h | 16
1 file changed, 16 inserti
lso future-proves the code by making it obvious that we intend to take
exactly one of these paths.
Improved-by: Jeff King <p...@peff.net>
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
sha1_file.c | 19 --
the `struct lock_file` on
the stack instead.
These instances were identified by running `git grep "^\s*struct
lock_file\s*\*"`.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
builtin/am.c | 24 +++---
` so that we have one
variable less to reason about.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
cache-tree.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/cache-tree.c b/cache-tree.c
ind
-allocate tempfiles on heap, 2017-09-05), we
can have lockfiles on the stack.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
builtin/checkout-index.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/buil
are inconsistent.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
v3: Maybe the commit message wasn't too long, but it was loong. For
example, some of it just duplicated stuff from the previous patch.
builtin/difftool.c | 1 -
cache.h| 4
merge.c| 4 +---
The function has always been documented as returning 0 or -1. It is in
fact `void`. Correct that. As part of the rearrangements we lose the
mention that `delete_tempfile()` might set `errno`. Because there is
no return value, the user can't really know whether it did anyway.
Signed-off-by: Martin
On 6 October 2017 at 21:44, Martin Ågren <martin.ag...@gmail.com> wrote:
> Ok, thanks. I've got a rerolled series running through the final checks
> right now. I did end up making this log message a bit more succinct.
This is v3 of this series. All patches are identical to
ma/lo
Commit 83a3069a3 (lockfile: do not rollback lock on failed close,
2017-09-05) forgot to update the documentation by the function definition
to reflect that the lock is not rolled back in case closing fails.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano
On 6 October 2017 at 14:02, Junio C Hamano <gits...@pobox.com> wrote:
> Martin Ågren <martin.ag...@gmail.com> writes:
>
>> On 6 October 2017 at 04:01, Junio C Hamano <gits...@pobox.com> wrote:
>>> Martin Ågren <martin.ag...@gmail.com> writes:
&
On 6 October 2017 at 14:09, Junio C Hamano <gits...@pobox.com> wrote:
> Martin Ågren <martin.ag...@gmail.com> writes:
>
>> Maybe I'm missing something Git-specific, but isn't the only thing that
>> needs to be done now, to document/specify that 1) the client s
On 6 October 2017 at 11:40, Junio C Hamano wrote:
> Simon Ruderich writes:
>
>> Did you consider Stefan Beller's suggestion regarding a
>> (white)list of allowed versions?
>>
>> On Mon, Sep 18, 2017 at 01:06:59PM -0700, Stefan Beller wrote:
>>> Thinking
On 6 October 2017 at 04:01, Junio C Hamano <gits...@pobox.com> wrote:
> Martin Ågren <martin.ag...@gmail.com> writes:
>
>> v2: Except for the slightly different documentation in cache.h, this is
>> a squash of the last two patches of v1. I hope the commit message is
&
On 6 October 2017 at 03:39, Junio C Hamano <gits...@pobox.com> wrote:
> Martin Ågren <martin.ag...@gmail.com> writes:
>
>> diff --git a/read-cache.c b/read-cache.c
>> index 65f4fe837..1c917eba9 100644
>> --- a/read-cache.c
>> +++ b/read-cac
in the next patch.)
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
v2: Identical.
apply.c | 14 +-
apply.h | 5 ++---
builtin/am.c| 3 +--
builtin/apply.c | 4 +---
4 files changed, 9 inser
`is_lock_file_locked()`.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
v2: Identical.
apply.c | 17 ++---
apply.h | 3 +--
2 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/apply.c b/apply.c
ind
The next patches will tweak the behavior of this function. Document it
in order to establish a basis for those patches.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
v2: Tweaked to go better with the changed approach in the later patches.
cache.h | 16
1 file c
The function has always been documented as returning 0 or -1. It is in
fact `void`. Correct that. As part of the rearrangements we lose the
mention that `delete_tempfile()` might set `errno`. Because there is
no return value, the user can't really know whether it did anyway.
Signed-off-by: Martin
he: close
index.lock in do_write_index, 2017-04-26).
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
v2: Except for the slightly different documentation in cache.h, this is
a squash of the last two patches of v1. I hope the commit message is
better.
builtin/difftool.c | 1 -
cache.h
in cache.h.
If `write_locked_index(..., COMMIT_LOCK)` fails, it will roll back the
lock for us (see the previous commit).
Noticed-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
v2: New patch.
cache.h | 4
read-cache.c | 5 ++---
2 f
ining flag, `COMMIT_LOCK`.
This means we neither have nor suggest that we have a mode to write the
index and leave the file open. Whatever extra contents we might
eventually want to write, we should probably write it from within
`write_locked_index()` itself anyway.
Signed-off-by: Martin Ågren <martin.ag
On 3 October 2017 at 08:21, Junio C Hamano <gits...@pobox.com> wrote:
> Martin Ågren <martin.ag...@gmail.com> writes:
>> On 2 October 2017 at 08:30, Junio C Hamano <gits...@pobox.com> wrote:
>>
>> Thanks both of you for your comments. Based on t
lso future-proves the code by making it obvious that we intend to take
exactly one of these paths.
Improved-by: Jeff King <p...@peff.net>
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
v2: Moved the rollback to the end to have an obvious if-else instead of
retaining the origi
the `struct lock_file` on
the stack instead.
These instances were identified by running `git grep "^\s*struct
lock_file\s*\*"`.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
v2: Identical.
b
` so that we have one
variable less to reason about.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
v2: Identical.
cache-tree.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/cache-tree.c b/
-allocate tempfiles on heap, 2017-09-05), we
can have lockfiles on the stack.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
v2: New patch.
builtin/checkout-index.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/builtin/checkout-index.c b/builtin/checkout-i
Commit 83a3069a3 (lockfile: do not rollback lock on failed close,
2017-09-05) forgot to update the documentation by the function definition
to reflect that the lock is not rolled back in case closing fails.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
Signed-off-by: Junio C Hamano
On 29 September 2017 at 06:34, Junio C Hamano wrote:
>
> * sd/branch-copy (2017-09-24) 4 commits
> (merged to 'next' on 2017-09-28 at a6eceefa02)
> + branch: fix "copy" to never touch HEAD
> + branch: add a --copy (-c) option to go with --move (-m)
> + branch: add test for
On 2 October 2017 at 08:25, Jeff King <p...@peff.net> wrote:
> On Sun, Oct 01, 2017 at 07:42:08PM +0200, Martin Ågren wrote:
>
>> Add some UNLEAKs where we are about to return from `cmd_*`. UNLEAK the
>> variables in the same order as we've declared them. While addressing
&
On 2 October 2017 at 08:30, Junio C Hamano wrote:
> Jeff King writes:
>
>> I've read through each and with the exception of patches 10 and 11, they
>> all look good to me.
>>
>> For 10 and 11, I think you've convinced me that the current behavior is
>> buggy. I
On 2 October 2017 at 06:14, Martin Ågren <martin.ag...@gmail.com> wrote:
> On 2 October 2017 at 05:49, Junio C Hamano <gits...@pobox.com> wrote:
>> Martin Ågren <martin.ag...@gmail.com> writes:
>>
>>> ... Instead, require that one of the
>>> f
On 2 October 2017 at 07:26, Jeff King <p...@peff.net> wrote:
> On Sun, Oct 01, 2017 at 04:56:02PM +0200, Martin Ågren wrote:
>
> The original code is actually a bit confusing/unsafe, as we set the
> "found" flag early and rollback here:
>
>> @@ -481,17 +481,15
On 2 October 2017 at 05:49, Junio C Hamano <gits...@pobox.com> wrote:
> Martin Ågren <martin.ag...@gmail.com> writes:
>
>> ... Instead, require that one of the
>> flags is set. Adjust documentation and the assert we already have for
>> checking that we do
On 2 October 2017 at 05:37, Junio C Hamano <gits...@pobox.com> wrote:
> Martin Ågren <martin.ag...@gmail.com> writes:
>
> This is not a show-stopper for this patch series, but just something
> I noticed, something that used to be unavoidable in the old world
> ord
Add some UNLEAKs where we are about to return from `cmd_*`. UNLEAK the
variables in the same order as we've declared them. While addressing
`msg` in builtin/tag.c, convert the existing `strbuf_release()` calls as
well.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
builtin/chec
On 25 September 2017 at 18:08, Jeff King <p...@peff.net> wrote:
> On Sun, Sep 24, 2017 at 09:59:28PM +0200, Martin Ågren wrote:
>
>> > I'm not sure of the best way to count things.
>>
>
> But at least on the topic of "how many unique leaks are there", I w
The next patches will tweak the behavior of this function. Document it
in order to establish a basis for those patches.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
cache.h | 16
1 file changed, 16 insertions(+)
diff --git a/cache.h b/cache.h
index ea6
`is_lock_file_locked()`.
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
apply.c | 17 ++---
apply.h | 3 +--
2 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/apply.c b/apply.c
index 5a6ca10a7..d676debd5 100644
--- a/apply.c
+++ b/apply.c
@@ -79,7 +79,6
t we don't have too many flags. Add a macro `HAS_SINGLE_BIT`
(inspired by `HAS_MULTI_BITS`) to simplify this check and similar checks
in the future.
When (if) we need "write the index and leave the lockfile open", we can
revisit this.
Signed-off-by: Martin Ågren <martin.ag...@
26).
Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
cache.h | 2 ++
read-cache.c | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/cache.h b/cache.h
index 32aa8afdf..4d09da792 100644
--- a/cache.h
+++ b/cache.h
@@ -617,6 +617,8 @@ extern int read_index_unmer
301 - 400 of 567 matches
Mail list logo