On Thu, Jan 4, 2018 at 7:00 PM, Jeff Hostetler wrote:
>
>
> On 1/3/2018 11:33 AM, Christian Couder wrote:
>> diff --git a/sha1_file.c b/sha1_file.c
>> index 261baf800f..785e8dda03 100644
>> --- a/sha1_file.c
>> +++ b/sha1_file.c
>> @@ -322,17 +322,22 @@ static void fill_sha1_path(struct strbuf *b
2018-01-16 1:09 GMT+03:00 Jeff King :
> On Mon, Jan 15, 2018 at 04:33:35PM -0500, Jeff King wrote:
>
>> That works, but I don't think it's where we want to end up in the long
>> run.
I absolutely agree, I want to merge current edits and then continue
migrating process. And hopefully second part of
Using a static buffer in sha1_file_name() is error prone
and the performance improvements it gives are not needed
in most of the callers.
So let's get rid of this static buffer and, if necessary
or helpful, let's use one in the caller.
---
cache.h | 8 +++-
http-walker.c | 6 --
h
2018-01-16 0:44 GMT+03:00 Jeff King :
> On Wed, Jan 10, 2018 at 09:36:41AM +, Olga Telezhnaya wrote:
>
>> Need that for further reusing of formatting logic in cat-file.
>> Have plans to get rid of using expand_data in cat-file at all,
>> and use it only in ref-filter for collecting, formatting
2018-01-16 0:42 GMT+03:00 Jeff King :
> On Wed, Jan 10, 2018 at 09:36:41AM +, Olga Telezhnaya wrote:
>
>> Make valid_atom as a function parameter,
>> there could be another variable further.
>> Need that for further reusing of formatting logic in cat-file.c.
>>
>> We do not need to allow users
On January 15, 2018 10:01 PM, brian m. Carlson wrote:
> On Mon, Jan 15, 2018 at 09:25:37AM -0500, Randall S. Becker wrote:
> > On January 15, 2018 2:06 AM, Johannes Sixt wrote:
> > > I take "die exits with non-zero" as a piece of information for the
> > > *users* so that they can write "if perl foo
On Mon, Jan 15, 2018 at 09:25:37AM -0500, Randall S. Becker wrote:
> On January 15, 2018 2:06 AM, Johannes Sixt wrote:
> > I take "die exits with non-zero" as a piece of information for the
> > *users* so that they can write "if perl foo.pl; then something; fi" in shell
> > scripts. I do *not* inte
Just to confirm, you're talking about the behavior of removing *all*
tags that aren't found on the remote? (Not just tags that used to be
on some remote, but have since been removed from that remote.) So,
with your proposed workflow, you would never create your own tags
locally, without pushing the
Replace the custom calls to mru.[ch] with calls to list.h. This patch is the
final step in removing the mru API completely and inlining the logic.
Another discussion, here
(https://public-inbox.org/git/caoci2dgyqr4jff5oby2buyhnjeaapqkf8tbojn2w0b18eo+...@mail.gmail.com/)
was on what has to be done
On Mon, Jan 15 2018, Michael Giuffrida jotted:
> `git remote prune ` should "delete all stale remote-tracking
> branches under ". I was surprised to discover, after some
> troubleshooting, that it also deletes *all* local tags that don't
> exist on the remote, if the following refspec is included
On 01/15, Randall S. Becker wrote:
> On January 15, 2018 3:43 PM, Thomas Gummerer wrote:
> > Thanks for your patch! A few nitpicks below:
> >
> > > Subject: [PATCH] Removed unnecessary void* from hashmap.h that caused
> > > compile warnings
> >
> > From Documentation/SubmittingPatches:
> >
> >
On Tue, Jan 16, 2018 at 12:37:51AM +0100, Kim Gybels wrote:
> > This looks good to me, and since it's a recent-ish regression, I think
> > we should take the minimal fix here.
>
> The minimal fix being a simple NULL check before munmap()?
Sorry to be unclear. I just meant that your patch is prob
On (15/01/18 16:15), Jeff King wrote:
> On Sat, Jan 13, 2018 at 05:11:49PM +0100, Kim Gybels wrote:
>
> > Take a hint from commit ea68b0ce9f8ce8da3e360aed3cbd6720159ffbee and use
> > read() instead of mmap() for small packed-refs files.
> >
> > This also fixes the problem[1] where xmmap() return
On Mon, Jan 15, 2018 at 04:33:35PM -0500, Jeff King wrote:
> That works, but I don't think it's where we want to end up in the long
> run. Because:
>
> 1. We still have the set of formats duplicated between expand_atom()
> and the "preparation" step. It's just that the preparation is now
>
On Wed, Jan 10, 2018 at 09:36:41AM +, Olga Telezhnaya wrote:
> Need that for further reusing of formatting logic in cat-file.
> Have plans to get rid of using expand_data in cat-file at all,
> and use it only in ref-filter for collecting, formatting and printing
> needed data.
I think some of
So it sounds like either we should deprecate rm, or I should update the patch
to the suggested method where we just complete remotes, but not rm in the list
of completions.
Thoughts?
--
Keith Smiley
On Wed, Jan 3, 2018, at 11:24, Junio C Hamano wrote:
> Ævar Arnfjörð Bjarmason writes:
>
> >
On Wed, Jan 10, 2018 at 09:36:41AM +, Olga Telezhnaya wrote:
> Make valid_atom as a function parameter,
> there could be another variable further.
> Need that for further reusing of formatting logic in cat-file.c.
>
> We do not need to allow users to pass their own valid_atom variable in
> gl
On Wed, Jan 10, 2018 at 09:36:41AM +, Olga Telezhnaya wrote:
> Start using ref_format struct instead of simple char*.
> Need that for further reusing of formatting logic from ref-filter.
OK, this makes sense (though again, at some point we want this to stop
being a "ref_format" and just be a
On Wed, Jan 10, 2018 at 09:36:41AM +, Olga Telezhnaya wrote:
> Split expand_atom function into 2 different functions,
> expand_atom_into_fields prepares variable for further filling,
> (new) expand_atom creates resulting string.
> Need that for further reusing of formatting logic from ref-filt
Hi Junio,
Please pull the following git l10n updates for Git 2.16.0.
The following changes since commit 36438dc19dd2a305dddebd44bf7a65f1a220075b:
Git 2.16-rc1 (2018-01-05 13:45:17 -0800)
are available in the Git repository at:
git://github.com/git-l10n/git-po tags/l10n-2.16.0-rnd2
for you
`git remote prune ` should "delete all stale remote-tracking
branches under ". I was surprised to discover, after some
troubleshooting, that it also deletes *all* local tags that don't
exist on the remote, if the following refspec is included in the
remote's fetch config:
+refs/tags/*:refs/tag
On Sat, Jan 13, 2018 at 05:11:49PM +0100, Kim Gybels wrote:
> Take a hint from commit ea68b0ce9f8ce8da3e360aed3cbd6720159ffbee and use
> read() instead of mmap() for small packed-refs files.
>
> This also fixes the problem[1] where xmmap() returns NULL for zero
> length[2], for which munmap() lat
On January 15, 2018 3:43 PM, Thomas Gummerer wrote:
> Thanks for your patch! A few nitpicks below:
>
> > Subject: [PATCH] Removed unnecessary void* from hashmap.h that caused
> > compile warnings
>
> From Documentation/SubmittingPatches:
>
> Describe your changes in imperative mood, e.g. "m
Thanks for your patch! A few nitpicks below:
> Subject: [PATCH] Removed unnecessary void* from hashmap.h that caused compile
> warnings
>From Documentation/SubmittingPatches:
Describe your changes in imperative mood, e.g. "make xyzzy do frotz"
instead of "[This patch] makes xyzzy do fr
My Dearest,
I am Miss Samira Kipkalya Kones, I am seeking for an investment assistance,
relocation and long term relationship , I am constrained to contact you
because of the abuse which I am receiving from my step mother .My Late father
deposited the sum of US$ 27.5 Million in one bank in Ben
Call strbuf_add_unique_abbrev() to add an abbreviated hash to a strbuf
instead of taking a detour through find_unique_abbrev() and its static
buffer. This is shorter and a bit more efficient.
Patch generated by Coccinelle (and contrib/coccinelle/strbuf.cocci).
Signed-off-by: Rene Scharfe
---
Th
On Thu, Jan 4, 2018 at 6:44 PM, Jeff Hostetler wrote:
>
>
> On 1/3/2018 11:33 AM, Christian Couder wrote:
>>
>> This is implemented only in the promisor remote mode
>> for now by calling fetch_object().
>>
>> Signed-off-by: Christian Couder
>> ---
>> external-odb.c | 15 +++
>> ext
On Thu, Jan 4, 2018 at 8:59 PM, Jeff Hostetler wrote:
>
>> diff --git a/odb-helper.h b/odb-helper.h
>> new file mode 100644
>> index 00..9395e606ce
>> --- /dev/null
>> +++ b/odb-helper.h
>> @@ -0,0 +1,24 @@
>> +#ifndef ODB_HELPER_H
>> +#define ODB_HELPER_H
>> +
>> +struct odb_helper {
>> +
On January 15, 2018 2:06 AM, Johannes Sixt wrote:
> Am 15.01.2018 um 03:37 schrieb Randall S. Becker:
> > On January 14, 2018 4:33 PM, I wrote:
> >> The exotic error code coming back from perl is 162. I can muck with
> >> it, if there was a value more useful to git.
> >> * 553 } else if (
If the `packed_refs` files is entirely empty (i.e., not even a header
line), then `load_contents()` returns 1 even though `snapshot->buf`
and `snapshot->eof` both end up set to NULL. In that case, the
subsequent processing that `create_snapshot()` does is unnecessary,
and also involves computing `N
If `snapshot->buf` is NULL, then `find_reference_location()` has two
problems:
1. It relies on behavior that is technically undefined in C, such as
computing `NULL + 0`.
2. It returns NULL if the reference doesn't exist, even if `mustexist`
is not set. This problem doesn't come up in the cu
Signed-off-by: Michael Haggerty
---
refs/packed-backend.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/refs/packed-backend.c b/refs/packed-backend.c
index 01a13cb817..f20f05b4df 100644
--- a/refs/packed-backend.c
+++ b/refs/packed-backend.c
@@ -69,11 +69,11 @@ st
Thanks for your patch. I haven't measured the performance difference
of `mmap()` vs. `read()` for small `packed-refs` files, but it's not
surprising that `read()` would be faster.
I especially like the fix for zero-length `packed-refs` files. (Even
though AFAIK Git never writes such files, they ar
If a command sets a new env variable GIT_DIR=.git, we need more context
to know where that '.git' is related to.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
trace.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/trace.c b/trace.c
index 8db5bbf3c9..ad75d683bf 100644
--- a/trace.c
+++ b/tra
We normally print full command line, including the program and its
argument. When git_cmd is set, we have a special code path to run the
right "git" program and child_process.argv[0] will not contain the
program name anymore. As a result, we print just the command
arguments.
I thought it was a reg
Occasionally submodule code could execute new commands with GIT_DIR set
to some submodule. GIT_TRACE prints just the command line which makes it
hard to tell that it's not really executed on this repository.
Print the env delta (compared to parent environment) in this case.
Helped-by: Junio C Ham
This is the same as the old code that uses trace_argv_printf() in
run-command.c. This function will be improved in later patches to
print more information from struct child_process.
A slight regression: the old code would print run-command.c:xxx as the
trace location site while the new code prints
From: Jeff King
Trace output which contains arbitrary strings (e.g., the
arguments to commands which we are running) is always passed
through sq_quote_buf(). That function always adds
single-quotes, even if the output consists of vanilla
characters. This can make the output a bit hard to read.
L
The function is about printing a trace line, not releasing the buffer it
receives too. Move strbuf_release() back outside. This makes it easier
to see how strbuf is managed.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
trace.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tr
v5
- makes test-run-command safer
- deletes a dead line
- fixes an embarassing memory leak
Interdiff
diff --git a/t/helper/test-run-command.c b/t/helper/test-run-command.c
index 0ab71f14fb..153342e44d 100644
--- a/t/helper/test-run-command.c
+++ b/t/helper/test-run-command.c
@@ -57,9 +57,14
From: Jeff King
No caller passes anything but "0" for this parameter, which
requests that the function ignore it completely. In fact, in
all of history there was only one such caller, and it went
away in 7f51f8bc2b (alias: use run_command api to execute
aliases, 2011-01-07).
Signed-off-by: Jeff
On Mon, Jan 15, 2018 at 12:44 PM, Alexander Shopov wrote:
> @@ -160,7 +160,7 @@ int check_filename(const char *prefix, const char *arg)
> free(to_free);
> return 0; /* file does not exist */
> }
> - die_errno("failed to stat '%s'", arg);
> + die_
On Mon, Jan 15, 2018 at 12:44 AM, Alexander Shopov wrote:
> Reuse already translated messages if possible
> Do not translate messages aimed at developers of git
A couple comments beyond those from Hannes...
> Signed-off-by: Alexander Shopov
> ---
> diff --git a/git.c b/git.c
> @@ -5,11 +5,11 @@
And again, sigh:
>> const char git_usage_string[] =
>> const char git_more_info_string[] =
> It is not obvious to me where git_usage_string is looked up in the
> message catalog. It is used that way in builtin/help.c ..
I wanted to be consistent with the current state of the file. This is
44 matches
Mail list logo