On Thu, Dec 8, 2016 at 5:39 AM, Brandon Williams wrote:
> On 12/07, Duy Nguyen wrote:
>> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote:
>> > Create helper functions to read the global magic environment variables
>> > in additon to factoring out the global magic gathering logic into its
>
On Thu, Dec 8, 2016 at 6:27 AM, Brandon Williams wrote:
>> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote:
>> > @@ -362,8 +368,6 @@ static unsigned prefix_pathspec(struct pathspec_item
>> > *item,
>> > } else {
>> > item->original = xstrdup(elt);
>> > }
>>
On Tue, Dec 6, 2016 at 3:16 AM, Brandon Williams wrote:
> On 12/05, Stefan Beller wrote:
>> > static const char *real_path_internal(const char *path, int die_on_error)
>> > {
>> > - static struct strbuf sb = STRBUF_INIT;
>> > + static struct strbuf resolved = STRBUF_INIT;
>>
>> Also
On Thu, Dec 8, 2016 at 8:46 AM, Stefan Beller wrote:
> The current caller of connect_work_tree_and_git_dir passes
> an absolute path for the `git_dir` parameter. In the future patch
> we will also pass in relative path for `git_dir`. Extend the functionality
> of connect_work_tree_and_git_dir to t
On Thu, Dec 8, 2016 at 8:46 AM, Stefan Beller wrote:
> Just like main commands in Git, the submodule helper needs
> access to the superproject prefix. Enable this in the git.c
> but have its own fuse in the helper code by having a flag to
> turn on the super prefix.
>
> Signed-off-by: Stefan Belle
On Thu, Dec 8, 2016 at 8:46 AM, Stefan Beller wrote:
>
> worktree = xcalloc(1, sizeof(*worktree));
> worktree->path = strbuf_detach(&worktree_path, NULL);
> @@ -101,7 +101,8 @@ static struct worktree *get_main_worktree(void)
All the good stuff is outside context lines again.. Some
Hi Junio,
On Thu, Dec 8, 2016 at 4:48 AM, Stefan Beller wrote:
> On Wed, Dec 7, 2016 at 11:41 AM, Junio C Hamano wrote:
>> The require_clean_work_tree() function calls hold_locked_index()
>> with die_on_error=0 to signal that it is OK if it fails to obtain
>> the lock, but unconditionally calls
Hi Stephan,
On Thu, Dec 8, 2016 at 5:51 AM, Stephan Beyer wrote:
> diff --git a/builtin/am.c b/builtin/am.c
> index 6981f42ce..7cf40e6f2 100644
> --- a/builtin/am.c
> +++ b/builtin/am.c
> @@ -2124,7 +2124,7 @@ static int safe_to_abort(const struct am_state *state)
>
> if (read_state_file(
On Thu, Dec 8, 2016 at 8:46 AM, Stefan Beller wrote:
> Signed-off-by: Stefan Beller
> ---
> worktree.c | 24
> worktree.h | 7 +++
> 2 files changed, 31 insertions(+)
>
> diff --git a/worktree.c b/worktree.c
> index 75db689672..2559f33846 100644
> --- a/worktree.c
>
On Thu, Dec 8, 2016 at 5:40 PM, Duy Nguyen wrote:
> Alternatively, we could add a new flag to get_worktrees() to tell it
> to return all worktrees if there is a least one linked worktree, or
> return NULL if there's only main worktree. I'm not sure if this is
> clever or very stupid.
No, this may
On Thu, Dec 8, 2016 at 8:46 AM, Stefan Beller wrote:
> diff --git a/dir.c b/dir.c
> index 8b74997c66..cc5729f733 100644
> --- a/dir.c
> +++ b/dir.c
> @@ -2774,3 +2774,15 @@ void connect_work_tree_and_git_dir(const char
> *work_tree, const char *git_dir)
> free(real_work_tree);
> f
On Thu, Dec 8, 2016 at 4:01 AM, Stefan Beller wrote:
> +/*
> + * Migrate the git directory of the given `path` from `old_git_dir` to
> + * `new_git_dir`. If an error occurs, append it to `err` and return the
> + * error code.
> + */
> +int relocate_gitdir(const char *path, const char *old_git_dir,
On Thu, Dec 8, 2016 at 7:36 AM, Brandon Williams wrote:
>> > @@ -25,25 +26,43 @@ static const char **internal_copy_pathspec(const char
>> > *prefix,
>> > {
>> > int i;
>> > const char **result;
>> > + struct pathspec ps;
>> > ALLOC_ARRAY(result, count + 1);
>> > -
On Thu, Dec 8, 2016 at 7:03 AM, Brandon Williams wrote:
> On 12/07, Duy Nguyen wrote:
>> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote:
>> > Convert 'create_simplify()' to use the pathspec struct interface from
>> > using the '_raw' entry in the pathspec.
>>
>> It would be even better to
Am 07.12.2016 um 23:29 schrieb Brandon Williams:
Instead of assuming root is "/"
I'll need to extract what root is from an absolute path. Aside from
what root looks like, do most other path constructs behave similarly in
unix and windows? (like ".." and "." as examples)
Yes, .. and . work the
Using Git-2.11.0 with the latest git-lfs 1.5.2 (also tested with
1.5.3) cloning from our locally hosted gitlab CE server via HTTPS.
When cloning a repo (large, 3.3 gig in git, 10.3 in LFS) for the
first time the clone will finish the checkout of the git part, then
when it starts downloading the
Hi Junio,
On Wed, 7 Dec 2016, Junio C Hamano wrote:
> The "libify sequencer" topic stopped passing the die_on_error option
> to hold_locked_index(), and this lost an error message from "git
> merge --ff-only $commit" when there are competing updates in
> progress.
Sorry for the breakage.
When l
Hi,
My name is Julinda, i'm single and looking.
--only is implied when paths are present, and required
them unless --amend. But with --allow-empty it should
be allowed as well - it is the only way to create an
empty commit in the presence of staged changes.
Also remove the post-fact cleverness indication;
it's in the man page anyway.
Signed-of
> On 08 Dec 2016, at 12:46, Nick Warr wrote:
>
> Using Git-2.11.0 with the latest git-lfs 1.5.2 (also tested with
> 1.5.3) cloning from our locally hosted gitlab CE server via HTTPS.
>
> When cloning a repo (large, 3.3 gig in git, 10.3 in LFS) for the
> first time the clone will finish the che
That looks pretty much like the error we're dealing with, any reason
why going back a point version on Git (not git-lfs) would resolve the
issue however?
On 8 December 2016 at 13:57, Lars Schneider wrote:
>
>> On 08 Dec 2016, at 12:46, Nick Warr wrote:
>>
>> Using Git-2.11.0 with the latest git-
Version sort with prerelease reordering sometimes puts tagnames in the
wrong order, when the common part of two compared tagnames ends with
the leading character(s) of one or more configured prerelease
suffixes. Add tests that demonstrate these issues.
The unrelated '--format should list tags as
The '--force is moot with a non-existing tag name' test creates two
new tags, which are then deleted right after the test is finished,
outside the test_expect_success block, allowing 'git tag -d's output to
pollute the test output.
Use test_when_finished to delete those tags.
Signed-off-by: SZEDE
> After having slept on this a couple of times
After having slept on it a few (erm...) more times...
> I think the longest
> matching prerelease suffix should determine the sorting order.
>
> A release tag usually consists of an optional prefix, e.g. 'v' or
> 'snapshot-', followed by the actual
... instead of setting and then manually unsetting configuration
variables, on one occasion even outside the test_expect_success block.
Signed-off-by: SZEDER Gábor
---
t/t7004-tag.sh | 23 ++-
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/t/t7004-tag.sh b/t/
The 'versionsort.prereleaseSuffix' configuration variable, as its name
suggests, is supposed to only deal with tagnames with prerelease
suffixes, and allows sorting those prerelease tags in a user-defined
order before the suffixless main release tag, instead of sorting them
simply lexicographically
Version sort with prerelease reordering sometimes puts tagnames in the
wrong order, when the common part of two compared tagnames overlaps
with the leading character(s) of one or more configured prerelease
suffixes. Note the position of "v2.1.0-beta-1":
$ git -c versionsort.prereleaseSuffix=-be
The swap_prereleases() helper function is responsible for finding
configured prerelease suffixes in a pair of tagnames to be compared,
but this function currently gets to see only the parts of those two
tagnames starting at the first different character. To fix some
issues related to the common pa
When comparing tagnames, it is possible that a tagname contains more
than one of the configured prerelease suffixes around the first
different character. After fixing a bug in the previous commit such a
tagname is sorted according to the contained suffix which comes first
in the configuration. Th
> On 08 Dec 2016, at 15:00, Nick Warr wrote:
>
> That looks pretty much like the error we're dealing with, any reason
> why going back a point version on Git (not git-lfs) would resolve the
> issue however?
Going back to GitLFS 1.4.* would make the error disappear. However, I think
you should f
Hi Dave,
I got a couple of bug reports that claim that 2.10.2 regressed on using
network credentials. That is, users regularly hit Enter twice when being
asked for user name and password while fetching via https://, and cURL
automatically used to fall back to using the login credentials (i.e.
auth
As the number of identical steps to be done for both tagnames grows,
extract them into a helper function, with the additional benefit that
the conditionals near the end of swap_prereleases() will use more
meaningful variable names.
Signed-off-by: SZEDER Gábor
---
I was not particularly happy wit
Hi,
On Wed, 7 Dec 2016, Stephan Beyer wrote:
> diff --git a/sequencer.c b/sequencer.c
> index 30b10ba14..c9b560ac1 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -27,6 +27,7 @@ GIT_PATH_FUNC(git_path_seq_dir, "sequencer")
> static GIT_PATH_FUNC(git_path_todo_file, "sequencer/todo")
> stati
The pager configuration needs to be read early, possibly before
discovering any .git/ directory.
Let's not hide this function in pager.c, but make it available to other
callers.
Signed-off-by: Johannes Schindelin
---
cache.h | 1 +
config.c | 31 +++
pager.c | 31
Earlier, we punted and simply assumed that we are in the top-level
directory of the project, and that there is no .git file but a .git/
directory so that we can read directly from .git/config.
Let's discover the .git/ directory correctly.
Signed-off-by: Johannes Schindelin
---
config.c | 69 +++
To refactor read_early_config() so that it discovers .git/config
properly, we have to make certain that commands such as `git init` (i.e.
commands that create their own .git/ and therefore do *not* want to
be affected by any other .git/ directory) skip this discovery.
Let's introduce a flag that s
The `init` and `clone` commands create their own .git/ directory,
therefore we must be careful not to read any repository config when
determining the pager settings.
Signed-off-by: Johannes Schindelin
---
builtin/am.c| 2 +-
builtin/blame.c | 2 +-
builtin/grep.c | 4 ++--
builtin/log.c
So far, we only look whether the startup_info claims to have seen a
git_dir.
However, do_git_config_sequence() (and consequently the
git_config_with_options() call used by read_early_config() asks the
have_git_dir() function whether we have a .git/ directory, which in turn
also looks at git_dir an
Hopefully these patches will lead to something that we can integrate,
and that eventually will make Git's startup sequence much less
surprising.
The idea here is to discover the .git/ directory gently (i.e. without
changing the current working directory), and to use it to read the
.git/config file
This ports the part from setup_git_directory_gently_1() where the
GIT_CEILING_DIRECTORIES environment variable is handled.
TODO: DRY up code again (exporting canonicalize_ceiling_directories()?)
Signed-off-by: Johannes Schindelin
---
config.c | 56 +++
Signed-off-by: Johannes Schindelin
---
t/helper/test-config.c | 15 +++
t/t1309-early-config.sh | 50 +
2 files changed, 65 insertions(+)
create mode 100755 t/t1309-early-config.sh
diff --git a/t/helper/test-config.c b/t/helper/test-c
On 8 December 2016 at 14:18, Lars Schneider wrote:
>
>> On 08 Dec 2016, at 15:00, Nick Warr wrote:
>>
>> That looks pretty much like the error we're dealing with, any reason
>> why going back a point version on Git (not git-lfs) would resolve the
>> issue however?
>
> Going back to GitLFS 1.4.* w
Andreas Krey writes:
> Ok, I've removed the clever message, as Junio suggested.
> I don't know what else to do to make it acceptable. :-)
> We're going to deploy it internally anyway, but I think
> it belongs in git.git as well (aka 'Can I has "will queue"?').
Oh, sorry for being unclear. Befor
Johannes Sixt writes:
> Am 07.12.2016 um 23:29 schrieb Brandon Williams:
>> Instead of assuming root is "/"
>> I'll need to extract what root is from an absolute path. Aside from
>> what root looks like, do most other path constructs behave similarly in
>> unix and windows? (like ".." and "." as
On Thu, Dec 08, 2016 at 04:35:56PM +0100, Johannes Schindelin wrote:
> The idea here is to discover the .git/ directory gently (i.e. without
> changing the current working directory), and to use it to read the
> .git/config file early, before we actually called setup_git_directory()
> (if we ever
Johannes Schindelin writes:
> On Wed, 7 Dec 2016, Stephan Beyer wrote:
>
>> diff --git a/sequencer.c b/sequencer.c
>> index 30b10ba14..c9b560ac1 100644
>> --- a/sequencer.c
>> +++ b/sequencer.c
>> @@ -27,6 +27,7 @@ GIT_PATH_FUNC(git_path_seq_dir, "sequencer")
>> static GIT_PATH_FUNC(git_path_tod
On Wed, Dec 07, 2016 at 05:22:30PM -0800, Stefan Beller wrote:
> On Wed, Dec 7, 2016 at 4:39 PM, wrote:
>
> >
> > Previously test contained errorneous
> > test_must_fail, which was masked by
> > missing &&.
>
> I wonder if we could make either
> the test_must_fail intelligent to de
On 12/08, Duy Nguyen wrote:
> On Tue, Dec 6, 2016 at 3:16 AM, Brandon Williams wrote:
> > On 12/05, Stefan Beller wrote:
> >> > static const char *real_path_internal(const char *path, int
> >> > die_on_error)
> >> > {
> >> > - static struct strbuf sb = STRBUF_INIT;
> >> > + static s
Paul Tan writes:
> Hmm, to add on, looking at the three other call sites of this
> function, two of them (builtin/commit.c and builtin/describe.c)
> basically do:
>
> if (0 <= fd)
> update_index_if_able(...)
>
> with that 0 <= fd conditional. With this patch it becomes three out of
>
On Thu, Dec 8, 2016 at 9:46 AM, Jeff King wrote:
>
> will both trigger on the &&-chain linter, because it uses a magic exit
> code to detect the breakage. I think the problem is just that the
> &&-chain linter cannot peek inside subshells, and that's where the bug
> was in this case.
Uh, yeah in
On 12/08/2016 08:46 PM, Jeff King wrote:
On Wed, Dec 07, 2016 at 05:22:30PM -0800, Stefan Beller wrote:
On Wed, Dec 7, 2016 at 4:39 PM, wrote:
Previously test contained errorneous
test_must_fail, which was masked by
missing &&.
I wonder if we could make either
the test_must_
On 12/08, Duy Nguyen wrote:
> On Thu, Dec 8, 2016 at 7:36 AM, Brandon Williams wrote:
> >> > @@ -25,25 +26,43 @@ static const char **internal_copy_pathspec(const
> >> > char *prefix,
> >> > {
> >> > int i;
> >> > const char **result;
> >> > + struct pathspec ps;
> >> >
Thanks all for taking a look at this, I didn't expect such a quick response :).
No hard feelings re: breakage; I know how gnarly these sorts of
refactors can be (and more libification is always better :)).
Robbie
On Thu, Dec 8, 2016 at 3:53 AM, Johannes Schindelin
wrote:
> Hi Junio,
>
> On Wed,
Johannes Schindelin writes:
> Sorry for the breakage.
Apologies from me, too. Once a topic is merged, the credit still
remains with the contributor, but the blame is shared by the project
as a whole, with those who missed breakages during their reviews,
and those who didn't review or test and l
On Thu, Dec 8, 2016 at 10:04 AM, vi0oss wrote:
> On 12/08/2016 08:46 PM, Jeff King wrote:
>>
>> On Wed, Dec 07, 2016 at 05:22:30PM -0800, Stefan Beller wrote:
>>
>>> On Wed, Dec 7, 2016 at 4:39 PM, wrote:
>>>
Previously test contained errorneous
test_must_fail, which was mask
On 12/08, Duy Nguyen wrote:
> On Thu, Dec 8, 2016 at 7:03 AM, Brandon Williams wrote:
> > On 12/07, Duy Nguyen wrote:
> >> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote:
> >> > Convert 'create_simplify()' to use the pathspec struct interface from
> >> > using the '_raw' entry in the path
Am 08.12.2016 um 08:55 schrieb Torsten Bögershausen:
Some conversion may be done in mingw.c:
https://github.com/github/git-msysgit/blob/master/compat/mingw.c
So what I understand, '/' in Git are already converted into '\' if needed ?
Only if needed, and there are not many places where this is t
On Thu, Dec 08, 2016 at 09:04:46PM +0300, vi0oss wrote:
> Why Git test use &&-chains instead of proper "set -e"?
Because "set -e" comes with all kinds of confusing corner cases. Using
&& chains is annoying, but rarely surprising.
One of my favorite examples is:
set -e
(
false
echo 1
On Thu, Dec 8, 2016 at 2:09 AM, Duy Nguyen wrote:
> On Thu, Dec 8, 2016 at 8:46 AM, Stefan Beller wrote:
>>
>> worktree = xcalloc(1, sizeof(*worktree));
>> worktree->path = strbuf_detach(&worktree_path, NULL);
>> @@ -101,7 +101,8 @@ static struct worktree *get_main_worktree(void)
Jacob Keller writes:
>> + are left behind. If a displayed ref has fewer components than
>> + ``, the command aborts with an error.
>>
>
> Would it make more sense to not die and instead just return the empty
> string? On the one hand, if we die() it's obvious that you tried to
> stri
On Wed, Dec 7, 2016 at 5:09 PM, SZEDER Gábor wrote:
> ref-filter's parse_ref_filter_atom() function parses an atom between
> the start and end pointers it gets as arguments. This is fine for two
> of its callers, which process '%(atom)' format specifiers and the end
> pointer comes directly from
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
v2 of this series addresses the comments brought up in v1, most of which were
small cosmetic changes (since this is mostly a cosmetic series to begin with).
Brandon Williams (16):
mv: remove use of deprecated 'get_pathspec()'
dir: convert create_simplify to use the pathspec struct interface
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
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 7df292b..a50b6f0 100644
--- a/dir.c
+
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,
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
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 523d7bf..29054
Convert 'create_simplify()' to use the pathspec struct interface from
using the '_raw' entry in the pathspec.
Signed-off-by: Brandon Williams
---
dir.c | 25 -
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/dir.c b/dir.c
index bfa8c8a..7df292b 100644
---
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 ++
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 4686298..08abd
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
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
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 | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
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
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
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
On 12/08, Johannes Sixt wrote:
> Am 08.12.2016 um 08:55 schrieb Torsten Bögershausen:
> >Some conversion may be done in mingw.c:
> >https://github.com/github/git-msysgit/blob/master/compat/mingw.c
> >So what I understand, '/' in Git are already converted into '\' if needed ?
>
> Only if needed, an
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 8f367f0..ec0d590 100644
--- a/pathspec.c
+++ b/pathspec.c
@@ -333,8 +333,8 @@
Hi,
I'm a little afraid of feeding Parkinson's law of triviality here, but... ;)
On 12/08/2016 06:27 PM, Junio C Hamano wrote:
> Johannes Schindelin writes:
>
>> On Wed, 7 Dec 2016, Stephan Beyer wrote:
>>
>>> diff --git a/sequencer.c b/sequencer.c
>>> index 30b10ba14..c9b560ac1 100644
>>> ---
On Thu, Dec 8, 2016 at 2:51 AM, Duy Nguyen wrote:
> On Thu, Dec 8, 2016 at 5:40 PM, Duy Nguyen wrote:
>> Alternatively, we could add a new flag to get_worktrees() to tell it
>> to return all worktrees if there is a least one linked worktree, or
>> return NULL if there's only main worktree. I'm no
SZEDER Gábor writes:
> The 'versionsort.prereleaseSuffix' configuration variable, as its name
> suggests, is supposed to only deal with tagnames with prerelease
> suffixes, and allows sorting those prerelease tags in a user-defined
> order before the suffixless main release tag, instead of sortin
Hello
I use the same machine for work and open-source contribution. In both cases, I
deal with a lot of repositories. Depending on whether I commit for work or
open-source activities, I must use a different mail address. I used to setup
work address for each work repo in git local config, but t
>
> unsigned int is probably safer for variables that are used as bit-flags.
done
> If it's meant for users to see, please _() the string.
done
>> + { "submodule--helper", cmd_submodule__helper, RUN_SETUP |
>> SUPPORT_SUPER_PREFIX},
>
> The same macro defined twice in two separate .c fil
v7:
* do not expose submodule_get_worktrees. The values may be wrong internally,
but for our purpose we do not care about the actual values, only the count.
Document the wrong values!
* more strings are _(marked up)
* renamed variables in connect_work_tree_and_git_dir
* unsigned instead of int
Just like main commands in Git, the submodule helper needs
access to the superproject prefix. Enable this in the git.c
but have its own fuse in the helper code by having a flag to
turn on the super prefix.
Signed-off-by: Stefan Beller
---
builtin/submodule--helper.c | 31
The current caller of connect_work_tree_and_git_dir passes
an absolute path for the `git_dir` parameter. In the future patch
we will also pass in relative path for `git_dir`. Extend the functionality
of connect_work_tree_and_git_dir to take relative paths for parameters.
We could work around this
In a later patch we want to move around the the git directory of
a submodule. Both submodules as well as worktrees are involved in
placing git directories at unusual places, so their functionality
may collide. To react appropriately to situations where worktrees
in submodules are in use, offer a ne
That function was primarily used by submodule code, but the function
itself is not inherently about submodules. In the next patch we'll
introduce relocate_git_dir, which can be used by worktrees as well,
so find a neutral middle ground in dir.h.
Signed-off-by: Stefan Beller
---
dir.c | 25
When a submodule has its git dir inside the working dir, the submodule
support for checkout that we plan to add in a later patch will fail.
Add functionality to migrate the git directory to be absorbed
into the superprojects git directory.
The newly added code in this patch is structured such tha
Specifically when setting up submodule tests, it comes in handy if
we can create commits in repositories that are not at the root of
the tested trash dir. Add "-C " similar to gits -C parameter
that will perform the operation in the given directory.
Signed-off-by: Stefan Beller
Signed-off-by: Jun
Jack Bates writes:
> There are two different places where the --no-abbrev option is parsed,
> and two different places where SHA-1s are abbreviated. We normally parse
> --no-abbrev with setup_revisions(), but in the no-index case, "git diff"
> calls diff_opt_parse() directly, and diff_opt_parse()
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
Thanks for all of the comments on v1 of the series. Hopefully this series
addresses the issues with windows and actually passes the first test :)
Some changes in v2:
* the 1st component of a path should now be handled correctly on windows as well
as unix.
* Pushed the static strbuf to the calle
Thanks.
Will replace, with the attached stylistic fixes squashed in for
minor issues that were spotted by my mechanical pre-acceptance
filter.
ref-filter.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git b/ref-filter.c a/ref-filter.c
index a68ed7b147..a9d2c6a89d 10
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 b0d4c1b..df37356 100644
---
Migrate callers of real_path() who duplicate the retern value to use
real_pathdup or strbuf_realpath.
Signed-off-by: Brandon Williams
---
builtin/init-db.c | 6 +++---
environment.c | 2 +-
setup.c | 15 +--
sha1_file.c | 2 +-
submodule.c | 2 +-
transp
On 08/12/16 03:53 PM, Junio C Hamano wrote:
Jack Bates writes:
@@ -3364,6 +3365,7 @@ void diff_setup(struct diff_options *options)
options->file = stdout;
+ options->abbrev = DEFAULT_ABBREV;
This is a new change relative to your earlier one.
I looked at all the callers of dif
Will queue, but with fixes on issues spotted by my pre-acceptance
mechanical filter squashed in, to fix style issues in the
destination of code movements.
pathspec.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pathspec.c b/pathspec.c
index 08abdd3922..cabc02e79b
1 - 100 of 108 matches
Mail list logo