Re: [PATCH] real_path: make real_path thread-safe

2016-12-07 Thread Torsten Bögershausen
On Wed, Dec 07, 2016 at 02:13:35PM -0800, Brandon Williams wrote: > On 12/07, Junio C Hamano wrote: > > Torsten Bögershausen writes: > > > > > But in any case it seems that e.g. > > > //SEFVER/SHARE/DIR1/DIR2/.. > > > must be converted into > > > //SEFVER/SHARE/DIR1 > > > > > >

Re: BUG: "cherry-pick A..B || git reset --hard OTHER"

2016-12-07 Thread Christian Couder
Hi, On Wed, Dec 7, 2016 at 7:36 PM, Stephan Beyer wrote: > Hi, > > On 12/06/2016 07:58 PM, Junio C Hamano wrote: > >> (1) The third invocation of "cherry-pick" with "--abort" to get rid >> of the state from the unfinished cherry-pick we did previously >> is necessary,

Re: [PATCH v15 19/27] bisect--helper: `bisect_state` & `bisect_head` shell function in C

2016-12-07 Thread Pranit Bauva
Hey Stephan, On Wed, Dec 7, 2016 at 5:24 AM, Stephan Beyer wrote: > Hi Pranit, > > On 12/06/2016 11:40 PM, Pranit Bauva wrote: >> On Tue, Nov 22, 2016 at 5:42 AM, Stephan Beyer wrote: >>> On 10/14/2016 04:14 PM, Pranit Bauva wrote: +static int

[PATCHv6 6/7] move connect_work_tree_and_git_dir to dir.h

2016-12-07 Thread Stefan Beller
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

[PATCHv6 1/7] submodule: use absolute path for computing relative path connecting

2016-12-07 Thread Stefan Beller
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

[PATCHv6 3/7] test-lib-functions.sh: teach test_commit -C

2016-12-07 Thread Stefan Beller
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

[PATCHv6 7/7] submodule: add absorb-git-dir function

2016-12-07 Thread Stefan Beller
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

[PATCHv6 5/7] worktree: add function to check if worktrees are in use

2016-12-07 Thread Stefan Beller
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 +++ b/worktree.c @@ -406,3 +406,27 @@ const struct

[PATCHv6 2/7] submodule helper: support super prefix

2016-12-07 Thread Stefan Beller
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 Signed-off-by: Junio C Hamano

[PATCHv6 4/7] worktree: get worktrees from submodules

2016-12-07 Thread Stefan Beller
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

[PATCHv6 0/7] submodule embedgitdirs

2016-12-07 Thread Stefan Beller
v6: * renamed embedgitdirs to absorbgitdirs embedding may be interpreted as embedding the git dir into the working directory, whereas absorbing sounds more like the submodule is absorbed by the superproject, making the submodule less independent * Worktrees API offer

[PATCH] submodule--helper: set alternateLocation for cloned submodules

2016-12-07 Thread vi0oss
From: "Vitaly \"_Vi\" Shukela" In 31224cbdc7 (clone: recursive and reference option triggers submodule alternates, 2016-08-17) a mechanism was added to have submodules referenced. It did not address _nested_ submodules, however. This patch makes all not just the root

Re: [PATCH] submodule--helper: set alternateLocation for cloned submodules

2016-12-07 Thread Stefan Beller
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 detect such a broken && call chain or the test_expect_success

Re: [PATCHv5 4/5] worktree: get worktrees from submodules

2016-12-07 Thread Brandon Williams
On 12/07, Stefan Beller wrote: > On Wed, Dec 7, 2016 at 2:45 PM, Junio C Hamano wrote: > > Stefan Beller writes: > > > >> + submodule_common_dir = strbuf_detach(, NULL); > >> + ret = get_worktrees_internal(submodule_common_dir, flags); > >> + > >> +

Re: [PATCH 2/2] describe: add support for multiple match patterns

2016-12-07 Thread Jacob Keller
On Wed, Dec 7, 2016 at 4:20 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> Basically, this started as a script to try each pattern in sequence, >> but this is slow, cumbersome and easy to mess up. >> >> You're suggesting just add a single second

Re: [PATCHv5 5/5] submodule: add embed-git-dir function

2016-12-07 Thread Brandon Williams
On 12/07, Stefan Beller wrote: > + argv_array_pushl(, "--super-prefix", sb.buf, > + "submodule--helper", > +"embed-git-dirs", NULL); check the spacing on these lines, looks like there is an extra space

[PATCH] submodule--helper: set alternateLocation for cloned submodules

2016-12-07 Thread vi0oss
From: "Vitaly \"_Vi\" Shukela" In 31224cbdc7 (clone: recursive and reference option triggers submodule alternates, 2016-08-17) a mechanism was added to have submodules referenced. It did not address _nested_ submodules, however. This patch makes all not just the root

Re: [PATCH 01/17] mv: convert to using pathspec struct interface

2016-12-07 Thread Brandon Williams
On 12/07, Duy Nguyen wrote: > On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote: > > Convert the 'internal_copy_pathspec()' function to use the pathspec > > struct interface from using the deprecated 'get_pathspec()' interface. > > > > In addition to this, fix a memory

Re: [PATCH 2/2] describe: add support for multiple match patterns

2016-12-07 Thread Junio C Hamano
Jacob Keller writes: > Basically, this started as a script to try each pattern in sequence, > but this is slow, cumbersome and easy to mess up. > > You're suggesting just add a single second pattern that we will do > matches and discard any tag that matches that first? I

Re: [PATCH 02/17] dir: convert create_simplify to use the pathspec struct interface

2016-12-07 Thread Brandon Williams
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 kill this create_simplify() and let >

Re: [PATCH 1/2] submodule--helper: set alternateLocation for cloned submodules

2016-12-07 Thread Stefan Beller
On Wed, Dec 7, 2016 at 2:49 PM, wrote: > Notes: > Resolved issues pointed by Stefan Beller except of > the one about loosened path check, which he aggreed > to be relaxed for this case. I am sorry to have given an incomplete review at the first time. :/ More below.

Re: [PATCH v8 00/19] port branch.c to use ref-filter's printing options

2016-12-07 Thread Jacob Keller
On Wed, Dec 7, 2016 at 7:36 AM, Karthik Nayak wrote: > This is part of unification of the commands 'git tag -l, git branch -l > and git for-each-ref'. This ports over branch.c to use ref-filter's > printing options. > > Initially posted here: $(gmane/279226). It was decided

Re: [PATCH 2/2] describe: add support for multiple match patterns

2016-12-07 Thread Jacob Keller
On Wed, Dec 7, 2016 at 2:08 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> ... Suppose that you version all >> your official releases such as "v1.2", "v1.3", "v1.4", "v2.1" and so on. >> Now, you also have other tags which represent -rc

Re: [PATCHv5 0/5] submodule embedgitdirs

2016-12-07 Thread Stefan Beller
On Wed, Dec 7, 2016 at 3:34 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Stefan Beller writes: >> >>> v5: >>> * Add another layer of abstraction, i.e. the relocate_git_dir is only about >>> moving a git dir of one

Re: [PATCH v2 0/6] shallow.c improvements

2016-12-07 Thread Junio C Hamano
Duy Nguyen writes: > On Tue, Dec 6, 2016 at 8:42 PM, Jeff King wrote: >> The final one _seems_ reasonable after reading your explanation, but I >> lack enough context to know whether or not there might be a corner case >> that you're missing. I'm inclined to

Re: [PATCHv5 5/5] submodule: add embed-git-dir function

2016-12-07 Thread Stefan Beller
On Wed, Dec 7, 2016 at 3:03 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> @@ -1093,7 +1129,8 @@ static struct cmd_struct commands[] = { >> {"resolve-relative-url", resolve_relative_url, 0}, >> {"resolve-relative-url-test",

Re: [PATCHv5 0/5] submodule embedgitdirs

2016-12-07 Thread Junio C Hamano
Junio C Hamano writes: > Stefan Beller writes: > >> v5: >> * Add another layer of abstraction, i.e. the relocate_git_dir is only about >> moving a git dir of one repository. The submodule specific stuff (e.g. >> recursion into nested submodules) is in

Re: [PATCH 16/17] pathspec: small readability changes

2016-12-07 Thread Brandon Williams
On 12/07, Duy Nguyen wrote: > On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote: > > A few small changes to improve readability. This is done by grouping > > related > > assignments, adding blank lines, ensuring lines are <80 characters, etc. > > > > Signed-off-by:

Re: BUG: "cherry-pick A..B || git reset --hard OTHER"

2016-12-07 Thread Duy Nguyen
On Thu, Dec 8, 2016 at 3:35 AM, Stephan Beyer wrote: > Hi, > > On 12/07/2016 09:04 PM, Junio C Hamano wrote: >> Stephan Beyer writes: >> >>> [1] By the way: git cherry-pick --quit, git rebase --forget ... >>> different wording for the same thing makes things

Re: [PATCHv5 5/5] submodule: add embed-git-dir function

2016-12-07 Thread Junio C Hamano
Stefan Beller writes: > @@ -1093,7 +1129,8 @@ static struct cmd_struct commands[] = { > {"resolve-relative-url", resolve_relative_url, 0}, > {"resolve-relative-url-test", resolve_relative_url_test, 0}, > {"init", module_init, 0}, > - {"remote-branch",

Re: [PATCHv5 4/5] worktree: get worktrees from submodules

2016-12-07 Thread Stefan Beller
On Wed, Dec 7, 2016 at 2:45 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> + submodule_common_dir = strbuf_detach(, NULL); >> + ret = get_worktrees_internal(submodule_common_dir, flags); >> + >> + free(submodule_gitdir); > > This

[PATCH 2/2] mailmap: Update my e-mail address

2016-12-07 Thread vi0oss
From: "Vitaly \"_Vi\" Shukela" Signed-off-by: Vitaly "_Vi" Shukela --- .mailmap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 9cc33e9..b7ae81a 100644 --- a/.mailmap +++ b/.mailmap @@ -246,7 +246,7 @@ Uwe

[PATCH 1/2] submodule--helper: set alternateLocation for cloned submodules

2016-12-07 Thread vi0oss
From: "Vitaly \"_Vi\" Shukela" In 31224cbdc7 (clone: recursive and reference option triggers submodule alternates, 2016-08-17) a mechanism was added to have submodules referenced. It did not address _nested_ submodules, however. This patch makes all not just the root

Re: [PATCH 03/17] dir: convert fill_directory to use the pathspec struct interface

2016-12-07 Thread Brandon Williams
On 12/07, Duy Nguyen wrote: > On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote: > > Convert 'fill_directory()' to use the pathspec struct interface from > > using the '_raw' entry in the pathspec struct. > > > > Signed-off-by: Brandon Williams > > ---

Re: [PATCHv5 4/5] worktree: get worktrees from submodules

2016-12-07 Thread Junio C Hamano
Stefan Beller writes: > + submodule_common_dir = strbuf_detach(, NULL); > + ret = get_worktrees_internal(submodule_common_dir, flags); > + > + free(submodule_gitdir); This sequence felt somewhat unusual. I would have written this without an extra variable, i.e.

Re: [PATCH 04/17] ls-tree: convert show_recursive to use the pathspec struct interface

2016-12-07 Thread Brandon Williams
On 12/07, Duy Nguyen wrote: > On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote: > > Convert 'show_recursive()' to use the pathspec struct interface from > > using the '_raw' entry in the pathspec struct. > > Slightly off-topic (sorry, but you made me look at this code!

Re: [PATCH 09/17] pathspec: always show mnemonic and name in unsupported_magic

2016-12-07 Thread Brandon Williams
On 12/07, Duy Nguyen wrote: > On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote: > > @@ -413,10 +411,9 @@ void parse_pathspec(struct pathspec *pathspec, > > prefixlen = prefix ? strlen(prefix) : 0; > > > > for (i = 0; i < n; i++) { > > -

Re: [PATCH 09/17] pathspec: always show mnemonic and name in unsupported_magic

2016-12-07 Thread Brandon Williams
On 12/07, Duy Nguyen wrote: > On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote: > > @@ -426,8 +423,7 @@ void parse_pathspec(struct pathspec *pathspec, > > nr_exclude++; > > if (item[i].magic & magic_mask) > >

Re: [PATCH 11/17] pathspec: factor global magic into its own function

2016-12-07 Thread Brandon Williams
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 > > own function. > > > > Signed-off-by:

Re: [PATCH 16/17] pathspec: small readability changes

2016-12-07 Thread Brandon Williams
On 12/07, Duy Nguyen wrote: > On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote: > > A few small changes to improve readability. This is done by grouping > > related > > assignments, adding blank lines, ensuring lines are <80 characters, etc. > > > > Signed-off-by:

Re: [PATCHv5 0/5] submodule embedgitdirs

2016-12-07 Thread Junio C Hamano
Stefan Beller writes: > v5: > * Add another layer of abstraction, i.e. the relocate_git_dir is only about > moving a git dir of one repository. The submodule specific stuff (e.g. > recursion into nested submodules) is in submodule.{c,h} > > This was motivated by

Re: [PATCH] real_path: make real_path thread-safe

2016-12-07 Thread Brandon Williams
On 12/07, Johannes Sixt wrote: > Am 07.12.2016 um 01:10 schrieb Brandon Williams: > >This function should accept both absolute and relative paths, which > >means it should probably accept "C:\My Files". I wasn't thinking about > >windows 100% of the time while writing this so I'm hoping that a

Re: [PATCH] real_path: make real_path thread-safe

2016-12-07 Thread Brandon Williams
On 12/07, Junio C Hamano wrote: > Torsten Bögershausen writes: > > > But in any case it seems that e.g. > > //SEFVER/SHARE/DIR1/DIR2/.. > > must be converted into > > //SEFVER/SHARE/DIR1 > > > > and > > \\SEFVER\SHARE\DIR1\DIR2\.. > > must be converted into > >

Re: [PATCH] submodule--helper: set alternateLocation for cloned submodules

2016-12-07 Thread Stefan Beller
On Wed, Dec 7, 2016 at 1:24 PM, vi0oss wrote: > On 12/07/2016 11:09 PM, Stefan Beller wrote: >>> >>> As submodule's alternate target does not end in .git/objects >>> (rather .git/modules/qq/objects), this alternate target >>> path restriction for in

Re: [PATCH 2/2] describe: add support for multiple match patterns

2016-12-07 Thread Junio C Hamano
Jacob Keller writes: > ... Suppose that you version all > your official releases such as "v1.2", "v1.3", "v1.4", "v2.1" and so on. > Now, you also have other tags which represent -rc releases and other > such tags. If you want to find the first major release that

Re: [PATCH 1/3] wt-status: implement opportunisitc index update correctly

2016-12-07 Thread Stefan Beller
On Wed, Dec 7, 2016 at 1:08 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> So my first question I had to answer was if we do the right thing here, >> i.e. if we could just fail instead. But we want to continue and just >> not write back the index,

Re: [PATCH 16/17] pathspec: small readability changes

2016-12-07 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote: >> A few small changes to improve readability. This is done by grouping related >> assignments, adding blank lines, ensuring lines are <80 characters, etc. >> >> Signed-off-by:

Re: [PATCH 00/17] pathspec cleanup

2016-12-07 Thread Junio C Hamano
Brandon Williams writes: > The intent of this series is to cleanup some of the pathspec initialization > code as well as finally migrating the remaining users of the _raw field or > get_pathspec() to the pathspec struct interface. This way both the _raw field > and

[PATCH 4/5] Make sequencer abort safer

2016-12-07 Thread Stephan Beyer
In contrast to "git am --abort", a sequencer abort did not check whether the current HEAD is the one that is expected. This can lead to loss of work (when not spotted and resolved using reflog before the garbage collector chimes in). This behavior is now changed by mimicking "git am --abort": the

[PATCH 3/5] Add test that cherry-pick --abort does not unsafely change HEAD

2016-12-07 Thread Stephan Beyer
Signed-off-by: Stephan Beyer --- t/t3510-cherry-pick-sequence.sh | 10 ++ 1 file changed, 10 insertions(+) diff --git a/t/t3510-cherry-pick-sequence.sh b/t/t3510-cherry-pick-sequence.sh index 7b7a89dbd..372307c21 100755 --- a/t/t3510-cherry-pick-sequence.sh +++

[PATCH 1/5] am: Fix filename in safe_to_abort() error message

2016-12-07 Thread Stephan Beyer
Signed-off-by: Stephan Beyer --- Okay let's give it a try. Some minor things that I found are also in this patchset (patch 01, 02 and 05). The branch can also be found on https://github.com/sbeyer/git/commits/sequencer-abort-safety builtin/am.c | 2 +- 1 file changed, 1

[PATCH 5/5] sequencer: Remove useless get_dir() function

2016-12-07 Thread Stephan Beyer
This function is used only once, for the removal of the directory. It is not used for the creation of the directory nor anywhere else. Signed-off-by: Stephan Beyer --- sequencer.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sequencer.c

[PATCH 2/5] am: Change safe_to_abort()'s not rewinding error into a warning

2016-12-07 Thread Stephan Beyer
The error message tells the user that something went terribly wrong and the --abort could not be performed. But the --abort is performed, only without rewinding. By simply changing the error into a warning, we indicate the user that she must not try something like "git am --abort --force", instead

Re: [PATCH] submodule--helper: set alternateLocation for cloned submodules

2016-12-07 Thread vi0oss
On 12/07/2016 11:09 PM, Stefan Beller wrote: As submodule's alternate target does not end in .git/objects (rather .git/modules/qq/objects), this alternate target path restriction for in add_possible_reference_from_superproject relates from "*.git/objects" to just */objects". I wonder if

Re: [PATCH 1/3] wt-status: implement opportunisitc index update correctly

2016-12-07 Thread Junio C Hamano
Stefan Beller writes: > So my first question I had to answer was if we do the right thing here, > i.e. if we could just fail instead. But we want to continue and just > not write back the index, which is fine. > > So we do not have to guard refresh_cache, but just call >

[PATCHv5 1/5] submodule: use absolute path for computing relative path connecting

2016-12-07 Thread Stefan Beller
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

[PATCHv5 0/5] submodule embedgitdirs

2016-12-07 Thread Stefan Beller
v5: * Add another layer of abstraction, i.e. the relocate_git_dir is only about moving a git dir of one repository. The submodule specific stuff (e.g. recursion into nested submodules) is in submodule.{c,h} This was motivated by reviews on the series of checkout aware of submodules

[PATCHv5 3/5] test-lib-functions.sh: teach test_commit -C

2016-12-07 Thread Stefan Beller
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

[PATCHv5 2/5] submodule helper: support super prefix

2016-12-07 Thread Stefan Beller
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 Signed-off-by: Junio C Hamano

[PATCHv5 5/5] submodule: add embed-git-dir function

2016-12-07 Thread Stefan Beller
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 embedded into the superprojects git directory. The newly added code in this patch is structured such

[PATCHv5 4/5] worktree: get worktrees from submodules

2016-12-07 Thread Stefan Beller
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

Re: [PATCH 1/3] wt-status: implement opportunisitc index update correctly

2016-12-07 Thread Stefan Beller
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 update_index_if_able(), which > will try to write

Re: [PATCH 1/3] wt-status: implement opportunisitc index update correctly

2016-12-07 Thread Stefan Beller
On Wed, Dec 7, 2016 at 12:53 PM, Junio C Hamano wrote: > On Wed, Dec 7, 2016 at 12:48 PM, Stefan Beller wrote: >> >> So I would expect that we'd rather fix the update_index_if_able instead by >> checking for the lockfile to be in the correct state? > > I

Re: [PATCH 1/3] wt-status: implement opportunisitc index update correctly

2016-12-07 Thread Junio C Hamano
On Wed, Dec 7, 2016 at 12:48 PM, Stefan Beller wrote: > > So I would expect that we'd rather fix the update_index_if_able instead by > checking for the lockfile to be in the correct state? I actually don't expect that, after looking at other call sites of that function.

Re: [PATCH] real_path: make real_path thread-safe

2016-12-07 Thread Johannes Sixt
Am 07.12.2016 um 01:10 schrieb Brandon Williams: This function should accept both absolute and relative paths, which means it should probably accept "C:\My Files". I wasn't thinking about windows 100% of the time while writing this so I'm hoping that a windows expert will point things like this

Re: [PATCH] real_path: make real_path thread-safe

2016-12-07 Thread Junio C Hamano
Torsten Bögershausen writes: > But in any case it seems that e.g. > //SEFVER/SHARE/DIR1/DIR2/.. > must be converted into > //SEFVER/SHARE/DIR1 > > and > \\SEFVER\SHARE\DIR1\DIR2\.. > must be converted into > \\SEFVER\SHARE\DIR1 Additional questions that may be interesting are:

Re: BUG: "cherry-pick A..B || git reset --hard OTHER"

2016-12-07 Thread Stephan Beyer
Hi, On 12/07/2016 09:04 PM, Junio C Hamano wrote: > Stephan Beyer writes: > >> [1] By the way: git cherry-pick --quit, git rebase --forget ... >> different wording for the same thing makes things unintuitive. > > It is not too late to STOP "--forget" from getting added to

Re: [PATCH] submodule--helper: set alternateLocation for cloned submodules

2016-12-07 Thread Junio C Hamano
Stefan Beller writes: > On Wed, Dec 7, 2016 at 12:18 PM, Junio C Hamano wrote: >> Stefan Beller writes: >> This patch makes all not just the root repository, but also all submodules (recursively) have

Re: [PATCH] submodule--helper: set alternateLocation for cloned submodules

2016-12-07 Thread Stefan Beller
On Wed, Dec 7, 2016 at 12:18 PM, Junio C Hamano wrote: > Stefan Beller writes: > >>> This patch makes all not just the root repository, but also >>> all submodules (recursively) have submodule.alternateLocation >>> and submodule.alternateErrorStrategy

Re: [PATCH] submodule--helper: set alternateLocation for cloned submodules

2016-12-07 Thread Junio C Hamano
Stefan Beller writes: >> This patch makes all not just the root repository, but also >> all submodules (recursively) have submodule.alternateLocation >> and submodule.alternateErrorStrategy configured, making Git >> search for possible alternates for nested submodules as

Re: [PATCH] real_path: make real_path thread-safe

2016-12-07 Thread Torsten Bögershausen
On Wed, Dec 07, 2016 at 01:12:25AM +, Ramsay Jones wrote: > > > On 07/12/16 00:10, Brandon Williams wrote: > > On 12/06, Junio C Hamano wrote: > >> POSIX cares about treating "//" at the very beginning of the path > >> specially. Is that supposed to be handled here, or by a lot higher > >>

Re: [PATCH] submodule--helper: set alternateLocation for cloned submodules

2016-12-07 Thread Stefan Beller
On Wed, Dec 7, 2016 at 10:42 AM, wrote: > From: Vitaly _Vi Shukela Thanks for contributing to Git! (/me looks up if you have sent patches already as you seem to know how to do that. :) unrelated side note: Maybe you want to send a patch for the .mailmap file

Re: BUG: "cherry-pick A..B || git reset --hard OTHER"

2016-12-07 Thread Junio C Hamano
Stephan Beyer writes: > [1] By the way: git cherry-pick --quit, git rebase --forget ... > different wording for the same thing makes things unintuitive. It is not too late to STOP "--forget" from getting added to "rebase" and give it a better name. Having said that, I have a

[PATCH 3/3] lockfile: LOCK_REPORT_ON_ERROR

2016-12-07 Thread Junio C Hamano
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. The command still exits with a non-zero status, but that is not of much help for an

[PATCH 1/3] wt-status: implement opportunisitc index update correctly

2016-12-07 Thread Junio C Hamano
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 update_index_if_able(), which will try to write into fd=-1. Signed-off-by: Junio C Hamano --- wt-status.c | 7

[PATCH 2/3] hold_locked_index(): align error handling with hold_lockfile_for_update()

2016-12-07 Thread Junio C Hamano
Callers of the hold_locked_index() function pass 0 when they want to prepare to write a new version of the index file without wishing to die or emit an error message when the request fails (e.g. somebody else already held the lock), and pass 1 when they want the call to die upon failure. This

[PATCH 0/3] Do not be totally silent upon lock error

2016-12-07 Thread Junio C Hamano
Robbie Iannucci reported that "git merge" that fast-forwards fails silently when a competing or stale index.lock is present in recent Git: $ git merge --ff-only master; echo $? Updating 454cb6bd52..8d7a455ed5 1 $ exit Did the update happen? We used to give "fatal: Unable to

[PATCH] submodule--helper: set alternateLocation for cloned submodules

2016-12-07 Thread vi0oss
From: Vitaly _Vi Shukela Git v2.11 introduced "git clone --recursive --referece ...", but it didn't put the alternates for _nested_ submodules. This patch makes all not just the root repository, but also all submodules (recursively) have submodule.alternateLocation and

Re: BUG: "cherry-pick A..B || git reset --hard OTHER"

2016-12-07 Thread Stephan Beyer
Hi, On 12/06/2016 07:58 PM, Junio C Hamano wrote: > I was burned a few times with this in the past few years, but it did > not irritate me often enough that I didn't write it down. But I > think this is serious enough that deserves attention from those who > were involved. > > A short

Re: Re* [BUG] Index.lock error message regression in git 2.11.0

2016-12-07 Thread Junio C Hamano
Junio C Hamano writes: > ... > I would not be surprised if some existing calls to hold_lock*() > functions that pass die_on_error=0 need to be updated to pass > LOCK_SILENT_ON_ERROR, and when this fix is taken alone, it may look > like a regression, but we are better off

[PATCH 1/2] ref-filter, tag: eliminate duplicated sorting option parsing

2016-12-07 Thread SZEDER Gábor
Sorting options are either specified on the command line, which is handled by parse_opt_ref_sorting() in ref-filter.c, or via the 'tag.sort' config variable, which is handled by parse_sorting_string() in builtin/tag.c. These two functions are nearly identical, the difference being only their

[PATCH 0/2] A bit of ref-filter atom parsing cleanups

2016-12-07 Thread SZEDER Gábor
The diffstat of the second patch doesn't show any benefits, but only because the first patch removed a callsite that would have benefited from it. It merges cleanly with Karthik's "port branch.c to use ref-filter's printing options" series. SZEDER Gábor (2): ref-filter, tag: eliminate

[PATCH 2/2] ref-filter: add function to parse atoms from a nul-terminated string

2016-12-07 Thread SZEDER Gábor
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 strchr() looking for the closing ')'. However, it's not

Re: git repo vs project level authorization

2016-12-07 Thread Sitaram Chamarty
Ken, On Mon, Dec 05, 2016 at 11:04:44PM +0100, Fredrik Gustafsson wrote: > On Mon, Dec 05, 2016 at 03:33:51PM -0500, ken edward wrote: > > I am currently using svn with apache+mod_dav_svn to have a single > > repository with multiple projects. Each of the projects is controlled > > by an access

[PATCH v8 08/19] ref-filter: add support for %(upstream:track,nobracket)

2016-12-07 Thread Karthik Nayak
From: Karthik Nayak Add support for %(upstream:track,nobracket) which will print the tracking information without the brackets (i.e. "ahead N, behind M"). This is needed when we port branch.c to use ref-filter's printing APIs. Add test and documentation for the same.

[PATCH v8 09/19] ref-filter: make "%(symref)" atom work with the ':short' modifier

2016-12-07 Thread Karthik Nayak
From: Karthik Nayak The "%(symref)" atom doesn't work when used with the ':short' modifier because we strictly match only 'symref' for setting the 'need_symref' indicator. Fix this by comparing with the valid_atom rather than the used_atom. Add tests for %(symref) and

[PATCH v8 03/19] ref-filter: implement %(if:equals=) and %(if:notequals=)

2016-12-07 Thread Karthik Nayak
From: Karthik Nayak Implement %(if:equals=) wherein the if condition is only satisfied if the value obtained between the %(if:...) and %(then) atom is the same as the given ''. Similarly, implement (if:notequals=) wherein the if condition is only satisfied if the value

[PATCH v8 06/19] ref-filter: introduce format_ref_array_item()

2016-12-07 Thread Karthik Nayak
From: Karthik Nayak To allow column display, we will need to first render the output in a string list to allow print_columns() to compute the proper size of each column before starting the actual output. Introduce the function format_ref_array_item() that does the

[PATCH v8 01/19] ref-filter: implement %(if), %(then), and %(else) atoms

2016-12-07 Thread Karthik Nayak
From: Karthik Nayak Implement %(if), %(then) and %(else) atoms. Used as %(if)...%(then)...%(end) or %(if)...%(then)...%(else)...%(end). If the format string between %(if) and %(then) expands to an empty string, or to only whitespaces, then the whole %(if)...%(end) expands

[PATCH v8 05/19] ref-filter: move get_head_description() from branch.c

2016-12-07 Thread Karthik Nayak
From: Karthik Nayak Move the implementation of get_head_description() from branch.c to ref-filter. This gives a description of the HEAD ref if called. This is used as the refname for the HEAD ref whenever the FILTER_REFS_DETACHED_HEAD option is used. Make it public

[PATCH v8 04/19] ref-filter: modify "%(objectname:short)" to take length

2016-12-07 Thread Karthik Nayak
From: Karthik Nayak Add support for %(objectname:short=) which would print the abbreviated unique objectname of given length. When no length is specified, the length is 'DEFAULT_ABBREV'. The minimum length is 'MINIMUM_ABBREV'. The length may be exceeded to ensure that the

[PATCH v8 19/19] branch: implement '--format' option

2016-12-07 Thread Karthik Nayak
From: Karthik Nayak Implement the '--format' option provided by 'ref-filter'. This lets the user list branches as per desired format similar to the implementation in 'git for-each-ref'. Add tests and documentation for the same. Mentored-by: Christian Couder

[PATCH v8 18/19] branch: use ref-filter printing APIs

2016-12-07 Thread Karthik Nayak
From: Karthik Nayak Port branch.c to use ref-filter APIs for printing. This clears out most of the code used in branch.c for printing and replaces them with calls made to the ref-filter library. Introduce build_format() which gets the format required for printing of refs.

[PATCH v8 17/19] branch, tag: use porcelain output

2016-12-07 Thread Karthik Nayak
From: Karthik Nayak Call ref-filter's setup_ref_filter_porcelain_msg() to enable translated messages for the %(upstream:tack) atom. Although branch.c doesn't currently use ref-filter's printing API's, this will ensure that when it does in the future patches, we do not need

[PATCH v8 07/19] ref-filter: make %(upstream:track) prints "[gone]" for invalid upstreams

2016-12-07 Thread Karthik Nayak
From: Karthik Nayak Borrowing from branch.c's implementation print "[gone]" whenever an unknown upstream ref is encountered instead of just ignoring it. This makes sure that when branch.c is ported over to using ref-filter APIs for printing, this feature is not lost.

[PATCH v8 13/19] ref-filter: rename the 'strip' option to 'lstrip'

2016-12-07 Thread Karthik Nayak
In preparation for the upcoming patch, where we introduce the 'rstrip' option. Rename the 'strip' option to 'lstrip' to remove ambiguity. Signed-off-by: Karthik Nayak --- Documentation/git-for-each-ref.txt | 10 +- builtin/tag.c | 4 ++--

[PATCH v8 14/19] ref-filter: modify the 'lstrip=' option to work with negative ''

2016-12-07 Thread Karthik Nayak
Currently the 'lstrip=' option only takes a positive value '' and strips '' slash-separated path components from the left. Modify the 'lstrip' option to also take a negative number '' which would only _leave_ behind 'N' slash-separated path components from the left. Add documentation and tests

[PATCH v8 10/19] ref-filter: introduce refname_atom_parser_internal()

2016-12-07 Thread Karthik Nayak
From: Karthik Nayak Since there are multiple atoms which print refs ('%(refname)', '%(symref)', '%(push)', '%(upstream)'), it makes sense to have a common ground for parsing them. This would allow us to share implementations of the atom modifiers between these atoms.

[PATCH v8 11/19] ref-filter: introduce refname_atom_parser()

2016-12-07 Thread Karthik Nayak
From: Karthik Nayak Using refname_atom_parser_internal(), introduce refname_atom_parser() which will parse the %(symref) and %(refname) atoms. Store the parsed information into the 'used_atom' structure based on the modifiers used along with the atoms. Now the '%(symref)'

[PATCH v8 15/19] ref-filter: add an 'rstrip=' option to atoms which deal with refnames

2016-12-07 Thread Karthik Nayak
Complimenting the existing 'lstrip=' option, add an 'rstrip=' option which strips `` slash-separated path components from the end of the refname (e.g., `%(refname:rstrip=2)` turns `refs/tags/foo` into `refs`). Signed-off-by: Karthik Nayak ---

  1   2   >