On Wed, Jan 4, 2017 at 6:34 PM, G. Sylvie Davies wrote:
> Right now the default variant does this:
>
>> --force-with-lease alone, without specifying the details, will protect all
>> remote refs that are going to be updated by requiring their current value to
>> be the same as the remote-tracking
Right now the default variant does this:
> --force-with-lease alone, without specifying the details, will protect all
> remote refs that are going to be updated by requiring their current value to
> be the same as the remote-tracking branch we have for them.
The problem is people sometimes run
> I haven't taken a through look at this patch but I think you may want to
> base it off of 'origin/bw/pathspec-cleanup' series as the changes made in this
> patch now conflict with that series.
eh right, I forgot to mention this in the notes, it requires
sb/submodule-embed-gitdir as well, so I'll
On 01/04, Stefan Beller wrote:
> Every once in a while someone complains to the mailing list to have
> run into this weird assertion[1]. The usual response from the mailing
> list is link to old discussions[2], and acknowledging the problem
> stating it is known.
>
> This patch accomplishes two th
Every once in a while someone complains to the mailing list to have
run into this weird assertion[1]. The usual response from the mailing
list is link to old discussions[2], and acknowledging the problem
stating it is known.
This patch accomplishes two things:
1. Switch assert() to die("BUG") t
On Tue, Jan 3, 2017 at 11:55 PM, Jeff King wrote:
> As this last bit is quoted from me, I won't deny that it's brilliant as
> usual.
obviously. :)
>
> But as this commit message needs to stand on its own, rather than as part of a
> larger discussion thread, it might be worth expanding "one of t
From: Johannes Sixt
When an absolute path is resolved, resolution begins at the first path
component after the root part. The root part is just copied verbatim,
because it must not be inspected for symbolic links. For POSIX paths,
this is just the initial slash, but on Windows, the root part has
Change the name of real_path_internal to strbuf_realpath. In addition
push the static strbuf up to its callers and instead take as a
parameter a pointer to a strbuf to use for the final result.
This change makes strbuf_realpath reentrant.
Signed-off-by: Brandon Williams
---
abspath.c | 53
The current implementation of real_path uses chdir() in order to resolve
symlinks. Unfortunately this isn't thread-safe as chdir() affects a
process as a whole and not just an individual thread. Instead perform
the symlink resolution by hand so that the calls to chdir() can be
removed, making rea
Migrate callers of real_path() who duplicate the return value to use
real_pathdup or strbuf_realpath.
Signed-off-by: Brandon Williams
---
builtin/init-db.c | 6 +++---
environment.c | 2 +-
setup.c | 13 -
sha1_file.c | 2 +-
submodule.c | 2 +-
transpor
Create real_pathdup which returns a caller owned string of the resolved
realpath based on the provide path.
Signed-off-by: Brandon Williams
---
abspath.c | 13 +
cache.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/abspath.c b/abspath.c
index a200d4220..72f716f80 100644
changes in v5:
* set errno to ELOOP when MAXSYMLINKS is exceded.
* revert to use MAXSYMLINKS instead of MAXDEPTH.
* If the OS hasn't defined MAXSYMLINKS, use a fallback value of 32.
Brandon Williams (4):
real_path: resolve symlinks by hand
real_path: convert real_path_internal to strbuf_realpa
On 01/04, Jacob Keller wrote:
> On Wed, Jan 4, 2017 at 10:22 AM, Stefan Beller wrote:
> > On Wed, Jan 4, 2017 at 10:13 AM, Brandon Williams wrote:
> >> On 01/04, Jeff King wrote:
> >>> On Wed, Jan 04, 2017 at 07:56:02AM +0100, Torsten Bögershausen wrote:
> >>>
> >>> > On 04.01.17 01:48, Jeff King
On Wed, Jan 4, 2017 at 10:22 AM, Stefan Beller wrote:
> On Wed, Jan 4, 2017 at 10:13 AM, Brandon Williams wrote:
>> On 01/04, Jeff King wrote:
>>> On Wed, Jan 04, 2017 at 07:56:02AM +0100, Torsten Bögershausen wrote:
>>>
>>> > On 04.01.17 01:48, Jeff King wrote:
>>> > > On Tue, Jan 03, 2017 at 11
On 01/04, Stefan Beller wrote:
> On Tue, Jan 3, 2017 at 11:55 PM, Jeff King wrote:
> > But as this commit message needs to stand on its own, rather than as part
> > of a
> > larger discussion thread, it might be worth expanding "one of the cases"
> > here. And talking about what's happening to th
On Tue, Jan 3, 2017 at 4:50 PM, Richard Hansen wrote:
> If a test fails it might leave the repository in a strange state. Add
> 'git reset --hard' at the beginning of each test to increase the odds
> of passing when an earlier test fails.
So each test is cleaning up the previous test, which *may
On Tue, Jan 3, 2017 at 11:55 PM, Jeff King wrote:
> But as this commit message needs to stand on its own, rather than as part of a
> larger discussion thread, it might be worth expanding "one of the cases"
> here. And talking about what's happening to the other cases.
>
> Like:
>
> This assertio
On Wed, Jan 4, 2017 at 10:13 AM, Brandon Williams wrote:
> On 01/04, Jeff King wrote:
>> On Wed, Jan 04, 2017 at 07:56:02AM +0100, Torsten Bögershausen wrote:
>>
>> > On 04.01.17 01:48, Jeff King wrote:
>> > > On Tue, Jan 03, 2017 at 11:09:18AM -0800, Brandon Williams wrote:
>> > >
>> > >> Only ch
On 01/03, Jacob Keller wrote:
> On Tue, Jan 3, 2017 at 11:09 AM, Brandon Williams wrote:
> > Migrate callers of real_path() who duplicate the retern value to use
> > real_pathdup or strbuf_realpath.
>
> Nit: s/retern/return
Thanks for catching that, I'll fix that in the next reroll.
--
Brandon
On 01/04, Jeff King wrote:
> On Wed, Jan 04, 2017 at 07:56:02AM +0100, Torsten Bögershausen wrote:
>
> > On 04.01.17 01:48, Jeff King wrote:
> > > On Tue, Jan 03, 2017 at 11:09:18AM -0800, Brandon Williams wrote:
> > >
> > >> Only change with v4 is in [1/5] renaming the #define MAXSYMLINKS back t
On Tue, Jan 3, 2017 at 1:33 PM, Johannes Schindelin
wrote:
>
> This patch was originally only to appease Coverity, but it actually *does*
> plug a very real memory leak: previously, *every* call to git_exec_path()
> *possibly* returned a newly-malloc()ed buffer. Now, the first call will
> store th
Removed unused variable 'n' from the 'unsupported_magic()' function.
Signed-off-by: Brandon Williams
---
pathspec.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/pathspec.c b/pathspec.c
index b8faa8f46..b9a3819d6 100644
--- a/pathspec.c
+++ b/pathspec.c
@@ -333,8 +333,
Convert 'fill_directory()' to use the pathspec struct interface from
using the '_raw' entry in the pathspec struct.
Signed-off-by: Brandon Williams
---
dir.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dir.c b/dir.c
index 9ae454dde..bc5ff7216 100644
--- a/dir
Teach simplify_away() and exclude_matches_pathspec() to handle struct
pathspec directly, eliminating the need for the struct path_simplify.
Also renamed the len parameter to pathlen in exclude_matches_pathspec()
to match the parameter names used in simplify_away().
Signed-off-by: Brandon Williams
Now that all callers of the old 'get_pathspec' interface have been
migrated to use the new pathspec struct interface it can be removed
from the codebase.
Since there are no more users of the '_raw' field in the pathspec struct
it can also be removed. This patch also removes the old functionality
Convert the 'internal_copy_pathspec()' function to 'prefix_path()'
instead of using the deprecated 'get_pathspec()' interface. Also,
rename 'internal_copy_pathspec()' to 'internal_prefix_pathspec()' to be
more descriptive of what the funciton is actually doing.
In addition to this, fix a memory l
The 'original' string entry in a pathspec_item is only duplicated some
of the time, instead always make a copy of the original and take
ownership of the memory.
Since both 'match' and 'original' string entries in a pathspec_item are
owned by the pathspec struct, they need to be freed when clearing
Changes in v5:
* Move GUARD_PATHSPEC to prevent checking if pathspec is null twice.
* Mark a string containing 'mnemonic' for translation.
Brandon Williams (16):
mv: remove use of deprecated 'get_pathspec()'
dir: remove struct path_simplify
dir: convert fill_directory to use the pathspec str
Convert 'show_recursive()' to use the pathspec struct interface from
using the '_raw' entry in the pathspec struct.
Signed-off-by: Brandon Williams
---
builtin/ls-tree.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c
ind
Give a more relevant name to the prefix_pathspec function as it does
more than just prefix a pathspec element.
Signed-off-by: Brandon Williams
---
pathspec.c | 24 +++-
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/pathspec.c b/pathspec.c
index e53530e7a..ff2
Factor out the logic responsible for stripping the trailing slash on
pathspecs referencing submodules into its own function.
Signed-off-by: Brandon Williams
---
pathspec.c | 68 ++
1 file changed, 42 insertions(+), 26 deletions(-)
diff
Create helper functions to read the global magic environment variables
in additon to factoring out the global magic gathering logic into its
own function.
Signed-off-by: Brandon Williams
---
pathspec.c | 127 +
1 file changed, 78 insert
Factor out the logic responsible for parsing long magic into its own
function. As well as hoist the prefix check logic outside of the inner
loop as there isn't anything that needs to be done after matching
"prefix:".
Signed-off-by: Brandon Williams
---
pathspec.c | 92 ++
Factor out the logic responsible for parsing short magic into its own
function.
Signed-off-by: Brandon Williams
---
pathspec.c | 54 --
1 file changed, 36 insertions(+), 18 deletions(-)
diff --git a/pathspec.c b/pathspec.c
index 77df55da6..1b0
The logic used to prefix an original pathspec element with 'prefix'
magic is more general purpose and can be used for more than just short
magic. Remove the extra code paths and rename 'prefix_short_magic' to
'prefix_magic' to better indicate that it can be used in more general
situations.
Also,
For better clarity, always show the mnemonic and name of the unsupported
magic being used. This lets users have a more clear understanding of
what magic feature isn't supported. And if they supplied a mnemonic,
the user will be told what its corresponding name is which will allow
them to more eas
Factor out the logic responsible for the magic in a pathspec element
into its own function.
Also avoid calling into the parsing functions when
`PATHSPEC_LITERAL_PATH` is specified since it causes magic to be
ignored and all paths to be treated as literals.
Signed-off-by: Brandon Williams
---
pa
A few small changes to improve readability. This is done by grouping related
assignments, adding blank lines, ensuring lines are <80 characters, and
adding additional comments.
Signed-off-by: Brandon Williams
---
pathspec.c | 25 +++--
1 file changed, 15 insertions(+), 10 de
On 01/04, Brandon Williams wrote:
> On 01/04, Duy Nguyen wrote:
> > On Wed, Jan 4, 2017 at 1:42 AM, Brandon Williams wrote:
> > > diff --git a/dir.c b/dir.c
> > > index 15f7c9993..e8ddd7f8a 100644
> > > --- a/dir.c
> > > +++ b/dir.c
> > > @@ -1353,6 +1353,15 @@ static int simplify_away(const char
On 01/04, Duy Nguyen wrote:
> On Wed, Jan 4, 2017 at 1:42 AM, Brandon Williams wrote:
> > diff --git a/dir.c b/dir.c
> > index 15f7c9993..e8ddd7f8a 100644
> > --- a/dir.c
> > +++ b/dir.c
> > @@ -1353,6 +1353,15 @@ static int simplify_away(const char *path, int
> > pathlen,
> > {
> > int
I am replying to this email across lists because I wanted to
highlight to the git community this jgit change to repacking
that we have up for review
https://git.eclipse.org/r/#/c/87969/
This change introduces a new convention for how to preserve
old pack files in a staging area
(.git/objects
On Wed, Jan 4, 2017 at 1:42 AM, Brandon Williams wrote:
> diff --git a/dir.c b/dir.c
> index 15f7c9993..e8ddd7f8a 100644
> --- a/dir.c
> +++ b/dir.c
> @@ -1353,6 +1353,15 @@ static int simplify_away(const char *path, int pathlen,
> {
> int i;
>
> + if (pathspec)
> + gu
On Tue, Dec 20, 2016 at 6:19 AM, Stefan Beller wrote:
>> On 12/19, Stefan Beller wrote:
> This code is heavily inspired by refs/files-backend.c which upon
> closer inspection only retries directory things within the git directory
> (which is assumed to be accessed in parallel by different invocati
On Wed, Jan 4, 2017 at 2:45 AM, Stefan Beller wrote:
>> In this implementation, the gettext call for the header and the body are done
>> in different places (error function vs. caller) but this call pattern seems
>> to
>> be the easiest variant for the caller, because the message body has to be
Hey Luke,
On Wed, Jan 4, 2017 at 2:41 PM, Luke Diamand wrote:
> On 3 January 2017 at 19:57, Pranit Bauva wrote:
>> The exit code of the upstream in a pipe is ignored thus we should avoid
>> using it. By writing out the output of the git command to a file, we can
>> test the exit codes of both th
Hi Stefan,
On Tue, 3 Jan 2017, Stefan Beller wrote:
> On Mon, Jan 2, 2017 at 8:22 AM, Johannes Schindelin
> wrote:
> > Technically, it is correct that git_exec_path() returns a possibly
> > malloc()ed string. Practically, it is *sometimes* not malloc()ed. So
> > let's just use a static variable
On 3 January 2017 at 20:02, Ori Rawlings wrote:
> Looks good to me.
And me.
>
>
> Ori Rawlings
On 3 January 2017 at 19:57, Pranit Bauva wrote:
> The exit code of the upstream in a pipe is ignored thus we should avoid
> using it. By writing out the output of the git command to a file, we can
> test the exit codes of both the commands.
Do we also need to fix t9814-git-p4-rename.sh ?
>
> Sig
On Mon, Jan 02, 2017 at 05:04:05PM +0100, Johannes Schindelin wrote:
> The "giteveryday" document has a callout list that contains a code
> block. This is not a problem for AsciiDoc, but AsciiDoctor sadly was
> explicitly designed *not* to render this correctly [*1*]. The symptom is
> an unhelpful
On Mon, Jan 02, 2017 at 05:03:57PM +0100, Johannes Schindelin wrote:
> From: =?UTF-8?q?=EB=A7=88=EB=88=84=EC=97=98?=
>
> The `user-manual.txt` is designed as a `book` but the `Makefile` wants
> to build it as an `article`. This seems to be a problem when building
> the documentation with `asciid
50 matches
Mail list logo