[PATCH v13 09/12] tag.c: use 'ref-filter' data structures

2015-08-21 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com Make 'tag.c' use 'ref-filter' data structures and make changes to support the new data structures. This is a part of the process of porting 'tag.c' to use 'ref-filter' APIs. This is a temporary step before porting 'tag.c' to use 'ref-filter' completely.

[PATCH v13 12/12] tag.c: implement '--merged' and '--no-merged' options

2015-08-21 Thread Karthik Nayak
Use 'ref-filter' APIs to implement the '--merged' and '--no-merged' options into 'tag.c'. The '--merged' option lets the user to only list tags merged into the named commit. The '--no-merged' option lets the user to only list tags not merged into the named commit. If no object is provided it

[PATCH v13 10/12] tag.c: use 'ref-filter' APIs

2015-08-21 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com Make 'tag.c' use 'ref-filter' APIs for iterating through refs, sorting and printing of refs. This removes most of the code used in 'tag.c' replacing it with calls to the 'ref-filter' library. Make 'tag.c' use the 'filter_refs()' function provided by

[PATCH v13 01/12] ref-filter: move `struct atom_value` to ref-filter.c

2015-08-21 Thread Karthik Nayak
Since atom_value is only required for the internal working of ref-filter it doesn't belong in the public header. Helped-by: Eric Sunshine sunsh...@sunshineco.com Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik

[PATCH v13 04/12] ref-filter: implement an `align` atom

2015-08-21 Thread Karthik Nayak
Implement an `align` atom which left-, middle-, or right-aligns the content between %(align:..) and %(end). It is followed by `:width,position`, where the `position` is either left, right or middle and `width` is the size of the area into which the content will be placed. If the content between

[PATCH v13 03/12] utf8: add function to align a string into given strbuf

2015-08-21 Thread Karthik Nayak
Add strbuf_utf8_align() which will align a given string into a strbuf as per given align_type and width. If the width is greater than the string length then no alignment is performed. Helped-by: Eric Sunshine sunsh...@sunshineco.com Mentored-by: Christian Couder christian.cou...@gmail.com

[PATCH v13 00/12] port tag.c to use ref-filter APIs

2015-08-21 Thread Karthik Nayak
Part of my GSoC project to port tag.c to use ref-filter APIs. This is a follow up to porting for-each-ref to use ref-filter APIs. Version 12 can be found here: thread.gmane.org/gmane.comp.version-control.git/276133 Changes since v12: * %(align)...%(end) now quote formats everything in between

[PATCH v13 02/12] ref-filter: introduce ref_formatting_state and ref_formatting_stack

2015-08-21 Thread Karthik Nayak
Introduce ref_formatting_state which will hold the formatted output strbuf instead of directly printing to stdout. This will help us in creating modifier atoms which modify the format specified before printing to stdout. Implement a stack machinery for ref_formatting_state, this allows us to push

[PATCH v13 08/12] ref-filter: add option to match literal pattern

2015-08-21 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com Since 'ref-filter' only has an option to match path names add an option for plain fnmatch pattern-matching. This is to support the pattern matching options which are used in `git tag -l` and `git branch -l` where we can match patterns like `git tag -l

[PATCH v13 07/12] ref-filter: add support to sort by version

2015-08-21 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com Add support to sort by version using the v:refname and version:refname option. This is achieved by using the 'versioncmp()' function as the comparing function for qsort. This option is included to support sorting by versions in `git tag -l` which will

[PATCH v13 05/12] ref-filter: add option to filter out tags, branches and remotes

2015-08-21 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com Add a function called 'for_each_reftype_fullpath()' to refs.{c,h} which iterates through each ref for the given path without trimming the path and also accounting for broken refs, if mentioned. Add 'filter_ref_kind()' in ref-filter.c to check the kind of

[PATCH v13 11/12] tag.c: implement '--format' option

2015-08-21 Thread Karthik Nayak
Implement the '--format' option provided by 'ref-filter'. This lets the user list tags as per desired format similar to the implementation in 'git for-each-ref'. Add tests and documentation for the same. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy

[PATCH v13 06/12] ref-filter: support printing N lines from tag annotation

2015-08-21 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com In 'tag.c' we can print N lines from the annotation of the tag using the '-nnum' option. Copy code from 'tag.c' to 'ref-filter' and modify 'ref-filter' to support printing of N lines from the annotation of tags. Mentored-by: Christian Couder

[PATCH v4 08/10] grep/pcre: support utf-8

2015-08-21 Thread Nguyễn Thái Ngọc Duy
In the previous change in this function, we add locale support for single-byte encodings only. It looks like pcre only supports utf-* as multibyte encodings, the others are left in the cold (which is fine). We need to enable PCRE_UTF8 so pcre can find character boundary correctly. It's needed for

[PATCH v4 10/10] diffcore-pickaxe: support case insensitive match on non-ascii

2015-08-21 Thread Nguyễn Thái Ngọc Duy
Similar to the grep -F -i case, we can't use kws on icase search outside ascii range, so we quote the string and pass it to regcomp as a basic regexp and let regex engine deal with case sensitivity. The new test is put in t7812 instead of t4209-log-pickaxe because lib-gettext.sh might cause

[PATCH v4 09/10] diffcore-pickaxe: share regex error handling code

2015-08-21 Thread Nguyễn Thái Ngọc Duy
There's another regcomp code block coming in this function. By moving the error handling code out of this block, we don't have to add the same error handling code in the new block. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- diffcore-pickaxe.c | 16 1 file changed,

Re: [PATCH 7/7] submodule: implement `module_clone` as a builtin helper

2015-08-21 Thread Jeff King
On Mon, Aug 17, 2015 at 05:22:03PM -0700, Stefan Beller wrote: +static int module_clone(int argc, const char **argv, const char *prefix) [...] + /* Redirect the worktree of the submodule in the superprojects config */ + if (!is_absolute_path(sm_gitdir)) { + char *s =

[PATCH v4 01/10] grep: allow -F -i combination

2015-08-21 Thread Nguyễn Thái Ngọc Duy
-F means no regex, not case sensitive so it should not override -i Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/grep.c b/builtin/grep.c index d04f440..2d392e9 100644 --- a/builtin/grep.c +++

[PATCH v4 03/10] test-regex: expose full regcomp() to the command line

2015-08-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- test-regex.c | 56 ++-- 1 file changed, 50 insertions(+), 6 deletions(-) diff --git a/test-regex.c b/test-regex.c index 0dc598e..3b5641c 100644 --- a/test-regex.c +++ b/test-regex.c @@

[PATCH v4 06/10] grep/pcre: prepare locale-dependent tables for icase matching

2015-08-21 Thread Nguyễn Thái Ngọc Duy
The default tables are usually built with C locale and only suitable for LANG=C or similar. This should make case insensitive search work correctly for all single-byte charsets. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- grep.c | 8 ++-- grep.h

[PATCH v4 04/10] grep/icase: avoid kwsset on literal non-ascii strings

2015-08-21 Thread Nguyễn Thái Ngọc Duy
When we detect the pattern is just a literal string, we avoid heavy regex engine and use fast substring search implemented in kwsset.c. But kws uses git-ctype which is locale-independent so it does not know how to fold case properly outside ascii range. Let regcomp or pcre take care of this case

[PATCH v4 02/10] grep: break down an if stmt in preparation for next changes

2015-08-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- grep.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/grep.c b/grep.c index b58c7c6..bd32f66 100644 --- a/grep.c +++ b/grep.c @@ -403,9 +403,11 @@ static void compile_regexp(struct grep_pat *p, struct grep_opt

[PATCH v4 00/10] icase match on non-ascii

2015-08-21 Thread Nguyễn Thái Ngọc Duy
Sorry it took more than a month for a simple reroll. Free time (with energy left) is rare these days. v4 adds system regex's icase support detection and only runs tests in these cases. This should fix test failures on Windows where compat regex does not support icase. Diff from v3 below diff

[PATCH v4 05/10] grep/icase: avoid kwsset when -F is specified

2015-08-21 Thread Nguyễn Thái Ngọc Duy
Similar to the previous commit, we can't use kws on icase search outside ascii range. But we can't simply pass the pattern to regcomp/pcre like the previous commit because it may contain regex special characters, so we need to quote the regex first. To avoid misquote traps that could lead to

[PATCH v4 07/10] gettext: add is_utf8_locale()

2015-08-21 Thread Nguyễn Thái Ngọc Duy
This function returns true if git is running under an UTF-8 locale. pcre in the next patch will need this. is_encoding_utf8() is used instead of strcmp() to catch both utf-8 and utf8 suffixes. When built with no gettext support, we peek in several env variables to detect UTF-8. pcre library

[PATCH] describe --contains: default to HEAD when no commit-ish is given

2015-08-21 Thread SZEDER Gábor
'git describe --contains' doesn't default to HEAD when no commit is given, and it doesn't produce any output, not even an error: ~/src/git ((v2.5.0))$ ./git describe --contains ~/src/git ((v2.5.0))$ ./git describe --contains HEAD v2.5.0^0 Unlike other 'git describe' options, the

Re: [PATCH v2 7/9] builtin/send-pack.c: Use option parsing API

2015-08-21 Thread Jeff King
On Wed, Aug 19, 2015 at 03:46:25PM -0400, Dave Borowitz wrote: + unsigned dry_run = 0; + unsigned send_mirror = 0; + unsigned force_update = 0; + unsigned quiet = 0; + unsigned push_cert = 0; + unsigned use_thin_pack = 0; + unsigned atomic =

Re: [PATCH 2/3] am: do not corrupt the index stat state

2015-08-21 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: Reported-by: Linus Torvalds Signed-off-by: David Aguilar dav...@gmail.com @@ -1975,10 +1977,20 @@ static int clean_index(const unsigned char *head, const unsigned char *remote) memset(pathspec, 0, sizeof(pathspec)); + memset(opts, 0,

Re: [BUG/PATCH] t9350-fast-export: Add failing test for symlink-to-directory

2015-08-21 Thread Jeff King
On Wed, Aug 19, 2015 at 03:46:27PM -0400, Anders Kaseorg wrote: git fast-export | git fast-import fails to preserve a commit that replaces a symlink with a directory. Add a failing test case demonstrating this bug. The fast-export output for the commit in question looks like commit

Re: [PATCH 3/3] am: rename struct tree_desc t to desc for readability

2015-08-21 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: Signed-off-by: David Aguilar dav...@gmail.com --- builtin/am.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) Naming the tree_desc parameter given to unpack_trees() as t is (unfortunately) an established convention, just like we often

Re: [PATCH] describe: make '--always' fallback work after '--exact-match' failed

2015-08-21 Thread Junio C Hamano
SZEDER Gábor sze...@ira.uka.de writes: Quoting Junio C Hamano gits...@pobox.com: Well, that can be argued both ways. ... 'git describe' errors out by default if it can't describe the given commit. Yes. describe always fails when it cannot produce an acceptable description. And --always

Re: Minor bug with help.autocorrect.

2015-08-21 Thread Jeff King
On Fri, Aug 21, 2015 at 09:10:35AM -0700, Junio C Hamano wrote: $ git \#fetch error: invalid key: pager.#fetch error: invalid key: alias.#fetch git: '#fetch' is not a git command. See 'git --help'. Did you mean this? fetch Thanks. I somehow thought that we had some

Re: [BUG/PATCH] t9350-fast-export: Add failing test for symlink-to-directory

2015-08-21 Thread Anders Kaseorg
On Fri, 21 Aug 2015, Jeff King wrote: - we may still have the opposite problem with renames. That is, a rename is _also_ a deletion, but will go to the end. So I would expect renaming the symlink foo to bar and then adding foo/world would end up with: M 100644 :3

git log date filter behavior with --date-order

2015-08-21 Thread Kirill Likhodedov
Hi, I’ve faced a strange behavior when filtering git log by date. When used with “--date-order” it gives significantly less results that when used without that option: # git log --pretty=oneline --remotes --after=Wed May 20 23:00:00 MSK 2015 --before=Fri May 22 00:00:00 MSK 2015 -- | wc -l

Re: Minor bug with help.autocorrect.

2015-08-21 Thread Junio C Hamano
Bjørnar Snoksrud snoks...@gmail.com writes: If you mis-type a git command starting with a non-letter, git internals will spit out some errors at you. $ git 5fetch error: invalid key: pager.5fetch error: invalid key: alias.5fetch git: '5fetch' is not a git command. See 'git --help'. Did

Re: [PATCH] describe --contains: default to HEAD when no commit-ish is given

2015-08-21 Thread Junio C Hamano
SZEDER Gábor sze...@ira.uka.de writes: 'git describe --contains' doesn't default to HEAD when no commit is given, and it doesn't produce any output, not even an error: ~/src/git ((v2.5.0))$ ./git describe --contains ~/src/git ((v2.5.0))$ ./git describe --contains HEAD v2.5.0^0 Good

[PATCH] Documentation/config: fix inconsistent label

2015-08-21 Thread Andreas Schwab
Change ref to pattern in the description of gc.*.reflogExpireUnreachable, since that is what the text refers to. Signed-off-by: Andreas Schwab sch...@linux-m68k.org --- Documentation/config.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/config.txt

Re: [RFC PATCH 2/3] run-commands: add an async queue processor

2015-08-21 Thread Stefan Beller
On Fri, Aug 21, 2015 at 12:44 PM, Jeff King p...@peff.net wrote: On Fri, Aug 21, 2015 at 12:05:13PM -0700, Junio C Hamano wrote: The primary reason I suspect is because you sent to a wrong set of people. Submodule folks have largely been working in the scripted ones, and may not necessarily

Re: [WIP/PATCH 3/3] submodule: helper to run foreach in parallel

2015-08-21 Thread Stefan Beller
On Fri, Aug 21, 2015 at 12:23 PM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: +struct submodule_args { + const char *name; + const char *path; + const char *sha1; + const char *toplevel; + const char *prefix; + const char **cmd;

Re: [RFC PATCH 2/3] run-commands: add an async queue processor

2015-08-21 Thread Junio C Hamano
Stefan Beller sbel...@google.com writes: +struct task_queue *create_task_queue(unsigned max_threads) +{ + struct task_queue *aq = xmalloc(sizeof(*aq)); + +#ifndef NO_PTHREADS + int i; + if (!max_threads) + aq-max_threads = online_cpus(); + else +

Re: [PATCH 2/3] format_config: simplify buffer handling

2015-08-21 Thread Jeff King
On Fri, Aug 21, 2015 at 10:43:58AM -0700, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: I wonder if we can do this instead if (!omit_values) { - if (show_keys) + if (show_keys value_) strbuf_addch(buf, key_delim);

Re: [RFC PATCH 2/3] run-commands: add an async queue processor

2015-08-21 Thread Jeff King
On Fri, Aug 21, 2015 at 12:05:13PM -0700, Junio C Hamano wrote: The primary reason I suspect is because you sent to a wrong set of people. Submodule folks have largely been working in the scripted ones, and may not necessarily be the ones who are most familiar with the run-command

Re: [WIP/PATCH 3/3] submodule: helper to run foreach in parallel

2015-08-21 Thread Junio C Hamano
Stefan Beller sbel...@google.com writes: +struct submodule_args { + const char *name; + const char *path; + const char *sha1; + const char *toplevel; + const char *prefix; + const char **cmd; + struct submodule_output *out; + sem_t *mutex; +}; I do not

Re: [RFC PATCH 2/3] run-commands: add an async queue processor

2015-08-21 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Fri, Aug 21, 2015 at 12:05:13PM -0700, Junio C Hamano wrote: The primary reason I suspect is because you sent to a wrong set of people. Submodule folks have largely been working in the scripted ones, and may not necessarily be the ones who are most

Re: [RFC/PATCH] contrib: teach completion about git-worktree options and arguments

2015-08-21 Thread SZEDER Gábor
Quoting Junio C Hamano gits...@pobox.com: Eric Sunshine sunsh...@sunshineco.com writes: On Thu, Jul 23, 2015 at 4:49 PM, Eric Sunshine sunsh...@sunshineco.com wrote: Complete subcommands 'add' and 'prune', as well as their respective options --force, --detach, --dry-run, --verbose, and

Re: [RFC PATCH 2/3] run-commands: add an async queue processor

2015-08-21 Thread Jeff King
On Fri, Aug 21, 2015 at 12:48:23PM -0700, Stefan Beller wrote: Before even looking at the implementation, my first question would be whether this pattern is applicable in several places in git (i.e., is it worth the extra complexity of abstracting out in the first place). I think there

[PoC PATCH] completion: support 'git worktree'

2015-08-21 Thread SZEDER Gábor
Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- I wrote a completion function for 'git worktree' as well, turns out a week or two before you posted this, but I never submitted it as it was way too convoluted. Anyway, will send it in reply to this, just for reference. And here it is. From

Re: [RFC PATCH 2/3] run-commands: add an async queue processor

2015-08-21 Thread Stefan Beller
On Fri, Aug 21, 2015 at 1:47 PM, Junio C Hamano gits...@pobox.com wrote: I do not think we are on the same wavelength. What I meant was to do this: aq = xmalloc(...); set up _everything_ in aq and make it a consistent state; /* aq-first and aq-last are part of

Re: [RFC PATCH 2/3] run-commands: add an async queue processor

2015-08-21 Thread Stefan Beller
On Fri, Aug 21, 2015 at 12:05 PM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: This adds functionality to do work in parallel. The whole life cycle of such a thread pool would look like struct task_queue * tq = create_task_queue(32); // no of threads

Re: [RFC PATCH 2/3] run-commands: add an async queue processor

2015-08-21 Thread Stefan Beller
On Fri, Aug 21, 2015 at 12:51 PM, Jeff King p...@peff.net wrote: On Fri, Aug 21, 2015 at 12:48:23PM -0700, Stefan Beller wrote: Before even looking at the implementation, my first question would be whether this pattern is applicable in several places in git (i.e., is it worth the extra

Urgent, Dear Invited Author,

2015-08-21 Thread Olga Nikolova
Dear Invited Author, You have 6 days until August 25 for your Invited Paper in the WSEAS Conferences in Seoul, South Korea. We have just upgraded the role of Invited Speakers (see below). The extended version of the accepted papers will be published in our collaborating 44 ISI Journals. If

Re: [PATCH v4] git-p4: fix faulty paths for case insensitive systems

2015-08-21 Thread Junio C Hamano
larsxschnei...@gmail.com writes: From: Lars Schneider larsxschnei...@gmail.com PROBLEM: We run P4 servers on Linux and P4 clients on Windows. For an unknown reason the file path for a number of files in P4 does not match the directory path with respect to case sensitivity. E.g. `p4 files`

Re: [PATCH 2/3] format_config: simplify buffer handling

2015-08-21 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: I wonder if we can do this instead if (!omit_values) { - if (show_keys) + if (show_keys value_) strbuf_addch(buf, key_delim); though. That would eliminate the need for rolling back. No we

Re: [PATCH] Documentation/config: fix inconsistent label

2015-08-21 Thread Junio C Hamano
Andreas Schwab sch...@linux-m68k.org writes: Change ref to pattern in the description of gc.*.reflogExpireUnreachable, since that is what the text refers to. Signed-off-by: Andreas Schwab sch...@linux-m68k.org --- Makes sense. Thanks. Documentation/config.txt | 2 +- 1 file changed, 1

Re: [RFC/PATCH] contrib: teach completion about git-worktree options and arguments

2015-08-21 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: On Thu, Jul 23, 2015 at 4:49 PM, Eric Sunshine sunsh...@sunshineco.com wrote: Complete subcommands 'add' and 'prune', as well as their respective options --force, --detach, --dry-run, --verbose, and --expire. Also complete 'refname' in git

[PATCH 4/3] builtin/log.c: minor reformat

2015-08-21 Thread Junio C Hamano
Two logical lines that were not overly long was split in the middle, which made them read worse. Signed-off-by: Junio C Hamano gits...@pobox.com --- builtin/log.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index 0cdd889..a491d3d 100644

Re: [RFC PATCH 2/3] run-commands: add an async queue processor

2015-08-21 Thread Junio C Hamano
Stefan Beller sbel...@google.com writes: This adds functionality to do work in parallel. The whole life cycle of such a thread pool would look like struct task_queue * tq = create_task_queue(32); // no of threads for (...) add_task(tq, process_one_item_function, item); //

[PATCH v4] git-p4: fix faulty paths for case insensitive systems

2015-08-21 Thread larsxschneider
From: Lars Schneider larsxschnei...@gmail.com PROBLEM: We run P4 servers on Linux and P4 clients on Windows. For an unknown reason the file path for a number of files in P4 does not match the directory path with respect to case sensitivity. E.g. `p4 files` might return //depot/path/to/file1

Re: Minor bug with help.autocorrect.

2015-08-21 Thread Junio C Hamano
Jeff King p...@peff.net writes: I think the plan is: 1. squelch the warning message from the config code; even if we change the config format to pager.*.command, we will have to support pager.* for historical reasons. 2. introduce pager.*.command so that git foo_bar can use

Submodule, subtree, or something else?

2015-08-21 Thread Jānis Rukšāns
Hello, First of all, I apologise for the wall of text that follows; obviously I am bad at this. My $DAYJOB is switching from Subversion to Git, primarily because of it's distributed nature (we are scattered all across the globe), and the ease of branching and merging. One issue that has popped

Where to report security vulnerabilities in git?

2015-08-21 Thread Guido Vranken
List, I would like to report security vulnerabilities in git. Due to the sensitive nature of security-impacting bugs I would like to know if there's a dedicated e-mail address for this, so that the issues at play can be patched prior to a coordinated public disclosure of the germane exploitation

Re: Which branch(es) contain certain commits? (was Re: (unknown))

2015-08-21 Thread Junio C Hamano
Ivan Chernyavsky campo...@yandex.ru writes: But now I had a look on the source and I can see that builtin/branch.c builds the list of references and prints them in a single place (print_ref_list()) so I will have to split that function into two in order to reuse existing functionality.

Which branch(es) contain certain commits? (was Re: (unknown))

2015-08-21 Thread Ivan Chernyavsky
17.08.2015, 20:49, Junio C Hamano gits...@pobox.com:  Duy Nguyen pclo...@gmail.com writes:   On Wed, Aug 5, 2015 at 7:47 PM, Ivan Chernyavsky campo...@yandex.ru wrote:  That is a dangeous thought. I'd understand if it were internally  two step process, i.e. (1) the first pass finds

[PATCH 3z/3] log: make '-p' imply '-m --cc'

2015-08-21 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: The latter was inspired by a recent discussion, most notably http://thread.gmane.org/gmane.comp.version-control.git/273937/focus=273988 but implements it with a much less UI impact. Tweaking git log -p has a lot of fallout---interested parties

Re: [RFC/PATCH] contrib: teach completion about git-worktree options and arguments

2015-08-21 Thread Eric Sunshine
On Fri, Aug 21, 2015 at 4:49 PM, SZEDER Gábor sze...@ira.uka.de wrote: Quoting Junio C Hamano gits...@pobox.com: Eric Sunshine sunsh...@sunshineco.com writes: On Thu, Jul 23, 2015 at 4:49 PM, Eric Sunshine sunsh...@sunshineco.com wrote: Complete subcommands 'add' and 'prune', as well as their

Re: [PATCH] describe: make '--always' fallback work after '--exact-match' failed

2015-08-21 Thread SZEDER Gábor
Quoting Junio C Hamano gits...@pobox.com: SZEDER Gábor sze...@ira.uka.de writes: 'git describe [...] --always' should always show the unique abbreviated object name as a fallback when the given commit cannot be described with the given set of options, see da2478dbb0 (describe --always: fall

Unable to create temporary file '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied

2015-08-21 Thread Joakim Tjernlund
I cannot push: # git push origin Login for jo...@git.transmode.se Password: Counting objects: 7, done. Delta compression using up to 4 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 13.73 KiB | 0 bytes/s, done. Total 7 (delta 4), reused 0 (delta 0) fatal: Unable to

Re: Unable to create temporary file '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied

2015-08-21 Thread Joakim Tjernlund
On Fri, 2015-08-21 at 13:36 +0200, Joakim Tjernlund wrote: I cannot push: # git push origin Login for jo...@git.transmode.se Password: Counting objects: 7, done. Delta compression using up to 4 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 13.73 KiB | 0

Re: [PATCH 2/3] format_config: simplify buffer handling

2015-08-21 Thread SZEDER Gábor
Quoting Jeff King p...@peff.net: When formatting a config value into a strbuf, we may end up stringifying it into a fixed-size buffer using sprintf, and then copying that buffer into the strbuf. We can eliminate the middle-man (and drop some calls to sprintf!) by writing directly to the

Re: [RFC PATCH 2/3] run-commands: add an async queue processor

2015-08-21 Thread Stefan Beller
On Fri, Aug 21, 2015 at 12:44 PM, Jeff King p...@peff.net wrote: On Fri, Aug 21, 2015 at 12:05:13PM -0700, Junio C Hamano wrote: The primary reason I suspect is because you sent to a wrong set of people. Submodule folks have largely been working in the scripted ones, and may not necessarily

[PATCH v2 0/5] fix local clone from a linked checkout

2015-08-21 Thread Nguyễn Thái Ngọc Duy
On Wed, Jul 15, 2015 at 8:25 PM, Duy Nguyen pclo...@gmail.com wrote: On Wed, Jul 15, 2015 at 11:40:18AM +0200, Bjørnar Snoksrud wrote: I reported this before, but now I have a nice topic to hang it on - I have re-reproduced the bug using a build from master as of today, using the new worktree

[PATCH v2 5/5] clone: better error when --reference is a linked checkout

2015-08-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/clone.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/builtin/clone.c b/builtin/clone.c index 836fb64..7a010bb 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -294,9 +294,14 @@ static int

[PATCH v2 2/5] enter_repo: avoid duplicating logic, use is_git_directory() instead

2015-08-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- path.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/path.c b/path.c index a536ee3..7340e11 100644 --- a/path.c +++ b/path.c @@ -441,8 +441,7 @@ const char *enter_repo(const char *path, int strict) else if

[PATCH v2 3/5] enter_repo: allow .git files in strict mode

2015-08-21 Thread Nguyễn Thái Ngọc Duy
Strict mode is about not guessing where .git is. If the user points to a .git file, we know exactly where the target .git dir will be. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- path.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/path.c b/path.c

[PATCH v2 4/5] clone: allow --local from a linked checkout

2015-08-21 Thread Nguyễn Thái Ngọc Duy
Noticed-by: Bjørnar Snoksrud snoks...@gmail.com Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/clone.c | 6 -- t/t2025-worktree-add.sh | 5 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c index 578da85..836fb64

[PATCH v2 1/5] path.c: delete an extra space

2015-08-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/path.c b/path.c index 95acbaf..a536ee3 100644 --- a/path.c +++ b/path.c @@ -431,7 +431,7 @@ const char *enter_repo(const char *path, int strict) }

[PATCH 0/8] Resurrect diff-lib.c: adjust position of i-t-a entries in diff

2015-08-21 Thread Nguyễn Thái Ngọc Duy
On Thu, Jun 25, 2015 at 8:07 PM, Junio C Hamano gits...@pobox.com wrote: Perhaps a good and safe way forward to resurrect what d95d728a wanted to do is to first add an option to tell run_diff_index() and run_diff_files() which behaviour the caller wants to see, add that only to the caller in

[PATCH 2/8] Add and use convenient macro ce_intent_to_add()

2015-08-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/rm.c | 2 +- cache-tree.c | 2 +- cache.h | 1 + read-cache.c | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/builtin/rm.c b/builtin/rm.c index 80b972f..8829b09 100644 --- a/builtin/rm.c +++

[PATCH 3/8] apply: fix adding new files on i-t-a entries

2015-08-21 Thread Nguyễn Thái Ngọc Duy
Applying a patch that adds a file when that file is registered with git add -N will fail with message already exists in index because git-apply checks, sees those i-t-a entries and aborts. git-apply does not realize those are for bookkeeping only, they do not really exist in the index. This patch

[PATCH 4/8] apply: make sure check_preimage() does not leave empty file on error

2015-08-21 Thread Nguyễn Thái Ngọc Duy
The test case probably describes the test scenario the best. We have a patch to modify some file but the base file is gone. Because check_preimage() finds an index entry with the same old_name, it tries to restore the on-disk base file with cached content with checkout_target() and move on. If

[PATCH 1/8] blame: remove obsolete comment

2015-08-21 Thread Nguyễn Thái Ngọc Duy
That someday in the comment happened two years later in b65982b (Optimize diff-index --cached using cache-tree - 2009-05-20) Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/blame.c | 5 - 1 file changed, 5 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index

[PATCH 5/8] checkout(-index): do not checkout i-t-a entries

2015-08-21 Thread Nguyễn Thái Ngọc Duy
The cached blob of i-t-a entries are empty blob. By checkout, we delete the content we have. Don't do it. This is done higher up instead of inside checkout_entry() because we would have limited options in there: silently ignore, loudly ignore, die. At higher level we can do better reporting. For

[PATCH 6/8] grep: make it clear i-t-a entries are ignored

2015-08-21 Thread Nguyễn Thái Ngọc Duy
The expression !S_ISREG(ce) covers i-t-a entries as well because ce-ce_mode would be zero then. I could make a comment saying that, but it's probably better just to comment with code, in case i-t-a entry content changes in future. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com ---

Re: Where to report security vulnerabilities in git?

2015-08-21 Thread Stefan Beller
The addresses are still valid. (I think there was a plan to introduce a git-security@... but I am not sure if that happened.) Current practice is to contact Junio C Hamano gitster at pobox.com. Cc-ing Jeff King peff at peff.net isn't a bad idea while at it. Just go for that. On Fri, Aug 21,

Re: Where to report security vulnerabilities in git?

2015-08-21 Thread Junio C Hamano
On Fri, Aug 21, 2015 at 3:55 PM, Guido Vranken guidovran...@gmail.com wrote: germane exploitation details. I did find an older thread in the archive addressing this question ( http://thread.gmane.org/gmane.comp.version-control.git/260328/ ), but because I'm unsure if those e-mail addresses are

[PATCH 7/8] diff.h: extend flags field to 64 bits because we're out of bits

2015-08-21 Thread Nguyễn Thái Ngọc Duy
I renamed both flags and touched_flags fields while making this patch to make sure I was aware of how these flags were manipulated (besides DIFF_OPT* macros). So hopefully I didn't miss anything. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/commit.c | 2 +- diff-lib.c

Re: Submodule, subtree, or something else?

2015-08-21 Thread Stefan Beller
On Fri, Aug 21, 2015 at 3:47 PM, Jānis Rukšāns janis.ruks...@gmail.com wrote: Hello, First of all, I apologise for the wall of text that follows; obviously I am bad at this. My $DAYJOB is switching from Subversion to Git, primarily because of it's distributed nature (we are scattered all

[PATCH 7/8] diff.h: extend flags field to 64 bits because we're out of bits

2015-08-21 Thread Nguyễn Thái Ngọc Duy
I renamed both flags and touched_flags fields while making this patch to make sure I was aware of how these flags were manipulated (besides DIFF_OPT* macros). So hopefully I didn't miss anything. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Resend to the right recipients. I screwed

[PATCH 8/8] Resurrect diff-lib.c: adjust position of i-t-a entries in diff

2015-08-21 Thread Nguyễn Thái Ngọc Duy
The original commit d95d728aba06a34394d15466045cbdabdada58a2 was reverted in commit 78cc1a540ba127b13f2f3fd531777b57f3a9cd46 because we were (and still are) not ready for a new world order. A lot more investigation must be done to see what is impacted. See the 78cc1a5 for details. This patch

[PATCH v3] gc: save log from daemonized gc --auto and print it next time

2015-08-21 Thread Nguyễn Thái Ngọc Duy
While commit 9f673f9 (gc: config option for running --auto in background - 2014-02-08) helps reduce some complaints about 'gc --auto' hogging the terminal, it creates another set of problems. The latest in this set is, as the result of daemonizing, stderr is closed and all warnings are lost. This

Re: [PATCH] trailer: ignore first line of message

2015-08-21 Thread Matthieu Moy
Christian Couder christian.cou...@gmail.com writes: When looking for the start of the trailers in the message we are passed, we should ignore the first line of the message. Thanks, this fixes my issue. There's one more corner-case I've just thought of: git commit -m 'place of code: change we

[PATCH 3/3] am: rename struct tree_desc t to desc for readability

2015-08-21 Thread David Aguilar
Signed-off-by: David Aguilar dav...@gmail.com --- builtin/am.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/am.c b/builtin/am.c index 9db1b34..7e6860d 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -1907,7 +1907,7 @@ static int fast_forward_to(struct tree

Re: [PATCH v2] git-p4: fix faulty paths for case insensitive systems

2015-08-21 Thread Lars Schneider
@Luke, Torsten, Eric, Junio: Thanks for the great feedback. I incorporated everything into [PATCH v3] git-p4: fix faulty paths for case insensitive systems”. Is this the correct way? I have never worked with the email-patch-files before :-) - Lars On 20 Aug 2015, at 17:55, Junio C Hamano

[PATCH 2/3] am: do not corrupt the index stat state

2015-08-21 Thread David Aguilar
Reported-by: Linus Torvalds Signed-off-by: David Aguilar dav...@gmail.com --- builtin/am.c| 14 +- t/t4151-am-abort.sh | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/builtin/am.c b/builtin/am.c index 1399c8d..9db1b34 100644 --- a/builtin/am.c +++

[PATCH 1/3] t4151: demonstrate that builtin am corrupts index' stat data

2015-08-21 Thread David Aguilar
From: Johannes Schindelin johannes.schinde...@gmx.de Reported by Linus Torvalds. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- t/t4151-am-abort.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh index

Re: [PATCH v2] git-p4: fix faulty paths for case insensitive systems

2015-08-21 Thread Eric Sunshine
On Fri, Aug 21, 2015 at 4:08 AM, Lars Schneider larsxschnei...@gmail.com wrote: @Luke, Torsten, Eric, Junio: Thanks for the great feedback. I incorporated everything into [PATCH v3] git-p4: fix faulty paths for case insensitive systems”. Is this the correct way? I have never worked with the