Re: [PATCH 2/4] completion: introduce __gitcomp_2 ()

2014-01-02 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > __gitcomp_nl "$(__git_heads)" "$pfx" "$cur_" "." > __gitcomp_nl_append $"autosetupmerge\nautosetuprebase\n" "$pfx" > "$cur_" " " This is not a bad idea at all. I'm just afraid that we might be leaving open ends: What happens if the $pfx isn't the same in bo

Re: [PATCH 3/4] completion: fix branch.autosetup(merge|rebase)

2014-01-02 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > If we are looking at "branch.autosetupmerge." followed by something, > who typed that final dot? I admit that it's a very unlikely case. The user did: $ branch.autosetupmer hit backspace to delete the trailing space, inserted a dot, and hit again. > If you are working

Re: aborted 'git fetch' leaves workspace unusable

2014-01-02 Thread Stephen Leake
Junio C Hamano writes: > stephen_le...@stephe-leake.org writes: > >> However, in this case, even running the fetch was a mistake; I would >> have prefered that it leave FETCH_HEAD in its previous state. > > I think the clearing of leftover FETCH_HEAD is one of the early > things "git fetch" does,

[PATCH V3 2/2] fetch --prune: Run prune before fetching

2014-01-02 Thread Tom Miller
When we have a remote-tracking branch named "frotz/nitfol" from a previous fetch, and the upstream now has a branch named "frotz". Prior to this patch fetch would fail to remove "frotz/nitfol" with a "git fetch --prune" from the upstream. git would inform the user to use "git remote prune" to fix t

[PATCH V3 1/2] fetch --prune: Always print header url

2014-01-02 Thread Tom Miller
If "fetch --prune" is run with no new refs to fetch, but it has refs to prune. Then, the header url is not printed as it would if there were new refs to fetch. Output before this patch: $ git fetch --prune remote-with-no-new-refs x [deleted] (none) -> origin/world Ou

Re: [PATCH 0/3] t0000 cleanups

2014-01-02 Thread Jeff King
On Thu, Jan 02, 2014 at 02:28:33PM -0800, Jonathan Nieder wrote: > > This is not exactly true. The TEST_OUTPUT_DIRECTORY setting does not > > leak. t sets $TEST_DIRECTORY (which it must, so the sub-scripts can > > find test-lib.sh and friends), and then TEST_OUTPUT_DIRECTORY uses that > > as a

Re: [PATCH/RFC] Introduce git submodule add|update --attach

2014-01-02 Thread Francesco Pretto
2014/1/3 Francesco Pretto : > Concluding, my point is that at the current state submodules in git > seem to be flawed because of the inconsistent HEAD state between "add" > and "update" users. With my patch applied the attached HEAD behavior > would be fully supported. At some point "git submodule

Re: [PATCH] gc: notice gc processes run by other users

2014-01-02 Thread Junio C Hamano
Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] gc: notice gc processes run by other users

2014-01-02 Thread Kyle
On Dec 31, 2013, at 04:07, Kyle J. McKay wrote: Since 64a99eb4 git gc refuses to run without the --force option if another gc process on the same repository is already running. However, if the repository is shared and user A runs git gc on the repository and while that gc is still running user B

Re: [PATCH 3/4] completion: fix branch.autosetup(merge|rebase)

2014-01-02 Thread Junio C Hamano
Ramkumar Ramachandra writes: > branch.*.*) > local pfx="${cur%.*}." cur_="${cur##*.}" > + if [ "$pfx" == "branch.autosetupmerge." ] || > + [ "$pfx" == "branch.autosetuprebase." ]; then > + return > + fi >

Re: [PATCH 2/4] completion: introduce __gitcomp_2 ()

2014-01-02 Thread Junio C Hamano
Ramkumar Ramachandra writes: > There are situations where two classes of completions possible. For > example > > branch. > > should try to complete > > branch.master. > branch.autosetupmerge > branch.autosetuprebase > > The first candidate has the suffix ".", and the second/ third candida

Re: [PATCH/RFC] Introduce git submodule add|update --attach

2014-01-02 Thread Francesco Pretto
2014/1/2 Junio C Hamano : > Francesco Pretto writes: > >> by default "git submodule" performs its add or update operations on a >> detached >> HEAD. This works well when using an existing full-fledged/indipendent >> project as >> the submodule, as there's less frequent need to update it or commi

Re: [PATCH 0/3] t0000 cleanups

2014-01-02 Thread Junio C Hamano
Jonathan Nieder writes: > Jeff King wrote: >> On Mon, Dec 30, 2013 at 10:51:25AM -0800, Jonathan Nieder wrote: > >>> These scratch areas for sub-tests should be under the t >>> trash directory, but because the TEST_OUTPUT_DIRECTORY >>> setting from the toplevel test leaks > [...]

Re: [PATCH 0/3] t0000 cleanups

2014-01-02 Thread Jonathan Nieder
Jeff King wrote: > On Mon, Dec 30, 2013 at 10:51:25AM -0800, Jonathan Nieder wrote: >> These scratch areas for sub-tests should be under the t >> trash directory, but because the TEST_OUTPUT_DIRECTORY >> setting from the toplevel test leaks [...] > This is not exactly true. The

Re: [PATCH v2] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Junio C Hamano
Junio C Hamano writes: > Junio C Hamano writes: > >> This has a bit of conflict with another topic in flight; I think I >> resolved it correctly, but please double check. The following is >> how it would apply on top of 'pu'. >> >> sha1_file.c | 9 + >> 1 file changed, 5 insertions(+),

[PATCH v2] name-hash: retire unused index_name_exists()

2014-01-02 Thread Eric Sunshine
db5360f3f496 (name-hash: refactor polymorphic index_name_exists(); 2013-09-17) split index_name_exists() into index_file_exists() and index_dir_exists() but retained index_name_exists() as a thin wrapper to avoid disturbing possible in-flight topics. Since this change landed in 'master' some time a

Re: [PATCH v2] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Junio C Hamano
Junio C Hamano writes: > This has a bit of conflict with another topic in flight; I think I > resolved it correctly, but please double check. The following is > how it would apply on top of 'pu'. > > sha1_file.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/s

Re: [RFC] blame: new option to better handle merged cherry-picks

2014-01-02 Thread Junio C Hamano
"Bernhard R. Link" writes: > When giving git-blame the new option introduced with my patch, only > the order of parents determines which commit is blamed. Without > the option (i.e. the currently only possible behaviour) which commit > is blamed depends what else touches other parts of the file.

Re: What's cooking in git.git (Dec 2013, #05; Thu, 26)

2014-01-02 Thread Eric Sunshine
On Thu, Jan 2, 2014 at 4:11 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >> On Fri, Dec 27, 2013 at 5:13 PM, Junio C Hamano wrote: >>> Eric Sunshine writes: >>> On Thu, Dec 26, 2013 at 4:08 PM, Junio C Hamano wrote: > [New Topics] Would $gmane/239575 [1] be of interes

Re: [PATCH v2] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Junio C Hamano
Sebastian Schuberth writes: > When cloning to a directory "C:\foo\bar" from Windows' cmd.exe where "foo" > does not exist yet, Git would throw an error like > > fatal: could not create work tree dir 'c:\foo\bar'.: No such file or directory > > Fix this by not hard-coding a platform specific direc

Re: [PATCH] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Johannes Schindelin
Hi Junio, On Thu, 2 Jan 2014, Junio C Hamano wrote: > If we are going to change the meaning of the function so that it can > now take any random path in platform-specific convention Note that nothing in the function name or documentation suggests otherwise. > that may be incompatible with the i

Re: [RFC] blame: new option to better handle merged cherry-picks

2014-01-02 Thread Bernhard R. Link
* Junio C Hamano [140102 21:29]: > > This optimization, while being faster in the usual case, means that in > > the case of cherry-picks the blamed commit depends on which other commits > > touched a file. > > > > If for example one commit A modified both files b and c. And there are > > commits B

Re: What's cooking in git.git (Dec 2013, #05; Thu, 26)

2014-01-02 Thread Junio C Hamano
Eric Sunshine writes: > On Fri, Dec 27, 2013 at 5:13 PM, Junio C Hamano wrote: >> Eric Sunshine writes: >> >>> On Thu, Dec 26, 2013 at 4:08 PM, Junio C Hamano wrote: [New Topics] >>> >>> Would $gmane/239575 [1] be of interest for "New Topics"? >>> >>> [1]: http://article.gmane.org/gmane.c

Re: [PATCH v2] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Johannes Schindelin
Hi, On Thu, 2 Jan 2014, Sebastian Schuberth wrote: > When cloning to a directory "C:\foo\bar" from Windows' cmd.exe where "foo" > does not exist yet, Git would throw an error like > > fatal: could not create work tree dir 'c:\foo\bar'.: No such file or directory > > Fix this by not hard-coding

Re: [PATCH] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Junio C Hamano
Sebastian Schuberth writes: > On 02.01.2014 20:55, Junio C Hamano wrote: > >> Thanks; the conclusion is correct --- you need a good commit >> message in the recorded history. That does not have anything to do >> with integrating with pulling from subsystem maintainers, which we >> regularly do.

Re: [PATCH v2 1/4] Consistently use the term "builtin" instead of "internal command"

2014-01-02 Thread Sebastian Schuberth
On Thu, Jan 2, 2014 at 9:31 PM, Jonathan Nieder wrote: > would just leave me wondering "I never claimed it was built-in; what's > going on?" I think it would be simplest to keep it as > > $ git whatever > fatal: cannot handle "whatever" internally > > which at least makes it clea

Re: [PATCH v2 4/4] Move builtin-related implementations to a new builtin.c file

2014-01-02 Thread Sebastian Schuberth
On Thu, Jan 2, 2014 at 8:43 PM, Junio C Hamano wrote: >> Documentation/technical/api-builtin.txt | 2 +- >> Makefile| 1 + >> builtin.c | 225 ++ >> builtin.h | 21 +++ >>

[PATCH v2] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Sebastian Schuberth
When cloning to a directory "C:\foo\bar" from Windows' cmd.exe where "foo" does not exist yet, Git would throw an error like fatal: could not create work tree dir 'c:\foo\bar'.: No such file or directory Fix this by not hard-coding a platform specific directory separator into safe_create_leading_

Re: [PATCH] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Sebastian Schuberth
On 02.01.2014 20:55, Junio C Hamano wrote: > Thanks; the conclusion is correct --- you need a good commit > message in the recorded history. That does not have anything to do > with integrating with pulling from subsystem maintainers, which we > regularly do. I'll send a v2 which adds a proper c

Re: What's cooking in git.git (Dec 2013, #05; Thu, 26)

2014-01-02 Thread Eric Sunshine
On Fri, Dec 27, 2013 at 5:13 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >> On Thu, Dec 26, 2013 at 4:08 PM, Junio C Hamano wrote: >>> [New Topics] >> >> Would $gmane/239575 [1] be of interest for "New Topics"? >> >> [1]: http://article.gmane.org/gmane.comp.version-control.git/239575/ >

Re: [PATCH] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Johannes Schindelin
Hi Sebastian, On Thu, 2 Jan 2014, Sebastian Schuberth wrote: > On 02.01.2014 18:33, Johannes Schindelin wrote: > > > -- snip -- > > On Linux, we can get away with assuming that the directory separator is a > > forward slash, but that is wrong in general. For that purpose, the > > is_dir_sep() fu

Re: [PATCH] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Johannes Schindelin
Hi Junio, On Thu, 2 Jan 2014, Junio C Hamano wrote: > Johannes Schindelin writes: > > > On Thu, 2 Jan 2014, Sebastian Schuberth wrote: > > > >> See https://github.com/msysgit/git/pull/80. > > > > Thanks Sebastian! > > > > However, since the git.git project is not comfortable with the concept >

Re: [PATCH] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Sebastian Schuberth
On 02.01.2014 19:18, John Keeping wrote: That said, I see any further explanations on top of the commit message title is an added bonus, and as "just" a bonus a link to a pull request should be fine. You don't need to understand or appreciate the concept of pull requests in order to follow the l

Re: [PATCH v2 1/4] Consistently use the term "builtin" instead of "internal command"

2014-01-02 Thread Jonathan Nieder
Hi, Sebastian Schuberth wrote: [...] > --- a/Documentation/technical/api-builtin.txt > +++ b/Documentation/technical/api-builtin.txt > @@ -14,7 +14,7 @@ Git: > > . Add the external declaration for the function to `builtin.h`. > > -. Add the command to `commands[]` table in `handle_internal_c

Re: [RFC] blame: new option to better handle merged cherry-picks

2014-01-02 Thread Junio C Hamano
"Bernhard R. Link" writes: > Allows to disable the git blame optimization of assuming that if there is a > parent of a merge commit that has the exactly same file content, then > only this parent is to be looked at. I think this is what we usually call --full-history in "git log" family, but mor

Re: [PATCH/RFC] Introduce git submodule add|update --attach

2014-01-02 Thread Junio C Hamano
Francesco Pretto writes: > by default "git submodule" performs its add or update operations on a detached > HEAD. This works well when using an existing full-fledged/indipendent project > as > the submodule, as there's less frequent need to update it or commit back > changes. When the submodule

Re: [PATCH] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Junio C Hamano
Johannes Schindelin writes: > Hi, > > On Thu, 2 Jan 2014, Sebastian Schuberth wrote: > >> See https://github.com/msysgit/git/pull/80. > > Thanks Sebastian! > > However, since the git.git project is not comfortable with the concept of > pull requests (which is why you submitted this patch via mail

Re: [PATCH v2 4/4] Move builtin-related implementations to a new builtin.c file

2014-01-02 Thread Junio C Hamano
Sebastian Schuberth writes: > Signed-off-by: Sebastian Schuberth > --- > Documentation/technical/api-builtin.txt | 2 +- > Makefile| 1 + > builtin.c | 225 ++ > builtin.h

Re: [PATCH v2 3/4] Speed up is_git_command() by checking early for internal commands

2014-01-02 Thread Junio C Hamano
Sebastian Schuberth writes: > Since 2dce956 is_git_command() is a bit slow as it does file I/O in the > call to list_commands_in_dir(). Avoid the file I/O by adding an early > check for internal commands. I think it is a good thing to check with the list of built-in's first, but in order to see

Re: [PATCH] drop unnecessary copying in credential_ask_one

2014-01-02 Thread Junio C Hamano
Jeff King writes: > ... But the test suite, of course, always uses askpass because it > cannot rely on accessing a terminal (we'd have to do some magic with > lib-terminal, I think). > > So it doesn't detect the problem in your patch, but I wonder if it is > worth applying the patch below anyway,

Re: [PATCH/RFC] Introduce git submodule add|update --attach

2014-01-02 Thread Francesco Pretto
Thanks for the comments, my replies below. Before, a couple of general questions: - I'm also writing some tests, should I commit them together with the feature patch? - to determine the attached/detached state I did this: head_detached= if test "$(rev-parse --abbrev-ref HEAD)" = "HEAD" then he

Re: [PATCH] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread John Keeping
On Thu, Jan 02, 2014 at 07:11:42PM +0100, Sebastian Schuberth wrote: > On 02.01.2014 18:33, Johannes Schindelin wrote: > > > -- snip -- > > On Linux, we can get away with assuming that the directory separator is a > > forward slash, but that is wrong in general. For that purpose, the > > is_dir_se

Re: [PATCH] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Sebastian Schuberth
On 02.01.2014 18:33, Johannes Schindelin wrote: -- snip -- On Linux, we can get away with assuming that the directory separator is a forward slash, but that is wrong in general. For that purpose, the is_dir_sep() function was introduced a long time ago. By using it in safe_create_leading_directo

Re: aborted 'git fetch' leaves workspace unusable

2014-01-02 Thread Junio C Hamano
stephen_le...@stephe-leake.org writes: > However, in this case, even running the fetch was a mistake; I would > have prefered that it leave FETCH_HEAD in its previous state. I think the clearing of leftover FETCH_HEAD is one of the early things "git fetch" does, unless "--append" is in effect. I

[RFC] blame: new option to better handle merged cherry-picks

2014-01-02 Thread Bernhard R. Link
Allows to disable the git blame optimization of assuming that if there is a parent of a merge commit that has the exactly same file content, then only this parent is to be looked at. This optimization, while being faster in the usual case, means that in the case of cherry-picks the blamed commit d

Re: [PATCH] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Johannes Schindelin
Hi, On Thu, 2 Jan 2014, Sebastian Schuberth wrote: > See https://github.com/msysgit/git/pull/80. Thanks Sebastian! However, since the git.git project is not comfortable with the concept of pull requests (which is why you submitted this patch via mail), I believe that we have to explain the rati

[PATCH] Fix safe_create_leading_directories() for Windows

2014-01-02 Thread Sebastian Schuberth
See https://github.com/msysgit/git/pull/80. Signed-off-by: Johannes Schindelin Signed-off-by: Sebastian Schuberth --- sha1_file.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index 760dd60..2114c58 100644 --- a/sha1_file.c +++ b/s

[no subject]

2014-01-02 Thread Василий Макаров
help -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH v2 4/4] Move builtin-related implementations to a new builtin.c file

2014-01-02 Thread Sebastian Schuberth
Signed-off-by: Sebastian Schuberth --- Documentation/technical/api-builtin.txt | 2 +- Makefile| 1 + builtin.c | 225 ++ builtin.h | 21 +++ git.c

[PATCH v2 1/4] Consistently use the term "builtin" instead of "internal command"

2014-01-02 Thread Sebastian Schuberth
Signed-off-by: Sebastian Schuberth --- Documentation/technical/api-builtin.txt | 2 +- git.c | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/technical/api-builtin.txt b/Documentation/technical/api-builtin.txt i

[PATCH v2 2/4] Call load_command_list() only when it is needed

2014-01-02 Thread Sebastian Schuberth
This avoids list_commands_in_dir() being called when not needed which is quite slow due to file I/O in order to list matching files in a directory. Signed-off-by: Sebastian Schuberth --- builtin/help.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/help.c b/builtin

[PATCH v2 3/4] Speed up is_git_command() by checking early for internal commands

2014-01-02 Thread Sebastian Schuberth
Since 2dce956 is_git_command() is a bit slow as it does file I/O in the call to list_commands_in_dir(). Avoid the file I/O by adding an early check for internal commands. Signed-off-by: Sebastian Schuberth --- Documentation/technical/api-builtin.txt | 4 +- builtin.h

[PATCH v2 0/4]

2014-01-02 Thread Sebastian Schuberth
This is the second iteration of the patches in http://www.spinics.net/lists/git/msg222428.html http://www.spinics.net/lists/git/msg222429.html which * adds a commit to use the term "builtin" instead of "internal command", * also modifies the docs accordingly, * moves the is_builtin() declaration

Re: [PATCH 2/2] Speed up is_git_command() by checking early for internal commands

2014-01-02 Thread Sebastian Schuberth
On 02.01.2014 09:51, Christian Couder wrote: diff --git a/builtin/help.c b/builtin/help.c index b6fc15e..1f0261e 100644 --- a/builtin/help.c +++ b/builtin/help.c @@ -284,10 +284,15 @@ static int git_help_config(const char *var, const char *value, void *cb) return git_default_config(var

Re: [PATCH 2/2] Speed up is_git_command() by checking early for internal commands

2014-01-02 Thread Christian Couder
On Mon, Dec 30, 2013 at 10:07 PM, Sebastian Schuberth wrote: > Since 2dce956 is_git_command() was a bit slow as it does file I/O in the > call to list_commands_in_dir(). Avoid the file I/O by adding an early > check for internal commands. > > Signed-off-by: Sebastian Schuberth > --- > builtin/he