Re: [PATCH 00/14] Add submodule test harness

2014-07-09 Thread Torsten Bögershausen
There seems to be some other trouble under Mac OS, not yet fully tracked down, (may be related to the diff -r) Torsten sees failures of this kind under Mac OS: diff -r .git/modules/sub1/config sub1/.git/config 6d5 worktree = ../../../sub1 8a8 worktree = ../../../sub1 So the config

Re: [PATCH] http: Add Accept-Language header if possible

2014-07-09 Thread Jeff King
On Wed, Jul 09, 2014 at 02:46:35PM +0900, Yi, EungJun wrote: I agree with you. In fact, I tried to get user's preferred language in the same way as gettext. It has guess_category_value() to do that and the function is good enough because it considers $LANGUAGE, $LC_ALL, $LANG, and also

No fchmod() under msygit - Was: Re: [PATCH 00/14] Add submodule test harness

2014-07-09 Thread Torsten Bögershausen
On 07/08/2014 10:25 PM, Ramsay Jones wrote: On 08/07/14 20:34, Jens Lehmann wrote: Am 07.07.2014 21:40, schrieb Torsten Bögershausen: On 2014-07-07 19.05, Junio C Hamano wrote: Jens Lehmann jens.lehm...@web.de writes: Junio, do you want me to resend 02/14 without the non-portable echo -n or

Re: move detection doesnt take filename into account

2014-07-09 Thread Jeff King
On Tue, Jul 01, 2014 at 10:08:15AM -0700, Junio C Hamano wrote: I didn't think it through but my gut feeling is that we could change the name similarity score to be the length of the tail part that matches (e.g. 1.a to a/2.a that has the same two bytes at the tail is a better match than to

Re: `git log --graph` with multiple roots is confusing

2014-07-09 Thread Jeff King
On Mon, Jun 30, 2014 at 03:04:19AM -0700, Gary Fixler wrote: I just made a new test repo, added and fetched two unrelated repos, and then did the log view (all/graph/decorate/oneline), and tacked on --boundary, but saw no change. The root commits looked the same. There was some discussion a

Error running 'git status' with Git version of current 'next' branch

2014-07-09 Thread Ralf Thielow
Hi, I'm getting the following error when calling 'git status' on one of my projects. git: dir.c:739: last_exclude_matching_from_list: Assertion `x-baselen == 0 || x-base[x-baselen - 1] == '/'' failed. Aborted (core dumped) I'm using the current 'next', git version 2.0.1.664.g35b839c I have

Re: `git log --graph` with multiple roots is confusing

2014-07-09 Thread Duy Nguyen
On Wed, Jul 9, 2014 at 1:51 PM, Jeff King p...@peff.net wrote: On Mon, Jun 30, 2014 at 03:04:19AM -0700, Gary Fixler wrote: I just made a new test repo, added and fetched two unrelated repos, and then did the log view (all/graph/decorate/oneline), and tacked on --boundary, but saw no change.

[PATCH v6 02/32] path.c: make get_pathname() call sites return const char *

2014-07-09 Thread Nguyễn Thái Ngọc Duy
Before the previous commit, get_pathname returns an array of PATH_MAX length. Even if git_path() and similar functions does not use the whole array, git_path() caller can, in theory. After the commit, get_pathname() may return a buffer that has just enough room for the returned string and

[PATCH v6 03/32] git_snpath(): retire and replace with strbuf_git_path()

2014-07-09 Thread Nguyễn Thái Ngọc Duy
In the previous patch, git_snpath() is modified to allocate a new strbuf buffer because vsnpath() needs that. But that makes it awkward because git_snpath() receives a pre-allocated buffer from outside and has to copy data back. Rename it to strbuf_git_path() and make it receive strbuf directly.

[PATCH v6 06/32] setup_git_env: use git_pathdup instead of xmalloc + sprintf

2014-07-09 Thread Nguyễn Thái Ngọc Duy
From: Jeff King p...@peff.net This is shorter, harder to get wrong, and more clearly captures the intent. Signed-off-by: Jeff King p...@peff.net Signed-off-by: Junio C Hamano gits...@pobox.com Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- environment.c | 12 1 file

[PATCH v6 07/32] setup_git_env(): introduce git_path_from_env() helper

2014-07-09 Thread Nguyễn Thái Ngọc Duy
From: Jeff King p...@peff.net Check the value of an environment and fall back to a known path inside $GIT_DIR is repeated a few times to determine the location of the data store, the index and the graft file, but the return value of getenv is not guaranteed to survive across further invocations

[PATCH v6 01/32] path.c: make get_pathname() return strbuf instead of static buffer

2014-07-09 Thread Nguyễn Thái Ngọc Duy
We've been avoiding PATH_MAX whenever possible. This patch makes get_pathname() return a strbuf and updates the callers to take advantage of this. The code is simplified as we no longer need to worry about buffer overflow. vsnpath() behavior is changed slightly: previously it always clears the

[PATCH v6 04/32] path.c: rename vsnpath() to do_git_path()

2014-07-09 Thread Nguyễn Thái Ngọc Duy
The name vsnpath() gives an impression that this is general path handling function. It's not. This is the underlying implementation of git_path(), git_pathdup() and strbuf_git_path() which will prefix $GIT_DIR in the result string. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- path.c

[PATCH v6 00/32] Support multiple checkouts

2014-07-09 Thread Nguyễn Thái Ngọc Duy
This is basically a reroll from what was parked on 'pu' with two new patches at the end: one to not share info/sparse-checkout across worktrees, and one to allow 'checkout --to` from a bare repository. I cherry-picked two patches from jk/xstrfmt (on next) because they result in non-trivial

[PATCH v6 05/32] path.c: group git_path(), git_pathdup() and strbuf_git_path() together

2014-07-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- path.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/path.c b/path.c index 2cb2e61..65881aa 100644 --- a/path.c +++ b/path.c @@ -78,6 +78,16 @@ void strbuf_git_path(struct strbuf *sb, const char

[PATCH v6 14/32] git-sh-setup.sh: use rev-parse --git-path to get $GIT_DIR/objects

2014-07-09 Thread Nguyễn Thái Ngọc Duy
If $GIT_COMMON_DIR is set, $GIT_OBJECT_DIRECTORY should be $GIT_COMMON_DIR/objects, not $GIT_DIR/objects. Just let rev-parse --git-path handle it. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- git-sh-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v6 08/32] git_path(): be aware of file relocation in $GIT_DIR

2014-07-09 Thread Nguyễn Thái Ngọc Duy
We allow the user to relocate certain paths out of $GIT_DIR via environment variables, e.g. GIT_OBJECT_DIRECTORY, GIT_INDEX_FILE and GIT_GRAFT_FILE. Callers are not supposed to use git_path() or git_pathdup() to get those paths. Instead they must use get_object_directory(), get_index_file() and

[PATCH v6 15/32] *.sh: avoid hardcoding $GIT_DIR/hooks/...

2014-07-09 Thread Nguyễn Thái Ngọc Duy
If $GIT_COMMON_DIR is set, it should be $GIT_COMMON_DIR/hooks/, not $GIT_DIR/hooks/. Just let rev-parse --git-path handle it. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- git-am.sh | 22 +++--- git-rebase--interactive.sh | 6

[PATCH v6 12/32] commit: use SEQ_DIR instead of hardcoding sequencer

2014-07-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/commit.c b/builtin/commit.c index 84cec9a..9f2aba3 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -156,7 +156,7 @@ static void

[PATCH v6 13/32] $GIT_COMMON_DIR: a new environment variable

2014-07-09 Thread Nguyễn Thái Ngọc Duy
This variable is intended to support multiple working directories attached to a repository. Such a repository may have a main working directory, created by either git init or git clone and one or more linked working directories. These working directories and the main repository share the same

[PATCH v6 11/32] fast-import: use git_path() for accessing .git dir instead of get_git_dir()

2014-07-09 Thread Nguyễn Thái Ngọc Duy
This allows git_path() to redirect info/fast-import to another place if needed Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- fast-import.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fast-import.c b/fast-import.c index c74ea15..e8ec34d 100644 ---

[PATCH v6 09/32] *.sh: respect $GIT_INDEX_FILE

2014-07-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- git-pull.sh | 2 +- git-stash.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/git-pull.sh b/git-pull.sh index 18a394f..6ab0c31 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -240,7 +240,7 @@ test true = $rebase {

[PATCH v6 10/32] reflog: avoid constructing .lock path with git_path

2014-07-09 Thread Nguyễn Thái Ngọc Duy
Among pathnames in $GIT_DIR, e.g. index or packed-refs, we want to automatically and silently map some of them to the $GIT_DIR of the repository we are borrowing from via $GIT_COMMON_DIR mechanism. When we formulate the pathname for its lockfile, we want it to be in the same location as its final

[PATCH v6 20/32] setup.c: detect $GIT_COMMON_DIR check_repository_format_gently()

2014-07-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- setup.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.c b/setup.c index a17389f..79f79f2 100644 --- a/setup.c +++ b/setup.c @@ -346,6 +346,10 @@ static int check_repository_format_gently(const char

[PATCH v6 16/32] git-stash: avoid hardcoding $GIT_DIR/logs/....

2014-07-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- git-stash.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-stash.sh b/git-stash.sh index 393e1ec..41f8f6b 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -184,7 +184,7 @@ store_stash () { fi

[PATCH v6 17/32] setup.c: convert is_git_directory() to use strbuf

2014-07-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- setup.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/setup.c b/setup.c index 0a22f8b..425fd79 100644 --- a/setup.c +++ b/setup.c @@ -238,31 +238,36 @@ void

[PATCH v6 18/32] setup.c: detect $GIT_COMMON_DIR in is_git_directory()

2014-07-09 Thread Nguyễn Thái Ngọc Duy
If the file $GIT_DIR/commondir exists, it contains the value of $GIT_COMMON_DIR. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Documentation/gitrepository-layout.txt | 7 ++ setup.c| 43 +- 2 files changed, 44

[PATCH v6 19/32] setup.c: convert check_repository_format_gently to use strbuf

2014-07-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- setup.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setup.c b/setup.c index 176d505..a17389f 100644 --- a/setup.c +++ b/setup.c @@ -342,7 +342,9 @@ void setup_work_tree(void) static int

[PATCH v6 26/32] checkout: detach if the branch is already checked out elsewhere

2014-07-09 Thread Nguyễn Thái Ngọc Duy
The normal rule is anything outside refs/heads/ is detached. This increases strictness of the rule a bit more: if the branch is checked out (either in $GIT_COMMON_DIR/HEAD or any $GIT_DIR/repos/.../HEAD) then it's detached as well. A hint is given so the user knows where to go and do something

[PATCH v6 25/32] checkout: clean up half-prepared directories in --to mode

2014-07-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/checkout.c | 49 +++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index 7df586a..5a52da4 100644 --- a/builtin/checkout.c +++

[PATCH v6 28/32] gc: style change -- no SP before closing bracket

2014-07-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/gc.c b/builtin/gc.c index 8d219d8..53f1302 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -285,7 +285,7 @@ int cmd_gc(int argc, const char

[PATCH v6 22/32] wrapper.c: wrapper to open a file, fprintf then close

2014-07-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 2 ++ wrapper.c | 31 +++ 2 files changed, 33 insertions(+) diff --git a/cache.h b/cache.h index e7dd5ce..b363c00 100644 --- a/cache.h +++ b/cache.h @@ -1355,6 +1355,8 @@ static inline ssize_t

[PATCH v6 21/32] setup.c: support multi-checkout repo setup

2014-07-09 Thread Nguyễn Thái Ngọc Duy
The repo setup procedure is updated to detect $GIT_DIR/commondir and set $GIT_COMMON_DIR properly. The core.worktree is ignored when $GIT_COMMON_DIR is set. This is because the config file is shared in multi-checkout setup, but checkout directories _are_ different. Making core.worktree effective

[PATCH v6 27/32] prune: strategies for linked checkouts

2014-07-09 Thread Nguyễn Thái Ngọc Duy
(alias R=$GIT_COMMON_DIR/repos/id) - linked checkouts are supposed to keep its location in $R/gitdir up to date. The use case is auto fixup after a manual checkout move. - linked checkouts are supposed to update mtime of $R/gitdir. If $R/gitdir's mtime is older than a limit, and it

[PATCH v6 24/32] checkout: support checking out into a new working directory

2014-07-09 Thread Nguyễn Thái Ngọc Duy
git checkout --to sets up a new working directory with a .git file pointing to $GIT_DIR/repos/id. It then executes git checkout again on the new worktree with the same arguments except --to is taken out. The second checkout execution, which is not contaminated with any info from the current

[PATCH v6 23/32] use new wrapper write_file() for simple file writing

2014-07-09 Thread Nguyễn Thái Ngọc Duy
This fixes common problems in these code about error handling, forgetting to close the file handle after fprintf() fails, or not printing out the error string.. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/branch.c | 4 +--- builtin/init-db.c | 7 +-- daemon.c

[PATCH v6 30/32] count-objects: report unused files in $GIT_DIR/repos/...

2014-07-09 Thread Nguyễn Thái Ngọc Duy
In linked checkouts, borrowed parts like config is taken from $GIT_COMMON_DIR. $GIT_DIR/config is never used. Report them as garbage. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/count-objects.c | 4 +++- cache.h | 1 + path.c | 29

[PATCH v6 32/32] checkout: don't require a work tree when checking out into a new one

2014-07-09 Thread Nguyễn Thái Ngọc Duy
From: Dennis Kaarsemaker den...@kaarsemaker.net For normal use cases, it does not make sense for 'checkout' to work on a bare repository, without a worktree. But checkout --to is an exception because it _creates_ a new worktree. Allow this option to run on bare repositories. People who check out

[PATCH v6 29/32] gc: support prune --repos

2014-07-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Documentation/config.txt | 7 +++ builtin/gc.c | 17 + 2 files changed, 24 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 286e539..470f979 100644 ---

[PATCH v6 31/32] git_path(): keep info/sparse-checkout per work-tree

2014-07-09 Thread Nguyễn Thái Ngọc Duy
Currently git_path(info/sparse-checkout) resolves to $GIT_COMMON_DIR/info/sparse-checkout in multiple worktree mode. It makes more sense for the sparse checkout patterns to be per worktree, so you can have multiple checkouts with different parts of the tree. With this, git checkout --to new on a

Unexpected end of command stream message looks irrelevant when I try to pull a non-existing branch

2014-07-09 Thread Dmitry
Hi, I'm using Git 1.8.1 and when I run the following command: git pull origin matser I get the following output: fatal: couldn't find remote ref matser Unexpected end of command stream The first line in the output is right on the money but the second one looks completely irrelevant - the

Re: [PATCH v6 28/32] gc: style change -- no SP before closing bracket

2014-07-09 Thread Eric Sunshine
On Wed, Jul 9, 2014 at 3:33 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/gc.c b/builtin/gc.c index 8d219d8..53f1302 100644 ---

Re: [PATCH v6 29/32] gc: support prune --repos

2014-07-09 Thread Eric Sunshine
On Wed, Jul 9, 2014 at 3:33 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Documentation/config.txt | 7 +++ builtin/gc.c | 17 + 2 files changed, 24 insertions(+) diff --git

Re: [PATCH] http: Add Accept-Language header if possible

2014-07-09 Thread Peter Krefting
Yi EungJun: Example: LANGUAGE= - LANGUAGE=ko - Accept-Language: ko; q=1.000, *; q=0.001 LANGUAGE=ko:en - Accept-Language: ko; q=1.000, en; q=0.999, *; q=0.001 Avoid adding q=1.000. It is redundant (the default for any unqualified language names is 1.0, and additionally there has

[PATCH v6 0/3] git config cache special querying api utilizing the cache

2014-07-09 Thread Tanay Abhra
Hi, [PATCH V7]: Style nits and a broken chain corrected in `t/t1308-config-set.sh`. See [9] for the nits. [PATCH V6]: Style nits and mistakes corrected. Diff between v6 and v5[8] is at the bottom. Thanks to Matthieu, Ramsay and Ram for their suggestions. [PATCH V5]:

[PATCH v7 2/2] test-config: Add tests for the config_set API

2014-07-09 Thread Tanay Abhra
Expose the `config_set` C API as a set of simple commands in order to facilitate testing. Add tests for the `config_set` API as well as for `git_config_get_*()` family for the usual config files. Signed-off-by: Tanay Abhra tanay...@gmail.com --- .gitignore| 1 + Makefile

[PATCH v7 1/2] add `config_set` API for caching config-like files

2014-07-09 Thread Tanay Abhra
Currently `git_config()` uses a callback mechanism and file rereads for config values. Due to this approach, it is not uncommon for the config files to be parsed several times during the run of a git program, with different callbacks picking out different variables useful to themselves. Add a

Re: [PATCH v6 2/2] test-config: Add tests for the config_set API

2014-07-09 Thread Tanay Abhra
On 7/7/2014 10:34 PM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com writes: diff --git a/t/t1308-config-hash.sh b/t/t1308-config-hash.sh new file mode 100755 index 000..ad99f8b --- /dev/null +++ b/t/t1308-config-hash.sh +test_expect_success 'setup default config' ' +cat

Re: [PATCH v6 27/32] prune: strategies for linked checkouts

2014-07-09 Thread Eric Sunshine
On Wed, Jul 9, 2014 at 3:33 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: (alias R=$GIT_COMMON_DIR/repos/id) - linked checkouts are supposed to keep its location in $R/gitdir up to date. The use case is auto fixup after a manual checkout move. - linked checkouts are supposed to

Re: t5150-request-pull.sh fails on newest master in Debian

2014-07-09 Thread Øyvind A . Holm
On 9 July 2014 03:18, David Turner dtur...@twopensource.com wrote: On Wed, 2014-07-09 at 02:52 +0200, Øyvind A. Holm wrote: On 3 July 2014 23:55, Øyvind A. Holm su...@sunbase.org wrote: When compiling newest master (v2.0.1-472-g6f92e5f) on Debian 7.5 (64-bit), t5150-request-pull.sh fails

Re: [PATCH] refs.c: handle REFNAME_REFSPEC_PATTERN at end of page

2014-07-09 Thread Øyvind A . Holm
On 7 July 2014 20:05, Junio C Hamano gits...@pobox.com wrote: David Turner dtur...@twopensource.com writes: When a ref crosses a memory page boundary, we restart the parsing at the beginning with the bytewise code. Pass the original flags to that code, rather than the current flags.

Re: [PATCH v6 2/2] test-config: Add tests for the config_set API

2014-07-09 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: On 7/7/2014 10:34 PM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com writes: diff --git a/t/t1308-config-hash.sh b/t/t1308-config-hash.sh new file mode 100755 index 000..ad99f8b --- /dev/null +++ b/t/t1308-config-hash.sh

Re: [PATCH v7 2/2] test-config: Add tests for the config_set API

2014-07-09 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: +test_expect_success 'find value with misspelled key' ' + test_must_fail check my.fOo Bar.hi Value not found for \my.fOo Bar.hi\ +' Sorry, this is still not right. You're checking that either test-config OR test_cmp fails. You want to check both.

Re: [PATCH v7 1/2] add `config_set` API for caching config-like files

2014-07-09 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: diff --git a/Documentation/technical/api-config.txt b/Documentation/technical/api-config.txt index 230b3a0..65a6717 100644 --- a/Documentation/technical/api-config.txt +++ b/Documentation/technical/api-config.txt +`int git_config_get_bool(const char

Re: [PATCH v7 1/2] add `config_set` API for caching config-like files

2014-07-09 Thread Tanay Abhra
On 7/9/2014 5:42 PM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com writes: diff --git a/Documentation/technical/api-config.txt b/Documentation/technical/api-config.txt index 230b3a0..65a6717 100644 --- a/Documentation/technical/api-config.txt +++

Re: [PATCH v7 2/2] test-config: Add tests for the config_set API

2014-07-09 Thread Tanay Abhra
On 7/9/2014 5:43 PM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com writes: +test_expect_success 'find value with misspelled key' ' +test_must_fail check my.fOo Bar.hi Value not found for \my.fOo Bar.hi\ +' Sorry, this is still not right. You're checking that either

Re: [PATCH v7 1/2] add `config_set` API for caching config-like files

2014-07-09 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: Also, I tried implementing Junio's request about saving the line number and the file name for each key-value pair. I had some success, but with some changes, My opinion on this: * It's low priority. I think the order of priority should be (high to

Re: t5150-request-pull.sh fails on newest master in Debian

2014-07-09 Thread René Scharfe
Am 09.07.2014 03:18, schrieb David Turner: On Wed, 2014-07-09 at 02:52 +0200, Øyvind A. Holm wrote: On 3 July 2014 23:55, Øyvind A. Holm su...@sunbase.org wrote: When compiling newest master (v2.0.1-472-g6f92e5f) on Debian 7.5 (64-bit), t5150-request-pull.sh fails when compiling with $ make

Re: [PATCH v6 02/10] replace: add --graft option

2014-07-09 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes: The usage string for this option is: git replace [-f] --graft commit [parent...] First we create a new commit that is the same as commit except that its parents are [parents...] Then we create a replace ref that replace commit with the

Re: [PATCH] enums: remove trailing ',' after last item in enum

2014-07-09 Thread Junio C Hamano
Ronnie Sahlberg sahlb...@google.com writes: Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- Looks good; thanks. builtin/clean.c | 2 +- builtin/tag.c | 2 +- pretty.c| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/clean.c b/builtin/clean.c

Re: [PATCH v7 1/2] add `config_set` API for caching config-like files

2014-07-09 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: My opinion on this: * It's low priority. I think the order of priority should be (high to low) 1) Finish and get the current series into pu (we're almost there, it's not time to back off and restart something new). 2) Work on

Re: [PATCH 00/14] Add submodule test harness

2014-07-09 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: A brute force approach could be to simply run the config file(s) through sort and compare them: sort .git/modules/sub1/config expect sort sub1/.git/config actual test_cmp expect actual Or git config --list from these files, perhaps? -- To

Re: move detection doesnt take filename into account

2014-07-09 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Tue, Jul 01, 2014 at 10:08:15AM -0700, Junio C Hamano wrote: I didn't think it through but my gut feeling is that we could change the name similarity score to be the length of the tail part that matches (e.g. 1.a to a/2.a that has the same two bytes at the

Re: [PATCH v7 1/2] add `config_set` API for caching config-like files

2014-07-09 Thread Tanay Abhra
On 7/9/2014 7:49 PM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com writes: My opinion on this: * It's low priority. I think the order of priority should be (high to low) 1) Finish and get the current series into pu (we're almost there, it's not time to back off and

Re: [PATCH RFC v2 00/19] Enable options --signoff, --reset-author for pick, reword

2014-07-09 Thread Fabian Ruch
On 07/08/2014 10:45 PM, Junio C Hamano wrote: Fabian Ruch baf...@gmail.com writes: Fabian Ruch (19): rebase -i: Failed reword prints redundant error message rebase -i: reword complains about empty commit despite --keep-empty rebase -i: reword executes pre-commit hook on interim commit

Re: [PATCH 2/2] dir: remove PATH_MAX limitation

2014-07-09 Thread Junio C Hamano
Karsten Blees karsten.bl...@gmail.com writes: 'git status' segfaults if a directory is longer than PATH_MAX, because processing .gitignore files in prep_exclude() writes past the end of a PATH_MAX-bounded buffer. Remove the limitation by using strbuf instead. Note: this fix just 'abuses'

Re: [PATCH 00/14] Add submodule test harness

2014-07-09 Thread Johannes Sixt
Am 08.07.2014 21:34, schrieb Jens Lehmann: And Msysgit complains error: fchmod on c:/xxxt/trash directory.t7613-merge-submodule/submodule_update_repo/.git/modules/sub1/config.lock failed: Function not implemented I'm not sure what this is about, seems to happen during the cp -R of the

Re: [PATCH v7 1/2] add `config_set` API for caching config-like files

2014-07-09 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: * Still, making sure that the (file, line) is doable later without too much change is good. So, if indeed, moving all code to another file is required, then it may make sense to do it now to avoid code move later. Good thinking. As long as the

Re: [PATCH RFC v2 02/19] rebase -i: reword complains about empty commit despite --keep-empty

2014-07-09 Thread Fabian Ruch
Junio C Hamano writes: Fabian Ruch baf...@gmail.com writes: Subject: rebase -i: reword complains about empty commit despite --keep-empty I had to read the title and then the log twice before understanding that the above is not change the complaint message (i.e. reword complaints spelled

Re: [PATCH 00/14] Add submodule test harness

2014-07-09 Thread Jens Lehmann
Am 09.07.2014 08:14, schrieb Torsten Bögershausen: There seems to be some other trouble under Mac OS, not yet fully tracked down, (may be related to the diff -r) Torsten sees failures of this kind under Mac OS: diff -r .git/modules/sub1/config sub1/.git/config 6d5 worktree =

Re: [PATCH 00/14] Add submodule test harness

2014-07-09 Thread Junio C Hamano
Johannes Sixt j...@kdbg.org writes: Am 08.07.2014 21:34, schrieb Jens Lehmann: And Msysgit complains error: fchmod on c:/xxxt/trash directory.t7613-merge-submodule/submodule_update_repo/.git/modules/sub1/config.lock failed: Function not implemented I'm not sure what this is about,

Re: [PATCH 00/14] Add submodule test harness

2014-07-09 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: I agree, but this case is special. The test asserts that nobody added, modified or removed *anything* inside the .git directory. The reason for problem we are seeing here is that I have to remove the core.worktree setting when moving the git directory

[PATCH v2 1/2] t/Makefile: check helper scripts for non-portable shell commands too

2014-07-09 Thread Jens Lehmann
Currently only the t[0-9][0-9][0-9][0-9]-*.sh scripts are tested for shell incompatibilities using the check-non-portable-shell.pl script. This makes it easy to miss non-POSIX constructs added to one of the t/*lib*.sh helper scripts, as they aren't automatically detected. Fix that by adding a

[PATCH v2 2/2] t/Makefile: always test all lint targets when running tests

2014-07-09 Thread Jens Lehmann
Only the two targets test-lint-duplicates and test-lint-executable are currently executed when running the test target. This was done on purpose when the TEST_LINT variable was added in 81127d74 to avoid twisted shell scripting by developers only to avoid false positives that might result from the

[PATCH v2 0/2] always run all lint targets when running the test suite

2014-07-09 Thread Jens Lehmann
Am 09.07.2014 07:42, schrieb Junio C Hamano: On Tue, Jul 8, 2014 at 12:24 PM, Jens Lehmann jens.lehm...@web.de wrote: Am 07.07.2014 20:13, schrieb Junio C Hamano: So I am not very enthusiastic to see this change myself. Ok, I understand we do not want to lightly risk false positives. I

Re: Re: [PATCH v2 3/4] use new config API for worktree configurations of submodules

2014-07-09 Thread Heiko Voigt
On Tue, Jul 08, 2014 at 01:14:20PM -0700, Junio C Hamano wrote: Heiko Voigt hvo...@hvoigt.net writes: diff --git a/builtin/checkout.c b/builtin/checkout.c index 07cf555..03ea20d 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -18,6 +18,7 @@ #include xdiff-interface.h

Re: [PATCH 00/14] Add submodule test harness

2014-07-09 Thread Eric Wong
Junio C Hamano gits...@pobox.com wrote: Johannes Sixt j...@kdbg.org writes: Am 08.07.2014 21:34, schrieb Jens Lehmann: And Msysgit complains error: fchmod on c:/xxxt/trash directory.t7613-merge-submodule/submodule_update_repo/.git/modules/sub1/config.lock failed: Function not

Re: No fchmod() under msygit - Was: Re: [PATCH 00/14] Add submodule test harness

2014-07-09 Thread Eric Wong
Torsten Bögershausen tbo...@web.de wrote: (And why is it 0 and not 0777) This is to preserve the uncommon sticky/sgid/suid bits. Probably not needed, but better to keep as much intact as possible. Can we avoid the fchmod() all together ? For single-user systems, sure. For

t3200-branch.sh number 102 fails when run under make test

2014-07-09 Thread Keller, Jacob E
Hello, I recently cloned the master branch of the git repo, and when I ran make test, it fails on test 102 of the t3200-branch.sh test cases. not ok 102 - tracking with unexpected .fetch refspec # # rm -rf a b c d # git init a # ( #

Re: t3200-branch.sh number 102 fails when run under make test

2014-07-09 Thread Jeff King
On Wed, Jul 09, 2014 at 08:37:51PM +, Keller, Jacob E wrote: I recently cloned the master branch of the git repo, and when I ran make test, it fails on test 102 of the t3200-branch.sh test cases. Just a guess, but try reverting 745224e (refs.c: SSE2 optimizations for

Re: t3200-branch.sh number 102 fails when run under make test

2014-07-09 Thread Keller, Jacob E
On Wed, 2014-07-09 at 13:37 -0700, Jacob E Keller wrote: Hello, I recently cloned the master branch of the git repo, and when I ran make test, it fails on test 102 of the t3200-branch.sh test cases. not ok 102 - tracking with unexpected .fetch refspec # # rm -rf a b c d #

Re: Unexpected end of command stream message looks irrelevant when I try to pull a non-existing branch

2014-07-09 Thread Jeff King
On Wed, Jul 09, 2014 at 11:37:51AM +0400, Dmitry wrote: I'm using Git 1.8.1 and when I run the following command: git pull origin matser I get the following output: fatal: couldn't find remote ref matser Unexpected end of command stream The first line in the output is right on the

Re: t3200-branch.sh number 102 fails when run under make test

2014-07-09 Thread Keller, Jacob E
On Wed, 2014-07-09 at 16:54 -0400, Jeff King wrote: On Wed, Jul 09, 2014 at 08:37:51PM +, Keller, Jacob E wrote: I recently cloned the master branch of the git repo, and when I ran make test, it fails on test 102 of the t3200-branch.sh test cases. Just a guess, but try reverting

[PATCH] remote-curl: do not complain on EOF from parent git

2014-07-09 Thread Jeff King
The parent git process is supposed to send us an empty line to indicate that the conversation is over. However, the parent process may die() if there is a problem with the operaiton (e.g., we try to fetch a ref that does not exist). In this case, it produces a useful message, but then remote-curl

[PATCH] tag: support configuring --sort via .gitconfig

2014-07-09 Thread Jacob Keller
Add support for configuring default sort ordering for git tags. Command line option will override this configured value, using the exact same syntax. Cc: Nguyễn Thái Ngọc Duy pclo...@gmail.com Cc: Junio C Hamano gits...@pobox.com Signed-off-by: Jacob Keller jacob.e.kel...@intel.com ---

Re: [PATCH] remote-curl: do not complain on EOF from parent git

2014-07-09 Thread Keller, Jacob E
On Wed, 2014-07-09 at 17:20 -0400, Jeff King wrote: The parent git process is supposed to send us an empty line to indicate that the conversation is over. However, the parent process may die() if there is a problem with the operaiton (e.g., we try to fetch a ref that does not exist).

Re: [PATCH] remote-curl: do not complain on EOF from parent git

2014-07-09 Thread Jeff King
On Wed, Jul 09, 2014 at 09:25:18PM +, Keller, Jacob E wrote: On Wed, 2014-07-09 at 17:20 -0400, Jeff King wrote: The parent git process is supposed to send us an empty line to indicate that the conversation is over. However, the parent process may die() if there is a problem with the

[PATCH 1/3] remote-curl: do not complain on EOF from parent git

2014-07-09 Thread Jeff King
The parent git process is supposed to send us an empty line to indicate that the conversation is over. However, the parent process may die() if there is a problem with the operation (e.g., we try to fetch a ref that does not exist). In this case, it produces a useful message, but then remote-curl

[PATCH 3/3] remote-curl: mark helper-protocol errors more clearly

2014-07-09 Thread Jeff King
When we encounter an error in remote-curl, we generally just report it to stderr. There is no need for the user to care that the could not connect to server error was generated by git-remote-https rather than a function in the parent git-fetch process. However, when the error is in the protocol

[PATCH 2/3] remote-curl: use error instead of fprintf(stderr)

2014-07-09 Thread Jeff King
We usually prefix our error messages with error: , but many error messages from remote-curl are simply printed with fprintf. This can make the output a little harder to read (especially because such message may be intermingled with errors from the parent git process). There is no reason to avoid

Re: [PATCH 00/14] Add submodule test harness

2014-07-09 Thread Junio C Hamano
Eric Wong normalper...@yhbt.net writes: Junio C Hamano gits...@pobox.com wrote: Johannes Sixt j...@kdbg.org writes: Am 08.07.2014 21:34, schrieb Jens Lehmann: And Msysgit complains error: fchmod on c:/xxxt/trash

Re: [PATCH] tag: support configuring --sort via .gitconfig

2014-07-09 Thread Jeff King
On Wed, Jul 09, 2014 at 02:21:00PM -0700, Jacob Keller wrote: Add support for configuring default sort ordering for git tags. Command line option will override this configured value, using the exact same syntax. This makes sense, and was something I was expecting to add once tag and branch

Re: move detection doesnt take filename into account

2014-07-09 Thread Jeff King
On Wed, Jul 09, 2014 at 08:51:07AM -0700, Junio C Hamano wrote: The delta heuristics in pack-objects use pack_name_hash, which claims: /* * This effectively just creates a sortable number from the * last sixteen non-whitespace characters. Last characters

Re: [PATCH v2 3/4] use new config API for worktree configurations of submodules

2014-07-09 Thread Junio C Hamano
Heiko Voigt hvo...@hvoigt.net writes: On Tue, Jul 08, 2014 at 01:14:20PM -0700, Junio C Hamano wrote: Heiko Voigt hvo...@hvoigt.net writes: diff --git a/builtin/checkout.c b/builtin/checkout.c index 07cf555..03ea20d 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -18,6

Re: [PATCH] tag: support configuring --sort via .gitconfig

2014-07-09 Thread Keller, Jacob E
On Wed, 2014-07-09 at 17:58 -0400, Jeff King wrote: On Wed, Jul 09, 2014 at 02:21:00PM -0700, Jacob Keller wrote: Add support for configuring default sort ordering for git tags. Command line option will override this configured value, using the exact same syntax. This makes sense, and

Re: [PATCH] tag: support configuring --sort via .gitconfig

2014-07-09 Thread Jeff King
On Wed, Jul 09, 2014 at 10:07:20PM +, Keller, Jacob E wrote: I only noticed the sort recently, and I first tried to add an alias like tag = tag --sort=v:refname but git didn't pick up the alias of the name already. It was only added recently (v2.0.0). :) As you noticed, we do not allow

Re: move detection doesnt take filename into account

2014-07-09 Thread Junio C Hamano
Jeff King p...@peff.net writes: I think the hash here does not collide in that way. It really is just the last sixteen characters shoved into a uint32_t. All bytes overlap with their adjacent byte because they are shifted by only 2 bits, not 8 bits, when a new byte is brought in. We can say

[PATCH] makefile: add ability to run specific test files

2014-07-09 Thread Jacob Keller
Running a specific test file manually does not obtain the exact environment setup by the Makefile. Add ability to run any of the tests in the t/ directory so that a user can more quickly debug a failing test. Otherwise, the entire test suite needs to be run, which can take a vary long time.

[PATCH v2] tag: support configuring --sort via .gitconfig

2014-07-09 Thread Jacob Keller
Add support for configuring default sort ordering for git tags. Command line option will override this configured value, using the exact same syntax. Cc: Jeff King p...@peff.net Signed-off-by: Jacob Keller jacob.e.kel...@intel.com --- Repost with changes suggested by Peff. These include fixing

Re: [PATCH] makefile: add ability to run specific test files

2014-07-09 Thread Junio C Hamano
Jacob Keller jacob.e.kel...@intel.com writes: Running a specific test file manually does not obtain the exact environment setup by the Makefile. What kind of things are missing, exactly? Perhaps that is something you need to fix, instead of mucking with the top-level Makefile. I recall last

  1   2   >