Re: [PATCH v2 06/20] checkout: check_linked_checkout: improve already checked out aesthetic

2015-07-16 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: When check_linked_checkout() discovers that the branch is already checked out elsewhere, it emits the diagnostic: 'blorp' is already checked out at '/some/path/.git' which is mildly misleading and a bit unsightly due to the trailing /.git.

[PATCH v2] Documentation/git: fix stale MULTIPLE CHECKOUT MODE reference

2015-07-16 Thread Eric Sunshine
This should have been changed by 93a3649 (Documentation: move linked worktree description from checkout to worktree, 2015-07-06). Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- Documentation/git.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v2] Documentation/git: fix stale MULTIPLE CHECKOUT MODE reference

2015-07-16 Thread Eric Sunshine
On Thu, Jul 16, 2015 at 8:17 PM, Eric Sunshine sunsh...@sunshineco.com wrote: This should have been changed by 93a3649 (Documentation: move linked worktree description from checkout to worktree, 2015-07-06). Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- diff --git

Re: [PATCH] Documentation: Alternate name for docbook2x-texi binary

2015-07-16 Thread Michael Darling
Ping. Don't have write access. Applied as an attachment, in case there were any formatting issues. On Wed, May 13, 2015 at 4:28 AM, Michael Darling darli...@gmail.com wrote: In Fedora 21, docbook2x-texi binary is named db2x_docbook2texi. If binary docbook2-texi is not found, looks for

[PATCH v2 06/20] checkout: check_linked_checkout: improve already checked out aesthetic

2015-07-16 Thread Eric Sunshine
When check_linked_checkout() discovers that the branch is already checked out elsewhere, it emits the diagnostic: 'blorp' is already checked out at '/some/path/.git' which is mildly misleading and a bit unsightly due to the trailing /.git. For the user, /some/path is significant, whereas

[PATCH v2 10/20] worktree: simplify new branch (-b/-B) option checking

2015-07-16 Thread Eric Sunshine
Make 'new_branch' be the name of the new branch for both forced and non-forced cases; and add boolean 'force_new_branch' to indicate forced branch creation. This will simplify logic later on when git-worktree handles branch creation locally rather than delegating it to git-checkout as part of the

[PATCH v2 15/20] worktree: add_worktree: construct worktree-population command locally

2015-07-16 Thread Eric Sunshine
The caller of add_worktree() provides it with a command to invoke to populate the new worktree. This was a useful abstraction during the conversion of git checkout --to functionality to git worktree add since git-checkout and git-worktree constructed the population command differently. However,

Re: git on vagrant shared folder

2015-07-16 Thread Peter Hüfner
Hi Stefan, Hi Frederik, maybe I stated the case not clearly enough. The repo is just inside an shared/mounted folder from the VM to the Host, so that we can access the sourcecode via an IDE running on the host. The git commands are executed inside the VM on an ubuntu system. So there is no mix

[PATCH v2 11/20] worktree: introduce options container

2015-07-16 Thread Eric Sunshine
add_worktree() will eventually need to deal with some options itself, so introduce a structure into which options can be conveniently bundled, and pass it along to add_worktree(). Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- No changes since v1. builtin/worktree.c | 45

[PATCH v2 18/20] worktree: avoid resolving HEAD unnecessarily

2015-07-16 Thread Eric Sunshine
Now that git-worktree sets HEAD explicitly to its final value via either git-symbolic-ref or git-update-ref, rather than relying upon git-checkout to do so, the hack for pacifying is_git_directory() with a temporary HEAD, though still necessary, can be simplified. Since the real HEAD is now

[PATCH v2 09/20] branch: publish die_if_checked_out()

2015-07-16 Thread Eric Sunshine
git-worktree currently conflates new branch creation, setting of HEAD in the new wortkree, and worktree population into a single sub-invocation of git-checkout. However, these operations will eventually be separated, and git-worktree itself will need to be able to detect if the branch is already

[PATCH v2 12/20] worktree: make --detach mutually exclusive with -b/-B

2015-07-16 Thread Eric Sunshine
Be consistent with git-checkout which disallows this (not particularly meaningful) combination. Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- No changes since v1. builtin/worktree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/worktree.c

[PATCH v2 17/20] worktree: make setup of new HEAD distinct from worktree population

2015-07-16 Thread Eric Sunshine
git-worktree currently conflates setting of HEAD in the new worktree and initial worktree population into a single git-checkout invocation which requires git-checkout to have special knowledge that it is operating on a newly created worktree. The eventual goal is to rid git-checkout of that

[PATCH v2 19/20] worktree: populate via git reset --hard rather than git checkout

2015-07-16 Thread Eric Sunshine
Now that git-worktree handles all functionality (--force, --detach, -b/-B) previously delegated to git-checkout, actual population of the new worktree can be accomplished more directly and lightweight with git reset --hard in place of git checkout. Signed-off-by: Eric Sunshine

[PATCH v2 00/20] rid git-checkout of too-intimate knowledge of new worktree

2015-07-16 Thread Eric Sunshine
This is v2 of [1] which rids git-checkout of the need to have specialized knowledge that it's operating in a newly created linked worktree, and decouples git-worktree from git-checkout. Thanks to Duy and Junio for reviews. A v1 to v2 interdiff is included below. Changes since v1: * patch 03/20:

[PATCH v2 08/20] checkout: teach check_linked_checkout() about symbolic link HEAD

2015-07-16 Thread Eric Sunshine
check_linked_checkout() only understands symref-style HEAD (i.e. ref: refs/heads/master), however, HEAD may also be a an actual symbolic link (on platforms which support it). To accurately detect if a branch is checked out elsewhere, it needs to handle symbolic link HEAD, as well. Signed-off-by:

[PATCH v2 07/20] checkout: check_linked_checkout: simplify symref parsing

2015-07-16 Thread Eric Sunshine
check_linked_checkout() only understands symref-style HEAD (i.e. ref: refs/heads/master), however, HEAD may also be a an actual symbolic link (on platforms which support it), thus it will need to check that style HEAD, as well (via readlink()). As a preparatory step, simplify parsing of

[PATCH v2 16/20] worktree: detect branch-name/detached and error conditions locally

2015-07-16 Thread Eric Sunshine
git-worktree currently conflates setting of HEAD in the new worktree with initial worktree population via a single git-checkout invocation, which requires git-checkout to have special knowledge that it is operating in a newly created worktree. The eventual goal is to separate these operations and

[PATCH v2 01/20] checkout: avoid resolving HEAD unnecessarily

2015-07-16 Thread Eric Sunshine
When --ignore-other-worktree is specified, we unconditionally skip the check to see if the requested branch is already checked out in a linked worktree. Since we know that we will be skipping that check, there is no need to resolve HEAD in order to detect other conditions under which we may skip

[PATCH v2 20/20] checkout: drop intimate knowledge of newly created worktree

2015-07-16 Thread Eric Sunshine
Now that git-worktree no longer relies upon git-checkout for new branch creation, new worktree HEAD set up, or initial worktree population, git-checkout no longer needs intimate knowledge that it may be operating in a newly created worktree. Therefore, drop 'new_worktree_mode' and the private

[PATCH v2 14/20] worktree: elucidate environment variables intended for child processes

2015-07-16 Thread Eric Sunshine
Take advantage of 'struct child_process.env' to make it obvious that environment variables set by add_worktree() are intended specifically for sub-commands it invokes to operate in the new worktree. We assign a local 'struct argv_array' to child_process.env, rather than utilizing the

[PATCH v2 13/20] worktree: make branch creation distinct from worktree population

2015-07-16 Thread Eric Sunshine
git-worktree currently conflates branch creation, setting of HEAD in the new worktree, and worktree population into a single sub-invocation of git-checkout, which requires git-checkout to be specially aware that it is operating in a newly-created worktree. The goal is to free git-checkout of that

[PATCH v2 03/20] checkout: improve die_if_checked_out() robustness

2015-07-16 Thread Eric Sunshine
die_if_checked_out() is intended to check if the branch about to be checked out is already checked out either in the main worktree or in a linked worktree. However, if .git/worktrees directory does not exist, then it never bothers checking the main worktree, even though the specified branch might

[PATCH v2 02/20] checkout: name check_linked_checkouts() more meaningfully

2015-07-16 Thread Eric Sunshine
check_linked_checkouts() doesn't just check linked checkouts for something; specifically, it aborts the operation if the branch about to be checked out is already checked out elsewhere. Therefore, rename it to die_if_checked_out() to give a better indication of its function. The more meaningful

[PATCH v2 04/20] checkout: die_if_checked_out: simplify strbuf management

2015-07-16 Thread Eric Sunshine
There is no reason to keep the strbuf active long after its last use. By releasing it as early as possible, resource management is simplified and there is less worry about future changes resulting in a leak. Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- No changes since v1.

[PATCH v2 05/20] checkout: generalize die_if_checked_out() branch name argument

2015-07-16 Thread Eric Sunshine
The plan is to publish die_if_checked_out() so that callers other than git-checkout can take advantage of it, however, those callers won't have access to git-checkout's struct branch_info. Therefore, change it to accept the full name of the branch as a simple string instead. While here, also give

Re: Building git 2.4.5 on AIX 6.1 problems

2015-07-16 Thread norricorp
The problem was down to the linker and archiver. I had to make sure that I used the ar and ld in /usr/bin (rather than aix ld and gnu ar) and the gnu compiler. Also, I did not realise I had already created libs so had to run clean and start with the right PATH to pick up the above. Finally, have

[PATCH v2] gitk: Add a Copy commit summary command

2015-07-16 Thread Beat Bolli
When referring to earlier commits in commit messages or other text, one of the established formats is abbrev-sha (summary, author-date) Add a Copy commit summary command to the context menu that puts this text for the currently selected commit on the clipboard. This makes it easy for our

Re: [PATCH v2] gitk: Add a Copy commit summary command

2015-07-16 Thread Junio C Hamano
Beat Bolli dev+...@drbeat.li writes: When referring to earlier commits in commit messages or other text, one of the established formats is abbrev-sha (summary, author-date) ... +proc copysummary {} { +global rowmenuid commitinfo + +set id [string range $rowmenuid 0 7] +

[PATCH] support bash completion for add-on commands

2015-07-16 Thread Joey Hess
This makes it possible to implement bash completion for add-on commands, that will work even when the bash completion scripts are being loaded on-demand, as is done by the bash-completion package. git's bash completion handles subcommands by running a _git_$command function. As well as the many

Re: git on vagrant shared folder

2015-07-16 Thread Junio C Hamano
Stefan Beller sbel...@google.com writes: A few weeks ago we weren’t able to clone and get an error: could not commit /vagrant/.git/config file. Manually we were able to change that file and also the clone command works outside the shared folder. Why are you trying to commit a file inside

Re: Bug: send-pack does not respect http.signingkey

2015-07-16 Thread Junio C Hamano
Dave Borowitz dborow...@google.com writes: When git-send-pack is exec'ed, as is done by git-remote-http, it does not reread the config, so it does not respect the configured http.signingkey, either from the config file or -c on the command line. Thus it is currently impossible to specify a

Re: GNU diff and git diff - difference on myers algorithm?

2015-07-16 Thread Luis R. Rodriguez
On Fri, Jun 12, 2015 at 11:52 AM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: OK wells I'm curious about more research / effort when trying to evaluate a diff with two seprate but adjoining preprocessor directives and if anyone has implemented an optimizaiton option to let the diff

Re: Bug: send-pack does not respect http.signingkey

2015-07-16 Thread Junio C Hamano
Dave Borowitz dborow...@google.com writes: On Thu, Jul 16, 2015 at 1:06 PM, Junio C Hamano gits...@pobox.com wrote: Perhaps something like this? Seems like it should work. Jonathan had suggested there might be some principled reason why send-pack does not respect config options, and

Re: A few linked checkout niggles

2015-07-16 Thread Junio C Hamano
Also in a linked checkout of git.git itself, t5601.21 seems to fail with: fatal: Not a git repository: /home/gitster/w/src/.git/worktrees/rerere not ok 21 - clone respects global branch.autosetuprebase # # ( # test_config=$HOME/.gitconfig #

Bug: send-pack does not respect http.signingkey

2015-07-16 Thread Dave Borowitz
When git-send-pack is exec'ed, as is done by git-remote-http, it does not reread the config, so it does not respect the configured http.signingkey, either from the config file or -c on the command line. Thus it is currently impossible to specify a signing key over HTTP, other than the default one

Re: Bug: send-pack does not respect http.signingkey

2015-07-16 Thread Dave Borowitz
On Thu, Jul 16, 2015 at 1:12 PM, Junio C Hamano gits...@pobox.com wrote: Dave Borowitz dborow...@google.com writes: On Thu, Jul 16, 2015 at 1:06 PM, Junio C Hamano gits...@pobox.com wrote: Perhaps something like this? Seems like it should work. Jonathan had suggested there might be some

Re: Bug: send-pack does not respect http.signingkey

2015-07-16 Thread Junio C Hamano
Dave Borowitz dborow...@google.com writes: On Thu, Jul 16, 2015 at 1:12 PM, Junio C Hamano gits...@pobox.com wrote: Dave Borowitz dborow...@google.com writes: On Thu, Jul 16, 2015 at 1:06 PM, Junio C Hamano gits...@pobox.com wrote: Perhaps something like this? Seems like it should work.

Re: [PATCH v2 20/20] checkout: drop intimate knowledge of newly created worktree

2015-07-16 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: Now that git-worktree no longer relies upon git-checkout for new branch creation, new worktree HEAD set up, or initial worktree population, git-checkout no longer needs intimate knowledge that it may be operating in a newly created worktree.

Re: [PATCH v2] gitk: Add a Copy commit summary command

2015-07-16 Thread Johannes Sixt
Am 16.07.2015 um 17:29 schrieb Beat Bolli: When referring to earlier commits in commit messages or other text, one of the established formats is abbrev-sha (summary, author-date) Add a Copy commit summary command to the context menu that puts this text for the currently selected commit on

Re: Bug: send-pack does not respect http.signingkey

2015-07-16 Thread Dave Borowitz
On Thu, Jul 16, 2015 at 1:06 PM, Junio C Hamano gits...@pobox.com wrote: Dave Borowitz dborow...@google.com writes: When git-send-pack is exec'ed, as is done by git-remote-http, it does not reread the config, so it does not respect the configured http.signingkey, either from the config file

Re: GNU diff and git diff - difference on myers algorithm?

2015-07-16 Thread Jacob Keller
On Thu, Jul 16, 2015 at 9:22 PM, Jacob Keller jacob.kel...@gmail.com wrote: On Thu, Jul 16, 2015 at 12:07 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: On Fri, Jun 12, 2015 at 11:52 AM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: OK wells I'm curious about more research / effort

Re: [PATCH v2 06/20] checkout: check_linked_checkout: improve already checked out aesthetic

2015-07-16 Thread Duy Nguyen
On Fri, Jul 17, 2015 at 7:32 AM, Eric Sunshine sunsh...@sunshineco.com wrote: In the new world order with GIT_DIR and GIT_COMMON_DIR, does $GIT_DIR always have to be the same as $GIT_WORK_TREE/.git? Do we need some sanity check if that is the case? Perhaps: if you have $GIT_DIR set to

Re: A few linked checkout niggles

2015-07-16 Thread Eric Sunshine
On Thu, Jul 16, 2015 at 7:13 PM, Duy Nguyen pclo...@gmail.com wrote: On Fri, Jul 17, 2015 at 3:39 AM, Junio C Hamano gits...@pobox.com wrote: Also in a linked checkout of git.git itself, t5601.21 seems to fail with: fatal: Not a git repository: /home/gitster/w/src/.git/worktrees/rerere not

Re: GNU diff and git diff - difference on myers algorithm?

2015-07-16 Thread Jacob Keller
On Thu, Jul 16, 2015 at 12:07 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: On Fri, Jun 12, 2015 at 11:52 AM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: OK wells I'm curious about more research / effort when trying to evaluate a diff with two seprate but adjoining preprocessor

Re: [PATCH v2] Documentation/git-worktree: fix stale git checkout --to references

2015-07-16 Thread Eric Sunshine
On Thu, Jul 16, 2015 at 6:57 PM, Junio C Hamano gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com writes: These should have been changed to git worktree add by fc56361 (worktree: introduce add command, 2015-07-06. Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- By the

Re: [PATCH v2] Documentation/git-worktree: fix stale git checkout --to references

2015-07-16 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: These should have been changed to git worktree add by fc56361 (worktree: introduce add command, 2015-07-06. Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- Changes since v1[1]: Reference the correct commit (fc56361, not b979d95) in

Re: [PATCH v2 06/20] checkout: check_linked_checkout: improve already checked out aesthetic

2015-07-16 Thread Eric Sunshine
On Thu, Jul 16, 2015 at 1:55 PM, Junio C Hamano gits...@pobox.com wrote: How does this work with manually configured GIT_DIR environment, by the way? I think GIT_DIR=/collection/of/repos/foo.git would be OK, as strbuf_strip_suffix() would hopefully leave it intact, but I am more interested in

[PATCH v2] Documentation/git-worktree: fix stale git checkout --to references

2015-07-16 Thread Eric Sunshine
These should have been changed to git worktree add by fc56361 (worktree: introduce add command, 2015-07-06. Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- Changes since v1[1]: Reference the correct commit (fc56361, not b979d95) in the commit message. Sorry for the noise. [1]:

[PATCH] Documentation/git-worktree: fix stale git checkout --to references

2015-07-16 Thread Eric Sunshine
These should have been changed to git worktree add by b979d95 (checkout: retire --to option, 2015-07-06). Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- Atop what is already in 'master'... Documentation/git-worktree.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: Bug: send-pack does not respect http.signingkey

2015-07-16 Thread Dave Borowitz
On Thu, Jul 16, 2015 at 2:10 PM, Junio C Hamano gits...@pobox.com wrote: Dave Borowitz dborow...@google.com writes: On Thu, Jul 16, 2015 at 1:12 PM, Junio C Hamano gits...@pobox.com wrote: Dave Borowitz dborow...@google.com writes: On Thu, Jul 16, 2015 at 1:06 PM, Junio C Hamano

Re: A few linked checkout niggles

2015-07-16 Thread Duy Nguyen
On Fri, Jul 17, 2015 at 3:39 AM, Junio C Hamano gits...@pobox.com wrote: Also in a linked checkout of git.git itself, t5601.21 seems to fail with: fatal: Not a git repository: /home/gitster/w/src/.git/worktrees/rerere not ok 21 - clone respects global branch.autosetuprebase # #