Re: Error when cloning with weird local directory

2015-08-05 Thread Torsten Bögershausen
On 2015-08-06 06.21, Chris Packham wrote: > Hi All, > > A developer at $dayjob called me over to have a look at a git error he > was getting (names changed to protect the innocent). > > $ git --version > git version 2.5.0 > $ git clone ssh://example.com/repo.git > Cloning into 'repo'... >

[PATCH 2/2] test-lib: disable trace when test is not verbose

2015-08-05 Thread Jeff King
The "-x" test-script option turns on the shell's "-x" tracing, which can help show why a particular test is failing. Unfortunately, this can create false negatives in some tests if they invoke a shell function with its stderr redirected. t5512.10 is such a test, as it does: test_must_fail git

[PATCH 1/2] test-lib: turn off "-x" tracing during chain-lint check

2015-08-05 Thread Jeff King
Now that GIT_TEST_CHAIN_LINT is on by default, running: ./t-basic.sh -x --verbose-only=1 starts with: expecting success: find .git/objects -type f -print >should-be-empty && test_line_count = 0 should-be-empty + exit 117 error: last command exited wit

[PATCH 0/2] ./t5512-*.sh -x complaints

2015-08-05 Thread Jeff King
On Thu, Aug 06, 2015 at 12:55:35AM -0400, Jeff King wrote: > PS I don't recall the outcome of our last discussion on the "verbose" >test function. Here it makes debug output for the "grep" above more >readable when it fails. But it also looks weird not to have the >matching negative on

Re: What's cooking in git.git

2015-08-05 Thread Jeff King
On Wed, Aug 05, 2015 at 03:55:23PM -0700, Junio C Hamano wrote: > * jk/negative-hiderefs (2015-07-28) 2 commits > - refs: support negative transfer.hideRefs > - docs/config.txt: reorder hideRefs config > > Allow negative !ref entry in multi-value transfer.hideRefs > configuration to say "don'

Error when cloning with weird local directory

2015-08-05 Thread Chris Packham
Hi All, A developer at $dayjob called me over to have a look at a git error he was getting (names changed to protect the innocent). $ git --version git version 2.5.0 $ git clone ssh://example.com/repo.git Cloning into 'repo'... fatal: I don't handle protocol '/home/user/src/ssh' After

Re: What's cooking in git.git

2015-08-05 Thread Junio C Hamano
David Turner writes: > On Wed, 2015-08-05 at 15:55 -0700, Junio C Hamano wrote: >> * dt/untracked-subdir (2015-08-05) 2 commits >> - DONTMERGE: Waiting for an Ack from Duy >> - untracked-cache: fix subdirectory handling >> (this branch uses dt/untracked-sparse.) >> >> This seems to break som

Re: What's cooking in git.git

2015-08-05 Thread David Turner
On Wed, 2015-08-05 at 15:55 -0700, Junio C Hamano wrote: > * dt/untracked-subdir (2015-08-05) 2 commits > - DONTMERGE: Waiting for an Ack from Duy > - untracked-cache: fix subdirectory handling > (this branch uses dt/untracked-sparse.) > > This seems to break some tests. All tests pass for me

Re: [bug report] Signing your work: GnuPG signing failed (gpg version 2.1)

2015-08-05 Thread brian m. carlson
On Wed, Aug 05, 2015 at 10:35:45PM +0200, Hugo Roy wrote: > > Hello, > > I've tried to sign a commit following > https://git-scm.com/book/tr/v2/Git-Tools-Signing-Your-Work however, > this is what happened: > > % git commit -a -S -m "signed commit testing" > gpg: échec de la signature : O

What's cooking in git.git

2015-08-05 Thread Junio C Hamano
This is still a draft but only to show the highlights on new topics. * bb/remote-get-url (2015-08-05) 1 commit - remote: add get-url subcommand "git remote" learned "get-url" subcommand to show the URL for a given remote name used for fetching and pushing. Expecting a reroll. * dt/untracke

[ANNOUNCE] Git Rev News edition 6

2015-08-05 Thread Thomas Ferris Nicolaisen
Dear all, I'm happy announce that the 6th edition of Git Rev News is now published: http://git.github.io/rev_news/2015/08/05/edition-6/ Big thanks to the contributors! Cheers, Thomas, Christian and Nicola -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a messag

Re: [PATCH/RFC] gitweb: Don't pass --full-history to git-log(1)

2015-08-05 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > I'm reminded of the make(1) story about not supporting spaces instead > of tabs because the guy already had a few dozen users. > > We could have changed this in 2008, when Git already had much fewer > users, Heh, in 2008 we already had more than a few dozen. I

Re: [PATCH v3] remote: add get-url subcommand

2015-08-05 Thread Junio C Hamano
Ben Boeckel writes: > On Wed, Aug 05, 2015 at 13:34:18 -0700, Junio C Hamano wrote: >> Changes to these two files look reasonable. >> >> Don't you want to protect this feature from future breakage by >> others by adding a couple of tests, though, to t/t5505? > > Thanks, I've done so locally. It

Re: [PATCH 0/10] Port branch.c to ref-filter.

2015-08-05 Thread Junio C Hamano
Karthik Nayak writes: > There are nine patches in the series. Have put "0/10" by mistake. FYI, format-patch has --cover-letter option. -- 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.kerne

Re: [PATCH v3] remote: add get-url subcommand

2015-08-05 Thread Ben Boeckel
On Wed, Aug 05, 2015 at 13:34:18 -0700, Junio C Hamano wrote: > Changes to these two files look reasonable. > > Don't you want to protect this feature from future breakage by > others by adding a couple of tests, though, to t/t5505? Thanks, I've done so locally. It actually brings up this case:

Re: [PATCH/RFC] gitweb: Don't pass --full-history to git-log(1)

2015-08-05 Thread Ævar Arnfjörð Bjarmason
On Wed, Aug 5, 2015 at 6:54 PM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> When you look at the history for a file via "git log" we don't show >> --full-history by default, but the Gitweb UI does so, which can be very >> confusing for all the reasons discussed in "History Simpl

Re: [PATCH v3 0/6] fix repo name when cloning a server's root

2015-08-05 Thread Jeff King
On Wed, Aug 05, 2015 at 10:34:34AM -0700, Junio C Hamano wrote: > > As you can see, there is a lot of complexity in there and I'm not > > convinced this is better than just exposing > > 'parse_connect_url()', which already handles everything for us. > > If the function "handles everything for us"

Re: [PATCH RFC 4/4] notes: add per-ref configuration of merge strategy

2015-08-05 Thread Junio C Hamano
Jacob Keller writes: > +notes..merge:: > + Which merge strategy to choose if the local ref for a notes merge > + matches . Is overridden by notes.merge and takes the same > + values. may be fully qualified or just under refs/notes/. > + See "NOTES MERGE STRATEGIES" section in lin

[PATCH] submodule: implement `module_name` as a builtin helper

2015-08-05 Thread Stefan Beller
This implements the helper `module_name` in C instead of shell, yielding a nice performance boost. Before this patch, I measured a time (best out of three): $ time ./t7400-submodule-basic.sh >/dev/null real0m11.066s user0m3.348s sys 0m8.534s With this patch applied

Re: [PATCH 0/2] fix clone guess_dir_name regression in v2.4.8

2015-08-05 Thread Jeff King
On Wed, Aug 05, 2015 at 10:19:56AM -0700, Junio C Hamano wrote: > >> I think this regression is in v2.4.8, as well. We should be able to use > >> a running "len" instead of the "end" pointer in the earlier part, and > >> then use strip_suffix_mem later (to strip from our already-reduced > >> lengt

Re: [PATCH v3 3/4] notes: add notes.merge option to select default strategy

2015-08-05 Thread Junio C Hamano
Jacob Keller writes: > From: Jacob Keller > > Teach git-notes about a new configuration option "notes.merge" for > selecting the default notes merge strategy. Document the option in > config.txt and git-notes.txt > > Add tests for use of the configuration option. Include a test to ensure > that

[bug report] Signing your work: GnuPG signing failed (gpg version 2.1)

2015-08-05 Thread Hugo Roy
Hello, I've tried to sign a commit following https://git-scm.com/book/tr/v2/Git-Tools-Signing-Your-Work however, this is what happened: % git commit -a -S -m "signed commit testing" gpg: échec de la signature : Opération annulée gpg: signing failed: Opération annulée error: gpg n

Re: [PATCH v3] remote: add get-url subcommand

2015-08-05 Thread Junio C Hamano
Ben Boeckel writes: > Expanding `insteadOf` is a part of ls-remote --url and there is no way > to expand `pushInsteadOf` as well. Add a get-url subcommand to be able > to query both as well as a way to get all configured urls. > > Signed-off-by: Ben Boeckel > --- > Documentation/git-remote.txt

Missing pages Git Book (Kindle - HTC M8)

2015-08-05 Thread Omar André Gonzáles Díaz
Hi, i want to learn git. I've downloaded the book for kindle. But i've found that after page 398 follows page 405, then 412, 419, 426. So there are pages missing. Any one had a similar problem? Thanks -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to maj

Re: Which branch(es) contain certain commits? (was Re: (unknown))

2015-08-05 Thread Ivan Chernyavsky
Sorry for empty subject in the original mail, somehow I've deleted it and didn't even notice. 05.08.2015, 20:05, "Junio C Hamano" : > Junio C Hamano writes: > >>  I think people do things like: >> >>  git log --all --decorate --grep=... > > s/decorate/source/; sorry for the noise. Thanks Ju

Re: [PATCH 2/4] submodule: implement `module_name` as a builtin helper

2015-08-05 Thread Stefan Beller
On Wed, Aug 5, 2015 at 12:06 PM, Jens Lehmann wrote: > Am 05.08.2015 um 02:04 schrieb Stefan Beller: >> >> The goal of this series being rewriting `git submodule update`, >> we don't want to call out to the shell script for config lookups. >> >> So reimplement the lookup of the submodule name in C

Re: [PATCH v4 1/3] clone: do not include authentication data in guessed dir

2015-08-05 Thread Junio C Hamano
Junio C Hamano writes: > For completeness, here is what I think the end result (together with > Peff's series) of the test should look like. > ... > Note that ssh://user:passw@rd@host:1234/ and user:passw@rd@host:/ > tests fail for the same reason (finding @ should be greedy, I think). And I thi

Re: [PATCH v4 1/3] clone: do not include authentication data in guessed dir

2015-08-05 Thread Junio C Hamano
Junio C Hamano writes: > Perhaps add > > "test_clone_dir ssh://user:passw@rd@host/ host" > > here? How is this expected to be parsed? For completeness, here is what I think the end result (together with Peff's series) of the test should look like. The first hunk is merely style. We could drop

Re: [PATCH 2/4] submodule: implement `module_name` as a builtin helper

2015-08-05 Thread Jens Lehmann
Am 05.08.2015 um 02:04 schrieb Stefan Beller: The goal of this series being rewriting `git submodule update`, we don't want to call out to the shell script for config lookups. So reimplement the lookup of the submodule name in C. Cool. This brings down the duration of the test suite from 3:13

[PATCH v9 03/11] ref-filter: implement an `align` atom

2015-08-05 Thread Karthik Nayak
Implement an `align` atom which will act as a modifier atom and align any string with or without an %(atom) appearing before a %(end) atom to the right, left or middle. It is followed by `:,`, where the `` is either left, right or middle and `` is the total length of the padding to be performed. I

Re: [PATCH 1/4] submodule: implement `module_list` as a builtin helper

2015-08-05 Thread Jens Lehmann
Am 05.08.2015 um 02:04 schrieb Stefan Beller: Most of the submodule operations work on a set of submodules. Calculating and using this set is usually done via: module_list "$@" | { while read mode sha1 stage sm_path do # the actual operation

Re: Error pushing new branch: value too great for base (error token is...

2015-08-05 Thread Eric Sunshine
On Wed, Aug 5, 2015 at 1:32 PM, Gaurav Chhabra wrote: > I had written the following code to check whether a push is for branch > deletion: > > #!/bin/bash > > NULL="" > if [[ "$new_sha" -eq "$NULL" ]]; then # Line 17 > remote: Stdin: [

Re: [PATCH v2 0/3] am: let command-line options override saved options

2015-08-05 Thread Paul Tan
On Wed, Aug 05, 2015 at 08:41:44AM -0700, Junio C Hamano wrote: > Interesting. This seems to break test under prove. > > cd t && make T=t4153-am-resume-override-opts.sh prove > > does not seem to return. The new test-terminal.perl code is the culprit. It seems that if our wrapped process te

Re: [PATCH v4 3/3] clone: abort if no dir name could be guessed

2015-08-05 Thread Junio C Hamano
Patrick Steinhardt writes: > Due to various components of the URI being stripped off it may > happen that we fail to guess a directory name. We currently error > out with a message that it is impossible to create the working > tree '' in such cases. Instead, error out early with a sensible > erro

Re: [PATCH v4 1/3] clone: do not include authentication data in guessed dir

2015-08-05 Thread Junio C Hamano
Patrick Steinhardt writes: > If the URI contains authentication data and the URI's path > component is empty we fail to guess a sensible directory name. > E.g. cloning a repository 'ssh://user:passw...@example.com/' we > guess a directory name 'passw...@example.com' where we would want > the host

Re: [PATCH v3 0/6] fix repo name when cloning a server's root

2015-08-05 Thread Junio C Hamano
Patrick Steinhardt writes: > - The naive way of just adding '@' as path separator would break >cloning repositories like '/foo/b...@baz.git' (which would >currently become 'bar@baz' but would become 'baz' only). > > - Skipping the scheme initially is required because without it we >

Error pushing new branch: value too great for base (error token is...

2015-08-05 Thread Gaurav Chhabra
I had written the following code to check whether a push is for branch deletion: #!/bin/bash NULL="" while read old_sha new_sha refname ; do echo "Stdin: [$old_sha] [$new_sha] [$refname]" if [[ "$new_sha" -eq "$NULL" ]]; then # Line 17 e

Re: [PATCH 0/2] fix clone guess_dir_name regression in v2.4.8

2015-08-05 Thread Junio C Hamano
Jeff King writes: > On Tue, Aug 04, 2015 at 06:42:46PM -0400, Jeff King wrote: > >> > I did not intend this change in behavior, and I can confirm that >> > reverting my patch restores the original behavior. Thanks for bringing >> > this to my attention, I'll work on a patch. >> >> I think this r

Re: Which branch(es) contain certain commits? (was Re: (unknown))

2015-08-05 Thread Junio C Hamano
Junio C Hamano writes: > I think people do things like: > > git log --all --decorate --grep=... s/decorate/source/; sorry for the noise. -- 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

Which branch(es) contain certain commits? (was Re: (unknown))

2015-08-05 Thread Junio C Hamano
Ivan Chernyavsky writes: > For some time I'm wondering why there's no "--grep" option to the "git > branch" command, which would request to print only branches having > specified string/regexp in their history. > > So for example: > > $ git branch -r --grep=BUG12345 > > should be roughly equi

Re: [PATCH/RFC] gitweb: Don't pass --full-history to git-log(1)

2015-08-05 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > When you look at the history for a file via "git log" we don't show > --full-history by default, but the Gitweb UI does so, which can be very > confusing for all the reasons discussed in "History Simplification" in > git-log(1) and in > http://thread.gmane.org/g

Re: [PATCH 2/4] submodule: implement `module_name` as a builtin helper

2015-08-05 Thread Stefan Beller
On Tue, Aug 4, 2015 at 5:58 PM, Eric Sunshine wrote: > On Tue, Aug 4, 2015 at 8:04 PM, Stefan Beller wrote: >> The goal of this series being rewriting `git submodule update`, >> we don't want to call out to the shell script for config lookups. >> >> So reimplement the lookup of the submodule name

Re: [PATCH] git_open_noatime: return with errno=0 on success

2015-08-05 Thread Junio C Hamano
Clemens Buchacher writes: > On Wed, Aug 05, 2015 at 10:59:09AM +0200, Linus Torvalds wrote: > ... >> A stale 'errno' generally shouldn't matter, because we either >> >> (a) return success (and nobody should look at errno) >> >> or >> >> (b) return an error later, without setting errno for th

[Bug] incomplete defence agains creating a branch named HEAD

2015-08-05 Thread Dennis Kaarsemaker
So git branch doesn't like to create a branch named HEAD $ git branch HEAD fatal: it does not make sense to create 'HEAD' manually But, you can trick it into doing so anyway: $ git branch @ $ git branch -a HEAD * master At which point git status becomes a bit confused: $ git status warning:

Re: [PATCH v2 0/3] am: let command-line options override saved options

2015-08-05 Thread Junio C Hamano
Interesting. This seems to break test under prove. cd t && make T=t4153-am-resume-override-opts.sh prove does not seem to return. -- 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

Re: [PATCH] git_open_noatime: return with errno=0 on success

2015-08-05 Thread Clemens Buchacher
On Wed, Aug 05, 2015 at 10:59:09AM +0200, Linus Torvalds wrote: > On Tue, Aug 4, 2015 at 11:03 PM, Junio C Hamano wrote: > > > > I would agree it is a good idea to clear it after seeing the first > > open fail due to lack of O_NOATIME before trying open for the second > > time, iow, more like this

[PATCH/RFC] gitweb: Don't pass --full-history to git-log(1)

2015-08-05 Thread Ævar Arnfjörð Bjarmason
When you look at the history for a file via "git log" we don't show --full-history by default, but the Gitweb UI does so, which can be very confusing for all the reasons discussed in "History Simplification" in git-log(1) and in http://thread.gmane.org/gmane.comp.version-control.git/89400/focus=906

[PATCH v3 1/1] completion: offer '--edit-todo' during interactive rebase

2015-08-05 Thread Thomas Braun
Signed-off-by: Thomas Braun Helped-by: John Keeping Helped-by: SZEDER Gábor --- Tested by: - ensuring I'm in a bash shell - source git-completion.bash - git rebase -i HEAD~1, choose edit instead of pick in the editor - on entering "git rebase" you should be offered "--edit-todo" contrib/comple

[no subject]

2015-08-05 Thread Ivan Chernyavsky
Dear community, For some time I'm wondering why there's no "--grep" option to the "git branch" command, which would request to print only branches having specified string/regexp in their history. So for example: $ git branch -r --grep=BUG12345 should be roughly equivalent to following exp

[PATCH v4 2/3] clone: do not use port number as dir name

2015-08-05 Thread Patrick Steinhardt
If the URI contains a port number and the URI's path component is empty we fail to guess a sensible directory name. E.g. cloning a repository 'ssh://example.com:/' we guess a directory name '' where we would want the hostname only, e.g. 'example.com'. Fix this by stripping trailing port nu

[PATCH v4 3/3] clone: abort if no dir name could be guessed

2015-08-05 Thread Patrick Steinhardt
Due to various components of the URI being stripped off it may happen that we fail to guess a directory name. We currently error out with a message that it is impossible to create the working tree '' in such cases. Instead, error out early with a sensible error message hinting that a directory name

[PATCH v4 0/3] fix repo name when cloning a server's root

2015-08-05 Thread Patrick Steinhardt
This is version 4 of my patch series, which aims to improve guessed directory names when we clone a server's root, that is we have empty path components. This version is still preliminary as it is based upon the patches by Peff ([PATCH 0/2] fix clone guess_dir_name regression in v2.4.8) which have

[PATCH v4 1/3] clone: do not include authentication data in guessed dir

2015-08-05 Thread Patrick Steinhardt
If the URI contains authentication data and the URI's path component is empty we fail to guess a sensible directory name. E.g. cloning a repository 'ssh://user:passw...@example.com/' we guess a directory name 'passw...@example.com' where we would want the hostname only, e.g. 'example.com'. Fix thi

[PATCH 2/2] tests: fix cleanup after tests in t1509-root-worktree

2015-08-05 Thread Patrick Steinhardt
During cleanup we do a simple 'rm /*' to remove leftover files from previous tests. As 'rm' errors out when there is anything it cannot delete and there are directories present at '/' it will throw an error, causing the '&&' chain to fail. Fix this by explicitly removing the files. Signed-off-by:

[PATCH 1/2] tests: fix broken && chains in t1509-root-worktree

2015-08-05 Thread Patrick Steinhardt
Signed-off-by: Patrick Steinhardt --- These two patches have previously been part of my patch series fixing directory guessing. As Jeff King has been posting a patch that contains tests for cloning from a server's root without requiring t1509 I now post these two fixes as separate patches. t/t1

Re: [PATCH v4] clone: simplify string handling in guess_dir_name()

2015-08-05 Thread Jeff King
On Wed, Aug 05, 2015 at 11:06:03AM +0200, Patrick Steinhardt wrote: > You're welcome. And yes, your tests help me quite a lot here. Got > tedious to always set up the chroot. Guess I'll still send my > fixes for the chroot-tests as a separate patch series, even > though I don't require them anymor

Re: [PATCH v4] clone: simplify string handling in guess_dir_name()

2015-08-05 Thread Patrick Steinhardt
On Wed, Aug 05, 2015 at 04:41:48AM -0400, Jeff King wrote: > On Wed, Aug 05, 2015 at 08:08:52AM +0200, Patrick Steinhardt wrote: > > > > Sadly we cannot just `strip_suffix_mem(repo, &len, "/.git"))` in the > > > earlier code, as we have to account for multiple directory separators. I > > > believe

Re: [PATCH] git_open_noatime: return with errno=0 on success

2015-08-05 Thread Linus Torvalds
On Tue, Aug 4, 2015 at 11:03 PM, Junio C Hamano wrote: > > I would agree it is a good idea to clear it after seeing the first > open fail due to lack of O_NOATIME before trying open for the second > time, iow, more like this? So I don't think this is _wrong_ per se, but I think the deeper issue i

Re: [PATCH 2/2] clone: use computed length in guess_dir_name

2015-08-05 Thread Sebastian Schuberth
On 8/5/2015 10:39, Jeff King wrote: > Commit 7e837c6 (clone: simplify string handling in > guess_dir_name(), 2015-07-09) changed clone to use > strip_suffix instead of hand-rolled pointer manipulation. > However, strip_suffix will strip from the end of a > NUL-terminated string, and we may have al

Re: [PATCH v4] clone: simplify string handling in guess_dir_name()

2015-08-05 Thread Jeff King
On Wed, Aug 05, 2015 at 08:08:52AM +0200, Patrick Steinhardt wrote: > > Sadly we cannot just `strip_suffix_mem(repo, &len, "/.git"))` in the > > earlier code, as we have to account for multiple directory separators. I > > believe the above code does the right thing, though. I haven't looked at > >

[PATCH 2/2] clone: use computed length in guess_dir_name

2015-08-05 Thread Jeff King
Commit 7e837c6 (clone: simplify string handling in guess_dir_name(), 2015-07-09) changed clone to use strip_suffix instead of hand-rolled pointer manipulation. However, strip_suffix will strip from the end of a NUL-terminated string, and we may have already stripped some characters (like directory

[PATCH 1/2] clone: add tests for output directory

2015-08-05 Thread Jeff King
When we run "git clone $url", clone guesses from the $url what to name the local output directory. We don't have any test coverage of this, so let's add some basic tests. This reveals a few problems: - cloning "foo.git/" does not properly remove the ".git"; this is a recent regression from

[PATCH 0/2] fix clone guess_dir_name regression in v2.4.8

2015-08-05 Thread Jeff King
On Tue, Aug 04, 2015 at 06:42:46PM -0400, Jeff King wrote: > > I did not intend this change in behavior, and I can confirm that > > reverting my patch restores the original behavior. Thanks for bringing > > this to my attention, I'll work on a patch. > > I think this regression is in v2.4.8, as w

Re: [PATCH v2] send-email: provide whitelist of SMTP AUTH mechanisms

2015-08-05 Thread Jan Viktorin
Hello Eric, all, thanks for comments, the coding style will be fixed in the next version (I cannot find a way how to set vim to help me with those if( issues. I always/often forget it when writing so I never do it to be consistent.). Do I understand well that you are complaining about too narrow