Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 11:21 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> When deep/in/ is an unrelated repository, and running either >> >> git add deep/in/the >> git add deep/in/the/tree >> >> would add deep/in/the/tree/is-a-leaf.txt to my index, but if I did >> >> git ad

Re: [PATCH v16 7/7] commit: add a commit.verbose config variable

2016-05-05 Thread Pranit Bauva
On Fri, May 6, 2016 at 10:35 AM, Pranit Bauva wrote: > I checked out your branch gitster/pb/commit-verbose-config and tests > from t0040 seem to be failing. Don't worry I will handle those, I will > squash your patch in mine and re-roll it again. I am still unsure how > those tests broke. I will

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Junio C Hamano
Junio C Hamano writes: > When deep/in/ is an unrelated repository, and running either > > git add deep/in/the > git add deep/in/the/tree > > would add deep/in/the/tree/is-a-leaf.txt to my index, but if I did > > git add deep/in > > I'd lose that and suddenly everything there turns int

Re: [git-for-windows] [PATCH] exec_cmd.c, sideband.c, Makefile: avoid multiple PREFIX definitions

2016-05-05 Thread Johannes Sixt
Am 05.05.2016 um 23:28 schrieb Philip Oakley: The short and sweet PREFIX can be confused when used in many places. Rename both usages to better describe their purpose. Noticed when compiling Git for Windows using MSVC/Visual Studio which reports the conflict beteeen the command line definition

Re: [PATCH 11/15] diff: ignore submodules excluded by groups

2016-05-05 Thread Junio C Hamano
Junio C Hamano writes: > The set of submodules you "init" to the working tree are the ones > that are interesting to you. So once the tree is populated, you do > not ever have to look at the "defaultGroup" configuration. You just > need to look at the working tree. > ... I forgot to prefix the

Re: [PATCH v2] git-stash: Don't GPG sign when stashing changes

2016-05-05 Thread Daurnimator
On 3 May 2016 at 11:21, Junio C Hamano wrote: > On Mon, May 2, 2016 at 4:56 PM, Daurnimator wrote: >> On 3 May 2016 at 07:57, Junio C Hamano wrote: >> >> I agree quiltimport should not, but I think filter-branch possibly >> should... at least for your *own* commits. >> I often think of filter-br

Re: [PATCH 3/3] test-parse-options: --expect= option to simplify tests

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 7:57 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> instead of filtering afterwards, i.e. each strbuf_add is guarded by >> an >> >> if (is_interesting_output(...)) >> strbuf_add(...) > > That's a good approach. > > The implementation gets a bit trickier

Re: [PATCH v16 0/7] config commit verbose

2016-05-05 Thread Eric Sunshine
On Thu, May 5, 2016 at 3:21 PM, Junio C Hamano wrote: > Pranit Bauva writes: >> This series of patches add a configuration variable for verbose in >> git-commit. >> >> Changes wrt v15: >> * Remove the previous patch 7/7 and split the tests. Include one in >>initial patch 6/7. The other one i

Re: [PATCH v16 7/7] commit: add a commit.verbose config variable

2016-05-05 Thread Eric Sunshine
On Thu, May 5, 2016 at 3:14 PM, Junio C Hamano wrote: > Pranit Bauva writes: >> +static int config_verbose = -1; /* unspecified */ > > The name does not make it clear that config_verbose is only for > "commit" and not relevant to "status". > >> @@ -1364,6 +1366,8 @@ int cmd_status(int argc, const

Re: [PATCH v16 7/7] commit: add a commit.verbose config variable

2016-05-05 Thread Pranit Bauva
On Fri, May 6, 2016 at 12:44 AM, Junio C Hamano wrote: > Pranit Bauva writes: > >> diff --git a/builtin/commit.c b/builtin/commit.c >> index 391126e..114ffc9 100644 >> --- a/builtin/commit.c >> +++ b/builtin/commit.c >> @@ -113,7 +113,9 @@ static char *edit_message, *use_message; >> static char

Re: [PATCH v4 01/11] add fetch-pack --diag-url tests for some corner cases

2016-05-05 Thread Torsten Bögershausen
On 05.05.16 23:52, Mike Hommey wrote: > On Wed, May 04, 2016 at 07:48:30AM +0900, Mike Hommey wrote: >> On Tue, May 03, 2016 at 09:07:41AM -0700, Junio C Hamano wrote: >>> Mike Hommey writes: >>> t5603-clone-dirname uses url patterns that are not tested with fetch-pack --diag-url, and it

[PATCH] remote-ext: fix typo

2016-05-05 Thread Li Peng
Fix a typo in builtin/remote-ext.c. Signed-off-by: Li Peng --- builtin/remote-ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/remote-ext.c b/builtin/remote-ext.c index 7457c74..88eb8f9 100644 --- a/builtin/remote-ext.c +++ b/builtin/remote-ext.c @@ -168,7 +168,7

Re: [PATCH 3/3] test-parse-options: --expect= option to simplify tests

2016-05-05 Thread Junio C Hamano
Stefan Beller writes: > instead of filtering afterwards, i.e. each strbuf_add is guarded by > an > > if (is_interesting_output(...)) > strbuf_add(...) That's a good approach. The implementation gets a bit trickier than the previous one, but it would look like this. Discard 2/3 and

Re: [PATCH 3/3] test-parse-options: --expect= option to simplify tests

2016-05-05 Thread Eric Sunshine
On Thu, May 5, 2016 at 8:41 PM, Stefan Beller wrote: > On Thu, May 5, 2016 at 2:50 PM, Junio C Hamano wrote: >> [...] >> But the only thing this test cares about is if "quiet: 3" is in the >> output. We should be able to write the above 18 lines with just >> four lines, like this: >> >>

Re: [PATCH] submodule: stop sanitizing config options

2016-05-05 Thread Jeff King
On Thu, May 05, 2016 at 05:23:51PM -0700, Stefan Beller wrote: > >> -/* > >> - * This function is intended as a callback for use with > >> - * git_config_from_parameters(). It ignores any config options which > >> - * are not suitable for passing along to a submodule, and accumulates the > >> res

Re: [PATCH 3/3] test-parse-options: --expect= option to simplify tests

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 2:50 PM, Junio C Hamano wrote: > Existing tests in t0040 follow a rather verbose pattern: > > cat >expect <<\EOF > boolean: 0 > integer: 0 > magnitude: 0 > timestamp: 0 > string: (not set) > abbrev: 7 > verbose:

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 4:54 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> That was my first reaction as well. However after a while of thought I >> actually >> like that bug. Consider the possibilities how gitk/git-gui or other >> subsystems >> can be developed. When accepting a patch

Re: [PATCH] submodule: stop sanitizing config options

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 4:33 PM, Junio C Hamano wrote: > Jeff King writes: > >> I had originally thought after the final one that we could further clean >> up by turning prepare_submodule_repo_env() into a static function. But >> we can't; it gets called in one spot from submodule--helper. However

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Junio C Hamano
Stefan Beller writes: > That was my first reaction as well. However after a while of thought I > actually > like that bug. Consider the possibilities how gitk/git-gui or other subsystems > can be developed. When accepting a patch for that you can either apply the > patch in the outer or inner re

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 4:27 PM, Junio C Hamano wrote: > Stefan Beller writes: > >>> I wonder if the patches mentioned have something to do with the "git >>> add deep/in/the/tree" that fails to notice deep/in/ is an unrelated >>> repository in some way? >> >> Which is considered a feature now. May

Re: [PATCH] submodule: stop sanitizing config options

2016-05-05 Thread Junio C Hamano
Jeff King writes: > I had originally thought after the final one that we could further clean > up by turning prepare_submodule_repo_env() into a static function. But > we can't; it gets called in one spot from submodule--helper. However, > while looking at it, I did notice that we probably want t

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Junio C Hamano
Stefan Beller writes: >> I wonder if the patches mentioned have something to do with the "git >> add deep/in/the/tree" that fails to notice deep/in/ is an unrelated >> repository in some way? > > Which is considered a feature now. Maybe we should add tests for that? > > http://debuggable.com/post

Re: [RFC PATCH] pathspec: get non matching arguments without reporting.

2016-05-05 Thread Junio C Hamano
Junio C Hamano writes: > Stefan Beller writes: > >> When giving more than just pathspec arguments (e.g. submodule labels), >> we need a way to check all non-matching arguments for the pathspec parsing >> if these are the submodule labels or typos. >> >> This patch prepares for that use case by s

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 4:09 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> `check_path_for_gitlink` was introduced in 9d67b61f739a (2013-01-06, >> add.c: extract check_path_for_gitlink() from treat_gitlinks() for reuse) >> but the implementation was removed in 5a76aff1a6 (2013-07-14, add:

Re: [RFC PATCH] pathspec: get non matching arguments without reporting.

2016-05-05 Thread Junio C Hamano
Stefan Beller writes: > When giving more than just pathspec arguments (e.g. submodule labels), > we need a way to check all non-matching arguments for the pathspec parsing > if these are the submodule labels or typos. > > This patch prepares for that use case by splitting up `report_path_error` >

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Junio C Hamano
Stefan Beller writes: > `check_path_for_gitlink` was introduced in 9d67b61f739a (2013-01-06, > add.c: extract check_path_for_gitlink() from treat_gitlinks() for reuse) > but the implementation was removed in 5a76aff1a6 (2013-07-14, add: > convert to use parse_pathspec). > > Remove the declaration

Re: [PATCH 11/15] diff: ignore submodules excluded by groups

2016-05-05 Thread Junio C Hamano
Stefan Beller writes: > I am aware that other operations such as a build system would be glad to > have the contents of the submodules there. But those would not use a > restrictive default group? The set of submodules you "init" to the working tree are the ones that are interesting to you. So

[RFC PATCH] pathspec: get non matching arguments without reporting.

2016-05-05 Thread Stefan Beller
When giving more than just pathspec arguments (e.g. submodule labels), we need a way to check all non-matching arguments for the pathspec parsing if these are the submodule labels or typos. This patch prepares for that use case by splitting up `report_path_error` into a new checking function `unma

Re: [PATCH v8 19/19] untracked-cache: config option

2016-05-05 Thread Junio C Hamano
David Turner writes: > + if (!git_config_get_bool("index.adduntrackedcache", &untracked) && > + untracked && > + !istate->untracked) > + add_untracked_cache(&the_index); The body is indented with HT + 4 spaces, replace it with two HTs. -- To unsubscribe from this list

Re: [PATCH v8 10/19] index-helper: use watchman to avoid refreshing index with lstat()

2016-05-05 Thread Junio C Hamano
David Turner writes: > +extern void write_watchman_ext(struct strbuf *sb, struct index_state* > istate); Asterisk sticks to the variable, not to the type. > + if (c == sb.buf) { > + strbuf_setlen(&sb, 0); > + } Unnecessary braces {}. -- To unsubscribe from this list: send

Re: [PATCH 11/15] diff: ignore submodules excluded by groups

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 3:20 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> The first option is giving nothing: >> >> git config submodule.defaultGroup "*SomeLabel" >> git -C submodule-not-labeled reset --hard HEAD^ >> git status >> # all good, no report about submodul

Re: [PATCH v8 18/19] Add tracing to measure where most of the time is spent

2016-05-05 Thread Junio C Hamano
David Turner writes: > From: Nguyễn Thái Ngọc Duy > Subject: Re: [PATCH v8 18/19] Add tracing to measure where most of the time > is spent trace: measure where the time is spent in the index-heavy operations -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a mes

Re: [PATCH v8 09/19] Add watchman support to reduce index refresh cost

2016-05-05 Thread Junio C Hamano
David Turner writes: > From: Nguyễn Thái Ngọc Duy > Subject: Re: [PATCH v8 09/19] Add watchman support to reduce index refresh > cost Subject: watchman: support watchman to reduce index refresh cost > +static struct watchman_query_result* query_watchman( > + struct index_state *istate, st

Re: [PATCH v8 08/19] read-cache: add watchman 'WAMA' extension

2016-05-05 Thread Junio C Hamano
David Turner writes: > +void write_watchman_ext(struct strbuf *sb, struct index_state* istate) void write_watchman_ext(struct strbuf *sb, struct index_state *istate) Asterisk sticks to the variable, not to the type. -- To unsubscribe from this list: send the line "unsubscribe git" in the body o

[PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Stefan Beller
`check_path_for_gitlink` was introduced in 9d67b61f739a (2013-01-06, add.c: extract check_path_for_gitlink() from treat_gitlinks() for reuse) but the implementation was removed in 5a76aff1a6 (2013-07-14, add: convert to use parse_pathspec). Remove the declaration from the header as well. Signed-o

Re: [PATCH 11/15] diff: ignore submodules excluded by groups

2016-05-05 Thread Junio C Hamano
Stefan Beller writes: > The first option is giving nothing: > > git config submodule.defaultGroup "*SomeLabel" > git -C submodule-not-labeled reset --hard HEAD^ > git status > # all good, no report about submodule-not-labeled > # because it is not in the default group. >

Re: [PATCH] exec_cmd.c, sideband.c, Makefile: avoid multiple PREFIX definitions

2016-05-05 Thread Junio C Hamano
Philip Oakley writes: > The short and sweet PREFIX can be confused when used in many places. > > Rename both usages to better describe their purpose. > > Noticed when compiling Git for Windows using MSVC/Visual Studio which > reports the conflict beteeen the command line definition and the > defi

Re: [PATCH v4 01/11] add fetch-pack --diag-url tests for some corner cases

2016-05-05 Thread Mike Hommey
On Wed, May 04, 2016 at 07:48:30AM +0900, Mike Hommey wrote: > On Tue, May 03, 2016 at 09:07:41AM -0700, Junio C Hamano wrote: > > Mike Hommey writes: > > > > > t5603-clone-dirname uses url patterns that are not tested with > > > fetch-pack --diag-url, and it would be useful if they were. > > > >

[PATCH 1/3] test-parse-options: fix output when callback option fails

2016-05-05 Thread Junio C Hamano
When test-parse-options detects an error on the command line, it gives the usage string just like any parse-options API users do, without showing any "variable dump". An exception is the callback test, where a "variable dump" for the option is done before the command line options are fully parsed.

[PATCH 0/3] test-parse-options update

2016-05-05 Thread Junio C Hamano
During the review of Pranit's "commit.verbose" series, I noticed an overly verbose input and output used to drive test-parse-options helper in t0040. Here is a patch to teach the program to allow us to write the test in a more concise way. I'll leave it as an exercise to the readers to actually u

[PATCH 3/3] test-parse-options: --expect= option to simplify tests

2016-05-05 Thread Junio C Hamano
Existing tests in t0040 follow a rather verbose pattern: cat >expect <<\EOF boolean: 0 integer: 0 magnitude: 0 timestamp: 0 string: (not set) abbrev: 7 verbose: 0 quiet: 3 dry run: no file: (not set) EO

[PATCH 2/3] test-parse-options: hold output in a strbuf

2016-05-05 Thread Junio C Hamano
In this step, all the output is held in a strbuf and unconditionally dumped at the end, so there is no behaviour change (other than that the processing may be a bit slower, now we do the buffering stdio has been doing for us). Signed-off-by: Junio C Hamano --- test-parse-options.c | 30 +

[PATCH v8 16/19] index-helper: autorun mode

2016-05-05 Thread David Turner
Soon, we'll want to automatically start index-helper, so we need a mode that silently exits if it can't start up (either because it's not in a git dir, or because another one is already running). Signed-off-by: David Turner --- Documentation/git-index-helper.txt | 4 index-helper.c

[PATCH v8 04/19] index-helper: add --strict

2016-05-05 Thread David Turner
From: Nguyễn Thái Ngọc Duy There are "holes" in the index-helper approach because the shared memory is not verified again by git. If $USER is compromised, shared memory could be modified. But anyone who could do this could already modify $GIT_DIR/index. A more realistic risk is some bugs in index

[PATCH v8 05/19] index-helper: log warnings

2016-05-05 Thread David Turner
Instead of writing warnings to stderr, write them to a log. Later, we'll probably be daemonized, so writing to stderr will be pointless. Signed-off-by: David Turner --- Documentation/git-index-helper.txt | 3 +++ index-helper.c | 32 2 files

[PATCH v8 06/19] daemonize(): set a flag before exiting the main process

2016-05-05 Thread David Turner
From: Nguyễn Thái Ngọc Duy This allows signal handlers and atexit functions to realize this situation and not clean up. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: David Turner --- builtin/gc.c | 2 +- cache.h | 2 +- daemon.c | 2 +- setup.c | 4 +++- 4 files changed, 6

[PATCH v8 15/19] index-helper: don't run if already running

2016-05-05 Thread David Turner
Signed-off-by: David Turner --- index-helper.c | 7 +++ t/t7900-index-helper.sh | 9 + 2 files changed, 16 insertions(+) diff --git a/index-helper.c b/index-helper.c index 4ed1610..b275f6e 100644 --- a/index-helper.c +++ b/index-helper.c @@ -458,6 +458,13 @@ int main(int arg

[PATCH v8 08/19] read-cache: add watchman 'WAMA' extension

2016-05-05 Thread David Turner
From: Nguyễn Thái Ngọc Duy The extension contains a bitmap, one bit for each entry in the index. If the n-th bit is zero, the n-th entry is considered unchanged, we can ce_mark_uptodate() it without refreshing. If the bit is non-zero and we found out the corresponding file is clean after refresh,

[PATCH v8 02/19] read-cache: allow to keep mmap'd memory after reading

2016-05-05 Thread David Turner
From: Nguyễn Thái Ngọc Duy Later, we will introduce git index-helper to share this memory with other git processes. We only unmap it when we discard the index (although the kernel may of course choose to page it out). Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: David Turner --- cache.

[PATCH v8 18/19] Add tracing to measure where most of the time is spent

2016-05-05 Thread David Turner
From: Nguyễn Thái Ngọc Duy All the known heavy code blocks are measured (except object database access). This should help identify if an optimization is effective or not. An unoptimized git-status would give something like below (92% of time is accounted). To sum up the effort of making git scale

[PATCH v8 13/19] watchman: add a config option to enable the extension

2016-05-05 Thread David Turner
For installations that have centrally-managed configuration, it's easier to set a config once than to run update-index on every repository. Signed-off-by: David Turner --- .gitignore| 1 + Documentation/config.txt | 4 Makefile | 1 + read-ca

[PATCH v8 12/19] unpack-trees: preserve index extensions

2016-05-05 Thread David Turner
Make git checkout (and other unpack_tree operations) preserve the untracked cache and watchman status. This is valuable for two reasons: 1. Often, an unpack_tree operation will not touch large parts of the working tree, and thus most of the untracked cache will continue to be valid. 2. Even if th

[PATCH v8 11/19] update-index: enable/disable watchman support

2016-05-05 Thread David Turner
From: Nguyễn Thái Ngọc Duy Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: David Turner --- Documentation/git-index-helper.txt | 3 +++ Documentation/git-update-index.txt | 6 ++ builtin/update-index.c | 16 3 files changed, 25 insertions(+) diff --git a/

[PATCH v8 07/19] index-helper: add --detach

2016-05-05 Thread David Turner
From: Nguyễn Thái Ngọc Duy We detach after creating and opening the socket, because otherwise we might return control to the shell before index-helper is ready to accept commands. This might lead to flaky tests. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: David Turner --- Documentatio

[PATCH v8 19/19] untracked-cache: config option

2016-05-05 Thread David Turner
Add a config option to populate the untracked cache. For installations that have centrally-managed configuration, it's easier to set a config once than to run update-index on every repository. Signed-off-by: David Turner --- Documentation/config.txt | 4 read-cache.c | 7 ++

[PATCH v8 09/19] Add watchman support to reduce index refresh cost

2016-05-05 Thread David Turner
From: Nguyễn Thái Ngọc Duy The previous patch has the logic to clear bits in 'WAMA' bitmap. This patch has logic to set bits as told by watchman. The missing bit, _using_ these bits, are not here yet. A lot of this code is written by David Turner originally, mostly from [1]. I'm just copying and

[PATCH v8 03/19] index-helper: new daemon for caching index and related stuff

2016-05-05 Thread David Turner
From: Nguyễn Thái Ngọc Duy Instead of reading the index from disk and worrying about disk corruption, the index is cached in memory (memory bit-flips happen too, but hopefully less often). The result is faster read. Read time is reduced by 70%. The biggest gain is not having to verify the traili

[PATCH v8 14/19] index-helper: kill mode

2016-05-05 Thread David Turner
Add a new command (and command-line arg) to allow index-helpers to exit cleanly. This is mainly useful for tests. Signed-off-by: David Turner --- Documentation/git-index-helper.txt | 3 +++ index-helper.c | 31 ++- t/t7900-index-helper.sh

[PATCH v8 17/19] index-helper: optionally automatically run

2016-05-05 Thread David Turner
Introduce a new config option, indexhelper.autorun, to automatically run git index-helper before starting up a builtin git command. This enables users to keep index-helper running without manual intervention. Signed-off-by: David Turner --- Documentation/config.txt | 4 read-cache.c

[PATCH v8 10/19] index-helper: use watchman to avoid refreshing index with lstat()

2016-05-05 Thread David Turner
From: Nguyễn Thái Ngọc Duy Watchman is hidden behind index-helper. Before git tries to read the index from shm, it notifies index-helper through the socket and waits for index-helper to prepare a file for sharing memory (with MAP_SHARED). index-helper then contacts watchman, updates 'WAMA' extens

[PATCH v8 00/19] index-helper/watchman

2016-05-05 Thread David Turner
This version corrects defects noticed by Ramsay Jones: index-helper now works when USE_WATCHMAN is not set sigpipe is handled post-test cleanup is improved a test now uses a more idiomatic check restored an index verification check from a previous version of the series David Turner (8): index-he

[PATCH v8 01/19] read-cache.c: fix constness of verify_hdr()

2016-05-05 Thread David Turner
From: Nguyễn Thái Ngọc Duy Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: David Turner --- read-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/read-cache.c b/read-cache.c index d9fb78b..16cc487 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1345,7 +1345,7 @@

Re: /* compiler workaround */ - what was the issue?

2016-05-05 Thread Junio C Hamano
"Philip Oakley" writes: > int saved_namelen = saved_namelen; /* compiler workaround */ > > Which then becomes an MSVC compile warning C4700: uninitialized local > variable. > > I'm wondering what was the compiler workaround being referred to? i.e. why > does it need that tweak? There's no m

Re: unary minus operator applied to unsigned type, result still unsigned?

2016-05-05 Thread Philip Oakley
From: "Junio C Hamano" "Philip Oakley" writes: I'm working on building Git on Visual Studio as part of the Git for Windows capability. The MSVC compiler is reporting: 1>..\sha1-lookup.c(100) : warning C4146: unary minus operator applied to unsigned type, result still unsigned 1>..\sha1-

Re: t7900-*.sh tesr #5 failure

2016-05-05 Thread David Turner
On Tue, 2016-05-03 at 22:34 +0100, Ramsay Jones wrote: > Hi David, > > Test t7900.5 fails for me, thus: > > $ ./t7900-index-helper.sh -i -v -x -d > > ... > > + test -S .git/index-helper.sock > + git status > On branch master > Untracked files: > (use "git add ..." to include

[PATCH] exec_cmd.c, sideband.c, Makefile: avoid multiple PREFIX definitions

2016-05-05 Thread Philip Oakley
The short and sweet PREFIX can be confused when used in many places. Rename both usages to better describe their purpose. Noticed when compiling Git for Windows using MSVC/Visual Studio which reports the conflict beteeen the command line definition and the definition in sideband.c Signed-off-by:

[PATCH] Conflicting PREFIX usage

2016-05-05 Thread Philip Oakley
While trying to resurrect the MSVC/Visual Studio capability for Git for Windows I noticed this little nuance. The PREFIX in Windows was introduced in 35fb0e8 (Compute prefix at runtime if RUNTIME_PREFIX is set, 2009-01-18) and in sideband.c at ebe8fa7 (fix display overlap between remote and local

Re: [PATCH 11/15] diff: ignore submodules excluded by groups

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 1:19 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Any thoughts on my thoughts below? >> >>> So here is a thought experiment: >>> >>> # get all submodules into the work tree >>> git submodule update --recursive --init >>> >>> # The selected default grou

Re: [PATCHv5] submodule deinit: require '--all' instead of '.' for all submodules

2016-05-05 Thread Junio C Hamano
On Thu, May 5, 2016 at 1:37 PM, Jonathan Nieder wrote: > Stefan Beller wrote: > >>>$ rungit v2.6.6 submodule deinit . >>>error: pathspec '.' did not match any file(s) known to git. >>>Did you forget to 'git add'? > [...] >> So instead of a pathspec add the '--all' option to

/* compiler workaround */ - what was the issue?

2016-05-05 Thread Philip Oakley
Duy, In https://github.com/git-for-windows/git/commit/b3c96fb158f05152336f167076f5d81d23c3a5e5 (split-index: strip pathname of on-disk replaced entries, 13 Jun 2014) Nguyễn Thái Ngọc Duy you have read-cache.c#L1790 (in that commit, now ~L1873) int saved_namelen = saved_namelen; /* compi

Re: [PATCHv5] submodule deinit: require '--all' instead of '.' for all submodules

2016-05-05 Thread Jonathan Nieder
Stefan Beller wrote: >>$ rungit v2.6.6 submodule deinit . >>error: pathspec '.' did not match any file(s) known to git. >>Did you forget to 'git add'? [...] > So instead of a pathspec add the '--all' option to deinit all submodules > and add a test to check for the corner c

Re: [PATCH 11/15] diff: ignore submodules excluded by groups

2016-05-05 Thread Junio C Hamano
Stefan Beller writes: > Any thoughts on my thoughts below? > >> So here is a thought experiment: >> >> # get all submodules into the work tree >> git submodule update --recursive --init >> >> # The selected default group will not include all submodules >> git config submodule.defa

Re: [PATCH] submodule: stop sanitizing config options

2016-05-05 Thread Jeff King
On Thu, May 05, 2016 at 09:59:15AM -0700, Junio C Hamano wrote: > Sorry for the trouble. > > I queued jk/submodule-c-credential to be mergeable to 'maint', as it > could be argued two ways. We can say that not propagating -c down > is a bug and the series is a bugfix. Or it is merely a known >

Re: [PATCH 80/83] run-command: make dup_devnull() non static

2016-05-05 Thread Johannes Sixt
Am 05.05.2016 um 11:50 schrieb Christian Couder: On Mon, Apr 25, 2016 at 5:05 PM, Johannes Schindelin wrote: Hi Chris, On Sun, 24 Apr 2016, Christian Couder wrote: diff --git a/run-command.c b/run-command.c index 8c7115a..29d2bda 100644 --- a/run-command.c +++ b/run-command.c @@ -85,7 +85,7

Re: [PATCH v6 1/2] http: support sending custom HTTP headers

2016-05-05 Thread Jeff King
On Thu, May 05, 2016 at 09:10:21PM +0200, Lars Schneider wrote: > > + > > + > > + Require expr %{HTTP:x-magic-one} == 'abra' > > + Require expr %{HTTP:x-magic-two} == 'cadabra' > > + > > I think "" depends on mod_authz_core which is only > available in Apache HTTPD 2.3 o

Re: [PATCH 11/15] diff: ignore submodules excluded by groups

2016-05-05 Thread Stefan Beller
Any thoughts on my thoughts below? On Fri, Apr 29, 2016 at 12:17 PM, Stefan Beller wrote: > On Fri, Apr 29, 2016 at 11:37 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> We do not need to do anything special to initialize the `submodule_groups` >>> pointer as the diff options setup wi

[PATCHv5] submodule deinit: require '--all' instead of '.' for all submodules

2016-05-05 Thread Stefan Beller
The discussion in [1] pointed out that '.' is a faulty suggestion as there is a corner case where it fails: > "submodule deinit ." may have "worked" in the sense that you would > have at least one path in your tree and avoided this "nothing > matches" most of the time. It would have still failed

Re: [PATCH] git-gui: l10n: add Portuguese translation

2016-05-05 Thread Vasco Almeida
Às 11:23 de 05-05-2016, Vasco Almeida escreveu: > Add Portuguese glossary. > > Signed-off-by: Vasco Almeida > --- > po/glossary/pt_pt.po | 177 > po/pt_pt.po | 2574 ++ > 2 files changed, 2751 insertions(+) > create mode 100644 po/gl

Re: [PATCH v6 1/2] http: support sending custom HTTP headers

2016-05-05 Thread Junio C Hamano
Lars Schneider writes: [administrivia: next time please snip the 224 lines you are not responding to when commenting on only five lines]. >> + >> + >> +Require expr %{HTTP:x-magic-one} == 'abra' >> +Require expr %{HTTP:x-magic-two} == 'cadabra' >> + > > I think ""

Re: [PATCHv4] submodule deinit: require '--all' instead of '.' for all submodules

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 12:20 PM, Jonathan Nieder wrote: > Junio C Hamano wrote: >> Jonathan Nieder writes: > >>> I mean low level as in implementation detail. The human user would >>> wonder "what is incompatible about them? Why are you stopping me from >>> what I am trying to do?" >> >> Maybe

Re: Submodule's .git file contains absolute path when created using 'git clone --recursive'

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 12:20 PM, Loet Avramson wrote: > It happened on 2.8.1, also reproducible on 2.8.2. > Haven't had the time to dive deeper into the code but my guess is that > relative_path() returns different results in those 2 cases or maybe > the way git-submodule.sh handles it. > Then yo

Re: [PATCH v16 0/7] config commit verbose

2016-05-05 Thread Junio C Hamano
Pranit Bauva writes: > This series of patches add a configuration variable for verbose in > git-commit. > > Link to v15: > http://thread.gmane.org/gmane.comp.version-control.git/293127 > > Changes wrt v15: > * Remove the previous patch 7/7 and split the tests. Include one in >initial patch 6

Re: Submodule's .git file contains absolute path when created using 'git clone --recursive'

2016-05-05 Thread Loet Avramson
It happened on 2.8.1, also reproducible on 2.8.2. Haven't had the time to dive deeper into the code but my guess is that relative_path() returns different results in those 2 cases or maybe the way git-submodule.sh handles it. On Thu, May 5, 2016 at 8:22 PM, Stefan Beller wrote: > On Thu, May 5, 2

Re: [PATCHv4] submodule deinit: require '--all' instead of '.' for all submodules

2016-05-05 Thread Jonathan Nieder
Junio C Hamano wrote: > Jonathan Nieder writes: >> I mean low level as in implementation detail. The human user would >> wonder "what is incompatible about them? Why are you stopping me from >> what I am trying to do?" > > Maybe s/incompatible/inconsistent/ is what you are after? Why are > you

Re: [PATCH v16 7/7] commit: add a commit.verbose config variable

2016-05-05 Thread Junio C Hamano
Pranit Bauva writes: > diff --git a/builtin/commit.c b/builtin/commit.c > index 391126e..114ffc9 100644 > --- a/builtin/commit.c > +++ b/builtin/commit.c > @@ -113,7 +113,9 @@ static char *edit_message, *use_message; > static char *fixup_message, *squash_message; > static int all, also, interac

Re: [PATCH v6 1/2] http: support sending custom HTTP headers

2016-05-05 Thread Lars Schneider
On 04 May 2016, at 08:14, Johannes Schindelin wrote: > We introduce a way to send custom HTTP headers with all requests. > > This allows us, for example, to send an extra token from build agents > for temporary access to private repositories. (This is the use case that > triggered this patch.)

Re: [PATCHv4] submodule deinit: require '--all' instead of '.' for all submodules

2016-05-05 Thread Stefan Beller
On Wed, May 4, 2016 at 4:59 PM, Jonathan Nieder wrote: >>> >>> Another option would be to call 'usage' and be done. >> >> I had that idea as well, but I think pointing out the low level is better >> than giving the high level again, so the user immediately sees what's wrong. > > I mean low level

Re: [PATCHv4] submodule deinit: require '--all' instead of '.' for all submodules

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 10:59 AM, Junio C Hamano wrote: > Stefan Beller writes: > +When the command is run without pathspec, it errors out, +instead of deinit-ing everything, to prevent mistakes. In +version 2.8 and before the command gave a suggestion to use +'.' to unregister

Re: [PATCHv4] submodule deinit: require '--all' instead of '.' for all submodules

2016-05-05 Thread Junio C Hamano
Jonathan Nieder writes: > I mean low level as in implementation detail. The human user would > wonder "what is incompatible about them? Why are you stopping me from > what I am trying to do?" Maybe s/incompatible/inconsistent/ is what you are after? Why are you stopping me from what I am tryi

[PATCH v2] gitk: Add Portuguese translation

2016-05-05 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- po/pt_pt.po | 1376 +++ 1 file changed, 1376 insertions(+) create mode 100644 po/pt_pt.po diff --git a/po/pt_pt.po b/po/pt_pt.po new file mode 100644 index 000..c181acc --- /dev/null +++ b/po/pt_pt.po @

Re: [PATCHv4] submodule deinit: require '--all' instead of '.' for all submodules

2016-05-05 Thread Junio C Hamano
Stefan Beller writes: >>> +When the command is run without pathspec, it errors out, >>> +instead of deinit-ing everything, to prevent mistakes. In >>> +version 2.8 and before the command gave a suggestion to use >>> +'.' to unregister all submodules when it was invoked without >>> +any argument,

[PATCH] gitk: Makefile: create install bin directory

2016-05-05 Thread Vasco Almeida
Force creation of destination bin directory. Before this commit, gitk would fail to install if this directory didn't already exist. Signed-off-by: Vasco Almeida --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 5acdc90..5bdd52a 100644 --- a/Makefile +++ b

Re: [PATCH] git-gui: Do not reset author details on amend

2016-05-05 Thread Junio C Hamano
Pat, we haven't heard from you for a long time. Are you still around and interested in helping us by maintaining git-gui? Otherwise we may have to start recruiting a volunteer or two to take this over. Thanks. Orgad Shaneh writes: > git commit --amend preserves the author details unless --res

Re: Submodule's .git file contains absolute path when created using 'git clone --recursive'

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 5:51 AM, Loet Avramson wrote: > Hi, > > According to git-clone man page - running 'git clone --recursive' "...is > equivalent to running 'git submodule update --init --recursive' immediately > after the clone is finished...", though I found a little difference between > the

Re: Submodule's .git file contains absolute path when created using 'git clone --recursive'

2016-05-05 Thread Junio C Hamano
Loet Avramson writes: > According to git-clone man page - running 'git clone --recursive' "...is > equivalent to running 'git submodule update --init --recursive' immediately > after the clone is finished...", though I found a little difference between > the two regarding the submodule's .git

Re: [PATCH] submodule: stop sanitizing config options

2016-05-05 Thread Junio C Hamano
Jeff King writes: > Here's a version of my patch that should apply for you (no > semantic changes, just differences in the surrounding context): Sorry for the trouble. I queued jk/submodule-c-credential to be mergeable to 'maint', as it could be argued two ways. We can say that not propagating

Re: [RFC PATCH] gc --auto: don't lie about running in background on Windows

2016-05-05 Thread Junio C Hamano
SZEDER Gábor writes: > Arguably this helper function could be just a simple variable. I > opted for a function because: > > - I preferred a single '#ifdef NO_POSIX_GOODIES', and putting a > static variable so near to EOF felt just wrong. (And this is why > it's not an inline-able func

[RFC PATCH] gc --auto: don't lie about running in background on Windows

2016-05-05 Thread SZEDER Gábor
When 'git gc --auto' is invoked it tells the user whether it is about to auto pack the repository in the background or in the foreground depending on 'gc.autoDetach' (enabled by default). However, going to the background is not supported at all on Windows, yet 'git gc --auto' by default claims tha

Re: [PATCH] t5510: run auto-gc in the foreground

2016-05-05 Thread SZEDER Gábor
Quoting Johannes Schindelin : Hi Gábor, On Tue, 3 May 2016, SZEDER Gábor wrote: Quoting SZEDER Gábor : >Quoting Johannes Schindelin : > > >Hi Gábor, > > > >On Sun, 1 May 2016, SZEDER Gábor wrote: > > > > >diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh > > >index 38321d19efbe..454d896390c0

[PATCH] git-gui: Do not reset author details on amend

2016-05-05 Thread Orgad Shaneh
git commit --amend preserves the author details unless --reset-author is given. git-gui discards the author details on amend. Fix by reading the author details along with the commit message, and setting the appropriate environment variables required for preserving them. Reported long ago in the

  1   2   >