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

2016-05-06 Thread Jeff King
On Fri, May 06, 2016 at 08:33:15AM -0700, Junio C Hamano wrote: > > Then I replied: > > > >However, that doesn't mean that we have to spread this badly chosen > >name from options to config variables, does it? I think that if we > >are going to define a new config variable today,

Re: [PATCH] t: fix duplicate words of "output"

2016-05-06 Thread Ilya Bobyr
On 5/6/2016 10:26 AM, Junio C Hamano wrote: > Li Peng writes: > >> Fix duplicate words of "output" in comment. >> >> Signed-off-by: Li Peng >> --- >> t/t-basic.sh | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/t/t-basic.sh

[PATCH] gitweb: fix link to parent diff with pathinfo

2016-05-06 Thread Richard Braun
Gitweb, when used with PATH_INFO, shows a link to parent diff like http://somedomain/somerepo.git/commitdiff/somehash?hp=parenthash. That link reports "400 - Invalid hash parameter". As I understand it, it should instead directly point to the parent diff, i.e. turn it into

Re: [PATCH v5 2/2] bisect: rewrite `check_term_format` shell function in C

2016-05-06 Thread Eric Sunshine
On Fri, May 6, 2016 at 10:49 AM, Pranit Bauva wrote: > Reimplement the `check_term_format` shell function in C and add > a `--check-term-format` subcommand to `git bisect--helper` to call it > from git-bisect.sh > > Using `--check-term-format` subcommand is a temporary

Re: [PATCH] t3513: do not compress backup tar file

2016-05-06 Thread Stefan Beller
On Fri, May 6, 2016 at 3:45 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Armin Kunaschik wrote: >>> I'm trying to compile/test/use git 2.8.2 on AIX 6.1 with >>> no bash available. >> ... >>> make test does not make it

What's cooking in git.git (May 2016, #02; Fri, 6)

2016-05-06 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. The 'master' branch now has the

Re: [PATCH] t3513: do not compress backup tar file

2016-05-06 Thread Junio C Hamano
Stefan Beller writes: > Armin Kunaschik wrote: >> I'm trying to compile/test/use git 2.8.2 on AIX 6.1 with >> no bash available. > ... >> make test does not make it through t3513-revert-submodule.sh anymore. >> The test is not portable since it uses

Re: [PATCH] gitweb: fix link to parent diff with pathinfo

2016-05-06 Thread Junio C Hamano
Richard Braun writes: > Signed-off-by: Richard Braun > --- Could you justify your change with a bit more than "fix"? That is, gitweb, when used with PATH_INFO, shows a link to parent diff like [fill in the blank]. However, it is wrong because

Re: [PATCH v5 0/2] bisect--helper: rewrite of check-term-format()

2016-05-06 Thread Junio C Hamano
Pranit Bauva writes: > A very interesting fact to note: > I made a mistake by dropping of the first argument 'term' in the function > one_of() and compiled and the test suite passed fully (which was pointed > out by Christian). This shows that the test coverage is

Re: [PATCH v3 1/2] rev-parse tests: add tests executed from a subdirectory

2016-05-06 Thread Junio C Hamano
Michael Rappazzo writes: > t1500-rev-parse contains envrionment leaks (changing dir without > changing back, setting config variables, etc). Add a test to clean this > up up so that future tests can be added without worry of any setting > from a previous test. This is a

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

2016-05-06 Thread Ramsay Jones
On 06/05/16 21:21, Ramsay Jones wrote: > On 06/05/16 19:54, Junio C Hamano wrote: >> Ramsay Jones writes: >> [snip] > I still can't get gcc to complain, e.g. (on top of above): > > $ git diff > diff --git a/builtin/rev-list.c b/builtin/rev-list.c > index

Re: [PATCH 78/83] Move libified code from builtin/apply.c to apply.{c,h}

2016-05-06 Thread Junio C Hamano
Christian Couder writes: > By the way does someone know how such a patch can be applied? Perhaps this one? http://thread.gmane.org/gmane.linux.kernel/1879635 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to

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

2016-05-06 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > On Fri, May 6, 2016 at 6:16 PM, Pranit Bauva wrote: >> [+cc:git@vger.kernel.org] Because its an interesting fact to be shared >> which isn't covered elsewhere. >> >> On Fri, May 6, 2016 at 2:53 AM, Ævar Arnfjörð

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

2016-05-06 Thread Marc Branchaud
On 2016-05-06 03:57 PM, Junio C Hamano wrote: Marc Branchaud writes: On 2016-05-06 02:54 PM, Junio C Hamano wrote: I wonder if can we come up with a short and sweet notation to remind futhre readers that this "initialization" is not initializing but merely squelching

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

2016-05-06 Thread Ramsay Jones
On 06/05/16 19:54, Junio C Hamano wrote: > Ramsay Jones writes: > >> The patch below applies to master (I haven't checked for any more >> additions). >> >> if (bisect_list) { >> -int reaches = reaches, all = all; >> +int reaches = 0,

Re: [PATCH 78/83] Move libified code from builtin/apply.c to apply.{c,h}

2016-05-06 Thread Christian Couder
On Thu, May 5, 2016 at 10:50 AM, Christian Couder wrote: > On Wed, May 4, 2016 at 1:32 PM, Duy Nguyen wrote: >> On Wed, May 4, 2016 at 5:39 PM, Christian Couder >> wrote: >>> >>> Right now I get: >>> git log

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-06 Thread Junio C Hamano
Stefan Beller writes: > It was a bug, but now people in the outside world consider it a feature. > Search for "Git fake submodules" and you'll find a few users who use this > technique successfully. > > I do not think fixing this bug would do good. So maybe we just let it

Re: [PATCH] submodule: stop sanitizing config options

2016-05-06 Thread Junio C Hamano
Stefan Beller writes: >> Hmph, Stefan, do you want to keep this (if you want to resurrect the >> function in some future, for example)? > > IMHO it is easier to revert or rewrite than to carry unused code? > Unused code is not tested and untested code is broken code. > And

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

2016-05-06 Thread Stefan Beller
On Fri, May 6, 2016 at 12:57 PM, Junio C Hamano wrote: > Marc Branchaud writes: > >> On 2016-05-06 02:54 PM, Junio C Hamano wrote: >>> >>> I wonder if can we come up with a short and sweet notation to remind >>> futhre readers that this "initialization"

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

2016-05-06 Thread Junio C Hamano
Marc Branchaud writes: > On 2016-05-06 02:54 PM, Junio C Hamano wrote: >> >> I wonder if can we come up with a short and sweet notation to remind >> futhre readers that this "initialization" is not initializing but >> merely squelching warnings from stupid compilers, and

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

2016-05-06 Thread Ævar Arnfjörð Bjarmason
On Fri, May 6, 2016 at 6:16 PM, Pranit Bauva wrote: > [+cc:git@vger.kernel.org] Because its an interesting fact to be shared > which isn't covered elsewhere. > > On Fri, May 6, 2016 at 2:53 AM, Ævar Arnfjörð Bjarmason > wrote: >> Sending this privately

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

2016-05-06 Thread Marc Branchaud
On 2016-05-06 02:54 PM, Junio C Hamano wrote: I wonder if can we come up with a short and sweet notation to remind futhre readers that this "initialization" is not initializing but merely squelching warnings from stupid compilers, and agree to use it consistently? Perhaps #define

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-06 Thread Stefan Beller
On Fri, May 6, 2016 at 12:02 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> On Fri, May 6, 2016 at 3:30 AM, Duy Nguyen wrote: >>> On Fri, May 6, 2016 at 6:27 AM, Junio C Hamano wrote: Stefan Beller

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-06 Thread Junio C Hamano
Stefan Beller writes: > On Fri, May 6, 2016 at 3:30 AM, Duy Nguyen wrote: >> On Fri, May 6, 2016 at 6:27 AM, Junio C Hamano wrote: >>> Stefan Beller writes: >>> > I wonder if the patches mentioned have something

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

2016-05-06 Thread Junio C Hamano
Stefan Beller writes: >> Further suppose that the user needs to view a submodule outside the >> default group temporarily (imagine: for a day or two), while >> carrying out some specific task. Perhaps she is working on the >> documentation submodule, which is her primary

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

2016-05-06 Thread Junio C Hamano
Ramsay Jones writes: > The patch below applies to master (I haven't checked for any more > additions). > > if (bisect_list) { > - int reaches = reaches, all = all; > + int reaches = 0, all = 0; One thing that is somewhat sad is that

[PATCH] t3513: do not compress backup tar file

2016-05-06 Thread Stefan Beller
Armin Kunaschik wrote: > I'm trying to compile/test/use git 2.8.2 on AIX 6.1 with > no bash available. ... > make test does not make it through t3513-revert-submodule.sh anymore. > The test is not portable since it uses the z-flags of GNU-tar. When -z > is removed, (and

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

2016-05-06 Thread Philip Oakley
From: "Ramsay Jones" On 06/05/16 14:15, Philip Oakley wrote: From: "Duy Nguyen" On Fri, May 6, 2016 at 4:41 AM, Junio C Hamano wrote: "Philip Oakley" writes: int saved_namelen = saved_namelen;

Re: [PATCH] utf8: fix duplicate words of "the"

2016-05-06 Thread Junio C Hamano
Junio C Hamano writes: > Jeff King writes: >> >> IMHO it would be fine to just do all of these in a single patch. They're >> different files, yes, but it's all conceptually the same change. > > I can squash them into a single one. So far, everything except two

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

2016-05-06 Thread Stefan Beller
On Thu, May 5, 2016 at 11:08 PM, Junio C Hamano wrote: > 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

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

2016-05-06 Thread Ramsay Jones
On 06/05/16 14:15, Philip Oakley wrote: > From: "Duy Nguyen" >> On Fri, May 6, 2016 at 4:41 AM, Junio C Hamano wrote: >>> "Philip Oakley" writes: >>> int saved_namelen = saved_namelen; /* compiler workaround */

[PATCH] t0040: remove unused test helpers

2016-05-06 Thread Junio C Hamano
9a001381 (Fix tests under GETTEXT_POISON on parseopt, 2012-08-27) introduced check_i18n, but the helper was never used from the beginning. The same commit also introduced check_unknown_i18n to replace the helper check_unknown and changed all users of the latter to use the former, but failed to

OK DEAR

2016-05-06 Thread mpmlmmawvx7958
My greeting to you over there and i hope all is fine, how are you doing, please my dear i saw your profile on FB and i became interested to know more about you, and i hope it will be the same from you, please i will like you to contact me to my email so that i will tell you more about me below,(

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

2016-05-06 Thread Junio C Hamano
Stefan Beller writes: >> + if (!item) >> + ; /* not among entries being checked */ >> + else { >> + if (strcmp((const char *)item->util, buf.buf)) { >> + printf("expected

Re: [PATCH] utf8: fix duplicate words of "the"

2016-05-06 Thread Junio C Hamano
Jeff King writes: > On Fri, May 06, 2016 at 08:31:33PM +0800, Li Peng wrote: > >> Fix duplicate words of "the" in comment. > > Obviously a good change, along with the other one of mine you found. > >> --- >> transport-helper.c | 2 +- >> utf8.h | 2 +- >> 2 files

Re: [PATCH] t: fix duplicate words of "output"

2016-05-06 Thread Junio C Hamano
Li Peng writes: > Fix duplicate words of "output" in comment. > > Signed-off-by: Li Peng > --- > t/t-basic.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/t/t-basic.sh b/t/t-basic.sh > index 79b9074..60811a3 100755 >

Re: [PATCH] mingw: introduce the 'core.hideDotFiles' setting

2016-05-06 Thread Junio C Hamano
Junio C Hamano writes: > If you are sure we do not need that, that is one less reason we > would be better off without mark_as_git_dir(). Oops. To many rounds of rewriting followed by a rather careless final round of reading. I couldn't decide between "That is one less

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-06 Thread Stefan Beller
On Fri, May 6, 2016 at 3:30 AM, Duy Nguyen wrote: > On Fri, May 6, 2016 at 6:27 AM, 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"

Re: [PATCH v8 10/10] ce_compare_data() did not respect conversion

2016-05-06 Thread Junio C Hamano
Torsten Bögershausen writes: > We only need to pay extra attention when there is an external > clean/smudge filter defined - otherwise we should be able to skip > it - after 10/10. The last two words worries me. The goal of the suggested fix was to make sure that $ git

Re: [PATCH v2 1/4] rev-parse: fix some options when executed from subpath of main tree

2016-05-06 Thread Junio C Hamano
SZEDER Gábor writes: >> I agree with this, but at one point Junio suggested that it should >> return the relative path[1], > > I wasn't aware of Junio's suggestion. Mike justified his position to change everything to absolute, citing that it is what "rev-parse

Re: Portability of git shell scripts?

2016-05-06 Thread Armin Kunaschik
On Wed, May 4, 2016 at 11:20 PM, Jeff King wrote: > On Wed, May 04, 2016 at 08:17:38PM +0200, Armin Kunaschik wrote: > >> I'm trying to compile/test/use git 2.8.2 on AIX 6.1 with no bash available. >> /bin/sh is a hard link to /bin/ksh which is a ksh88, a posix shell. >> Is this

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

2016-05-06 Thread Junio C Hamano
Dropped "git-for-windows" from the Cc: list, as I seem to be getting bounces from it due to its moderation policy. "Philip Oakley" writes: > Perhaps EXEC_CMD_PREFIX, for that is what it is? That name is doubly wrong, I have to say. This

Re: [PATCH] mingw: introduce the 'core.hideDotFiles' setting

2016-05-06 Thread Junio C Hamano
Johannes Schindelin writes: >> I agree with the goal of the change, but I am having a hard time >> justifying this addition. Primarily because I do not understand the >> need for this. >> >> In order to be prepared to handle HIDE_DOTFILES_TRUE case, >> mingw_mkdir()

[PATCH v2 33/33] lock_ref_sha1_basic(): only handle REF_NODEREF mode

2016-05-06 Thread Michael Haggerty
Now lock_ref_sha1_basic() is only called with flags==REF_NODEREF. So we don't have to handle other cases anymore. This enables several simplifications, the most interesting of which come from the fact that ref_lock::orig_ref_name is now always the same as ref_lock::ref_name: * Remove

[PATCH v2 22/33] refs: allow log-only updates

2016-05-06 Thread Michael Haggerty
From: David Turner The refs infrastructure learns about log-only ref updates, which only update the reflog. Later, we will use this to separate symbolic reference resolution from ref updating. Signed-off-by: David Turner Signed-off-by: Junio

[PATCH v2 20/33] ref_transaction_commit(): correctly report close_ref() failure

2016-05-06 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 1 + 1 file changed, 1 insertion(+) diff --git a/refs/files-backend.c b/refs/files-backend.c index 7cc680a..f4f7953 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -3139,6 +3139,7 @@ int

[PATCH v2 09/33] commit_ref_update(): write error message to *err, not stderr

2016-05-06 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 0cc116d..2d3a8c6 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -2719,7 +2719,7 @@

[PATCH v2 18/33] refs: make error messages more consistent

2016-05-06 Thread Michael Haggerty
* Always start error messages with a lower-case letter. * Always enclose reference names in single quotes. Signed-off-by: Michael Haggerty --- refs.c| 8 refs/files-backend.c | 32 t/t1400-update-ref.sh | 4 ++--

[PATCH v2 30/33] lock_ref_for_update(): don't re-read non-symbolic references

2016-05-06 Thread Michael Haggerty
Before the previous patch, our first read of the reference happened before the reference was locked, so we couldn't trust its value and had to read it again. But now that our first read of the reference happens after acquiring the lock, there is no need to read it a second time. So move the

[PATCH v2 11/33] ref_transaction_commit(): remove local variable n

2016-05-06 Thread Michael Haggerty
This microoptimization doesn't make a significant difference in speed. And it causes problems if somebody ever wants to modify the function to add updates to a transaction as part of processing it, as will happen shortly. Make the same change in initial_ref_transaction_commit(). Signed-off-by:

[PATCH v2 19/33] ref_transaction_create(): disallow recursive pruning

2016-05-06 Thread Michael Haggerty
It is nonsensical (and a little bit dangerous) to use REF_ISPRUNING without REF_NODEREF. Forbid it explicitly. Change the one REF_ISPRUNING caller to pass REF_NODEREF too. Signed-off-by: Michael Haggerty --- refs.c | 3 +++ refs/files-backend.c | 2 +-

[PATCH v2 10/33] rename_ref(): remove unneeded local variable

2016-05-06 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 2d3a8c6..80d346f 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -2360,20

[PATCH v2 26/33] lock_ref_for_update(): new function

2016-05-06 Thread Michael Haggerty
Extract a new function, lock_ref_for_update(), from ref_transaction_commit(). Signed-off-by: Michael Haggerty --- refs/files-backend.c | 152 --- 1 file changed, 85 insertions(+), 67 deletions(-) diff --git

[PATCH v2 14/33] read_raw_ref(): rename symref argument to referent

2016-05-06 Thread Michael Haggerty
After all, it doesn't hold the symbolic reference, but rather the reference referred to. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 21 +++-- refs/refs-internal.h | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git

[PATCH v2 16/33] read_raw_ref(): move docstring to header file

2016-05-06 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 38 -- refs/refs-internal.h | 38 ++ 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/refs/files-backend.c

[PATCH v2 21/33] delete_branches(): use resolve_refdup()

2016-05-06 Thread Michael Haggerty
The return value of resolve_ref_unsafe() is not guaranteed to stay around as long as we need it, so use resolve_refdup() instead. Signed-off-by: Michael Haggerty --- builtin/branch.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git

[PATCH v2 02/33] commit_ref(): if there is an empty dir in the way, delete it

2016-05-06 Thread Michael Haggerty
Part of the bug revealed in the last commit is that resolve_ref_unsafe() incorrectly returns EISDIR if it finds a directory in the place where it is looking for a loose reference, even if the corresponding packed reference exists. lock_ref_sha1_basic() notices the bogus EISDIR, and use it as an

[PATCH v2 29/33] refs: resolve symbolic refs first

2016-05-06 Thread Michael Haggerty
Before committing ref updates, split symbolic ref updates into two parts: an update to the underlying ref, and a log-only update to the symbolic ref. This ensures that both references are locked correctly during the transaction, including while their reflogs are updated. Similarly, if the

[PATCH v2 32/33] commit_ref_update(): remove the flags parameter

2016-05-06 Thread Michael Haggerty
commit_ref_update() is now only called with flags=0. So remove the flags parameter entirely. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/refs/files-backend.c

[PATCH v2 28/33] ref_transaction_update(): check refname_is_safe() at a minimum

2016-05-06 Thread Michael Haggerty
If the user has asked that a new value be set for a reference, we use check_refname_format() to verify that the reference name satisfies all of the rules. But in other cases, at least check that refname_is_safe(). Signed-off-by: Michael Haggerty --- refs.c

[PATCH v2 17/33] lock_ref_sha1_basic(): remove unneeded local variable

2016-05-06 Thread Michael Haggerty
resolve_ref_unsafe() can cope with being called with NULL passed to its flags argument. So lock_ref_sha1_basic() can just hand its own type parameter through. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 9 +++-- 1 file changed, 3 insertions(+), 6

[PATCH v2 08/33] refname_is_safe(): insist that the refname already be normalized

2016-05-06 Thread Michael Haggerty
The reference name is going to be compared to other reference names, so it should be in its normalized form. Signed-off-by: Michael Haggerty --- refs.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index ca0280f..b18d995

[PATCH v2 31/33] lock_ref_for_update(): don't resolve symrefs

2016-05-06 Thread Michael Haggerty
If a transaction includes a non-NODEREF update to a symbolic reference, we don't have to look it up in lock_ref_for_update(). The reference will be dereferenced anyway when the split-off update is processed. This change requires that we store a backpointer from the split-off update to its parent

[PATCH v2 25/33] add_update(): initialize the whole ref_update

2016-05-06 Thread Michael Haggerty
Change add_update() to initialize all of the fields in the new ref_update object. Rename the function to ref_transaction_add_update(), and increase its visibility to all of the refs-related code. All of this makes the function more useful for other future callers. Signed-off-by: Michael Haggerty

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

2016-05-06 Thread Pranit Bauva
[+cc:git@vger.kernel.org] Because its an interesting fact to be shared which isn't covered elsewhere. On Fri, May 6, 2016 at 2:53 AM, Ævar Arnfjörð Bjarmason wrote: > Sending this privately since it's probably covered elsewhere. With > this, if I set the option will "reword" in

[PATCH v2 12/33] read_raw_ref(): rename flags argument to type

2016-05-06 Thread Michael Haggerty
This will hopefully reduce confusion with the "flags" arguments that are used in many functions in this module as an input parameter to choose how the function should operate. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 18 +-

[PATCH v2 24/33] verify_refname_available(): adjust constness in declaration

2016-05-06 Thread Michael Haggerty
The two string_list arguments can be const. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 4 ++-- refs/refs-internal.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index ad53b6e..f0eef9e

[PATCH v2 15/33] read_raw_ref(): improve docstring

2016-05-06 Thread Michael Haggerty
Among other things, document the (important!) requirement that input refname be checked for safety before calling this function. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 41 - 1 file changed, 24 insertions(+), 17

[PATCH v2 13/33] read_raw_ref(): clear *type at start of function

2016-05-06 Thread Michael Haggerty
This is more convenient and less error-prone for callers. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 1 + 1 file changed, 1 insertion(+) diff --git a/refs/files-backend.c b/refs/files-backend.c index fa8bbd6..8ced104 100644 --- a/refs/files-backend.c +++

[PATCH v2 23/33] refs: don't dereference on rename

2016-05-06 Thread Michael Haggerty
From: David Turner When renaming refs, don't dereference either the origin or the destination before renaming. The origin does not need to be dereferenced because it is presently forbidden to rename symbolic refs. Not dereferencing the destination fixes a bug where

[PATCH v2 27/33] unlock_ref(): move definition higher in the file

2016-05-06 Thread Michael Haggerty
This avoids the need for a forward declaration in the next patch. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index

[PATCH v2 07/33] refname_is_safe(): don't allow the empty string

2016-05-06 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index 5789152..ca0280f 100644 --- a/refs.c +++ b/refs.c @@ -136,11 +136,12 @@ int refname_is_safe(const char *refname)

[PATCH v2 00/33] Yet more preparation for reference backends

2016-05-06 Thread Michael Haggerty
Thanks to David, Junio, and Peff for their comments on v1 of this patch series [1]. I think I have addressed all of the points that were brought up. Plus I fixed a pre-existing bug that I noticed myself while adding some more tests; see the first bullet point below for more information. Changes

[PATCH v2 03/33] read_raw_ref(): don't get confused by an empty directory

2016-05-06 Thread Michael Haggerty
Even if there is an empty directory where we look for the loose version of a reference, check for a packed reference before giving up. This fixes the failing test that was introduced two commits ago. Signed-off-by: Michael Haggerty --- refs/files-backend.c |

[PATCH v2 06/33] refname_is_safe(): use skip_prefix()

2016-05-06 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/refs.c b/refs.c index 87dc82f..5789152 100644 --- a/refs.c +++ b/refs.c @@ -120,17 +120,19 @@ int check_refname_format(const char *refname, int flags)

[PATCH v2 01/33] t1404: demonstrate a bug resolving references

2016-05-06 Thread Michael Haggerty
Add some tests checking that it is possible to work with a reference even if there is an empty directory where the loose ref would be stored. One of the new tests demonstrates a bug that has been with us since at least 2.5.0--single reference lookup gives up when it sees the directory, even if

[PATCH v2 04/33] safe_create_leading_directories(): improve docstring

2016-05-06 Thread Michael Haggerty
Document the difference between this function and safe_create_leading_directories_const(), and that the former restores path before returning. Signed-off-by: Michael Haggerty --- cache.h | 5 + 1 file changed, 5 insertions(+) diff --git a/cache.h b/cache.h index

[PATCH v2 05/33] remove_dir_recursively(): add docstring

2016-05-06 Thread Michael Haggerty
Add a docstring for the remove_dir_recursively() function and the REMOVE_DIR_* flags that can be passed to it. Signed-off-by: Michael Haggerty --- dir.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/dir.h b/dir.h index 301b737..5f19acc 100644

[PATCH v3] gitk: Add Portuguese translation

2016-05-06 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- I think translation work is ready. Don't expect another re-roll soon. po/pt_pt.po | 1376 +++ 1 file changed, 1376 insertions(+) create mode 100644 po/pt_pt.po diff --git

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

2016-05-06 Thread Vasco Almeida
Add Portuguese glossary. Signed-off-by: Vasco Almeida --- po/glossary/pt_pt.po | 293 ++ po/pt_pt.po | 2716 ++ 2 files changed, 3009 insertions(+) create mode 100644 po/glossary/pt_pt.po create mode 100644

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

2016-05-06 Thread Junio C Hamano
Torsten Bögershausen writes: > ssh itself does not use a password: > ... > Neither does Git. > ... > The user:password came in here: > Commit 92722efec01f67a54b > clone: do not use port number as dir name > > Actually, looking back, it may have been better to say > git clone

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

2016-05-06 Thread Johannes Schindelin
Hi Chris, On Fri, 6 May 2016, Christian Couder wrote: > On Thu, May 5, 2016 at 10:07 PM, Johannes Sixt wrote: > > Am 05.05.2016 um 11:50 schrieb Christian Couder: > >> > >> On Mon, Apr 25, 2016 at 5:05 PM, Johannes Schindelin > >> wrote: > >>> > >>>

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

2016-05-06 Thread Junio C Hamano
SZEDER Gábor writes: > A while ago in a related thread Peff remarked about 'git commit's > '--quiet' and '--verbose' options: > >I think that is a UX mistake, and we would not do >it that way if designing from scratch. But we're stuck with it for >historical

Re: Found possible branch point, then "Use of uninitialized value $u in substitution/concatenation"

2016-05-06 Thread Thierry Suzanne
Sorry, can't help :( On 6 May 2016 at 09:27, Christian Couder wrote: > Hi, > > On Thu, May 5, 2016 at 12:43 PM, Thierry Suzanne > wrote: >> >> Looking at svn.pm, I can see we're in find_parent_branch() which >> outputs the message "Found

Re: [PATCH] mingw: introduce the 'core.hideDotFiles' setting

2016-05-06 Thread Johannes Schindelin
Hi Junio, On Wed, 4 May 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > diff --git a/builtin/init-db.c b/builtin/init-db.c > > index b2d8d40..c4269ac 100644 > > --- a/builtin/init-db.c > > +++ b/builtin/init-db.c > > @@ -370,6 +370,7 @@ int

[PATCH v5 2/2] bisect: rewrite `check_term_format` shell function in C

2016-05-06 Thread Pranit Bauva
Reimplement the `check_term_format` shell function in C and add a `--check-term-format` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--check-term-format` subcommand is a temporary measure to port shell function to C so as to use the existing test suite. As more

[PATCH v5 0/2] bisect--helper: rewrite of check-term-format()

2016-05-06 Thread Pranit Bauva
A very interesting fact to note: I made a mistake by dropping of the first argument 'term' in the function one_of() and compiled and the test suite passed fully (which was pointed out by Christian). This shows that the test coverage is incomplete. I am currently writing tests to improve on that

Re: [PATCH v2 1/4] rev-parse: fix some options when executed from subpath of main tree

2016-05-06 Thread SZEDER Gábor
Quoting Mike Rappazzo : On Fri, Apr 29, 2016 at 9:50 AM, SZEDER Gábor wrote: Executing `git-rev-parse` with `--git-common-dir`, `--git-path `, or `--shared-index-path` from the root of the main worktree results in a relative path to the git dir. When

Re: [PATCH] git-cvsserver: fix duplicate words

2016-05-06 Thread Marc Branchaud
On 2016-05-06 08:09 AM, Li Peng wrote: Fix duplicate words in comments. Signed-off-by: Li Peng --- git-cvsserver.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 02c0445..392e59e 100755 ---

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

2016-05-06 Thread Christian Couder
On Thu, May 5, 2016 at 10:07 PM, Johannes Sixt wrote: > 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: >>>

[PATCH v3 0/2] [PATCH v3 0/2] rev-parse: fix some options when executed from subpath of main tree

2016-05-06 Thread Michael Rappazzo
Differenced from v2[1]: - Rewrote the commits to just two; one that introduces tests, and one which fixes the problem. [1] http://thread.gmane.org/gmane.comp.version-control.git/292272 Michael Rappazzo (2): rev-parse tests: add tests executed from a subdirectory rev-parse: fix some

[PATCH v3 1/2] rev-parse tests: add tests executed from a subdirectory

2016-05-06 Thread Michael Rappazzo
t1500-rev-parse contains envrionment leaks (changing dir without changing back, setting config variables, etc). Add a test to clean this up up so that future tests can be added without worry of any setting from a previous test. t2027-worktree-list has an incorrect expectation for

[PATCH v3 2/2] rev-parse: fix some options when executed from subpath of main tree

2016-05-06 Thread Michael Rappazzo
Executing `git-rev-parse` with `--git-common-dir`, `--git-path `, or `--shared-index-path` from the root of the main worktree results in a relative path to the git dir. When executed from a subdirectory of the main tree, it can incorrectly return a path which starts 'sub/path/.git'. Change this

wishlist; unify behavior while cloning non-bare repos over http to be in line with ssh/local

2016-05-06 Thread Yaroslav Halchenko
Dear Git Folks, Originally this issue was mentioned in previous thread [1], and I have decided to bring it into a separate thread. ATM there is a dichotomy in git behavior between cloning non-bare repos: if I clone over ssh or just locally by providing url without trailing /.git, git senses for

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

2016-05-06 Thread Philip Oakley
From: "Duy Nguyen" On Fri, May 6, 2016 at 4:41 AM, Junio C Hamano wrote: "Philip Oakley" writes: int saved_namelen = saved_namelen; /* compiler workaround */ Which then becomes an MSVC compile warning C4700: uninitialized

Re: [PATCH] utf8: fix duplicate words of "the"

2016-05-06 Thread Jeff King
On Fri, May 06, 2016 at 08:31:33PM +0800, Li Peng wrote: > Fix duplicate words of "the" in comment. Obviously a good change, along with the other one of mine you found. > --- > transport-helper.c | 2 +- > utf8.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) You seem

Re: [PATCH v2 1/4] rev-parse: fix some options when executed from subpath of main tree

2016-05-06 Thread Mike Rappazzo
On Fri, Apr 29, 2016 at 9:50 AM, SZEDER Gábor wrote: >> Executing `git-rev-parse` with `--git-common-dir`, `--git-path `, >> or `--shared-index-path` from the root of the main worktree results in >> a relative path to the git dir. >> >> When executed from a subdirectory of the

[PATCH] wildmatch: fix duplicate words of "the"

2016-05-06 Thread Li Peng
Fix duplicate words of "the" in comment. Signed-off-by: Li Peng --- wildmatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wildmatch.c b/wildmatch.c index f91ba99..57c8765 100644 --- a/wildmatch.c +++ b/wildmatch.c @@ -136,7 +136,7 @@ static int

[PATCH] utf8: fix duplicate words of "the"

2016-05-06 Thread Li Peng
Fix duplicate words of "the" in comment. Signed-off-by: Li Peng --- transport-helper.c | 2 +- utf8.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/transport-helper.c b/transport-helper.c index b934183..13b7a57 100644 ---

[PATCH] transport-helper: fix duplicate words of "read"

2016-05-06 Thread Li Peng
Fix duplicate words of "read" in comment. Signed-off-by: Li Peng --- transport-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport-helper.c b/transport-helper.c index b934183..13b7a57 100644 --- a/transport-helper.c +++ b/transport-helper.c

  1   2   >