Re: [PATCH 6/6] t4012: Make --shortstat more robust

2012-07-11 Thread Alexander Strasser
Hi, seems I managed to omit a word in the short log message: t4012: Make --shortstat *test* more robust Junio C Hamano wrote: > Alexander Strasser writes: > > > The --shortstat test depends on the same scenario as the --stat > > test. Use the part of the same expected result for the --stat

Re: Mini bug report origin/pu: t1512 failed on Mac OS X (commit 957d74062c1f0e ?)

2012-07-11 Thread Junio C Hamano
Junio C Hamano writes: > I think the other tests in t/ prefer to unquote it so that we would > ignore spaces around "wc -l" output, i.e. > > test $(wc -l > Thanks for a report. -- >8 -- Subject: [PATCH] t1512: ignore whitespaces in wc -l output Some implementations of sed (e.g. MacOS X)

Re: Mini bug report origin/pu: t1512 failed on Mac OS X (commit 957d74062c1f0e ?)

2012-07-11 Thread Junio C Hamano
Torsten Bögershausen writes: > The following tweak will make t1512 work on my Mac OS box: > > > --- a/t/t1512-rev-parse-disambiguation.sh > +++ b/t/t1512-rev-parse-disambiguation.sh > @@ -257,7 +257,7 @@ test_expect_success 'rev-parse --disambiguate' ' > # commits created by commit-tree i

Re: [PATCH/RFC] git-svn: don't create master if another head exists

2012-07-11 Thread Junio C Hamano
Marcin Owsiany writes: > Date: Sun, 24 Jun 2012 22:40:05 +0100 > Subject: [PATCH] git-svn: don't create master if another head exists > > git-svn insists on creating the "master" head (unless it exists) on every > "fetch". It is useful that it gets created initially, when no head exists > - users

Re: [PATCH 6/6] t4012: Make --shortstat more robust

2012-07-11 Thread Junio C Hamano
Alexander Strasser writes: > The --shortstat test depends on the same scenario as the --stat > test. Use the part of the same expected result for the --stat test > to avoid duplicating it manually. > diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh > index 81a9e8c..a3f6030 100755 > -

What's cooking in git.git (Jul 2012, #03; Wed, 11)

2012-07-11 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. Many topics in flight are now in 'next' and all of them look more or less done (knock wood). Many fixes that are already in 'master' are now me

[ANNOUNCE] Git v1.7.11.2

2012-07-11 Thread Junio C Hamano
The latest maintenance release Git v1.7.11.2 is now available at the usual places. The release tarballs are found at: http://code.google.com/p/git-core/downloads/list and their SHA-1 checksums are: f67b4f6c0277250411c6872ae7b8a872ae11d313 git-1.7.11.2.tar.gz 088996c301cca24360fd5e30ce66bfa

[PATCH 6/6] t4012: Make --shortstat more robust

2012-07-11 Thread Alexander Strasser
The --shortstat test depends on the same scenario as the --stat test. Use the part of the same expected result for the --stat test to avoid duplicating it manually. Signed-off-by: Alexander Strasser --- t/t4012-diff-binary.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 4/6] t4012: Break up pipe into serial redirections

2012-07-11 Thread Alexander Strasser
Do not hide possible git errors by masquerading its process exit status. Signed-off-by: Alexander Strasser --- t/t4012-diff-binary.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh index 60c2f6c..daf8234 100755 --- a/t/t4012-

[PATCH 5/6] t4012: Re-indent test snippets

2012-07-11 Thread Alexander Strasser
Most one-level indents were 1 HT (horizontal tab) followed by 1 SP. Remove the SP. Signed-off-by: Alexander Strasser --- t/t4012-diff-binary.sh | 68 +- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/t/t4012-diff-binary.sh b/t/t401

[PATCH 3/6] t4012: Actually quote the sed script

2012-07-11 Thread Alexander Strasser
The nested quoting is not needed in this cases, thus the previous version did work just fine. Never the less the usage is misleading, so just achieve nested quoting by using double quotes instead. Lower the probability of breakage in the future and make the code easier to read. NOTE: Just dropping

[PATCH 2/6] t4012: Unquote git command fragment in test title

2012-07-11 Thread Alexander Strasser
The command fragments are quoted nowhere else in title texts of this file, thus make this one consistent with all other titles. Signed-off-by: Alexander Strasser --- t/t4012-diff-binary.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-b

[PATCH 1/6] t4012: Use different style for quoting

2012-07-11 Thread Alexander Strasser
This quoting style is used by all newly added test code. Signed-off-by: Alexander Strasser --- t/t4012-diff-binary.sh | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh index 6cebb39..2a8b68e 1

[PATCH 0/6] Cleaning up t4012

2012-07-11 Thread Alexander Strasser
Hi, during my recent bug hunting expedition I had the honor to modify t/t4012-diff-binary.sh . After submitting my previous patch set it quickly became clear that this file does not adhere to currently practiced style of Git tests. It took me some time to get back to this but here finally com

Re: [PATCH 2/6] Teach remote.c about the remote.default configuration setting.

2012-07-11 Thread Junio C Hamano
Marc Branchaud writes: > On 12-07-11 02:21 PM, Junio C Hamano wrote: >> marcn...@xiplink.com writes: >> >>> From: Marc Branchaud >>> >>> The code now has a default_remote_name and an effective_remote_name: >>> >>> - default_remote_name is set by remote.default in the config, or is >>> "origin

Re: [PATCH 3/6] Teach "git remote" about remote.default.

2012-07-11 Thread Junio C Hamano
Marc Branchaud writes: > What about a warning displayed if "remote.default" is not set? Something > like: > > This repository does not have an explicitly configured default > remote. Selecting "origin" as the default remote repository. > To suppress this warning, or if you wi

Re: [PATCH/RFC] git-svn: don't create master if another head exists

2012-07-11 Thread Marcin Owsiany
On Wed, Jul 11, 2012 at 01:26:17AM +, Eric Wong wrote: > Junio C Hamano wrote: > > Marcin Owsiany writes: > > > > >> This makes my idea to do the same to "my something else instead of > > >> master" much less attractive. In fact I don't think such behaviour would > > >> be useful. > > >> >

Re: [PATCH] submodules: don't stumble over symbolic links when cloning recursively

2012-07-11 Thread Jens Lehmann
Am 11.07.2012 22:39, schrieb Johannes Sixt: > Am 11.07.2012 22:06, schrieb Jens Lehmann: >> Am 11.07.2012 21:10, schrieb Johannes Sixt: >>> Am 11.07.2012 20:11, schrieb Jens Lehmann: Since 69c305178 (submodules: refactor computation of relative gitdir path) cloning a submodule recursively

Re: [PATCH 3/6] Teach "git remote" about remote.default.

2012-07-11 Thread Marc Branchaud
On 12-07-11 02:27 PM, Junio C Hamano wrote: > marcn...@xiplink.com writes: > >> From: Marc Branchaud >> >> The "rename" and "rm" commands now handle the case where the remote being >> changed is the default remote. > > "handle the case" is way underspecified. > > Until I peeked the patch, I cou

Re: [PATCH 2/6] Teach remote.c about the remote.default configuration setting.

2012-07-11 Thread Marc Branchaud
On 12-07-11 02:21 PM, Junio C Hamano wrote: > marcn...@xiplink.com writes: > >> From: Marc Branchaud >> >> The code now has a default_remote_name and an effective_remote_name: >> >> - default_remote_name is set by remote.default in the config, or is "origin" >>if remote.default doesn't exist

Re: [PATCH] submodules: don't stumble over symbolic links when cloning recursively

2012-07-11 Thread Johannes Sixt
Am 11.07.2012 22:06, schrieb Jens Lehmann: > Am 11.07.2012 21:10, schrieb Johannes Sixt: >> Am 11.07.2012 20:11, schrieb Jens Lehmann: >>> Since 69c305178 (submodules: refactor computation of relative gitdir path) >>> cloning a submodule recursively fails for recursive submodules when a >>> symboli

Mini bug report origin/pu: t1512 failed on Mac OS X (commit 957d74062c1f0e ?)

2012-07-11 Thread Torsten Bögershausen
The following tweak will make t1512 work on my Mac OS box: --- a/t/t1512-rev-parse-disambiguation.sh +++ b/t/t1512-rev-parse-disambiguation.sh @@ -257,7 +257,7 @@ test_expect_success 'rev-parse --disambiguate' ' # commits created by commit-tree in earlier tests do not share # the

Re: [PATCH] submodules: don't stumble over symbolic links when cloning recursively

2012-07-11 Thread Jens Lehmann
Am 11.07.2012 21:10, schrieb Johannes Sixt: > Am 11.07.2012 20:11, schrieb Jens Lehmann: >> Since 69c305178 (submodules: refactor computation of relative gitdir path) >> cloning a submodule recursively fails for recursive submodules when a >> symbolic link is part of the path to the work tree of th

Re: [PATCH] submodules: don't stumble over symbolic links when cloning recursively

2012-07-11 Thread Johannes Sixt
Am 11.07.2012 20:11, schrieb Jens Lehmann: > Since 69c305178 (submodules: refactor computation of relative gitdir path) > cloning a submodule recursively fails for recursive submodules when a > symbolic link is part of the path to the work tree of the superproject. > > This happens when module_clo

Re: [PATCH 3/6] Teach "git remote" about remote.default.

2012-07-11 Thread Junio C Hamano
marcn...@xiplink.com writes: > From: Marc Branchaud > > The "rename" and "rm" commands now handle the case where the remote being > changed is the default remote. "handle the case" is way underspecified. Until I peeked the patch, I couldn't tell if you were now allowing "git remote rm" that doe

Re: [PATCH 2/6] Teach remote.c about the remote.default configuration setting.

2012-07-11 Thread Junio C Hamano
marcn...@xiplink.com writes: > From: Marc Branchaud > > The code now has a default_remote_name and an effective_remote_name: > > - default_remote_name is set by remote.default in the config, or is "origin" >if remote.default doesn't exist ("origin" was the fallback value before >this cha

Re: [PATCH v2 0/6] Default remote

2012-07-11 Thread Junio C Hamano
marcn...@xiplink.com writes: > Incorporated feedback on the first version of this series[1], and also added > documentation updates. > > Note that the documentation changes include 4 minor grammatical fixes (verb > tenses, added a "the" in a couple fo places). > ... > Patches 5 & 6 are unchanged

[PATCH] submodules: don't stumble over symbolic links when cloning recursively

2012-07-11 Thread Jens Lehmann
Since 69c305178 (submodules: refactor computation of relative gitdir path) cloning a submodule recursively fails for recursive submodules when a symbolic link is part of the path to the work tree of the superproject. This happens when module_clone() tries to find the relative paths between work tr

Re: [PATCH 2/4] Allow reading svn dumps from files via file:// urls.

2012-07-11 Thread Stephen Bash
- Original Message - > From: "Junio C Hamano" > To: "Dmitry Ivankov" > Cc: git@vger.kernel.org > Sent: Wednesday, July 11, 2012 1:00:29 PM > Subject: Re: [PATCH 2/4] Allow reading svn dumps from files via file:// urls. > > Dmitry Ivankov writes: > > > Florian Achleitner gmail.com> > >

Re: [PATCH 2/4] Allow reading svn dumps from files via file:// urls.

2012-07-11 Thread Junio C Hamano
Dmitry Ivankov writes: > Florian Achleitner gmail.com> writes: > >> >> Especially for testing and development it's useful >> to bypass svnrdump and replay the svndump from a file >> without connecting to an svn server. >> >> Add support for file:// urls in the remote url. >> e.g. svn::file:///

Re: [PATCH 3/3] branch: add --unset-upstream option

2012-07-11 Thread Junio C Hamano
Carlos Martín Nieto writes: > I've added a bit of code to also remove branch.foo.rebase, which > I'd also consider to be part of the upstream information. If "git branch -t" or "git branch --set-upstream" took another option "--integrate-with=[rebase|merge]" to set the variable, I would agree th

Re: [PATCH v3 3/3] Replace strlen() with ce_namelen()

2012-07-11 Thread Junio C Hamano
Thanks for resending; I've merged this independently to 'next' and will merge it to 'master' soonish. This one is trivially correct. -- 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.o

Re: [PATCH v3 1/3] read-cache.c: Handle long filenames correctly

2012-07-11 Thread Junio C Hamano
Thomas Gummerer writes: > Make git handle long file/path names (> 4096 characters) correctly. > > There is a bug in the current version, which causes very long > file/pathnames to be handled incorrectly, or not even added to > the index, if they share the first 4096 characters. > > Signed-off-by:

Re: [PATCH/RFC v2 1/2] Strip namelen out of ce_flags into a ce_namelen field

2012-07-11 Thread Junio C Hamano
Junio C Hamano writes: >> @@ -395,10 +395,8 @@ int df_name_compare(const char *name1, int len1, int >> mode1, >> return c1 - c2; >> } >> >> -int cache_name_compare(const char *name1, int flags1, const char *name2, >> int flags2) >> +int cache_name_stage_compare(const char *name1, int st

Re: Subtree in Git

2012-07-11 Thread dag
Herman van Rink writes: >> It's hard to tell what's what with one big diff. Each command should >> get its own commit plus more if infrastructure work has to be done. I >> realize it's a bit of a pain to reformulate this but git rebase -i makes >> it easy and the history will be much better lon

[PATCH 2/6] Teach remote.c about the remote.default configuration setting.

2012-07-11 Thread marcnarc
From: Marc Branchaud The code now has a default_remote_name and an effective_remote_name: - default_remote_name is set by remote.default in the config, or is "origin" if remote.default doesn't exist ("origin" was the fallback value before this change). - effective_remote_name is the nam

[PATCH 1/6] Rename remote.c's default_remote_name static variables.

2012-07-11 Thread marcnarc
From: Marc Branchaud This prepares the code to handle a true remote.default configuration value. Rename two variables: default_remote_name --> effective_remote_name explicit_default_remote_name --> explicit_effective_remote_name effective_remote_name is the remote name that is curr

[PATCH 6/6] Teach get_default_remote to respect remote.default.

2012-07-11 Thread marcnarc
From: Marc Branchaud Use "git remote default" instead of replicating its logic. The unit test checks a relative-path submodule because the submodule code is (almost) the only thing that uses get_default_remote. Signed-off-by: Marc Branchaud --- git-parse-remote.sh| 5 + t/t7400-s

[PATCH 5/6] Test that plain "git fetch" uses remote.default when on a detached HEAD.

2012-07-11 Thread marcnarc
From: Marc Branchaud Signed-off-by: Marc Branchaud --- t/t5510-fetch.sh | 17 + 1 file changed, 17 insertions(+) diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index d7a19a1..8ecd996 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -69,6 +69,23 @@ test_expect_success "

[PATCH v2 0/6] Default remote

2012-07-11 Thread marcnarc
Incorporated feedback on the first version of this series[1], and also added documentation updates. Note that the documentation changes include 4 minor grammatical fixes (verb tenses, added a "the" in a couple fo places). I also added Phil's "git push" scenario to patch #2's message, rather tha

[PATCH 4/6] Teach clone to set remote.default.

2012-07-11 Thread marcnarc
From: Marc Branchaud This makes git-clone consistent with the remote.default support implemented in git-remote. Specifically, since "git remote add" sets remote.default if it's adding the first remote to the repository, when clone itself adds the first remote it should do the same. This also ma

[PATCH 3/6] Teach "git remote" about remote.default.

2012-07-11 Thread marcnarc
From: Marc Branchaud The "rename" and "rm" commands now handle the case where the remote being changed is the default remote. If the "add" command is used to add the repo's first remote, that remote becomes the default remote. Also introduce a "default" sub-command to get or set the default rem

Re: [PATCH 2/3] branch: suggest how to undo a --set-upstream when given one branch

2012-07-11 Thread Carlos Martín Nieto
On Tue, 2012-07-10 at 18:00 -0500, Jonathan Nieder wrote: > Junio C Hamano wrote: > > > I think it > > is better to leave them emitted unconditionally to the standard > > error stream, in order to train users away from using the old option

Re: [PATCH 2/4] Allow reading svn dumps from files via file:// urls.

2012-07-11 Thread Dmitry Ivankov
Florian Achleitner gmail.com> writes: > > Especially for testing and development it's useful > to bypass svnrdump and replay the svndump from a file > without connecting to an svn server. > > Add support for file:// urls in the remote url. > e.g. svn::file:///path/to/dump > When the remote help

Re: [PATCH 2/3] branch: suggest how to undo a --set-upstream when given one branch

2012-07-11 Thread Carlos Martín Nieto
On Tue, 2012-07-10 at 10:40 -0700, Junio C Hamano wrote: > Carlos Martín Nieto writes: > > > This interface is error prone, and a better one (--set-upstream-to) > > exists. Suggest how to fix a --set-upstream invocation in case the > > user only gives one argument, which makes it likely that he m

Re: [PATCH 3/3] branch: add --unset-upstream option

2012-07-11 Thread Carlos Martín Nieto
On Tue, 2012-07-10 at 11:02 -0700, Junio C Hamano wrote: > Carlos Martín Nieto writes: > > > We have ways of setting the upstream information, but if we want to > > unset it, we need to resort to modifying the configuration manually. > > > > Teach branch an --unset-upstream option that unsets thi

Re: [PATCH 2/3] branch: suggest how to undo a --set-upstream when given one branch

2012-07-11 Thread Carlos Martín Nieto
On Tue, 2012-07-10 at 19:20 +0200, Matthieu Moy wrote: > Carlos Martín Nieto writes: > > > --- a/builtin/branch.c > > +++ b/builtin/branch.c > > @@ -864,10 +864,32 @@ int cmd_branch(int argc, const char **argv, const > > char *prefix) > >info and making sure new_upstream is corre

[RFC/PATCH 0/4] GSOC remote-svn

2012-07-11 Thread Florian Achleitner
Hi! This series adds creating notes to vcs-svn, plus some testing aids. I picked one patch from Dmitry's existing work. Next steps are storing the fetched revisions and notes in the right place in refs/remote/ and adding incremental import using the notes. Im currently stuck on some unexpected b

[PATCH 3/4] Create a note for every imported commit containing svn metadata.

2012-07-11 Thread Florian Achleitner
To provide metadata from svn dumps for further processing, e.g. branch detection, attach a note to each imported commit that stores additional information. The notes are currently hard-coded in refs/notes/svn/revs. Currently the following lines from the svn dump are directly accumulated in the note

[PATCH 4/4] When debug==1, start fast-import with "--stats" instead of "--quiet".

2012-07-11 Thread Florian Achleitner
fast-import prints statistics that could be interesting to the developer of remote helpers. Signed-off-by: Florian Achleitner --- transport-helper.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport-helper.c b/transport-helper.c index 616db91..d6daad5 100644 --- a/

[PATCH 2/4] Allow reading svn dumps from files via file:// urls.

2012-07-11 Thread Florian Achleitner
Especially for testing and development it's useful to bypass svnrdump and replay the svndump from a file without connecting to an svn server. Add support for file:// urls in the remote url. e.g. svn::file:///path/to/dump When the remote helper finds an url starting with file:// it tries to open th

Re: [PATCH v3 1/3] read-cache.c: Handle long filenames correctly

2012-07-11 Thread Nguyen Thai Ngoc Duy
On Wed, Jul 11, 2012 at 4:22 PM, Thomas Gummerer wrote: > Make git handle long file/path names (> 4096 characters) correctly. > > There is a bug in the current version, which causes very long > file/pathnames to be handled incorrectly, or not even added to > the index, if they share the first 4096

[PATCH v3 2/3] Strip namelen out of ce_flags into a ce_namelen field

2012-07-11 Thread Thomas Gummerer
Strip the name length from the ce_flags field and move it into its own ce_namelen field in struct cache_entry. This will both give us a tiny bit of a performance enhancement when working with long pathnames and is a refactoring for more readability of the code. It enhances readability, by making i

[PATCH v3 3/3] Replace strlen() with ce_namelen()

2012-07-11 Thread Thomas Gummerer
Replace strlen(ce->name) with ce_namelen() in a couple of places which gives us some additional bits of performance. Signed-off-by: Thomas Gummerer --- read-cache.c |4 ++-- unpack-trees.c |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/read-cache.c b/read-cache.c

[PATCH v3 1/3] read-cache.c: Handle long filenames correctly

2012-07-11 Thread Thomas Gummerer
Make git handle long file/path names (> 4096 characters) correctly. There is a bug in the current version, which causes very long file/pathnames to be handled incorrectly, or not even added to the index, if they share the first 4096 characters. Signed-off-by: Thomas Gummerer --- read-cache.c

[PATCH v3 0/3] Introduction of a ce_namelen field

2012-07-11 Thread Thomas Gummerer
Thanks to Junio for reviewing v2 of this patch series. The speedup coming from introducing the field exists, but is minimal, here are the times for 1000 runs of git ls-files on the Webkit index, first without the ce_namelen field, and then with the ce_namelen field. $ time ./test.sh real 4m40.895