[PATCH] update-index: fix segfault with missing --cacheinfo argument

2014-06-04 Thread Jeff King
Running "git update-index --cacheinfo" without any further arguments results in a segfault rather than an error message. Commit ec160ae (update-index: teach --cacheinfo a new syntax "mode,sha1,path", 2014-03-23) added code to examine the format of the argument, but forgot to handle the NULL case.

Re: [PATCH v6 2/2] refs.c: SSE4.2 optimizations for check_refname_component

2014-06-04 Thread Torsten Bögershausen
On 2014-06-04 05.38, David Turner wrote: [] > [] > diff --git a/Makefile b/Makefile > index a53f3a8..dd2127a 100644 > --- a/Makefile > +++ b/Makefile > @@ -1326,6 +1326,11 @@ else > COMPAT_OBJS += compat/win32mmap.o > endif > endif > +ifdef NO_SSE42 > + BASIC_CFLAGS += -DN

[PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread Torsten Bögershausen
t9001 used a '\n' in a sed expression to split one line into two lines. Some versions of sed simply ignore the '\' before the 'n', treating '\n' as 'n'. As the test already requires perl as a prerequisite, use perl instead of sed. Signed-off-by: Torsten Bögershausen --- t/t9001-send-email.sh |

[RFC PATCH] clone: add clone.recursesubmodules config option

2014-06-04 Thread Chris Packham
Add a config option that will cause clone to recurse into submodules as if the --recurse-submodules option had been specified on the command line. This can be overridden with the --no-recurse-submodules option. Signed-off-by: Chris Packham --- On 04/06/14 09:05, Junio C Hamano wrote: >> Mara Kim

Re: [PATCH v6 2/2] refs.c: SSE4.2 optimizations for check_refname_component

2014-06-04 Thread Duy Nguyen
On Wed, Jun 4, 2014 at 3:04 PM, Torsten Bögershausen wrote: > > On 2014-06-04 05.38, David Turner wrote: > [] >> [] >> diff --git a/Makefile b/Makefile >> index a53f3a8..dd2127a 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -1326,6 +1326,11 @@ else >> COMPAT_OBJS += compat/win32mm

[PATCH] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Stepan Kasal
test_cmp() is primarily meant to compare text files (and display the difference for debug purposes). Raw "cmp" is better suited to compare binary files (tar, zip, etc.). On MinGW, test_cmp is a shell function mingw_test_cmp that tries to read both files into environment, stripping CR characters (

[PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Stepan Kasal
From: Johannes Schindelin Date: Wed, 2 Jun 2010 00:41:33 +0200 If HOME is not set, use $HOMEDRIVE/$HOMEPATH Signed-off-by: Johannes Schindelin Signed-off-by: Stepan Kasal --- Hi, this patch is present in msysGit for 4 years. Stepan compat/mingw.c| 18 ++ compat/mingw.h

Re: [PATCH] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Thomas Braun
Am 04.06.2014 13:42, schrieb Stepan Kasal: > test_cmp() is primarily meant to compare text files (and display the > difference for debug purposes). > > Raw "cmp" is better suited to compare binary files (tar, zip, etc.). > > On MinGW, test_cmp is a shell function mingw_test_cmp that tries to > re

Re: [PATCH] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Stepan Kasal
Hello Thomas, On Wed, Jun 04, 2014 at 02:13:44PM +0200, Thomas Braun wrote: > Wouldn't a function like test_cmp_bin() be better suited for all? I also considered it. The advantage is that is shows that this intentionally differs from test_cmp. > The windows folks can then use cmp inside test_cm

Re: [msysGit] Re: [PATCH] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Thomas Braun
Hi Stephan, Am 04.06.2014 14:42, schrieb Stepan Kasal: > On Wed, Jun 04, 2014 at 02:13:44PM +0200, Thomas Braun wrote: >> Wouldn't a function like test_cmp_bin() be better suited for all? > > I also considered it. The advantage is that is shows that > this intentionally differs from test_cmp. > >

Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Duy Nguyen
On Wed, Jun 4, 2014 at 6:47 PM, Stepan Kasal wrote: > @@ -133,7 +133,7 @@ char *git_path(const char *fmt, ...) > void home_config_paths(char **global, char **xdg, char *file) > { > char *xdg_home = getenv("XDG_CONFIG_HOME"); > - char *home = getenv("HOME"); > + const char *ho

Re: [PATCH v4] Add an explicit GIT_DIR to the list of excludes

2014-06-04 Thread Duy Nguyen
On Wed, Jun 4, 2014 at 3:55 AM, Pasha Bolokhov wrote: >> The case when $GIT_DIR points to a _file_ seems uncovered. >> setup_git_directory() will transform the file to the directory >> internally and we never know the .git file's path (so we can't exclude >> it). So people could accidentally add t

Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Erik Faye-Lund
On Wed, Jun 4, 2014 at 3:47 PM, Duy Nguyen wrote: > On Wed, Jun 4, 2014 at 6:47 PM, Stepan Kasal wrote: >> @@ -133,7 +133,7 @@ char *git_path(const char *fmt, ...) >> void home_config_paths(char **global, char **xdg, char *file) >> { >> char *xdg_home = getenv("XDG_CONFIG_HOME"); >> -

Re: [PATCH v6 2/2] refs.c: SSE4.2 optimizations for check_refname_component

2014-06-04 Thread Torsten Bögershausen
On 2014-06-04 13.21, Duy Nguyen wrote: > On Wed, Jun 4, 2014 at 3:04 PM, Torsten Bögershausen wrote: >> >> On 2014-06-04 05.38, David Turner wrote: >> [] >>> [] >>> diff --git a/Makefile b/Makefile >>> index a53f3a8..dd2127a 100644 >>> --- a/Makefile >>> +++ b/Makefile >>> @@ -1326,6 +1326,11 @@ e

Re: [PATCH v2 7/9] fetch doc: remove "short-cut" section

2014-06-04 Thread Marc Branchaud
On 14-06-03 06:16 PM, Junio C Hamano wrote: > It is misleading to mention that that does not store is to > fetch the ref into FETCH_HEAD, because a refspec that does store is > also to fetch the LHS into FETCH_HEAD. It is doubly misleading to > list it as part of "short-cut". stands for a refsp

Re: [PATCH v2 5/9] fetch doc: on pulling multiple refspecs

2014-06-04 Thread Marc Branchaud
On 14-06-03 06:16 PM, Junio C Hamano wrote: > Replace desription of old-style "Pull:" lines in remotes/ > configuration with modern remote.*.fetch variables. > > As this note applies only to "git pull", enable it only > in git-pull manual page. > > Signed-off-by: Junio C Hamano > --- > Document

Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Stepan Kasal
Hello, On Wed, Jun 04, 2014 at 08:47:58PM +0700, Duy Nguyen wrote: > setenv("HOME") if it's missing instead? MinGW port already replaces > main(). Extra initialization should not be a problem. well, I would be afraid to modify the environment for subprocesses. It could hit back in certain situati

Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Karsten Blees
Am 04.06.2014 16:05, schrieb Erik Faye-Lund: > On Wed, Jun 4, 2014 at 3:47 PM, Duy Nguyen wrote: >> On Wed, Jun 4, 2014 at 6:47 PM, Stepan Kasal wrote: >>> @@ -133,7 +133,7 @@ char *git_path(const char *fmt, ...) >>> void home_config_paths(char **global, char **xdg, char *file) >>> { >>>

Re: [PATCH v2 9/9] fetch: allow explicit --refmap to override configuration

2014-06-04 Thread Marc Branchaud
On 14-06-03 06:16 PM, Junio C Hamano wrote: > Since the introduction of opportunisitic updates of remote-tracking > branches, started at around f2690487 (fetch: opportunistically > update tracking refs, 2013-05-11) with a few updates in v1.8.4 era, > the remote.*.fetch configuration always kicks in

Re: [PATCH v2 8/9] fetch doc: add a section on configured remote-tracking branches

2014-06-04 Thread Marc Branchaud
On 14-06-03 06:16 PM, Junio C Hamano wrote: > To resurrect a misleading mention removed in the previous step, > add a section to explain how the remote-tracking configuration > interacts with the refspecs given as the command-line arguments. > > Signed-off-by: Junio C Hamano > --- > Documentatio

Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Johannes Schindelin
Hi Duy, On Wed, 4 Jun 2014, Duy Nguyen wrote: > On Wed, Jun 4, 2014 at 6:47 PM, Stepan Kasal wrote: > > @@ -133,7 +133,7 @@ char *git_path(const char *fmt, ...) > > void home_config_paths(char **global, char **xdg, char *file) > > { > > char *xdg_home = getenv("XDG_CONFIG_HOME"); > > -

Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Johannes Schindelin
Hi Erik, On Wed, 4 Jun 2014, Erik Faye-Lund wrote: > On Wed, Jun 4, 2014 at 3:47 PM, Duy Nguyen wrote: > > On Wed, Jun 4, 2014 at 6:47 PM, Stepan Kasal wrote: > >> @@ -133,7 +133,7 @@ char *git_path(const char *fmt, ...) > >> void home_config_paths(char **global, char **xdg, char *file) > >>

Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Erik Faye-Lund
On Wed, Jun 4, 2014 at 5:14 PM, Johannes Schindelin wrote: > Hi Erik, > > On Wed, 4 Jun 2014, Erik Faye-Lund wrote: > >> On Wed, Jun 4, 2014 at 3:47 PM, Duy Nguyen wrote: >> > On Wed, Jun 4, 2014 at 6:47 PM, Stepan Kasal wrote: >> >> @@ -133,7 +133,7 @@ char *git_path(const char *fmt, ...) >> >>

Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Johannes Schindelin
Hi kusma, On Wed, 4 Jun 2014, Erik Faye-Lund wrote: > On Wed, Jun 4, 2014 at 5:14 PM, Johannes Schindelin > wrote: > > > > On Wed, 4 Jun 2014, Erik Faye-Lund wrote: > > > >> On Wed, Jun 4, 2014 at 3:47 PM, Duy Nguyen wrote: > >> > On Wed, Jun 4, 2014 at 6:47 PM, Stepan Kasal wrote: > >> >> @@

Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Stepan Kasal
Hi dscho, > > On Wed, Jun 4, 2014 at 5:14 PM, Johannes Schindelin > > wrote: > > > No. Git is not always called through Bash or the git-wrapper, > > > unfortunately. but you have to admit, that in most cases it is called through bash or the git wrapper. > The problem arises whenever git.exe cal

Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Johannes Schindelin
Hi kusma, On Wed, 4 Jun 2014, Johannes Schindelin wrote: > The problem arises whenever git.exe calls subprocesses. You can pollute > the environment by setting HOME, I do not recall the details, but I > remember that we had to be very careful *not* to do that, hence the patch. > Sorry, has been a

Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Johannes Schindelin
Hi Stepan, On Wed, 4 Jun 2014, Stepan Kasal wrote: > > > On Wed, Jun 4, 2014 at 5:14 PM, Johannes Schindelin > > > wrote: > > > > No. Git is not always called through Bash or the git-wrapper, > > > > unfortunately. > > but you have to admit, that in most cases it is called through bash or > the

[PATCH v2] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Stepan Kasal
test_cmp() is primarily meant to compare text files (and display the difference for debug purposes). Raw "cmp" is better suited to compare binary files (tar, zip, etc.). On MinGW, test_cmp is a shell function mingw_test_cmp that tries to read both files into environment, stripping CR characters (

Re: [PATCH] gitweb: Harden UTF-8 handling in generated links

2014-06-04 Thread Michael Wagner
On Tue, May 27, 2014 at 04:22:42PM +0200, Jakub Narębski wrote: > W dniu 2014-05-15 21:28, Jakub Narębski pisze: > > On Thu, May 15, 2014 at 8:48 PM, Michael Wagner > > wrote: > >> On Thu, May 15, 2014 at 10:04:24AM +0100, Peter Krefting wrote: > >>> Michael Wagner: > > >> diff --git a/gitweb/gi

Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Stepan Kasal
Hi dscho, your arguments seem really strong. (Especially the four years of battle testing, with the memories of constant problems with HOME before.) I hope they are strong enough to convince Junio to accept this patch; that would help. Stepan PS (about mingwGitDevEnv): > plan is to switch to m

Re: [RFC PATCH] clone: add clone.recursesubmodules config option

2014-06-04 Thread Junio C Hamano
Chris Packham writes: > On 04/06/14 09:05, Junio C Hamano wrote: >>> Also, going --recursive when the user did not want is a lot more >>> expensive mistake to fix than not being --recursive when the user >>> wanted to. >> >> Having said all that, I do not mean to say that I am opposed to >> intr

Re: [PATCH v2] receive-pack: optionally deny case clone refs

2014-06-04 Thread David Turner
On Wed, 2014-06-04 at 08:06 +0200, Johannes Sixt wrote: > > +receive.denyCaseCloneBranches:: > > + If set to true, git-receive-pack will deny a ref update that creates > > + a ref which is the same but for case as an existing ref. This is > > + useful when clients are on a case-insensitive

Re: [PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread Junio C Hamano
Torsten Bögershausen writes: > t9001 used a '\n' in a sed expression to split one line into two lines. > Some versions of sed simply ignore the '\' before the 'n', treating > '\n' as 'n'. > > As the test already requires perl as a prerequisite, use perl instead of sed. > > Signed-off-by: Torsten

Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Johannes Schindelin
Hi Stepan, On Wed, 4 Jun 2014, Stepan Kasal wrote: > PS (about mingwGitDevEnv): > > plan is to switch to mingwGitDevEnv for said release. No more msysGit. > > Like, bu-bye. Thanks for all the fish. > > Interesting. > > With msysgit, there is the "net installer" - first time I installed > msys/m

Re: [PATCH] update-index: fix segfault with missing --cacheinfo argument

2014-06-04 Thread Junio C Hamano
Jeff King writes: > Running "git update-index --cacheinfo" without any further > arguments results in a segfault rather than an error > message. Commit ec160ae (update-index: teach --cacheinfo a > new syntax "mode,sha1,path", 2014-03-23) added code to > examine the format of the argument, but for

Re: [PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread Junio C Hamano
Junio C Hamano writes: > Torsten Bögershausen writes: > >> t9001 used a '\n' in a sed expression to split one line into two lines. >> Some versions of sed simply ignore the '\' before the 'n', treating >> '\n' as 'n'. >> >> As the test already requires perl as a prerequisite, use perl instead of

Re: [PATCH v2] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Junio C Hamano
Stepan Kasal writes: > test_cmp() is primarily meant to compare text files (and display the > difference for debug purposes). > > Raw "cmp" is better suited to compare binary files (tar, zip, etc.). > > On MinGW, test_cmp is a shell function mingw_test_cmp that tries to > read both files into env

Re: 2.0.0 regression? request pull does not seem to find head

2014-06-04 Thread Michael S. Tsirkin
On Mon, Jun 02, 2014 at 02:36:01PM -0700, Linus Torvalds wrote: > On Mon, Jun 2, 2014 at 2:01 PM, Michael S. Tsirkin wrote: > > > > [mst@robin linux]$ git request-pull net-next/master > > git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git net-next > > warn: No match for commit 2ae76693b

Re: [PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread Torsten Bögershausen
On 2014-06-04 20.13, Junio C Hamano wrote: > Junio C Hamano writes: > >> Torsten Bögershausen writes: >> >>> t9001 used a '\n' in a sed expression to split one line into two lines. >>> Some versions of sed simply ignore the '\' before the 'n', treating >>> '\n' as 'n'. >>> >>> As the test alread

Re: [PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread John Keeping
On Wed, Jun 04, 2014 at 10:42:46AM -0700, Junio C Hamano wrote: > Torsten Bögershausen writes: > > > t9001 used a '\n' in a sed expression to split one line into two lines. > > Some versions of sed simply ignore the '\' before the 'n', treating > > '\n' as 'n'. > > > > As the test already require

Re: [PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread David Kastrup
Junio C Hamano writes: > Torsten Bögershausen writes: > >> t9001 used a '\n' in a sed expression to split one line into two lines. >> Some versions of sed simply ignore the '\' before the 'n', treating >> '\n' as 'n'. >> >> As the test already requires perl as a prerequisite, use perl instead of

Re: [PATCH] gitweb: Harden UTF-8 handling in generated links

2014-06-04 Thread Jakub Narębski
Michael Wagner wrote: > On Tue, May 27, 2014 at 04:22:42PM +0200, Jakub Narębski wrote: >> Subject: [PATCH] gitweb: Harden UTF-8 handling in generated links >> >> esc_html() ensures that its input is properly UTF-8 encoded and marked >> as UTF-8 with to_utf8(). Make esc_param() (used for query pa

[PATCH 00/11] Add transaction support for reflog

2014-06-04 Thread Ronnie Sahlberg
This patch series is based on the ref-transaction series and is available at https://github.com/rsahlberg/git/tree/ref-transactions-reflog This patch series adds transaction support for updating the reflog. Ronnie Sahlberg (11): refs.c make ref_transaction_create a wrapper to ref_transaction_up

[PATCH 08/11] refs.c: add a flag to allow reflog updates to truncate the log

2014-06-04 Thread Ronnie Sahlberg
Add a flag that allows us to truncate the reflog before we write the update. Signed-off-by: Ronnie Sahlberg --- refs.c | 17 +++-- refs.h | 4 +++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/refs.c b/refs.c index b99fcd9..f2619e1 100644 --- a/refs.c +++ b/refs.c

[PATCH 06/11] lockfile.c: make hold_lock_file_for_append preserve meaningful errno

2014-06-04 Thread Ronnie Sahlberg
Update hold_lock_file_for_append and copy_fd to return a meaningful errno on failure. Signed-off-by: Ronnie Sahlberg --- copy.c | 20 +--- lockfile.c | 7 ++- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/copy.c b/copy.c index a7f58fd..5cb8679 100644 --

[PATCH 11/11] reflog.c: use a reflog transaction when writing during expire

2014-06-04 Thread Ronnie Sahlberg
Use a transaction for all updates during expire_reflog. Signed-off-by: Ronnie Sahlberg --- builtin/reflog.c | 84 refs.c | 2 +- 2 files changed, 37 insertions(+), 49 deletions(-) diff --git a/builtin/reflog.c b/builtin/reflog.

[PATCH 04/11] refs.c: add a new update_type field to ref_update

2014-06-04 Thread Ronnie Sahlberg
Add a field that describes what type of update this refers to. For now the only type is UPDATE_SHA1 but we will soon add more types. Signed-off-by: Ronnie Sahlberg --- refs.c | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/refs.c b/refs.c index f0800

[PATCH 02/11] refs.c: make ref_transaction_delete a wrapper for ref_transaction_update

2014-06-04 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- refs.c | 15 +-- refs.h | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/refs.c b/refs.c index 2dfedf4..0c382f3 100644 --- a/refs.c +++ b/refs.c @@ -3482,16 +3482,11 @@ int ref_transaction_delete(struct ref_transaction *trans

[PATCH 05/11] refs.c: add a function to append a reflog entry to a fd

2014-06-04 Thread Ronnie Sahlberg
Break out the code to create the string and writing it to the file descriptor from log_ref_write and into a dedicated function log_ref_write_fd. For now this is only used from log_ref_write but later on we will call this function from reflog transactions too which means that we will end up with onl

[PATCH 09/11] refs.c: only write reflog update if msg is non-NULL

2014-06-04 Thread Ronnie Sahlberg
When performing a reflog transaction update, only write to the reflog iff msg is non-NULL. This can then be combined with REFLOG_TRUNCATE to perform an update that only truncates but does not write. Signed-off-by: Ronnie Sahlberg --- refs.c | 5 +++-- refs.h | 1 + 2 files changed, 4 insertions(

[PATCH 01/11] refs.c make ref_transaction_create a wrapper to ref_transaction_update

2014-06-04 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- refs.c | 11 ++- refs.h | 7 --- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/refs.c b/refs.c index f8a6c9a..2dfedf4 100644 --- a/refs.c +++ b/refs.c @@ -3464,15 +3464,8 @@ int ref_transaction_create(struct ref_transaction *trans

[PATCH 07/11] refs.c: add a transaction function to append a reflog entry

2014-06-04 Thread Ronnie Sahlberg
Define a new transaction update type, UPDATE_LOG, and a new function transaction_update_reflog. This function will lock the reflog and append an entry to it during transaction commit. Signed-off-by: Ronnie Sahlberg --- refs.c | 101

[PATCH 10/11] refs.c: allow multiple reflog updates during a single transaction

2014-06-04 Thread Ronnie Sahlberg
Allow to make multiple reflog updates to the same ref during a transaction. This means we only need to lock the reflog once, during the first update that touches the reflog, and that all further updates can just write the reflog entry since the reflog is already locked. This allows us to write cod

[PATCH 03/11] refs.c: rename the transaction functions

2014-06-04 Thread Ronnie Sahlberg
Rename the transaction functions. Remove the leading ref_ from the names and append _sha1 to the names for functions that create/delete/update sha1 refs. Signed-off-by: Ronnie Sahlberg --- branch.c | 11 +++ builtin/commit.c | 14 - builtin/fetch.c| 12 +++

Re: [PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread Junio C Hamano
John Keeping writes: > Note that quoted section of POSIX says "embedded in the pattern space"; > under the description of the "s" command, it says: > > The replacement string shall be scanned from beginning to end. > [...] > The meaning of a immediately followed by any >

Re: [RFC PATCH] clone: add clone.recursesubmodules config option

2014-06-04 Thread Jens Lehmann
Am 04.06.2014 19:24, schrieb Junio C Hamano: > Chris Packham writes: > >> On 04/06/14 09:05, Junio C Hamano wrote: Also, going --recursive when the user did not want is a lot more expensive mistake to fix than not being --recursive when the user wanted to. >>> >>> Having said all t

Re: What's cooking in git.git (Jun 2014, #01; Tue, 3)

2014-06-04 Thread Jens Lehmann
Am 04.06.2014 00:16, schrieb Junio C Hamano: > * jl/status-added-submodule-is-never-ignored (2014-04-07) 2 commits > - commit -m: commit staged submodules regardless of ignore config > - status/commit: show staged submodules regardless of ignore config > > There also are a few patches Ronald We

Re: [PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread Andreas Schwab
John Keeping writes: > So the portable way to do it is: > > sed "s/^From:/$header: ex...@address.com\ > From:/" cover-to-edit.patch >"$cover" && That wouldn't work as \ is removed in double quotes. You either need to double the backslash or put it in single quotes. Andreas. -- Andreas

Re: Re: [RFC PATCH] clone: add clone.recursesubmodules config option

2014-06-04 Thread Heiko Voigt
On Wed, Jun 04, 2014 at 10:24:06AM -0700, Junio C Hamano wrote: > Chris Packham writes: > > > On 04/06/14 09:05, Junio C Hamano wrote: > >>> Also, going --recursive when the user did not want is a lot more > >>> expensive mistake to fix than not being --recursive when the user > >>> wanted to. >

[PATCH v2] t9001: avoid not portable '\n' with sed

2014-06-04 Thread Torsten Bögershausen
t9001 used a '\n' in a sed expression to split one line into two lines. Some versions of sed (/usr/bin/sed under Mac OS X) simply ignore the '\' before the 'n', treating '\n' as 'n'. As the test already requires perl as a prerequisite, use perl instead of sed. Signed-off-by: Torsten Bögershausen

[PATCH v5] Add an explicit GIT_DIR to the list of excludes

2014-06-04 Thread Pasha Bolokhov
When an explicit '--git-dir' option points to a directory inside the work tree, git treats it as if it were any other directory. In particular, 'git status' lists it as untracked, while 'git add -A' stages the metadata directory entirely Add GIT_DIR to the list of excludes in a dedicated function

Re: [PATCH] gitweb: Harden UTF-8 handling in generated links

2014-06-04 Thread Michael Wagner
On Wed, Jun 04, 2014 at 08:47:54PM +0200, Jakub Narębski wrote: > Michael Wagner wrote: > > On Tue, May 27, 2014 at 04:22:42PM +0200, Jakub Narębski wrote: > > >> Subject: [PATCH] gitweb: Harden UTF-8 handling in generated links > >> > >> esc_html() ensures that its input is properly UTF-8 encoded

Re: What's cooking in git.git (Jun 2014, #01; Tue, 3)

2014-06-04 Thread Junio C Hamano
Jens Lehmann writes: > Am 04.06.2014 00:16, schrieb Junio C Hamano: >> * jl/status-added-submodule-is-never-ignored (2014-04-07) 2 commits >> - commit -m: commit staged submodules regardless of ignore config >> - status/commit: show staged submodules regardless of ignore config >> >> There al

Re: What's cooking in git.git (Jun 2014, #01; Tue, 3)

2014-06-04 Thread Jens Lehmann
Am 04.06.2014 22:50, schrieb Junio C Hamano: > Jens Lehmann writes: > >> Am 04.06.2014 00:16, schrieb Junio C Hamano: >>> * jl/status-added-submodule-is-never-ignored (2014-04-07) 2 commits >>> - commit -m: commit staged submodules regardless of ignore config >>> - status/commit: show staged su

[PATCH v2 00/11] Zsh prompt tests

2014-06-04 Thread Richard Hansen
Changes from v1: * fix a bug that caused the Zsh test cases to run in Zsh's sh emulation mode, not Zsh "native" mode Description: This series adds test cases for running __git_ps1 (see contrib/completion/git-prompt.sh) from Zsh. This series also adds more Bash test cases to test how __git

[PATCH v2 01/11] t9903: remove Zsh test from the suite of Bash prompt tests

2014-06-04 Thread Richard Hansen
This test is about to become redundant: All of the Bash prompt tests will be moved into a separate library file that will also be used by a new Zsh-specific test script. Signed-off-by: Richard Hansen --- t/t9903-bash-prompt.sh | 11 --- 1 file changed, 11 deletions(-) diff --git a/t/t9

[PATCH v2 10/11] test-lib: make it possible to override how test code is eval'd

2014-06-04 Thread Richard Hansen
If a command named 'test_eval_override' exists, use it instead of 'eval' to run the test code. This is needed to support zsh test cases: test-lib.sh must be sourced in sh emulation mode due to fundamental incompatibilities between the POSIX sh language and the zsh language. When a function is de

[PATCH v2 04/11] t9903: run pc mode tests again with PS1 expansion disabled

2014-06-04 Thread Richard Hansen
Bash has a shell option that makes it possible to disable parameter expansion in PS1. Test __git_ps1's ability to detect and react to disabled PS1 expansion by running the "pc mode" tests twice: once with PS1 parameter expansion enabled and once with it disabled. Signed-off-by: Richard Hansen -

[PATCH v2 03/11] t9903: move test name prefix to a separate variable

2014-06-04 Thread Richard Hansen
This is a step toward reusing the same test cases after disabling PS1 parameter expansion. Signed-off-by: Richard Hansen --- t/t9903-bash-prompt.sh | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh index c691

[PATCH v2 02/11] t9903: put the Bash pc mode prompt test cases in a function

2014-06-04 Thread Richard Hansen
This is a step toward invoking the same pc mode test cases twice: once with PS1 parameter expansion enabled and once with it disabled. Signed-off-by: Richard Hansen --- t/t9903-bash-prompt.sh | 236 + 1 file changed, 120 insertions(+), 116 deletion

[PATCH v2 06/11] t9903: move PS1 color code variable definitions to lib-bash.sh

2014-06-04 Thread Richard Hansen
Define a new 'set_ps1_format_vars' function in lib-bash.sh that sets the c_red, c_green, c_lblue, and c_clear variables. Call this function from run_pcmode_tests(). This is a step toward moving the shell prompt tests to a separate library file so that they can be reused to test prompting in Zsh.

[PATCH v2 05/11] t9903: include "Bash" in test names via new $shellname var

2014-06-04 Thread Richard Hansen
Define a new 'shellname' variable in lib-bash.sh and use it in the prompt test names. This is a step toward moving the shell prompt tests to a separate library file so that they can be reused to test prompting in Zsh. Signed-off-by: Richard Hansen --- t/lib-bash.sh | 2 ++ t/t9903-bas

[PATCH v2 07/11] t9903: move prompt tests to a new lib-prompt-tests.sh file

2014-06-04 Thread Richard Hansen
This is a step toward creating a new test script that runs the same prompt tests as t9903 but with Zsh instead of Bash. Signed-off-by: Richard Hansen --- t/lib-prompt-tests.sh | 653 + t/t9903-bash-prompt.sh | 626 +

[PATCH v2 11/11] t9904: new __git_ps1 tests for Zsh

2014-06-04 Thread Richard Hansen
These are the same tests as in t9903, but run in zsh instead of bash. Signed-off-by: Richard Hansen --- t/lib-zsh.sh | 52 +++ t/t9904-zsh-prompt.sh | 10 ++ 2 files changed, 62 insertions(+) create mode 100644 t/lib-zsh.sh creat

[PATCH v2 08/11] lib-prompt-tests.sh: put all tests inside a function

2014-06-04 Thread Richard Hansen
Modify lib-prompt-tests.sh so that it does nothing when sourced except define a function for running the prompt tests (plus some "private" helper functions). Signed-off-by: Richard Hansen --- t/lib-prompt-tests.sh | 802 - t/t9903-bash-prompt.sh |

[PATCH v2 09/11] lib-prompt-tests.sh: add variable for string that encodes percent in PS1

2014-06-04 Thread Richard Hansen
To add a literal percent character to a Zsh prompt, the string "%%" is used in PS1. Bash and POSIX shells simply use "%". To accommodate this difference, use ${percent} where a percent character is expected and define the percent variable in the set_ps1_format_vars function. Signed-off-by: Richa

Re: [PATCH v6 2/2] refs.c: SSE4.2 optimizations for check_refname_component

2014-06-04 Thread David Turner
On Wed, 2014-06-04 at 10:04 +0200, Torsten Bögershausen wrote: [snip discussion of compiler flags; I'll look into a cpuid approach] > > --- a/git-compat-util.h > > +++ b/git-compat-util.h > > @@ -668,6 +668,28 @@ void git_qsort(void *base, size_t nmemb, size_t size, > > #endif > > #endif > > >

Re: [PATCH v6 2/2] refs.c: SSE4.2 optimizations for check_refname_component

2014-06-04 Thread David Turner
On Wed, 2014-06-04 at 16:25 +0200, Torsten Bögershausen wrote: > On the other hand, looking here: > http://sourceware.org/ml/libc-alpha/2009-10/msg00063.html > and looking into refs.c, > it seems as if we can try to run > strcspn(refname, bad_characters) > and > strstr(refname, "@{" > and > str

Re: [PATCH v6 2/2] refs.c: SSE4.2 optimizations for check_refname_component

2014-06-04 Thread Junio C Hamano
David Turner writes: > On Wed, 2014-06-04 at 10:04 +0200, Torsten Bögershausen wrote: > [snip discussion of compiler flags; I'll look into a cpuid approach] H, I am not sure if the complexity is really worth it. In any case, [PATCH 1/2] is fairly uncontroversial, so I am inclined to queue i

GOOD DAY,

2014-06-04 Thread YAO YUTA
My name is Mr Yao Yuta from Hong Kong, I want you to be my partner in a business project. If Interested Contact me back via my email address. Thank you, Mr. Yao Yuta. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More ma

Re: [PATCH v2 8/9] fetch doc: add a section on configured remote-tracking branches

2014-06-04 Thread Junio C Hamano
Marc Branchaud writes: [jc: omitted good suggestions I'll use in amending] >> + the refspecs to be used to fetch. The example above will fetch > > /to be used// I have a problem with that change, actually, because you do not "fetch" refspec from anywhere. A refspec is what is used to determi

Re: [PATCH v2 9/9] fetch: allow explicit --refmap to override configuration

2014-06-04 Thread Junio C Hamano
Marc Branchaud writes: >> Teach the command to pay attention to the --refmap=: >> command-line options that can be used to override the use of >> configured remote.*.fetch as the refmap. > > (Your 0/9 message merely said "The new patches at the > end clarifies how remote.*.fetch configuration var

Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Duy Nguyen
On Wed, Jun 4, 2014 at 11:16 PM, Stepan Kasal wrote: > Hi dscho, > > your arguments seem really strong. (Especially the four years of > battle testing, with the memories of constant problems with HOME before.) > > I hope they are strong enough to convince Junio to accept this patch; > that would

GOOD DAY,

2014-06-04 Thread YAO YUTA
My name is Mr Yao Yuta from Hong Kong, I want you to be my partner in a business project. If Interested Contact me back via my email address. Thank you, Mr. Yao Yuta. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More ma

Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-04 Thread Karsten Blees
Am 04.06.2014 17:46, schrieb Johannes Schindelin: > Hi kusma, > > On Wed, 4 Jun 2014, Johannes Schindelin wrote: > >> The problem arises whenever git.exe calls subprocesses. You can pollute >> the environment by setting HOME, I do not recall the details, but I >> remember that we had to be very c

Re: [msysGit] Re: [PATCH v2] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Michael Geddes
I have the problem that the overridden test_cmp crashes on a couple of places where it is doing a binary compare, so this is definitely needed. I actually used cmp -q in my override as it's the return code that is most important. //. On Wed, 4 Jun 2014 11:22:56 AM Junio C Hamano wrote: > Ste

Git autocorrect bug

2014-06-04 Thread David Turner
$ cd [some existing git repo] $ git git foo WARNING: You called a Git command named 'git', which does not exist. Continuing under the assumption that you meant 'init' in 0.1 seconds automatically... fatal: internal error: work tree has already been set Current worktree: /home/dturner/git New worktr

GOOD DAY,

2014-06-04 Thread YAO YUTA
My name is Mr Yao Yuta from Hong Kong, I want you to be my partner in a business project. If Interested Contact me back via my email address. Thank you, Mr. Yao Yuta. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More m

[PATCH] t/t7810-grep.sh: remove duplicate test_config()

2014-06-04 Thread Jeremiah Mahler
t/t7810-grep.sh had its own test_config() function which served the same purpose as the one in t/test-lib-functions.sh. Removed, all tests pass. Signed-off-by: Jeremiah Mahler --- t/t7810-grep.sh | 5 - 1 file changed, 5 deletions(-) diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh index 63b

[PATCH v3 2/4] replace: add test for --graft

2014-06-04 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t6050-replace.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 68b3cb2..ca45a84 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -351,4 +351,16 @@ test_expect_success 'replace ref cl

[PATCH v3 3/4] Documentation: replace: add --graft option

2014-06-04 Thread Christian Couder
Signed-off-by: Christian Couder --- Documentation/git-replace.txt | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index 61461b9..491875e 100644 --- a/Documentation/git-replace.txt +++ b/Documentation/git-replace.txt @@ -10,

[PATCH v3 1/4] replace: add --graft option

2014-06-04 Thread Christian Couder
The usage string for this option is: git replace [-f] --graft [...] First we create a new commit that is the same as except that its parents are [...] Then we create a replace ref that replace with the commit we just created. With this new option, it should be straightforward to convert graf

[PATCH v3 4/4] contrib: add convert-grafts-to-replace-refs.sh

2014-06-04 Thread Christian Couder
This patch adds into contrib/ an example script to convert grafts from an existing grafts file into replace refs using the new --graft option of "git replace". While at it let's mention this new script in the "git replace" documentation for the --graft option. Signed-off-by: Christian Couder ---

[PATCH v3 0/4] Add --graft option to git replace

2014-06-04 Thread Christian Couder
Here is a small patch series to implement: git replace [-f] --graft [...] This patch series goes on top of the patch series that implements --edit. There is only one change since v2 thanks to Eric: - improve error messages in convert-grafts-to-replace-refs.sh (patch 4/4) Christian C

[PATCH 0/5] submodule config lookup API

2014-06-04 Thread Heiko Voigt
I have been holding back this series during the RC phase but now I think it is ready for another round. The most important changes: * The API is using a singleton now. No need to pass in the cache object anymore. * Local configuration can be looked up by passing in the null_sha1 * We u

Re: Git autocorrect bug

2014-06-04 Thread Øystein Walle
David Turner twopensource.com> writes: > > $ cd [some existing git repo] > $ git git foo > WARNING: You called a Git command named 'git', which does not exist. > Continuing under the assumption that you meant 'init' > in 0.1 seconds automatically... > fatal: internal error: work tree has already

[PATCH 1/5] hashmap: add enum for hashmap free_entries option

2014-06-04 Thread Heiko Voigt
This allows a reader to immediately know which options can be used and what this parameter is about. Signed-off-by: Heiko Voigt --- Documentation/technical/api-hashmap.txt | 2 +- diffcore-rename.c | 2 +- hashmap.c | 2 +- hashmap.h

[PATCH 2/5] implement submodule config cache for lookup of submodule names

2014-06-04 Thread Heiko Voigt
This submodule configuration cache allows us to lazily read .gitmodules configurations by commit into a runtime cache which can then be used to easily lookup values from it. Currently only the values for path or name are stored but it can be extended for any value needed. It is expected that .gitm

[PATCH 3/5] extract functions for submodule config set and lookup

2014-06-04 Thread Heiko Voigt
This is one step towards using the new configuration API. We just extract these functions to make replacing the actual code easier. Signed-off-by: Heiko Voigt --- This refactoring is included in the series to make following the series easier (and because it was one step I did). The extracted fun

[PATCH 4/5] use new config API for worktree configurations of submodules

2014-06-04 Thread Heiko Voigt
We remove the extracted functions and directly parse into and read out of the cache. This allows us to have one unified way of accessing submodule configuration values specific to single submodules. Regardless whether we need to access a configuration from history or from the worktree. Signed-off-

  1   2   >