Am 07.04.2017 um 08:30 schrieb Jeff King:
Probably it's "read" which does backslash expansion, but nothing else.
Just grepping git-submodule.sh, some of the "read" calls should probably
be "read -r"
http://wiki.bash-hackers.org/commands/builtin/read has this to say:
Essentially all you need t
Am 07.04.2017 um 08:30 schrieb Jeff King:
I also don't know how some of those loops would cope with
a submodule name that needed quoting).
"git submodule add" worked fine with most of the following names:
"sub"
# potentially confusing the shell
"sub with blanks",
"sub with\nnew
On Fri, Mar 31, 2017 at 9:11 PM, Michael Haggerty wrote:
> Extract a new function from `do_for_each_ref()`. It will be useful
> elsewhere.
>
> Signed-off-by: Michael Haggerty
> ---
> refs.c | 15 +--
> refs/refs-internal.h | 11 +++
> 2 files changed, 24 inserti
> There's "branch --merged" already. And in recent versions of git, the
> scriptable for-each-ref knows it, too. So you could do something like:
>
> git for-each-ref --format='delete %(refname)' --merged HEAD refs/heads/ |
> grep -v 'any-branches-you-want-saved' |
> git update-ref --stdin
Ye
Hi Peff,
On Thu, 6 Apr 2017, Jeff King wrote:
> And it's not like people on ancient mission-critical systems get cut
> off. They can still run the version of Git they were running when their
> OS went out of support.
You keep baiting me, so I'll bite, after resisting the urge for so long.
Let m
On Fri, Mar 31, 2017 at 9:11 PM, Michael Haggerty wrote:
> It turns out that we can now implement
> `refs_verify_refname_available()` based on the other virtual
> functions, so there is no need for it to be defined at the backend
> level. Instead, define it once in `refs.c` and remove the
> `files
On Fri, Mar 31, 2017 at 9:11 PM, Michael Haggerty wrote:
> +void free_ref_cache(struct ref_cache *cache)
> +{
> + free_ref_entry(cache->root);
> + free(cache);
> +}
free(NULL) is no-op (and safe). Maybe we should follow the same
pattern for free_ref_cache(). It's really up to you.
--
On Fri, Mar 31, 2017 at 9:11 PM, Michael Haggerty wrote:
> Instead of keeping a pointer to the ref_store in every ref_dir entry,
> store it once in `struct ref_cache`, and change `struct ref_dir` to
> include a pointer to its containing `ref_cache` instead. This makes it
> easier to add to the inf
On Fri, Mar 31, 2017 at 9:11 PM, Michael Haggerty wrote:
> Use reference iteration rather than do_for_each_entry_in_dir() in the
> definition of files_pack_refs().
A "why" is missing here. My guess is readability/maintainability
because it's easier to follow the code with iterator design, than th
On Wed, Apr 5, 2017 at 9:03 PM, Duy Nguyen wrote:
> On Sat, Apr 1, 2017 at 12:16 PM, Michael Haggerty
> wrote:
>> Duy, have you looked over my patch series? Since you've been working in
>> the area, your feedback would be very welcome, if you have the time for it.
>
> You probably have guessed m
Do a mechanical rename of the functions that will become the reusable
sub-process module.
Signed-off-by: Ben Peart
---
convert.c | 53 +++--
1 file changed, 27 insertions(+), 26 deletions(-)
diff --git a/convert.c b/convert.c
index 747c0c363b..235
Move the sub-proces functions into sub-process.h/c. Add documentation
for the new module in Documentation/technical/api-sub-process.txt
Signed-off-by: Ben Peart
---
Documentation/technical/api-sub-process.txt | 54 +
Makefile| 1 +
convert.c
Add packet_read_line_gently() to enable reading a line without dying on
EOF.
Signed-off-by: Ben Peart
---
pkt-line.c | 12
pkt-line.h | 10 ++
2 files changed, 22 insertions(+)
diff --git a/pkt-line.c b/pkt-line.c
index d4b6bfe076..58842544b4 100644
--- a/pkt-line.c
+++ b/p
To enable future reuse of the filter..process infrastructure,
split the cmd2process structure into two separate parts.
subprocess_entry will now contain the generic data required to manage
the creation and tracking of the child process in a hashmap. Also move
all knowledge of the hashmap into the
Enable sub-processes to gracefully handle when the process dies by
updating subprocess_read_status to return an error on EOF instead of
dying.
Update apply_multi_file_filter to take advantage of the revised
subprocess_read_status.
Signed-off-by: Ben Peart
---
convert.c | 10 --
sub-
Update all functions that are going to be moved into a reusable module
so that they only work with the reusable data structures. Move code
that is specific to the filter out into the filter specific functions.
Signed-off-by: Ben Peart
---
convert.c | 46 -
Add packet_writel() which writes multiple lines in a single call and
then calls packet_flush_gently(). Update convert.c to use the new
packet_writel() function from pkt-line.
Signed-off-by: Ben Peart
---
convert.c | 23 ++-
pkt-line.c | 19 +++
pkt-line.h |
Hopefully final spin. Updates patch 6 to rename additional instances
of "filter" in comment and error messages.
Refactor the filter..process code into a separate sub-process
module that can be used to reduce the cost of starting up a sub-process
for multiple commands. It does this by keeping the
To enable future reuse of the filter..process infrastructure,
split start_multi_file_filter into two separate parts.
start_multi_file_filter will now only contain the generic logic to
manage the creation and tracking of the child process in a hashmap.
start_multi_file_filter_fn is a protocol spec
On Sat, Apr 1, 2017 at 11:54 AM, Michael Haggerty wrote:
> On 03/26/2017 04:42 AM, Nguyễn Thái Ngọc Duy wrote:
>> The transaction struct now takes a ref store at creation and will
>> operate on that ref store alone.
>
> Having worked downstream of this patch series for a while, I started to
> wond
I'll mark this mail and do a follow-up patch once this topic graduates
to master. It's less review burden and mail traffic.
On Sat, Apr 1, 2017 at 11:02 AM, Michael Haggerty wrote:
> On 03/26/2017 04:42 AM, Nguyễn Thái Ngọc Duy wrote:
>> files-backend.c is unlearning submodules. Instead of having
On 4/7/2017 1:19 AM, Jeff King wrote:
On Thu, Apr 06, 2017 at 03:48:07PM -0700, Stefan Beller wrote:
On Thu, Apr 6, 2017 at 1:37 PM, wrote:
From: Jeff Hostetler
Teach traverse_trees_recursive() to not do redundant ODB
lookups when both directories refer to the same OID.
And the reason
On 4/6/2017 8:32 PM, René Scharfe wrote:
Am 06.04.2017 um 22:37 schrieb g...@jeffhostetler.com:
From: Jeff Hostetler
Teach traverse_trees_recursive() to not do redundant ODB
lookups when both directories refer to the same OID.
In operations such as read-tree, checkout, and merge when
the di
Duy Nguyen venit, vidit, dixit 25.03.2017 13:07:
> On Fri, Mar 24, 2017 at 12:55 AM, Junio C Hamano wrote:
>> Michael J Gruber writes:
>>
>>> Are we at a point where we can still rename the new feature at least? If
>>> yes, and keeping everything else is mandatory, than "workspace" or
>>> "workin
SZEDER Gábor venit, vidit, dixit 06.04.2017 16:33:
>> @@ -1779,6 +1780,31 @@ static void wt_shortstatus_print_tracking(struct
>> wt_status *s)
>> }
>>
>> color_fprintf(s->fp, header_color, "]");
>> +
>> + inprogress:
>> +if (!s->show_inprogress)
>> +goto conclude;
>> +
Junio C Hamano venit, vidit, dixit 31.03.2017 20:14:
> Michael J Gruber writes:
>
>> Ordinary (long) status shows information about bisect, revert, am,
>> rebase, cherry-pick in progress, and so does git-prompt.sh. status
>> --short currently shows none of this information.
>>
>> Introduce an `--
On 04/06/2017 10:49 PM, Johannes Sixt wrote:
> Am 06.04.2017 um 19:31 schrieb René Scharfe:
>> Am 06.04.2017 um 18:33 schrieb Johannes Sixt:
>>> Am 06.04.2017 um 17:42 schrieb Martin Liška:
+static inline void *sane_memmove(void *dest, const void *src, size_t n)
+{
+if (n > 0)
>>
On Sun, Mar 26, 2017 at 3:52 AM, Mike Hommey wrote:
> After a note is removed, note_tree_consolidate is called to eliminate
> some useless nodes. The typical case is that if you had an int_node
> with 2 PTR_TYPE_NOTEs in it, and remove one of them, then the
> PTR_TYPE_INTERNAL pointer in the paren
Add MOVE_ARRAY to complement COPY_ARRAY, which was added in 60566cbb.
It provides the same convenience, safety and support for NULL pointers
as representations of empty arrays, just as a wrapper for memmove(3)
instead of memcpy(3).
Inspired-by: Martin Liska
Signed-off-by: Rene Scharfe
---
git-c
Add a semantic patch for converting certain calls of memmove(3) to
MOVE_ARRAY() and apply that transformation to the code base. The result
is shorter and safer code.
Signed-off-by: Rene Scharfe
---
apply.c| 7 +++
builtin/ls-files.c | 3 +--
builtin/mer
Am 07.04.2017 um 16:23 schrieb Martin Liška:
On 04/06/2017 10:49 PM, Johannes Sixt wrote:
Am 06.04.2017 um 19:31 schrieb René Scharfe:
Am 06.04.2017 um 18:33 schrieb Johannes Sixt:
Am 06.04.2017 um 17:42 schrieb Martin Liška:
+static inline void *sane_memmove(void *dest, const void *src, size
Hi Stefan,
Thanks for the reply. Is there any known workaround for this
situation, so that a manual resolve isn't needed for every single
merge in this scenario?
Thanks,
Benbuck
On Thu, Apr 6, 2017 at 4:05 PM, Stefan Beller wrote:
> On Wed, Apr 5, 2017 at 11:10 PM, Ben Nason wrote:
>> Hi,
>>
From: Jeff Hostetler
Version 2 simplifies this and just copies the tree_descriptor
data and borrows the underlying buffer without mallocing. It
also handles the n=3 cases, so merges shold be helped too.
I've updated the p0004 perf times in the commit message.
The V2 changes took ~0.15 off the V
From: Jeff Hostetler
Teach traverse_trees_recursive() to not do redundant ODB
lookups when both directories refer to the same OID.
In operations such as read-tree, checkout, and merge when
the differences between the commits are relatively small,
there will likely be many directories that have t
On Fri, Apr 7, 2017 at 6:59 AM, Michael J Gruber wrote:
> Duy Nguyen venit, vidit, dixit 25.03.2017 13:07:
>> On Fri, Mar 24, 2017 at 12:55 AM, Junio C Hamano wrote:
>>> Michael J Gruber writes:
>>>
Are we at a point where we can still rename the new feature at least? If
yes, and keepi
On Fri, Mar 31, 2017 at 11:14 AM, Junio C Hamano wrote:
> Michael J Gruber writes:
>
>> Ordinary (long) status shows information about bisect, revert, am,
>> rebase, cherry-pick in progress, and so does git-prompt.sh. status
>> --short currently shows none of this information.
>>
>> Introduce an
On 04/07, Jeff King wrote:
> On Fri, Apr 07, 2017 at 08:12:49AM +0200, Joachim Durchholz wrote:
>
> > So... something inside "git submodule add" is replacing the \b with a
> > backspace control code.
> > [...]
> > Whatever that "something" is, it is not doing shell expansion, otherwise it
> > woul
>> Probably it's "read" which does backslash expansion, but nothing else.
>> Just grepping git-submodule.sh, some of the "read" calls should probably
>> be "read -r" (I also don't know how some of those loops would cope with
>> a submodule name that needed quoting).
>
> So I blindly converted all "
When attempting to add a submodule with backslashes in its name 'git
submodule' fails in a funny way. We can see that some of the
backslashes are expanded resulting in a bogus path:
git -C main submodule add ../sub\\with\\backslash
fatal: repository '/tmp/test/sub\witackslash' does not exist
fata
Thanks!
On 4/6/2017 6:48 PM, Stefan Beller wrote:
On Thu, Apr 6, 2017 at 1:37 PM, wrote:
From: Jeff Hostetler
Teach traverse_trees_recursive() to not do redundant ODB
lookups when both directories refer to the same OID.
And the reason for this is that omitting the second lookup
saves time, i.e.
On 4/6/2017 7:07 PM, René Scharfe wrote:
Am 06.04.2017 um 18:34 schrieb g...@jeffhostetler.com:
diff --git a/read-cache.c b/read-cache.c
index 9054369..e8f1900 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -887,6 +887,26 @@ static int has_file_name(struct index_state *istate,
return re
On 4/7/2017 12:46 AM, Jeff King wrote:
On Thu, Apr 06, 2017 at 04:34:39PM +, g...@jeffhostetler.com wrote:
Teach add_index_entry_with_check() and has_dir_name()
to avoid index lookups if the given path sorts after
the last entry in the index.
This saves at least 2 binary searches per ent
Update the file when there is a conflict with a modify/delete scenario
when using the sparse-checkout feature since the file might not be on disk
because the skip-worktree bit is on and the user will need the file and
content to determine how to resolve the conflict.
Signed-off-by: Kevin Willford
When using the sparse checkout feature the git reset command will add
entries to the index that will have the skip-worktree bit off but will
leave the working directory empty. File data is lost because the index
version of the files has been changed but there is nothing that is in the
working dire
While using the sparse-checkout feature there are scenarios where
the working directory should and should not be updated. This patch
series addresses issues found in reset, apply, and merge conflicts.
Kevin Willford (3):
merge-recursive.c: conflict using sparse should update file
apply.c: do
When using the sparse-checkout feature git should not write to
the working directory for files with the skip-worktree bit on.
With the skip-worktree bit on the file may or may not be in
the working directory and if it is not we don't want or need to
create it by calling checkout_entry.
There are t
+ Duy, for sparse checkout
On Fri, Apr 7, 2017 at 12:23 PM, Kevin Willford wrote:
> While using the sparse-checkout feature there are scenarios where
> the working directory should and should not be updated. This patch
> series addresses issues found in reset, apply, and merge conflicts.
>
> Kev
This time for real.
On Fri, Apr 7, 2017 at 12:27 PM, Stefan Beller wrote:
> + Duy, for sparse checkout
>
> On Fri, Apr 7, 2017 at 12:23 PM, Kevin Willford wrote:
>> While using the sparse-checkout feature there are scenarios where
>> the working directory should and should not be updated. This
In 'clear_pathspec()' the incorrect index parameter is used to bound an
inner-loop which is used to free a 'struct attr_match' value field.
Using the incorrect index parameter (in addition to being incorrect)
occasionally causes segmentation faults when attempting to free an
invalid pointer. Fix t
On Fri, Apr 7, 2017 at 12:29 PM, Brandon Williams wrote:
> In 'clear_pathspec()' the incorrect index parameter is used to bound an
> inner-loop which is used to free a 'struct attr_match' value field.
> Using the incorrect index parameter (in addition to being incorrect)
> occasionally causes segm
From: Jeff Hostetler
Version 7 addresses size_t and casting issues in strcmp_offset()
and replaces shell test function with an awk expression to make
the perf test run faster.
Teach add_index_entry_with_check() and has_dir_name()
to avoid index lookups if the given path sorts af
From: Jeff Hostetler
Signed-off-by: Jeff Hostetler
---
t/perf/p0004-read-tree.sh | 117 ++
1 file changed, 117 insertions(+)
create mode 100755 t/perf/p0004-read-tree.sh
diff --git a/t/perf/p0004-read-tree.sh b/t/perf/p0004-read-tree.sh
new file mod
From: Jeff Hostetler
Teach add_index_entry_with_check() and has_dir_name()
to see if the path of the new item is greater than the
last path in the index array before attempting to search
for it.
During checkout, merge_working_tree() populates the new
index in sorted order, so this change will sa
From: Jeff Hostetler
Add strcmp_offset() function to also return the offset of the
first change.
Add unit test and helper to verify.
Signed-off-by: Jeff Hostetler
---
Makefile | 1 +
cache.h | 1 +
read-cache.c | 20 ++
On Fri, Apr 7, 2017 at 12:23 PM, Kevin Willford wrote:
> When using the sparse-checkout feature git should not write to
> the working directory for files with the skip-worktree bit on.
> With the skip-worktree bit on the file may or may not be in
> the working directory and if it is not we don't w
On Fri, Apr 7, 2017 at 12:23 PM, Kevin Willford wrote:
> When using the sparse checkout feature the git reset command will add
> entries to the index that will have the skip-worktree bit off but will
> leave the working directory empty. File data is lost because the index
> version of the files h
When I'm rewriting history, "git push --force-with-lease" is a nice
safeguard compared to "git push --force", but it still assumes the
remote-tracking ref gives the old state the user wants to overwrite.
Tools that do an implicit fetch, assuming it to be a safe operation,
may break this assumption
58 matches
Mail list logo