[PATCH] Git/SVN: die when there is no commit metadata

2016-05-06 Thread Christian Couder
When passing a bad --trunk option to `git svn clone`, like for example the same URL that we are cloning: C:\Windows\system32>git svn clone https://mycompany.svn.beanstalkapp.com/myproject --no-metadata -A c:\temp\svn_to_git_users.txt --trunk=https://mycompany.svn.beanstalkapp.com/myproject

[PATCH v2 2/2] mingw: remove unnecessary definition

2016-05-06 Thread Johannes Schindelin
For some reason, the definition of the MINGW version of `mark_as_git_dir()` slipped into this developer's patch series to support building Git for Windows. As the `mark_as_git_dir()` function is not needed at all anymore (it was used originally to support the core.hideDotFiles = gitDirOnly setting

[PATCH v2 1/2] mingw: introduce the 'core.hideDotFiles' setting

2016-05-06 Thread Johannes Schindelin
On Unix (and Linux) it is common that files and directories whose names start with a dot are not shown by default. This convention is used by Git: the .git/ directory should be left alone by regular users, and only accessed through Git itself. On Windows, no such convention exists. Instead, there

[PATCH v2 0/2] Support marking .git/ (or all files) as hidden on Windows

2016-05-06 Thread Johannes Schindelin
Windows does not share Unix' convention that files and directories whose names start with a dot are hidden. Hence `.git/`, for example, is in plain view, and caused quite a bit of trouble: some users wanted to peek inside and did not understand what it contains, others modified files. There was a

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

2016-05-06 Thread Johannes Schindelin
Hi Junio, On Fri, 6 May 2016, Junio C Hamano wrote: > 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 HI

[PATCH v9 3/6] convert: unify the "auto" handling of CRLF

2016-05-06 Thread tboegi
From: Torsten Bögershausen Before this change, $ echo "* text=auto" >.gitattributes $ echo "* eol=crlf" >>.gitattributes would have the same effect as $ echo "* text" >.gitattributes $ git config core.eol crlf Since the 'eol' attribute had higher priority than 'text=auto', this may corrupt bina

[PATCH v9 1/6] read-cache: factor out get_sha1_from_index() helper

2016-05-06 Thread tboegi
From: Torsten Bögershausen Factor out the retrieval of the sha1 for a given path in read_blob_data_from_index() into the function get_sha1_from_index(). This will be used in the next commit, when convert.c can do the analyze for "text=auto" without slurping the whole blob into memory at once. A

[PATCH v9 2/6] convert.c: stream and early out

2016-05-06 Thread tboegi
From: Torsten Bögershausen When statistics are done for the autocrlf handling, the search in the content can be stopped, if e.g - a search for binary is done, and a NUL character is found - a search for CRLF is done, and the first CRLF is found. Similar when statistics for binary vs non-binary a

[PATCH v9 4/6] convert.c: more safer crlf handling with text attribute

2016-05-06 Thread tboegi
From: Torsten Bögershausen A follow-up after a discussion how to fix the flaky execution of t0025, gmane/$284352. This patch extends the work done in commit c480539: "Make it work also for un-normalized repositories". Make sure that CRLF can be converted round trip, or don't convert them at all.

[PATCH v9 5/6] t6038; use crlf on all platforms

2016-05-06 Thread tboegi
From: Torsten Bögershausen t6038 uses different code, dependig if NATIVE_CRLF is set ot not. When the native line endings are LF, merge.renormalize is not tested very well. Change the test to always use CRLF by setting core.eol=crlf. After doing so, the test fails: rm '.gitattributes' rm 'contro

[PATCH v9 6/6] convert: ce_compare_data() checks for a sha1 of a path

2016-05-06 Thread tboegi
From: Torsten Bögershausen To compare a file in working tree with the index, convert_to_git() is used, the the result is hashed and the hash value compared with ce->sha1. Deep down would_convert_crlf_at_commit() is invoked, to check if CRLF are converted or not: When a CRLF had been in the index

[PATCH v9 0/6] convert-eol-autocrlf, old 5..10 now 1..6

2016-05-06 Thread tboegi
From: Torsten Bögershausen Changes since v8: As discussed earlier, 1..4 should be broken out into tb/autocrlf-fix or so. 1..4 are not part of this series any more. The old 10/10 is now 6/6. It is replaced by "ce_compare_data() checks for a sha1 of a path" It now checks for "What

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

2016-05-06 Thread Johannes Schindelin
Hi Junio, On Fri, 6 May 2016, Junio C Hamano wrote: > 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.

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, then

Re: Portability of git shell scripts?

2016-05-06 Thread Jeff King
On Fri, May 06, 2016 at 06:57:45PM +0200, Armin Kunaschik wrote: > > Right. Any modern-ish Bourne shell will do, so moving to bash is one > > way to fix it. > > My last compile of git 2.2.2 did far better than the current 2.8.2. So > it looks like there were more recent changes that broke portabi

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 b/t/t-basic.sh >> index 79b9074.

[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 http://somedomain/somere

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 measure to port > shell func

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 through t3513-revert-submodule.sh anymore. >>> The test is not porta

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 te

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 the z-flags of GNU-tar. When -z >> is removed,

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 [fill in the blank]. Make it sho

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 incomplete. > I am > currently

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 wonderful thing to do, b

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 deae1f3..845fcdc 100644 > --- a

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 majord...@vger.kernel.org More major

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ð Bjarmason >> wrote: >>> Sending this privately si

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 warnings from stupid com

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, all = 0; > > One thing that is

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 --summary -M -C -B -1 20f1d27 >>> commit 20f1d274609f5dde2eaaa279e7ee79fd5ef9c849 >

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 slip? I am OK with leav

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 relying on broken code

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" is not initializing but >>> merely squelchi

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 agree to use >> it consis

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 since it's probably covered elsewhere. With

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 COMP

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 writes: >> I wonder if the patches mentioned have something to do with the

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 to do with the "git > add deep/in/the/tree" that fails to notice deep/in/

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 task hence her >> config

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 this makes future readers wonder

[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 extension is changed back t

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; /* compiler workaround */ Which then becomes an MSVC compile warning C4700: uninitialized

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 > I saw was good. So I tentativel

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 "defaultGroup" configuration. You just >>

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 */ Which then becomes an MSVC compile warning C4700: uninitialized

[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 rem

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 '%s', got '%s'\n", >> +

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 changed, 2 insertion

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 > --- a/t/t-basic.sh > +++ b/t/t

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 reason why we need it" a

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" that fails to notice deep/in/ is an unrelated repository

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 reset --hard &&

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 --show-toplevel" does when run from

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 supposed to work?

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 is used only after RUNTIME_PREFIX heuristics to learn th

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() needs to be taught about nee

[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 ref_lock::or

[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 C Hamano Signed-off-by: Michael Haggerty --- refs

[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 ref_transaction_commit(struct ref_

[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 read_re

[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: Mi

[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 +- refs/refs-internal.h | 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 +2360,17 @@ int rename_

[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 a/refs/files-backend.c b/refs/files-back

[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 a/refs/files-backend.c b/refs

[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 b/refs/files-backend.c index 73717dd..fc0c7

[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 a/builtin/branch.c b/built

[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 ind

[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 @@ static int commit_ref_

[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 ++-- 3 files changed, 22 i

[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 deletions(-) diff --git a/ref

[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 100644 --- a/refs.c +++ b/re

[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 u

[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

[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 b/refs/files-backend.c index 08ec293..a180

[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 | 5 +++-- t/t1400-upd

[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 referenc

[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 100644 --- a/refs/files-

[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 deletions(-) diff --git

[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 +++ b/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 renaming on top of a broken s

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 git rebase -i show

[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 +- refs/refs-internal.h | 2 +- 2 files

[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) free(buf); ret

[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 1c20af5..8ff76ed 100644 --- a/re

[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 be

[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 | 11 ++- t/t1404

[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) int refname_is_safe(cons

[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 the

[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 2711048..4134f64 100644 ---

[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 --- a/dir.h +++ b/dir.

[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 a/po/pt_pt.po b/po/pt_pt.po new f

[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 po/pt_pt.po diff --git a

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 ssh://:@host:

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: > >>> > >>> Hi Chris, > >>> > >>> On Sun, 24 Apr 2016, Ch

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 reasons (I'd probably name

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 possible branch point". It then calls >> other_gs($new_ur

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 init_db(const char *template_dir, unsi

[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 functions

  1   2   >