"Tom \"Ravi\" Hale" writes:
> If a user types `set -e` in an interactive shell, and is using __git_ps1
> to set
> their prompt, the shell will die if the current directory isn't inside a git
> repository.
>
> This is because `set -e` instructs the shell to exit upon a command
>
Giuseppe Bilotta writes:
> Damnit! I just realized that I forgot to amend before the format-patch:
>
> On Sat, Apr 15, 2017 at 4:41 PM, Giuseppe Bilotta
> wrote:
>
>> +signoff! passed to 'git am'
>
> This should be without the !
Johannes Sixt writes:
> Cc Gábor.
>
> Am 15.04.2017 um 00:33 schrieb Ævar Arnfjörð Bjarmason:
>> On Sat, Apr 15, 2017 at 12:08 AM, Carlos Pita
>> wrote:
>>> This is much faster (below 0.1s):
>>>
>>> __git_index_files ()
>>> {
>>> local
Ævar Arnfjörð Bjarmason writes:
> Document & test for cases where there are two remotes pointing to the
> same URL, and a background fetch & subsequent `git push
> --force-with-lease` shouldn't clobber un-updated references we haven't
> fetched.
>
> Some editors like
Lars Schneider writes:
>> -static struct cmd2process *find_multi_file_filter_entry(struct hashmap
>> *hashmap, const char *cmd)
>> +static struct subprocess_entry *find_multi_file_filter_entry(const char
>> *cmd)
>
> I am curious why you removed the hashmap parameter
Jeff King writes:
> The reason I mentioned escaping earlier is I wondered what would happen
> when the submodule starts with a double-quote, or has a newline in the
> name. Git's normal quoting would include backslash escape sequences, and
> I wondered if we might be relying on
On Sun, Apr 16, 2017 at 11:51:32AM -0400, Jeff King wrote:
> > diff --git a/cache.h b/cache.h
> > index e29a093839..27b7286f99 100644
> > --- a/cache.h
> > +++ b/cache.h
> > @@ -1884,6 +1884,8 @@ enum config_origin_type {
> >
> > struct config_options {
> > unsigned int respect_includes :
Martin Liška writes:
> From 0bdf4d717d3d368dd9676d15d20f8592c4d22fde Mon Sep 17 00:00:00 2001
> From: marxin
> Date: Wed, 5 Apr 2017 14:31:32 +0200
> Subject: [PATCH 1/2] Fix nonnull errors reported by UBSAN with GCC 7.
>
> Replace call to memmove with newly
On Sun, Apr 16, 2017 at 11:31:28AM -0400, Jeff King wrote:
> On Sun, Apr 16, 2017 at 05:41:24PM +0700, Nguyễn Thái Ngọc Duy wrote:
>
> > So far we can only pass one flag, respect_includes, to thie function. We
> > need to pass some more (non-flag even), so let's make it accept a struct
> >
On Sun, Apr 16, 2017 at 07:04:01PM +, Sebastian Schuberth wrote:
> Signed-off-by: Sebastian Schuberth
> ---
> sha1_file.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/sha1_file.c b/sha1_file.c
> index 7106389..9ecf71f 100644
> --- a/sha1_file.c
> +++
On Sun, Apr 16, 2017 at 06:55:58PM +0200, René Scharfe wrote:
> If an error occurs when or after closing the stream we call fclose(3)
> again in the error handler. The second call can exhibit undefined
> behavior, so make sure to call fclose(3) at most once.
Yikes. Good catch.
> Also avoid
>
Duy Nguyen writes:
> This is embarassing. I worked on and off on this series over a long
> period of time. I guess at the end I thought everything was ok "since
> the last time" and just sent it away without realizing I hadn't
> actually run the test suite, because it does
Ævar Arnfjörð Bjarmason writes:
> On Tue, Apr 11, 2017 at 12:54 PM, Jeff King wrote:
>> On Tue, Apr 11, 2017 at 11:27:57AM +0200, Ævar Arnfjörð Bjarmason wrote:
>>
>>> Junio: If you're not in some rush to pick this up I'll take this, fix
>>> up a bunch of other
Ævar Arnfjörð Bjarmason writes:
>> That's fine by me. We may want to pick up the segfault one separately
>> (though I don't think it's security-interesting).
>
> Up to you, but in case it's less work for you & Junio I already have
> it in my branch of fallout from this
Jeff King writes:
>> cwd with prefix. I was kinda hoping "super prefix" would solve it, but
>> that one seems designed specifically for submodules.
>
> Ah, right. I think the issue is that "prefix" really serves two uses.
> For things like command-line arguments, we use to find
Ævar Arnfjörð Bjarmason writes:
> On Sat, Apr 8, 2017 at 6:07 PM, Fred .Flintstone wrote:
>> $ git log --format=json
>> [{
>> "commit": "64eabf050e315a4c7a11e0c05ca163be7cf9075e",
>> "tree": "b1e977800f40bbf6de906b1fe4f2de4b4b14f0fd",
>>
Duy Nguyen writes:
>> * nd/worktree-add-lock (2017-04-15) 2 commits
>> - SQUASH???
>> - worktree add: add --lock option
>>
>
> Allow to lock a workktree immediately after it's created. This helps
> prevent a race between "git worktree add; git worktree lock" and "git
>
On Fri, Apr 14, 2017 at 11:23 PM, Jeff King wrote:
> On Tue, Apr 11, 2017 at 10:56:01PM +0200, Ævar Arnfjörð Bjarmason wrote:
>
>> > Right, my suggestion was to teach "grep" to treat --threads=1 as "do not
>> > spawn any other threads". I.e., to make it like the "0" case you were
Skip the administrative overhead of using pthreads when only using one
thread. Instead take the non-threaded path which would be taken under
NO_PTHREADS.
The threading support was initially added in commit
5b594f457a ("Threaded grep", 2010-01-25) with a hardcoded compile-time
number of 8 threads.
Add a PTHREADS prerequisite which is false when git is compiled with
NO_PTHREADS=YesPlease.
There's lots of custom code that runs when threading isn't available,
but before this prerequisite there was no way to test it.
Signed-off-by: Ævar Arnfjörð Bjarmason
---
Makefile
Add a test for the warning that's emitted when --threads or
pack.threads is provided under NO_PTHREADS. This uses the new PTHREADS
prerequisite.
The assertion for !GETTEXT_POISON in the latter test is currently
redundant, since unlike index-pack the pack-objects warnings aren't
i18n'd. However
Fix a buggy warning about threads under NO_PTHREADS=YesPlease. Due to
re-using the delta_search_threads variable for both the state of the
"pack.threads" config & the --threads option setting "pack.threads"
but not supplying --threads would trigger the warning for both
"pack.threads" & --threads.
Add a warning about missing thread support when grep.threads or
--threads is set to a non 0 (default) or 1 (no parallelism) value
under NO_PTHREADS=YesPlease.
This is for consistency with the index-pack & pack-objects commands,
which also take a --threads option & are configurable via
Change the pattern compilation logic under threading so that grep
doesn't compile a pattern it never ends up using on the non-threaded
code path, only to compile it again N times for N threads which will
each use their own copy, ignoring the initially compiled pattern.
This redundant compilation
Add tests for when --threads=N is supplied on the command-line or when
grep.threads is supplied in the configuration.
When the threading support was made run-time configurable in commit
89f09dd34e ("grep: add --threads= option and grep.threads
configuration", 2015-12-15) no tests were added for
Change the grep_{lock,unlock} functions to assert that num_threads is
true, instead of only locking & unlocking the pthread mutex lock when
it is.
These functions are never called when num_threads isn't true, this
logic has gone through multiple iterations since the initial
introduction of grep
This is the spiritual successor to the "grep: add ability to disable
threading with --threads=0 or grep.threads=0" patch I submitted as
part of my PCRE series (<20170408132506.5415-2-ava...@gmail.com>).
There's a long back & forth thread between me and Jeff King as a
follow-up to that which I'll
On Sun, 2017-04-16 at 22:25 +0100, Philip Oakley wrote:
> From: "Christoph Michelbach"
> > It's: git checkout [-p|--patch] [] [--] ...
> The one I quoted is direct from the Synopsis, which does indicate
> there are
> potentially more aspects to resolve, such as the
From: "Christoph Michelbach"
On Sun, 2017-04-16 at 19:03 +0100, Philip Oakley wrote:
From: "Christoph Michelbach"
>
> On Sun, 2017-04-16 at 00:28 +0100, Philip Oakley wrote:
> >
> > From: "Christoph Michelbach"
> > >
> >
Signed-off-by: Sebastian Schuberth
---
sha1_file.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sha1_file.c b/sha1_file.c
index 7106389..9ecf71f 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -3970,7 +3970,6 @@ int read_loose_object(const char *path,
On Sun, 2017-04-16 at 19:03 +0100, Philip Oakley wrote:
> From: "Christoph Michelbach"
> >
> > On Sun, 2017-04-16 at 00:28 +0100, Philip Oakley wrote:
> > >
> > > From: "Christoph Michelbach"
> > > >
> > > >
> > > > While technically in the
On IRC someone pointed me to the glossary section for pathspec, and I
find that even more confusing.
In the section about ":(glob)" it says:
> For example, "**/foo" matches file or directory "foo" anywhere, the same as
> pattern "foo".
This is not true for ls-files: ":(glob)**/.gitignore" is
From: "Christoph Michelbach"
On Sun, 2017-04-16 at 00:28 +0100, Philip Oakley wrote:
From: "Christoph Michelbach"
>
> While technically in the documentation, the fact that changes
> introduced by a checkout are staged automatically, was
> not
Exit the loop orderly through the cleanup code, instead of dashing out
with logfp still open and sb leaking.
Found with Cppcheck.
Signed-off-by: Rene Scharfe
---
refs/files-backend.c | 20
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git
If an error occurs when or after closing the stream we call fclose(3)
again in the error handler. The second call can exhibit undefined
behavior, so make sure to call fclose(3) at most once. Also avoid
calling close(2) after fd has been successfully associated with the
stream, as fclose(3) has
Avoid closing stdin, but do close an actual input file on error exit.
Found with Cppcheck.
Signed-off-by: Rene Scharfe
---
builtin/am.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/builtin/am.c b/builtin/am.c
index f7a7a971fb..805f56cec2 100644
---
On 16 April 2017 at 12:25, Duy Nguyen wrote:
> git ls-files ':(glob)**/*'
>
> Without that '**' is a normal '*' and matching just subdirs is expected.
But '*/' should match exactly one subdirectory deep. Instead it
matches one more more subdirectories.
Meaning it behaves the
On Sun, Apr 16, 2017 at 05:41:25PM +0700, Nguyễn Thái Ngọc Duy wrote:
> If setup_git_directory() and friends have not been called,
> get_git_dir() (because of includeIf.gitdir:XXX) would lead to
>
> die("BUG: setup_git_env called without repository");
>
> There are two cases when a config
On Sun, Apr 16, 2017 at 05:41:24PM +0700, Nguyễn Thái Ngọc Duy wrote:
> So far we can only pass one flag, respect_includes, to thie function. We
> need to pass some more (non-flag even), so let's make it accept a struct
> instead of an integer.
Yeah, this makes sense. But...
> diff --git
On 2017-04-11 09:26, Lars Schneider wrote:
Add a dedicated build job for static analysis. As a starter we only run
coccicheck but in the future we could run Clang Static Analyzer or
similar tools, too.
Just FYI, some time ago someone (I don't recall who) signed up Git with
Coverity's free
On Sun, 2017-04-16 at 00:28 +0100, Philip Oakley wrote:
> From: "Christoph Michelbach"
> >
> > While technically in the documentation, the fact that changes
> > introduced by a checkout are staged automatically, was
> > not obvious when reading its documentation. It is
On Sat, Apr 15, 2017 at 2:17 AM, Alistair Buxton wrote:
> To reproduce, go to any git repository and run:
>
> diff <(git ls-files '**/*' | sort) <(git ls-files | sort)
Actually the '**/' magic only kicks in if you write
git ls-files ':(glob)**/*'
Without that '**' is
On Sat, Apr 15, 2017 at 2:17 AM, Alistair Buxton wrote:
> To reproduce, go to any git repository and run:
>
> diff <(git ls-files '**/*' | sort) <(git ls-files | sort)
>
> Expected result: No output since both commands should produce identical
> output.
>
> Actual
On Sat, Apr 15, 2017 at 5:14 PM, Junio C Hamano wrote:
> * nd/conditional-config-include (2017-04-14) 2 commits
> - config: resolve symlinks in conditional include's patterns
> - path.c: and an option to call real_path() in expand_user_path()
>
$GIT_DIR may in some cases be
If setup_git_directory() and friends have not been called,
get_git_dir() (because of includeIf.gitdir:XXX) would lead to
die("BUG: setup_git_env called without repository");
There are two cases when a config file could be read before $GIT_DIR is
located. The first one is
So far we can only pass one flag, respect_includes, to thie function. We
need to pass some more (non-flag even), so let's make it accept a struct
instead of an integer.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
Prep patch for the bug fix in 2/2.
builtin/config.c | 21
If a user types `set -e` in an interactive shell, and is using __git_ps1
to set
their prompt, the shell will die if the current directory isn't inside a git
repository.
This is because `set -e` instructs the shell to exit upon a command
returning a non-zero exit status, and the following command
Dear Friend,
I would like to discuss a very important issue with you. I am writing to find
out if this is your valid email. Please, let me know if this email is valid
Kind regards
Adrien Saif
Attorney to Quatif Group of Companies
On Sat, Apr 15, 2017 at 01:00:51PM -0700, Stephen Kent wrote:
> It would be nice if the branch, remote tracking branch, and branch commit
> comparison count colors in git status --short --branch were configurable
> like the other git status colors.
That seems like a reasonable thing to want.
I
It was never used.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 4 ++--
refs/ref-cache.c | 6 +++---
refs/ref-cache.h | 11 +--
3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
It is a leveling violation for `ref_cache` to know about
`files_ref_store` or that it should call `read_loose_refs()` to lazily
fill cache directories. So instead, have its constructor take as an
argument a callback function that it should use for lazy-filling, and
change `files_ref_store` to
Extract a new function, `get_loose_ref_cache()`, from
get_loose_ref_dir(). The function returns the `ref_cache` for the
loose refs of a `files_ref_store`.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 9 +++--
1 file changed, 7 insertions(+), 2
Extract a new function from `refs_resolve_ref_unsafe()`. It will be
useful elsewhere.
Signed-off-by: Michael Haggerty
---
refs.c | 11 +--
refs/refs-internal.h | 4
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/refs.c b/refs.c
The `ref_cache` code is currently too tightly coupled to
`files-backend`, making the code harder to understand and making it
awkward for new code to use `ref_cache` (as we indeed have planned).
Start loosening that coupling by splitting `ref_cache` into a separate
module.
This commit moves code,
Change `cache_ref_iterator_begin()` to take two new arguments:
* `prefix` -- to iterate only over references with the specified
prefix.
* `prime_dir` -- to "prime" (i.e., pre-load) the cache before starting
the iteration.
The new functionality makes it possible for
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_backend` definition.
Signed-off-by: Michael Haggerty
Change `lock_raw_ref()` and `lock_ref_sha1_basic()` to use
`refs_verify_refname_available()` instead of
`verify_refname_available_dir()`. This means that those callsites now
check for conflicts with all references rather than just packed refs,
but the performance cost shouldn't be significant (and
Its only remaining caller was itself.
Signed-off-by: Michael Haggerty
---
refs/ref-cache.c | 21 -
refs/ref-cache.h | 11 ---
2 files changed, 32 deletions(-)
diff --git a/refs/ref-cache.c b/refs/ref-cache.c
index b3a30350d7..6059362f1d 100644
This function's visibility is about to be increased, so give it a more
distinctive name.
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
This function's visibility is about to be increased, so give it a more
distinctive name.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index
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 insertions(+), 2 deletions(-)
diff --git a/refs.c
Use reference iteration rather than `do_for_each_entry_in_dir()` in
the definition of `files_pack_refs()`. This makes the code shorter and
easier to follow, because the logic can be inline rather than spread
between the main function and a callback function, and it removes the
need to use
That "refs/bisect/" has to be handled specially when filling the
ref_cache for loose references is a peculiarity of the files backend,
and the ref-cache code shouldn't need to know about it. So move this
code to the callback function, `loose_fill_ref_dir()`.
Signed-off-by: Michael Haggerty
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 information that is accessible from
a `ref_dir` without
For now, it just wraps a `ref_entry *` that points at the root of the
tree. Soon it will hold more information.
Add two new functions, `create_ref_cache()` and `free_ref_cache()`.
Make `free_ref_entry()` private.
Change files-backend to use this type to hold its caches.
Signed-off-by: Michael
Use reference iteration rather than do_for_each_entry_in_dir() in the
definition of commit_packed_refs().
Note that an internal consistency check that was previously done in
`write_packed_entry_fn()` is not there anymore. This is actually an
improvement:
The old error message was emitted when
This function's visibility is about to be increased, so give it a more
distinctive name.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index
The new name is more analogous to `get_packed_ref_dir()`.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index c0550ad9d6..3beab0b752 100644
---
Since references under "refs/bisect/" are per-worktree, they have to
be sought in the worktree rather than in the main repository. But
since loose references are found by traversing directories, the
reference iterator won't even get the idea to look for a
"refs/bisect/" directory in the worktree
This is v3 of a patch series to separate the reference caching code
into a separate module that interacts with `files_ref_cache` more at
arm's length. Thanks to Stefan and Duy for their feedback about v2 [1].
This version has only minor changes since v2 (and indeed since v1 [2]):
* Rebased onto
Dear Friend,
I would like to discuss a very important issue with you. I am writing to find
out if this is your valid email. Please, let me know if this email is valid
Kind regards
Adrien Saif
Attorney to Quatif Group of Companies
On 04/07/2017 01:53 PM, Duy Nguyen wrote:
> 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
On 04/07/2017 01:51 PM, Duy Nguyen wrote:
> 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
73 matches
Mail list logo