Re: [PATCH 13/21] rev-parse: add '--absolute-git-dir' option

2016-04-25 Thread Jeff King
On Mon, Apr 25, 2016 at 10:33:13PM -0400, Mike Rappazzo wrote: > I propose that it might make more sense to use something like > `--abs-path` to indicate > that the result should include an absolute path (or we could also just spell > out > `--absolute-path`). That way we don't have to add

Re: [PATCH 13/21] rev-parse: add '--absolute-git-dir' option

2016-04-25 Thread Mike Rappazzo
On Thu, Feb 25, 2016 at 5:54 PM SZEDER Gábor wrote: > > Some scripts can benefit from not having to deal with the possibility > of relative paths to the repository, but the output of 'git rev-parse > --git-dir' can be a relative path. Case in point: supporting 'git -C > ' in

肯德基大

2016-04-25 Thread 肯德基大
你的老朋友邀你来Q群:343257759 抢优惠券N�r��yb�X��ǧv�^�)޺{.n�+ا���ܨ}���Ơz�:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf

Re: [PATCH 51/83] builtin/apply: make apply_patch() return -1 instead of die()ing

2016-04-25 Thread Eric Sunshine
On Sun, Apr 24, 2016 at 9:33 AM, Christian Couder wrote: > To libify `git apply` functionality we have to signal errors > to the caller instead of die()ing. > > As a first step in this direction, let's make apply_patch() return > -1 in case of errors instead of dying.

[PATCHv2] clone: add `--shallow-submodules` flag

2016-04-25 Thread Stefan Beller
When creating a shallow clone of a repository with submodules, the depth argument does not influence the submodules, i.e. the submodules are done as non-shallow clones. It is unclear what the best default is for the depth of submodules of a shallow clone, so we need to have the possibility to do

Re: [PATCH] clone: add `--shallow-submodules` flag

2016-04-25 Thread Stefan Beller
On Mon, Apr 25, 2016 at 3:37 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> I agree. How about `currentdir`, `testdir` or `testtop` instead? >> That is slightly longer than `D`, `here` or `top`, but is slightly more >> informative. $TRASH would also

Re: [PATCH] Update git-p4 to be compatible with git-lfs 1.2

2016-04-25 Thread SZEDER Gábor
Quoting Junio C Hamano : SZEDER Gábor writes: You can have a look at these patches at https://github.com/szeder/git completion-test-multiple-bash-versions and perhaps you could even adapt it to LFS and/or p4 somehow. Plus if we want to be

What's cooking in git.git (Apr 2016, #07; Mon, 25)

2016-04-25 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] clone: add `--shallow-submodules` flag

2016-04-25 Thread Junio C Hamano
Stefan Beller writes: > I agree. How about `currentdir`, `testdir` or `testtop` instead? > That is slightly longer than `D`, `here` or `top`, but is slightly more > informative. $TRASH would also work for me. I would not be happy to see a patch that adds yet another variable

Re: [PATCH] remote.c: spell __attribute__ correctly

2016-04-25 Thread Ramsay Jones
On 25/04/16 22:50, Philip Oakley wrote: > From: "Jeff King" >> On Mon, Apr 25, 2016 at 05:10:30PM -0400, Jeff King wrote: >> >>> It should be handled in git-compat-util.h, which is included by cache.h, >>> which is included by remote.c. >>> >>> There we have: >>> >>> #ifndef

Re: [PATCH/RFC 4/6] transport: add refspec list parameters to functions

2016-04-25 Thread Stefan Beller
On Mon, Apr 25, 2016 at 9:44 AM, David Turner wrote: > On Wed, 2016-04-20 at 16:57 -0400, Jeff King wrote: >> On Wed, Apr 20, 2016 at 04:46:55PM -0400, David Turner wrote: >> >> > As you note, it appears that git-daemon does sort-of have support >> > for >> > extra args

Re: [PATCH 0/2] git-p4: support python3 in the tests

2016-04-25 Thread Junio C Hamano
Luke Diamand writes: > This patchset updates the git-p4 tests so that they work with > either Python2 or Python3. > > Note that this does *not* fix git-p4 to work with Python3 - that's > a much bigger challenge. We use Python outside p4 tests (e.g. remote-svn test), and the

Re: [PATCH 47/83] builtin/apply: move applying patches into apply_all_patches()

2016-04-25 Thread Stefan Beller
On Sun, Apr 24, 2016 at 6:33 AM, Christian Couder wrote: > Signed-off-by: Christian Couder Up to this patch, have a Reviewed-by: Stefan Beller in case you want to split the series in here (as indicated in the cover

Re: [PATCH 33/83] builtin/apply: move 'root' global into 'struct apply_state'

2016-04-25 Thread Stefan Beller
> > Eventually we want to have some sort of `init_apply_state` function or > a define which has all the values, I guess? > > Compare for example to sliding_window.h, where > we have > > struct sliding_view { > ... > struct strbuf buf; > }; > > #define

Re: [PATCH] remote.c: spell __attribute__ correctly

2016-04-25 Thread Philip Oakley
From: "Jeff King" On Mon, Apr 25, 2016 at 05:10:30PM -0400, Jeff King wrote: It should be handled in git-compat-util.h, which is included by cache.h, which is included by remote.c. There we have: #ifndef __GNUC__ #ifndef __attribute__ #define __attribute__(x) #endif

Re: [PATCH 33/83] builtin/apply: move 'root' global into 'struct apply_state'

2016-04-25 Thread Stefan Beller
On Sun, Apr 24, 2016 at 6:33 AM, Christian Couder wrote: > Signed-off-by: Christian Couder > --- > builtin/apply.c | 82 > ++--- > 1 file changed, 49 insertions(+), 33 deletions(-) > > diff

Re: [PATCH v5b 00/17] port branch.c to use ref-filter's printing options

2016-04-25 Thread Junio C Hamano
Karthik Nayak writes: > This is part of unification of the commands 'git tag -l, git branch -l > and git for-each-ref'. This ports over branch.c to use ref-filter's > printing options. > > Initially posted here: $(gmane/279226). It was decided that this series > would

Re: [PATCH 18/83] builtin/apply: move 'numstat' global into 'struct apply_state'

2016-04-25 Thread Stefan Beller
On Sun, Apr 24, 2016 at 6:33 AM, Christian Couder wrote: > Signed-off-by: Christian Couder > --- > builtin/apply.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/builtin/apply.c b/builtin/apply.c > index

Re: definition for _attribute() in remote.c

2016-04-25 Thread Jeff King
On Mon, Apr 25, 2016 at 10:34:27PM +0100, Philip Oakley wrote: > It's not the __attribute__ definition (a Gnu C ism), rather its the > __attribute variant, which has a definition in regex_internal.h, and is used > in the regex code. It's that one that's used in remote.c that I can't fathom >

Re: [RFC/PATCH] Ordering of remotes for fetch --all

2016-04-25 Thread Jeff King
On Mon, Apr 25, 2016 at 11:15:05PM +0200, Guido Martínez wrote: > I run a server with several git mirrors, that are updated every hour. On > that same server, users clone those projects and work on them. We use > the local mirrors to reduce network load: the users can fetch from the > mirror

Re: definition for _attribute() in remote.c

2016-04-25 Thread Philip Oakley
From: "Jeff King" On Mon, Apr 25, 2016 at 10:02:38PM +0100, Philip Oakley wrote: I'm looking at getting Git for Windows to compile via Visual Studio (https://github.com/git-for-windows/git/pull/256). However the use of __attribute() in remote.c at L1662

Re: [RFC] How to pass Git config command line instructions to Submodule commands?

2016-04-25 Thread Jeff King
On Mon, Apr 25, 2016 at 01:59:03PM -0700, Jacob Keller wrote: > >> However, I noticed that git config command line instructions such as > >> "-c filter.lfs.smudge=" are not passed to Git submodule operations. Thus > >> this does not work as expected: > >> > >> git -c filter.lfs.smudge= -c

Re: [RFC] How to pass Git config command line instructions to Submodule commands?

2016-04-25 Thread Jeff King
On Mon, Apr 25, 2016 at 05:24:50PM -0400, Jeff King wrote: > It does mean that somebody would be stuck who really wanted to run the > smudge filter in their local repo, but for some reason not in the > subrepos. I am trying to think of a case in which that might be > security-relevant if you

Re: [PATCH] clone: add `--shallow-submodules` flag

2016-04-25 Thread Stefan Beller
On Mon, Apr 25, 2016 at 2:04 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> This replaces origin/sb/clone-shallow-passthru. >> @@ -190,7 +190,11 @@ objects from the source repository into a pack in the >> cloned repository. >> >> --depth :: >>

[PATCH v3] fast-import: implement unpack limit

2016-04-25 Thread Eric Wong
With many incremental imports, small packs become highly inefficient due to the need to readdir scan and load many indices to locate even a single object. Frequent repacking and consolidation may be prohibitively expensive in terms of disk I/O, especially in large repositories where the initial

[PATCH] remote.c: spell __attribute__ correctly

2016-04-25 Thread Jeff King
On Mon, Apr 25, 2016 at 05:10:30PM -0400, Jeff King wrote: > It should be handled in git-compat-util.h, which is included by cache.h, > which is included by remote.c. > > There we have: > > #ifndef __GNUC__ > #ifndef __attribute__ > #define __attribute__(x) > #endif > #endif > >

[RFC/PATCH] remote: add a fetching priority to each remote

2016-04-25 Thread Guido Martínez
Add an int that allows for a way of setting a fetch order for remotes, mainly for the use case of "git remote update" which updates every remote. This way, users can set local mirrors of repositories first to quickly get a bunch of objects, and later the upstream repo to make sure that they

[RFC/PATCH] Ordering of remotes for fetch --all

2016-04-25 Thread Guido Martínez
Hi all, I run a server with several git mirrors, that are updated every hour. On that same server, users clone those projects and work on them. We use the local mirrors to reduce network load: the users can fetch from the mirror first (to get most of the objects with zero network cost) and then

Re: definition for _attribute() in remote.c

2016-04-25 Thread Jeff King
On Mon, Apr 25, 2016 at 10:02:38PM +0100, Philip Oakley wrote: > I'm looking at getting Git for Windows to compile via Visual Studio > (https://github.com/git-for-windows/git/pull/256). > > However the use of __attribute() in remote.c at L1662 >

Re: [PATCH] clone: add `--shallow-submodules` flag

2016-04-25 Thread Junio C Hamano
Stefan Beller writes: > This replaces origin/sb/clone-shallow-passthru. > @@ -190,7 +190,11 @@ objects from the source repository into a pack in the > cloned repository. > > --depth :: > Create a 'shallow' clone with a history truncated to the > - specified

definition for _attribute() in remote.c

2016-04-25 Thread Philip Oakley
Hi, I'm looking at getting Git for Windows to compile via Visual Studio (https://github.com/git-for-windows/git/pull/256). However the use of __attribute() in remote.c at L1662 (https://github.com/git-for-windows/git/blob/master/remote.c#L1662) has got me confused in that I can't see how

Re: [RFC] How to pass Git config command line instructions to Submodule commands?

2016-04-25 Thread Jacob Keller
On Mon, Apr 25, 2016 at 10:02 AM, Stefan Beller wrote: > On Mon, Apr 25, 2016 at 3:39 AM, Lars Schneider > wrote: >> Hi, >> >> a few folks from the Git LFS project and I try to make cloning of >> repositories >> with a lot of LFS files faster. >> >>

Re: [PATCH v5 06/15] index-helper: add --detach

2016-04-25 Thread David Turner
On Wed, 2016-04-20 at 06:50 +0700, Duy Nguyen wrote: > On Wed, Apr 20, 2016 at 6:28 AM, David Turner < > dtur...@twopensource.com> wrote: > > @@ -317,6 +320,8 @@ int main(int argc, char **argv) > > if (fd < 0) > > die_errno(_("could not set up index-helper > > socket")); >

Re: [GIT PULL] l10n updates for maint branch (2.8.2)

2016-04-25 Thread Junio C Hamano
Jiang Xin writes: > Please pull this update to the maint branch. It should have been merged to > Git 2.8.0, but I was busy these weeks and forgot to check my private mailbox. Thanks, will do. -- To unsubscribe from this list: send the line "unsubscribe git" in the

Re: [PATCH v2] hooks: Add ability to specify where the hook directory is

2016-04-25 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > +core.hooksPath:: > + By default Git will look for your hooks in the > + '$GIT_DIR/hooks' directory. Set this to different path, > + e.g. '/etc/git/hooks', and Git will try to find your hooks in > + that directory, e.g.

Re: [PATCH v1] travis-ci: build documentation

2016-04-25 Thread Junio C Hamano
Matthieu Moy writes: > Actually, this may also be a motivation to move anything non-trivial out > of .travic.yml and to start using separate scripts (to avoid writting > shell within a Yaml syntax). Excellent suggestion. I do not mind if we added a new directory

Re: [PATCH v7 07/10] convert: unify the "auto" handling of CRLF

2016-04-25 Thread Junio C Hamano
tbo...@web.de writes: > 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

Re: [PATCH v1] travis-ci: build documentation

2016-04-25 Thread Matthieu Moy
Junio C Hamano writes: > Junio C Hamano writes: > >> Lars Schneider writes: >> There also are existing instances of "useless ;" that would want to be cleaned up regardless of portability issues. >>> Unfortunately it

Re: [PATCH v7 01/10] t0027: Make commit_chk_wrnNNO() reliable

2016-04-25 Thread Junio C Hamano
tbo...@web.de writes: > From: Torsten Bögershausen > > When the content of a commited file is unchanged and the attributes are > changed, > Git may not detect that the next commit must treat the file as changed. > This happens when lstat() doesn't detect a change, since neither

Re: [PATCH v2] hooks: Add ability to specify where the hook directory is

2016-04-25 Thread Johannes Sixt
Am 24.04.2016 um 23:18 schrieb Ævar Arnfjörð Bjarmason: +test_expect_success 'set up a pre-commit hook in core.hooksPath' ' + mkdir -p .git/custom-hooks .git/hooks && + write_script .git/custom-hooks/pre-commit <>.git/PRE-COMMIT-HOOK-WAS-CALLED +EOF + cat >.git/hooks/pre-commit

Re: [PATCH v1] travis-ci: build documentation

2016-04-25 Thread Junio C Hamano
Junio C Hamano writes: > Lars Schneider writes: > >>> There also are existing instances of "useless ;" that would want to >>> be cleaned up regardless of portability issues. >> Unfortunately it seems to be required. Travis CI generates a shell script

Re: [PATCH 09/83] builtin/apply: move 'check' global into 'struct apply_state'

2016-04-25 Thread Stefan Beller
On Sun, Apr 24, 2016 at 6:33 AM, Christian Couder wrote: > Signed-off-by: Christian Couder > --- > builtin/apply.c | 16 +--- > 1 file changed, 9 insertions(+), 7 deletions(-) > > diff --git a/builtin/apply.c b/builtin/apply.c >

Re: [PATCH 05/83] builtin/apply: extract line_by_line_fuzzy_match() from match_fragment()

2016-04-25 Thread Stefan Beller
> @@ -2251,7 +2319,7 @@ static int match_fragment(struct image *img, > int match_beginning, int match_end) > { > int i; > - char *fixed_buf, *buf, *orig, *target; > + char *fixed_buf, *orig, *target; > struct strbuf fixed; > size_t

Re: [PATCH] http: Support sending custom HTTP headers

2016-04-25 Thread Junio C Hamano
Johannes Schindelin writes: > To make communication for `git fetch`, `git ls-remote` and friends extra > secure, we introduce a way to send custom HTTP headers with all > requests. I think an ability to send custom headers may be a good addition and have no problem

Re: [PATCH v14 3/6] t0040-parse-options: improve test coverage

2016-04-25 Thread Pranit Bauva
On Wed, Apr 13, 2016 at 10:57 PM, Eric Sunshine wrote: > On Wed, Apr 13, 2016 at 4:59 AM, Pranit Bauva wrote: >> On Wed, Apr 13, 2016 at 10:56 AM, Eric Sunshine >> wrote: >>> On Tue, Apr 12, 2016 at 7:02 PM, Pranit Bauva

Re: [PATCH v3 0/3] Improvements to githooks.txt documentation

2016-04-25 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > This includes minor grammar edits pointed out by Eric Sunshine + the > one v2 patch I sent out in response to comments by Jacob Keller. > > I thought it was less confusing to just send out a whole v3 series > than ask Junio to piece together

Re: [PATCH 3/3] githooks.txt: Minor improvements to the grammar & phrasing

2016-04-25 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > -This hook is invoked by 'git am' script. It takes a single > +This hook is invoked by 'git am'. It takes a single Good, as it does not matter to the readers that "am" happens to be implemented as a script. > parameter, the name of the

[PATCH] clone: add `--shallow-submodules` flag

2016-04-25 Thread Stefan Beller
When creating a shallow clone of a repository with submodules, the depth argument does not influence the submodules, i.e. the submodules are done as non-shallow clones. It is unclear what the best default is for the depth of submodules of a shallow clone, so we need to have the possibility to do

Re: [PATCH 2/3] githooks.txt: Amend dangerous advice about 'update' hook ACL

2016-04-25 Thread Junio C Hamano
Jacob Keller writes: >> -Another use suggested on the mailing list is to use this hook to >> -implement access control which is finer grained than the one >> -based on filesystem group. >> +Another use for this hook to implement access control which is finer >> +grained

Re: [PATCH 1/3] githooks.txt: Improve the intro section

2016-04-25 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Change the documentation so that: > > * We don't talk about "little scripts". Hooks can be as big as you >want, and don't have to be scripts, just call them "programs". > > * We note what happens with chdir() before a hook is called,

Re: [PATCH v2 03/21] t/test-lib-functions.sh: generalize test_cmp_rev

2016-04-25 Thread Junio C Hamano
Stephan Beyer writes: > Hi, > > On 04/15/2016 10:00 PM, Junio C Hamano wrote: >> Stephan Beyer writes: >> >>> test_cmp_rev() took exactly two parameters, the expected revision >>> and the revision to test. This commit generalizes this function >>> such that it

Re: [PATCH 49/83] builtin/apply: move 'lock_file' global into 'struct apply_state'

2016-04-25 Thread Junio C Hamano
Eric Sunshine writes: >> + /* >> +* Since lockfile.c keeps a linked list of all created >> +* lock_file structures, it isn't safe to free(lock_file). >> +*/ >> + struct lock_file *lock_file; > > Is there ever a time when lock_file is

Re: [PATCH v2] string_list: use string-list API in unsorted_string_list_lookup()

2016-04-25 Thread Stefan Beller
On Mon, Apr 25, 2016 at 10:40 AM, Ralf Thielow wrote: > Using the string-list API in function unsorted_string_list_lookup() > makes the code more readable. > > Signed-off-by: Ralf Thielow > --- > Changes since v1: > - remove extra curly braces

Re: RFC: Supporting .git/hooks/$NAME.d/* && /etc/git/hooks/$NAME.d/*

2016-04-25 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > The reason for supporting the *.d directories was that I spotted a lot > of hooks people had hacked up at work using the pee(1) command[1] to > run sequences of other unrelated hook commands. IIRC, we wanted to do this several years ago but

Re: [PATCH 3/3] clone: add t5614 to test cloning submodules with shallowness involved

2016-04-25 Thread Stefan Beller
On Tue, Apr 12, 2016 at 11:52 PM, Jacob Keller wrote: > On Tue, Apr 12, 2016 at 4:48 PM, Stefan Beller wrote: >> There are some inherent issues with shallow clones and submodules, such >> as having not having a commit available the superproject may

[PATCH v2] string_list: use string-list API in unsorted_string_list_lookup()

2016-04-25 Thread Ralf Thielow
Using the string-list API in function unsorted_string_list_lookup() makes the code more readable. Signed-off-by: Ralf Thielow --- Changes since v1: - remove extra curly braces string-list.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [PATCH] string_list: use string-list API in unsorted_string_list_lookup()

2016-04-25 Thread Ralf Thielow
Johannes Schindelin writes: >> >> -for (i = 0; i < list->nr; i++) >> -if (!cmp(string, list->items[i].string)) >> -return list->items + i; >> +for_each_string_list_item(item, list) { >> +if (!cmp(string,

Re: [PATCH 1/3] clone: add `--shallow-submodules` flag

2016-04-25 Thread Stefan Beller
On Mon, Apr 25, 2016 at 4:50 AM, Lars Schneider wrote: >> first case (as we wouldd have already transmitted the non shallow over > s/wouldd/would/ will be fixed in a reroll >> --depth :: >> Create a 'shallow' clone with a history truncated to the >> -

Re: [PATCH] Update git-p4 to be compatible with git-lfs 1.2

2016-04-25 Thread Junio C Hamano
SZEDER Gábor writes: > You can have a look at these patches at > > https://github.com/szeder/git completion-test-multiple-bash-versions > > and perhaps you could even adapt it to LFS and/or p4 somehow. > >> Plus if we want to be consistent we would >> need to do the same for

Re: [PATCH 1/3] submodule clone: pass along `local` option

2016-04-25 Thread Stefan Beller
On Mon, Apr 25, 2016 at 5:18 AM, Lars Schneider wrote: >> @@ -140,6 +141,10 @@ static int clone_submodule(const char *path, const char >> *gitdir, const char *url >> argv_array_pushl(, "--reference", reference, NULL); >> if (gitdir && *gitdir) >>

Re: [PATCH v1] travis-ci: build documentation

2016-04-25 Thread Jeff King
On Mon, Apr 25, 2016 at 10:35:24AM +0200, Lars Schneider wrote: > > This does slow down the normal test results for linux/gcc, though. I > > don't know very much about Travis, but is it possible to break out the > > documentation build into its own test, with a separate build status from > > the

Re: [PATCH] http: Support sending custom HTTP headers

2016-04-25 Thread Jeff King
On Mon, Apr 25, 2016 at 03:13:08PM +0200, Johannes Schindelin wrote: > diff --git a/http.c b/http.c > index 4304b80..02d7147 100644 > --- a/http.c > +++ b/http.c > @@ -114,6 +114,7 @@ static unsigned long http_auth_methods = CURLAUTH_ANY; > > static struct curl_slist *pragma_header; > static

Re: [RFC] How to pass Git config command line instructions to Submodule commands?

2016-04-25 Thread Stefan Beller
On Mon, Apr 25, 2016 at 3:39 AM, Lars Schneider wrote: > Hi, > > a few folks from the Git LFS project and I try to make cloning of repositories > with a lot of LFS files faster. > > The core problem is that Git LFS uses a Git smudge filter to replace LFS > pointers with

[PATCH v7 07/10] convert: unify the "auto" handling of CRLF

2016-04-25 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

Re: [PATCH v1] travis-ci: build documentation

2016-04-25 Thread Junio C Hamano
Lars Schneider writes: >> There also are existing instances of "useless ;" that would want to >> be cleaned up regardless of portability issues. > Unfortunately it seems to be required. Travis CI generates a shell script > out of the yml file and I think they don't

[PATCH v7 08/10] convert.c: more safer crlf handling with text attribute

2016-04-25 Thread tboegi
From: Torsten Bögershausen 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. The old handling would treat a file as unchanged after checkout, as

[PATCH v7 09/10] t6038; use crlf on all platforms

2016-04-25 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

[PATCH v7 05/10] read-cache: factor out get_sha1_from_index() helper

2016-04-25 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

[PATCH v7 10/10] ce_compare_data() did not respect conversion

2016-04-25 Thread tboegi
From: Torsten Bögershausen We define the working tree file is clean if either: * the result of running convert_to_git() on the working tree contents matches what is in the index (because that would mean doing another "git add" on the path is a no-op); OR * the result

[PATCH v7 01/10] t0027: Make commit_chk_wrnNNO() reliable

2016-04-25 Thread tboegi
From: Torsten Bögershausen When the content of a commited file is unchanged and the attributes are changed, Git may not detect that the next commit must treat the file as changed. This happens when lstat() doesn't detect a change, since neither inode, mtime nor size are changed.

[PATCH v7 02/10] convert: allow core.autocrlf=input and core.eol=crlf

2016-04-25 Thread tboegi
From: Torsten Bögershausen Even though the configuration parser errors out when core.autocrlf is set to 'input' when core.eol is set to 'crlf', there is no need to do so, because the core.autocrlf setting trumps core.eol. Allow all combinations of core.crlf and core.eol and

[PATCH v7 06/10] convert.c: stream and early out

2016-04-25 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

[PATCH v7 04/10] convert.c: ident + core.autocrlf didn't work

2016-04-25 Thread tboegi
From: Torsten Bögershausen When the ident attributes is set, get_stream_filter() did not obey core.autocrlf=true, and the file was checked out with LF. Change the rule when a streaming filter can be used: - if an external filter is specified, don't use a stream filter. - if the

[PATCH v7 03/10] t0027: test cases for combined attributes

2016-04-25 Thread tboegi
From: Torsten Bögershausen Add more test cases for the not normalized files ("NNO"). The "text" attribute is most important, use it as the first parameter. "ident", if set, is the second paramater followed by the eol attribute. The eol attribute overrides core.autocrlf, which

Re: [PATCH v7 19/33] refs: allow log-only updates

2016-04-25 Thread David Turner
On Thu, 2016-04-21 at 16:17 +0200, Michael Haggerty wrote: > On 03/01/2016 01:52 AM, David Turner wrote: > > 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. >

Re: How to have EOL=LF and keep binary files auto-detection?

2016-04-25 Thread Torsten Bögershausen
On 25.04.16 16:11, Kirill Likhodedov wrote: > Hi, > > I wonder if it is possible both to have LFs in all and only text files in > working trees, and keep Git’s binary files auto-detection? > > To be more precise: > * we want all text files to be checked out in LF; > * we don’t want force

Re: [PATCH/RFC 4/6] transport: add refspec list parameters to functions

2016-04-25 Thread David Turner
On Wed, 2016-04-20 at 16:57 -0400, Jeff King wrote: > On Wed, Apr 20, 2016 at 04:46:55PM -0400, David Turner wrote: > > > As you note, it appears that git-daemon does sort-of have support > > for > > extra args -- see parse_host_arg. So it wouldn't be hard to add > > something here.

Re: [PATCH] Update git-p4 to be compatible with git-lfs 1.2

2016-04-25 Thread SZEDER Gábor
> > * One option on the Travis front would be to just test one combination > > of the 1.1 build - e.g. linux + clang + 1.1, so you'll stay within the > > 5 parallel builds while also having some coverage on lfs 1.1. > TBH I still think testing an outdated Git LFS version does not justify > +10

Re: [PATCH 81/83] apply: roll back index in case of error

2016-04-25 Thread Johannes Schindelin
Hi Chris, On Sun, 24 Apr 2016, Christian Couder wrote: > @@ -4734,16 +4737,22 @@ int apply_all_patches(struct apply_state *state, > read_stdin = 0; > set_default_whitespace_mode(state); > res = apply_patch(state, fd, arg, options); > - if

Re: [PATCH] http: Support sending custom HTTP headers

2016-04-25 Thread Shawn Pearce
On Mon, Apr 25, 2016 at 6:13 AM, Johannes Schindelin wrote: > To make communication for `git fetch`, `git ls-remote` and friends extra > secure, we introduce a way to send custom HTTP headers with all > requests. Hmm. Its not Apr 1 2016. So I guess you are serious. :)

[PATCH v5b 11/17] ref-filter: introduce symref_atom_parser() and refname_atom_parser()

2016-04-25 Thread Karthik Nayak
Using refname_atom_parser_internal(), introduce symref_atom_parser() and refname_atom_parser() which will parse the atoms %(symref) and %(refname) respectively. Store the parsed information into the 'used_atom' structure based on the modifiers used along with the atoms. Now the '%(symref)' atom

[PATCH v5b 09/17] ref-filter: make "%(symref)" atom work with the ':short' modifier

2016-04-25 Thread Karthik Nayak
The "%(symref)" atom doesn't work when used with the ':short' modifier because we strictly match only 'symref' for setting the 'need_symref' indicator. Fix this by using comparing with valid_atom rather than used_atom. Add tests for %(symref) and %(symref:short) while we're here. Helped-by:

[PATCH v5b 02/17] ref-filter: include reference to 'used_atom' within 'atom_value'

2016-04-25 Thread Karthik Nayak
Ensure that each 'atom_value' has a reference to its corresponding 'used_atom'. This let's us use values within 'used_atom' in the 'handler' function. Hence we can get the %(align) atom's parameters directly from the 'used_atom' therefore removing the necessity of passing %(align) atom's

[PATCH v5b 13/17] ref-filter: add `:dir` and `:base` options for ref printing atoms

2016-04-25 Thread Karthik Nayak
Add the options `:dir` and `:base` to all ref printing ('%(refname)', '%(symref)', '%(push)' and '%(upstream)') atoms. The `:dir` option gives the directory (the part after $GIT_DIR/) of the ref without the refname. The `:base` option gives the base directory of the given ref (i.e. the directory

[PATCH v5b 05/17] ref-filter: move get_head_description() from branch.c

2016-04-25 Thread Karthik Nayak
Move the implementation of get_head_description() from branch.c to ref-filter. This gives a description of the HEAD ref if called. This is used as the refname for the HEAD ref whenever the FILTER_REFS_DETACHED_HEAD option is used. Make it public because we need it to calculate the length of the

[PATCH v5b 12/17] ref-filter: make remote_ref_atom_parser() use refname_atom_parser_internal()

2016-04-25 Thread Karthik Nayak
Use the recently introduced refname_atom_parser_internal() within remote_ref_atom_parser(), this provides a common base for all the ref printing atoms, allowing %(upstream) and %(push) to also use the ':strip' option. The atoms '%(push)' and '%(upstream)' will retain the ':track' and

[PATCH v5b 08/17] ref-filter: add support for %(upstream:track,nobracket)

2016-04-25 Thread Karthik Nayak
Add support for %(upstream:track,nobracket) which will print the tracking information without the brackets (i.e. "ahead N, behind M"). This is needed when we port branch.c to use ref-filter's printing APIs. Add test and documentation for the same. Mentored-by: Christian Couder

[PATCH v5b 16/17] branch: use ref-filter printing APIs

2016-04-25 Thread Karthik Nayak
Port branch.c to use ref-filter APIs for printing. This clears out most of the code used in branch.c for printing and replaces them with calls made to the ref-filter library. Introduce build_format() which gets the format required for printing of refs. Make amendments to print_ref_list() to

[PATCH v5b 10/17] ref-filter: introduce refname_atom_parser_internal()

2016-04-25 Thread Karthik Nayak
Since there are multiple atoms which print refs ('%(refname)', '%(symref)', '%(push)', '%upstream'), it makes sense to have a common ground for parsing them. This would allow us to share implementations of the atom modifiers between these atoms. Introduce refname_atom_parser_internal() to act as

[PATCH v5b 17/17] branch: implement '--format' option

2016-04-25 Thread Karthik Nayak
Implement the '--format' option provided by 'ref-filter'. This lets the user list branches as per desired format similar to the implementation in 'git for-each-ref'. Add tests and documentation for the same. Mentored-by: Christian Couder Mentored-by: Matthieu Moy

[PATCH v5b 15/17] branch, tag: use porcelain output

2016-04-25 Thread Karthik Nayak
Call ref-filter's setup_ref_filter_porcelain_msg() to enable translated messages for the %(upstream:tack) atom. Although branch.c doesn't currently use ref-filter's printing API's, this will ensure that when it does in the future patches, we do not need to worry about translation. Written-by:

[PATCH v5b 14/17] ref-filter: allow porcelain to translate messages in the output

2016-04-25 Thread Karthik Nayak
Introduce setup_ref_filter_porcelain_msg() so that the messages used in the atom %(upstream:track) can be translated if needed. This is needed as we port branch.c to use ref-filter's printing API's. Written-by: Matthieu Moy Mentored-by: Christian Couder

[PATCH v5b 01/17] ref-filter: implement %(if), %(then), and %(else) atoms

2016-04-25 Thread Karthik Nayak
Implement %(if), %(then) and %(else) atoms. Used as %(if)...%(then)...%(end) or %(if)...%(then)...%(else)...%(end). If the format string between %(if) and %(then) expands to an empty string, or to only whitespaces, then the whole %(if)...%(end) expands to the string following %(then). Otherwise,

[PATCH v5b 03/17] ref-filter: implement %(if:equals=) and %(if:notequals=)

2016-04-25 Thread Karthik Nayak
Implement %(if:equals=) wherein the if condition is only satisfied if the value obtained between the %(if:...) and %(then) atom is the same as the given ''. Similarly, implement (if:notequals=) wherein the if condition is only satisfied if the value obtained between the %(if:...) and %(then) atom

[PATCH v5b 07/17] ref-filter: make %(upstream:track) prints "[gone]" for invalid upstreams

2016-04-25 Thread Karthik Nayak
Borrowing from branch.c's implementation print "[gone]" whenever an unknown upstream ref is encountered instead of just ignoring it. This makes sure that when branch.c is ported over to using ref-filter APIs for printing, this feature is not lost. Make changes to t/t6300-for-each-ref.sh and

[PATCH v5b 06/17] ref-filter: introduce format_ref_array_item()

2016-04-25 Thread Karthik Nayak
To allow column display, we will need to first render the output in a string list to allow print_columns() to compute the proper size of each column before starting the actual output. Introduce the function format_ref_array_item() that does the formatting of a ref_array_item to an strbuf.

[PATCH v5b 04/17] ref-filter: modify "%(objectname:short)" to take length

2016-04-25 Thread Karthik Nayak
Add support for %(objectname:short=) which would print the abbreviated unique objectname of given length. When no length is specified, the length is 'DEFAULT_ABBREV'. The minimum length is 'MINIMUM_ABBREV'. The length may be exceeded to ensure that the provided object name is unique. Add tests

Re: [PATCH 00/83] libify apply and use lib in am

2016-04-25 Thread Johannes Schindelin
Hi Chris, On Sun, 24 Apr 2016, Christian Couder wrote: > On Sun, Apr 24, 2016 at 6:27 PM, Christian Couder > wrote: > > On Sun, Apr 24, 2016 at 5:23 PM, Ramsay Jones > > wrote: > >> > >> > >> On 24/04/16 14:33, Christian Couder wrote: >

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

2016-04-25 Thread Johannes Schindelin
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 @@ static inline void close_pair(int fd[2]) > } > > #ifndef GIT_WINDOWS_NATIVE > -static inline

Re: [PATCH 83/83] builtin/am: use apply api in run_apply()

2016-04-25 Thread Johannes Schindelin
Hi Chris, On Sun, 24 Apr 2016, Christian Couder wrote: > [...] > /* >* If we are allowed to fall back on 3-way merge, don't give false >* errors during the initial attempt. >*/ > + > if (state->threeway && !index_file) { > - cp.no_stdout = 1; > -

  1   2   >