Correct.
I think adding the option (both to command line and to config file) is good, as
long as the IO issues are documented. And default to just the fixed number of
threads for now - and with the option, maybe people can then more easily try
out different scenarios and maybe improve on the
Convert this function to use struct object_id. Express several
hardcoded constants in terms of GIT_SHA1_HEXSZ.
Signed-off-by: brian m. carlson
---
builtin/fetch-pack.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git
Use struct object_id in three fields in struct ref and convert all the
necessary places that use it.
Signed-off-by: brian m. carlson
---
builtin/clone.c| 16 +++---
builtin/fetch-pack.c | 4 ++--
builtin/fetch.c| 50
Convert most instances where the sha1 member of struct object is
dereferenced to use get_object_hash. Most instances that are passed to
functions that have versions taking struct object_id, such as
get_sha1_hex/get_oid_hex, or instances that can be trivially converted
to use struct object_id
Replace an unsigned char array with struct object_id and express several
hard-coded constants in terms of GIT_SHA1_HEXSZ.
Signed-off-by: brian m. carlson
---
connect.c | 22 --
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git
Convert all instances of get_object_hash to use an appropriate reference
to the hash member of the oid member of struct object. This provides no
functional change, as it is essentially a macro substitution.
Signed-off-by: brian m. carlson
---
The script used to do
Add has_object_file, which is a wrapper around has_sha1_file, but for
struct object_id.
Signed-off-by: brian m. carlson
---
cache.h | 3 +++
sha1_file.c | 5 +
2 files changed, 8 insertions(+)
diff --git a/cache.h b/cache.h
index 3ba0b8f3..27bc121b 100644
Signed-off-by: brian m. carlson
---
transport-helper.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/transport-helper.c b/transport-helper.c
index 91cb0e72..0eb3cf01 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -878,13
Convert ref_newer and its caller to use struct object_id instead of
unsigned char *.
Signed-off-by: brian m. carlson
---
builtin/remote.c | 2 +-
http-push.c | 4 ++--
remote.c | 8
remote.h | 2 +-
4 files changed, 8 insertions(+), 8
Convert several unsigned char arrays to use struct object_id instead,
and change hard-coded 40-based constants to use GIT_SHA1_HEXSZ as well.
Signed-off-by: brian m. carlson
---
remote.c | 58 +-
1 file
Convert the parse_fetch function to use struct object_id. Remove the
strlen check as get_oid_hex will fail safely on receiving a too-short
NUL-terminated string.
Signed-off-by: brian m. carlson
---
remote-curl.c | 12 ++--
1 file changed, 6 insertions(+),
This macro is a temporary change to ease the transition of struct object
to use struct object_id. It takes an argument of struct object and
returns the object's hash. Provide this hash next to struct object for
easier conversion.
Signed-off-by: brian m. carlson
Dair Grant wrote:
> This takes 10 minutes to process when using a single hash, vs
> 3 seconds with a hash of hashes.
>
> Signed-off-by: Dair Grant
Thanks! I've made some minor edits, will push the following out
to
> if (list.nr || cached)
>num_threads = 1;
> if (!num_threads)
> num_threads = GREP_NUM_THREADS_DEFAULT;
> and then later, instead of use_threads, do:
> if (num_threads <= 1) {
... do single-threaded version ...
> } else {
... do multi-threaded version
On Mon, Nov 09, 2015 at 09:55:34AM -0800, Linus Torvalds wrote:
> > if (list.nr || cached )
> > num_threads = 0; // do not use threads
> > else if (num_threads == 0)
> > num_threads = online_cpus() <= 1 ? 0 : GREP_NUM_THREADS_DEFAULT;
>
> I will say this AGAIN.
>
> The number of threads is
On Mon, Nov 9, 2015 at 9:55 AM, Linus Torvalds
wrote:
>
> So stop with the "online_cpus()" stuff. And don't base your benchmarks
> purely on the CPU-bound case. Because the CPU-bound case is the case
> that is already generally so good that few people will care all
On 09/11/15 17:03, Michael Haggerty wrote:
> From: David Turner
>
> is_branch was already non-static, but this patch declares it in the
> header.
>
> Signed-off-by: Ronnie Sahlberg
> Signed-off-by: David Turner
>
On Mon, Nov 09, 2015 at 08:34:27AM -0800, Victor Leschuk wrote:
> > Why don't we leave it at 8, then? That's the conservative choice, and
> > once we have --threads, people can easily experiment with different
> > values and we can follow-up with a change to the default if need be.
>
> I'd
When passed an ssh:// url, git strips ssh://host from the url but does
not remove leading slashes from the path. So when this test used
ssh://remote//path/to/pwd, the path accessed by our fake SSH is
//path/to/pwd, which cygwin interprets as a UNC path, causing the test
to fail.
We may want to
On Mon, Nov 9, 2015 at 10:32 AM, Victor Leschuk
wrote:
> On Mon, Nov 9, 2015 at 9:28 AM, Victor Leschuk
>> num_threads = online_cpus() <= 1 ? 0 : GREP_NUM_THREADS_DEFAULT;
>
> Actually I have never said the nCPUs played main role in it. T
The pseudo-code you sent
On Mon, Nov 09, 2015 at 06:49:35PM +0100, Dennis Kaarsemaker wrote:
> When passed an ssh:// url, git strips ssh://host from the url but does
> not remove leading slashes from the path. So when this test used
> ssh://remote//path/to/pwd, the path accessed by our fake SSH is
> //path/to/pwd, which
On Mon, Nov 9, 2015 at 9:28 AM, Victor Leschuk
wrote:
>
> Maybe use the simplest version (and keep num_numbers == 0 also as flag for
> all other checks in code like if(num_flags) ):
>
> if (list.nr || cached )
> num_threads = 0; // do not use threads
> else if
On Mon, Nov 09, 2015 at 09:28:12AM -0800, Victor Leschuk wrote:
> Maybe use the simplest version (and keep num_numbers == 0 also as flag for
> all other checks in code like if(num_flags) ):
>
> if (list.nr || cached )
> num_threads = 0; // do not use threads
> else if (num_threads == 0)
On Mon, Nov 9, 2015 at 9:28 AM, Victor Leschuk
wrote:
>
> Maybe use the simplest version (and keep num_numbers == 0 also as flag for
> all other checks in code like if(num_flags) ):
>
> if (list.nr || cached )
> num_threads = 0; // do not use threads
> else if
I'm using vss2git [1] which as the name suggests, converts a VSS
source control database to git. It has had a couple of hiccups, but
for the most part I've not had too much problems that I couldn't
manually fix except for this one.
I have a file that refuses to be staged. The commands are:
From: David Turner
Create new function find_descendant_ref, to hold one of the ref
conflict checks used in verify_refname_available. Multiple backends
will need this function, so move it to the common code.
Also move rename_ref_available to the common code, because
is_per_worktree_ref() will soon be made private, so use the public
interface, ref_type(), in its place. And now that we're using
ref_type(), we can make it clear that we won't pack pseudorefs. This was
the case before, but due to the not-so-obvious reason that this function
is applied to
There are a number of constants, structs, and static functions defined
in refs.c and treated as private to the references module. But we want
to support multiple reference backends within the reference module,
and those backends will need access to some heretofore private
declarations.
We don't
From: David Turner
Because HEAD and stash are per-worktree, every refs backend needs to
go through the files backend to write these refs.
So create a new function, files_log_ref_write, and add it to
refs/refs-internal.h. Later, we will use this to handle reflog updates
On Sun, Nov 08, 2015 at 10:54:04AM +0100, Dennis Kaarsemaker wrote:
> The fake ssh used by this test simply strips ssh://host from the url,
> leaving paths behind that start with //, which cygwin interprets as UNC
> paths, causing the test to fail.
I found the first sentence a little misleading.
On Sun, Nov 08, 2015 at 09:58:06PM -0500, Noam Postavsky wrote:
> > I am leaning more towards ignoring SIGHUP (configurably) being the only
> > really sane path forward. Do you want to try your hand at a patch?
>
> Something like this?
Yes, but with a proper commit message, and an update to
HEAD is a worktree specific sysmref, so that a repository with multiple
worktrees can have multiple HEADs, or HEADs in a worktree different from
the current worktree.
So far, "rev-parse --all" adds only the HEAD from the current worktree
to the list of refs (besides branches etc.). So, a detached
On Mon, Nov 09, 2015 at 03:36:16AM -0800, Victor Leschuk wrote:
> Yeah do also think it would be more reasonable to use "0" for
> "autodetect" default value. However chat this autodetect value should
> be?
>
> For index index-pack and pack-objects we use ncpus() for this, however
> according to
From: Ronnie Sahlberg
Add a new verify_refname_available() function, which checks whether the
refname is available for use, taking all references (both packed and
loose) into account. This function, unlike the old
verify_refname_available(), has semantics independent of the
Signed-off-by: Michael Haggerty
---
refs.c | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/refs.c b/refs.c
index 82129f0..f48c58a 100644
--- a/refs.c
+++ b/refs.c
@@ -341,13 +341,17 @@ static struct ref_dir *get_ref_dir(struct ref_entry
This is another reroll of the pre-vtable part of the refs-backend
patch series dt/refs-backend-pre-vtable. v6 [1] proved cumbersome
because it conflicted messily with lf/ref-is-hidden-namespace [2]. The
conflicts were partly due to the motion of code across files but, even
worse, due to the change
From: David Turner
is_branch was already non-static, but this patch declares it in the
header.
Signed-off-by: Ronnie Sahlberg
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
Signed-off-by:
From: Ronnie Sahlberg
Rename verify_refname_available() to verify_refname_available_dir() to
make the old name available for a more general purpose.
Signed-off-by: Ronnie Sahlberg
Signed-off-by: David Turner
Signed-off-by:
From: David Turner
We will soon increase the visibility of this function, so make its name
more distinctive.
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
Signed-off-by: Michael Haggerty
From: David Turner
Soon we will want to create initdb functions for ref backends, and
code from initdb that calls this function needs to move into the files
backend. So this function needs to be public.
Signed-off-by: David Turner
> Why don't we leave it at 8, then? That's the conservative choice, and
> once we have --threads, people can easily experiment with different
> values and we can follow-up with a change to the default if need be.
I'd propose the following:
if (list.nr || cached) {
On 09/11/15 17:03, Michael Haggerty wrote:
> There are a number of constants, structs, and static functions defined
> in refs.c and treated as private to the references module. But we want
> to support multiple reference backends within the reference module,
> and those backends will need access
[+cc Duy for shallow expertise]
On Sun, Oct 25, 2015 at 10:16:00AM +0100, Tim Janik wrote:
> git fetch --dry-run modifies the repository if --unshallow is passed:
>
> $ git --version
> git version 2.1.4
> $ git fetch --dry-run --unshallow
> remote: Counting objects: 30603, done.
> remote:
.
> In the meantime I'd argue for just getting rid of the online_cpu's
> check, because
> (a) I think it's actively misleading
> (b) the threaded grep probably doesn't hurt much even on a single
> CPU, and the _potential_ upside from IO could easily dwarf the cost.
> (c) do developers
On Tue, Nov 3, 2015 at 10:21 AM, Duy Nguyen wrote:
> On Mon, Nov 2, 2015 at 8:23 PM, Duy Nguyen wrote:
>> On Mon, Nov 2, 2015 at 3:54 PM, Paolo Ciarrocchi
>> wrote:
>>> On Sun, Nov 1, 2015 at 2:55 PM, Nguyễn Thái Ngọc Duy
On 11/09/2015 07:54 PM, Ramsay Jones wrote:
> On 09/11/15 17:03, Michael Haggerty wrote:
>> [...]
>> diff --git a/refs.h b/refs.h
>> index 6d30c98..39b8edc 100644
>> --- a/refs.h
>> +++ b/refs.h
>> @@ -217,6 +217,8 @@ extern void warn_dangling_symrefs(FILE *fp, const char
>> *msg_fmt, const
On 11/09/2015 08:46 PM, Ramsay Jones wrote:
> On 09/11/15 17:03, Michael Haggerty wrote:
>> [...]
>> diff --git a/refs.c b/refs.c
>> index f48c58a..9aff0c8 100644
>> --- a/refs.c
>> +++ b/refs.c
>> @@ -1,6 +1,6 @@
>> #include "cache.h"
>> +#include "refs/refs-internal.h"
>> #include "lockfile.h"
This is the second in a series of conversions to struct object_id.
This series converts more of the refs code and struct object to use
struct object_id. It introduces an additional helper function,
has_object_file, which is the equivalent of has_sha1_file. The name was
chosen to be slightly
Johannes Schindelin writes:
>Hi,
>
>On Tue, 27 Oct 2015, Johannes Schindelin wrote:
>
>> On Mon, 26 Oct 2015, Junio C Hamano wrote:
>>
>> > James McCoy writes:
>> >
>> > >> The code looks OK but the last paragraph makes _us_ worried. What
>>
On Mon, 2015-11-09 at 18:54 +, Ramsay Jones wrote:
>
> On 09/11/15 17:03, Michael Haggerty wrote:
> > From: David Turner
> >
> > is_branch was already non-static, but this patch declares it in the
> > header.
> >
> > Signed-off-by: Ronnie Sahlberg
On Mon, 2015-11-09 at 18:03 +0100, Michael Haggerty wrote:
> This is another reroll of the pre-vtable part of the refs-backend
> patch series dt/refs-backend-pre-vtable. v6 [1] proved cumbersome
> because it conflicted messily with lf/ref-is-hidden-namespace [2]. The
> conflicts were partly due to
On zo, 2015-11-08 at 22:23 +0100, Marc Haber wrote:
> Hi,
>
> I am trying to abuse git as a code distribution channel and would
> like
> to be able to trigger redistribution just by git push.
[insert obligatory remark about git not being a deployment tool]
> The idea is to push to a remote to
Hi Dennis,
thanks for your comments. I appreciate that.
On Mon, Nov 09, 2015 at 09:25:00AM +0100, Dennis Kaarsemaker wrote:
> On zo, 2015-11-08 at 22:23 +0100, Marc Haber wrote:
> > Hi,
> >
> > I am trying to abuse git as a code distribution channel and would
> > like
> > to be able to trigger
On ma, 2015-11-09 at 10:31 +0100, Marc Haber wrote:
> Abusing git here has the advantage that one can save local changes
> and merge them, which is handy for the task at hand (which is
> deploying my dotfiles to "my" servers).
For this I really like vcsh (https://github.com/RichiH/vcsh/) in
From: Jeff King [p...@peff.net]
Sent: Tuesday, November 03, 2015 22:40
To: Junio C Hamano
Cc: Victor Leschuk; git@vger.kernel.org; Victor Leschuk;
torva...@linux-foundation.org; j...@keeping.me.uk
Subject: Re: [PATCH v4] Add git-grep threads param
On
This patch adds -C (change working directory) parameter to
gitk. With this parameter, instead of need to cd to directory
with .git folder, one can point the correct folder from
commandline.
Signed-off-by: Juha-Pekka Heikkila
---
v2: Adjusted the parameter as per
On Mon, Nov 9, 2015 at 10:53 AM, Jeff King wrote:
> Yes, but with a proper commit message, and an update to
> Documentation/config.txt. :)
Right, see attached.
>
> Automated tests would be nice, but I suspect it may be too complicated
> to be worth it.
I attempted
57 matches
Mail list logo