Re: Topic sk/mingw-unicode-spawn-args breaks tests

2014-07-12 Thread Stepan Kasal
Hello Hannes, Am 10.07.2014 22:05, schrieb Johannes Sixt: It looks like I totally missed the topic sk/mingw-unicode-spawn-args. ... Am I doing something wrong? Does the topic depend on a particular version of MSYS (or DLL)? unfortunately, I paused my submissions at random point. I'm

Re: 745224e0 gcc-4.9 emmintrin.h build error

2014-07-12 Thread Tuncer Ayaz
On Sat, Jul 12, 2014 at 6:56 AM, Jeff King wrote: On Fri, Jul 11, 2014 at 12:12:55AM +0200, Tuncer Ayaz wrote: Sorry, didn't test properly when I tried with/without config.mak, and PROFILE=BUILD was the problem. I had that in config.mak based on information gathered from INSTALL and

Re: 745224e0 gcc-4.9 emmintrin.h build error

2014-07-12 Thread Tuncer Ayaz
On Sat, Jul 12, 2014 at 6:56 AM, Jeff King wrote: I think none of the regular devs uses PROFILE, and it bit-rotted By the way, is there no build (CI) server for git.git to regularly test branches on different platforms or at least different build configs on the same platform? -- To unsubscribe

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

2014-07-12 Thread Peter Krefting
Jeff King: If that is the case, though, I wonder if we should actually be adding it as a git-protocol header so that all transports can benefit (i.e., we could be localizing human-readable error messages in upload-pack, receive-pack, etc). That would be very nice, thre is a lot of language

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

2014-07-12 Thread Peter Krefting
Yi EungJun: Add an Accept-Language header which indicates the user's preferred languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG. This one seems to fix all the issues I had with the first patch, thanks! -- \\// Peter - http://www.softwolves.pp.se/ -- To unsubscribe from this

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

2014-07-12 Thread Max Kirillov
On Wed, Jul 09, 2014 at 02:33:11PM +0700, Nguyễn Thái Ngọc Duy wrote: +static int check_linked_checkout(struct branch_info *new, + const char *name, const char *path) +{ ... + if (!strncmp(start, new-path, end - start) + new-path[end - start] ==

Re: [PATCH 2/7] move setting of object-type to alloc_* functions

2014-07-12 Thread Ramsay Jones
On 11/07/14 09:46, Jeff King wrote: The struct object type implements basic object polymorphism. Individual instances are allocated as concrete types (or as a union type that can store any object), and a struct object * can be cast into its real type after examining its type enum. This

Re: [PATCH 2/7] move setting of object-type to alloc_* functions

2014-07-12 Thread Ramsay Jones
On 11/07/14 09:46, Jeff King wrote: [snip] Sorry, hit send too early ... diff --git a/blob.c b/blob.c index ae320bd..5720a38 100644 --- a/blob.c +++ b/blob.c @@ -7,7 +7,7 @@ struct blob *lookup_blob(const unsigned char *sha1) { struct object *obj = lookup_object(sha1); if

Re: git-p4 and initial import

2014-07-12 Thread Pete Wyckoff
lcharri...@promptu.com wrote on Thu, 10 Jul 2014 15:45 +0200: I've used git-p4 for several years now and it's generally working well for me. The only thing that bugs me at this time is having to re-clone regularly. Here is how this happens: * Say my p4 client maps //foo/bar/... to

Re: [PATCH 2/7] move setting of object-type to alloc_* functions

2014-07-12 Thread Jeff King
On Sat, Jul 12, 2014 at 03:44:06PM +0100, Ramsay Jones wrote: - return alloc_node(name##_state, sizeof(type)); \ + return alloc_node(name##_state, flag, sizeof(type)); \ } I don't particularly like 'flag' here. (not a massive dislike, mind you:) Perhaps:

Re: [PATCH 2/7] move setting of object-type to alloc_* functions

2014-07-12 Thread Jeff King
On Sat, Jul 12, 2014 at 03:55:35PM +0100, Ramsay Jones wrote: if (!obj) { struct commit *c = alloc_commit_node(); - return create_object(sha1, OBJ_COMMIT, c); + return create_object(sha1, c); } perhaps: if (!obj) return

Re: git p4 diff-tree ambiguous argument error

2014-07-12 Thread Pete Wyckoff
duanemur...@mac.com wrote on Thu, 10 Jul 2014 12:19 -0700: Some additional investigation. I am working in a copy of a repository that was originally used to pull the data from Perforce. As part of my experiments to figure out this problem, I deleted the contents of .git/git-p4-tmp/.

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

2014-07-12 Thread Jens Lehmann
Am 10.07.2014 22:52, schrieb Junio C Hamano: Junio C Hamano gits...@pobox.com writes: 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

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

2014-07-12 Thread Yi, EungJun
Thanks for your detailed review and nice suggestions. I will accept most of them. 2014-07-12 2:35 GMT+09:00 Jeff King p...@peff.net: + /* Decide the precision for q-factor on number of preferred languages. */ + if (num_langs + 1 100) { /* +1 is for '*' */ + q_precision =

Re: git p4 diff-tree ambiguous argument error

2014-07-12 Thread Duane Murphy
On Jul 12, 2014, at 11:10 AM, Pete Wyckoff p...@padd.com wrote: Some additional investigation. I am working in a copy of a repository that was originally used to pull the data from Perforce. As part of my experiments to figure out this problem, I deleted the contents of

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

2014-07-12 Thread Eric Sunshine
On Fri, Jul 11, 2014 at 6:55 PM, Jacob Keller jacob.e.kel...@intel.com wrote: 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

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

2014-07-12 Thread Eric Sunshine
On Fri, Jul 11, 2014 at 12:52 PM, Yi EungJun semtlen...@gmail.com wrote: Add an Accept-Language header which indicates the user's preferred languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG. Examples: LANGUAGE= - LANGUAGE=ko:en - Accept-Language: ko, en; q=0.9, *; q=0.1

[PATCH v7 00/31] Support multiple checkouts

2014-07-12 Thread Nguyễn Thái Ngọc Duy
v7 fixes all comments from Eric and Max. Jeff's two patches are dropped because they have landed in latest master now. Diff against v6: diff --git a/Documentation/config.txt b/Documentation/config.txt index 470f979..57999fa 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@

[PATCH v7 06/31] git_path(): be aware of file relocation in $GIT_DIR

2014-07-12 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 v7 05/31] path.c: group git_path(), git_pathdup() and strbuf_git_path() together

2014-07-12 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 v7 03/31] git_snpath(): retire and replace with strbuf_git_path()

2014-07-12 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 v7 02/31] path.c: make get_pathname() call sites return const char *

2014-07-12 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 v7 04/31] path.c: rename vsnpath() to do_git_path()

2014-07-12 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 v7 01/31] path.c: make get_pathname() return strbuf instead of static buffer

2014-07-12 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 v7 07/31] *.sh: respect $GIT_INDEX_FILE

2014-07-12 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 v7 10/31] commit: use SEQ_DIR instead of hardcoding sequencer

2014-07-12 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 461c3b1..4b9f012 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -156,7 +156,7 @@ static void

[PATCH v7 11/31] $GIT_COMMON_DIR: a new environment variable

2014-07-12 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 v7 17/31] setup.c: convert check_repository_format_gently to use strbuf

2014-07-12 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 v7 16/31] setup.c: detect $GIT_COMMON_DIR in is_git_directory()

2014-07-12 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 v7 21/31] use new wrapper write_file() for simple file writing

2014-07-12 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 v7 19/31] setup.c: support multi-checkout repo setup

2014-07-12 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 v7 08/31] reflog: avoid constructing .lock path with git_path

2014-07-12 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 v7 12/31] git-sh-setup.sh: use rev-parse --git-path to get $GIT_DIR/objects

2014-07-12 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 v7 13/31] *.sh: avoid hardcoding $GIT_DIR/hooks/...

2014-07-12 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 v7 22/31] checkout: support checking out into a new working directory

2014-07-12 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 v7 18/31] setup.c: detect $GIT_COMMON_DIR check_repository_format_gently()

2014-07-12 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 v7 09/31] fast-import: use git_path() for accessing .git dir instead of get_git_dir()

2014-07-12 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 d9c068b..ea426c4 100644 ---

[PATCH v7 15/31] setup.c: convert is_git_directory() to use strbuf

2014-07-12 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 v7 14/31] git-stash: avoid hardcoding $GIT_DIR/logs/....

2014-07-12 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 v7 20/31] wrapper.c: wrapper to open a file, fprintf then close

2014-07-12 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 e3ff7dc..bf4d15e 100644 --- a/cache.h +++ b/cache.h @@ -1359,6 +1359,8 @@ static inline ssize_t

[PATCH v7 27/31] gc: factor out gc.pruneexpire parsing code

2014-07-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/gc.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/builtin/gc.c b/builtin/gc.c index 3bfb990..e38c902 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -55,6 +55,17 @@ static void

[PATCH v7 28/31] gc: support prune --repos

2014-07-12 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 | 11 +++ 2 files changed, 18 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 286e539..57999fa 100644 ---

[PATCH v7 29/31] count-objects: report unused files in $GIT_DIR/repos/...

2014-07-12 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 v7 23/31] checkout: clean up half-prepared directories in --to mode

2014-07-12 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 81adb74..3167fd2 100644 --- a/builtin/checkout.c +++

[PATCH v7 26/31] gc: style change -- no SP before closing bracket

2014-07-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/gc.c b/builtin/gc.c index 8d219d8..3bfb990 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -298,7 +298,7 @@ int cmd_gc(int argc, const char **argv,

[PATCH v7 25/31] prune: strategies for linked checkouts

2014-07-12 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 v7 30/31] git_path(): keep info/sparse-checkout per work-tree

2014-07-12 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

[PATCH v7 24/31] checkout: detach if the branch is already checked out elsewhere

2014-07-12 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 v7 31/31] checkout: don't require a work tree when checking out into a new one

2014-07-12 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

Re: [PATCH v8 4/4] cache-tree: Write updated cache-tree after commit

2014-07-12 Thread Duy Nguyen
On Sat, Jul 12, 2014 at 11:44 AM, David Turner dtur...@twopensource.com wrote: @@ -342,6 +342,15 @@ static char *prepare_index(int argc, const char **argv, const char *prefix, discard_cache(); read_cache_from(index_lock.filename); + if