Re: [PATCH 2/3] revision: add --grep-reflog to filter commits by reflog messages

2012-09-29 Thread Nguyen Thai Ngoc Duy
On Sat, Sep 29, 2012 at 12:54 PM, Junio C Hamano gits...@pobox.com wrote: I like how callers not doing a reflog walk do not have to pay the price to do the extra allocating. We could further limit it to only when --grep-reflog is in effect, but I guess that would mean wading through

[PATCH v2 0/9] Fix GIT_CEILING_DIRECTORIES that contain symlinks

2012-09-29 Thread Michael Haggerty
v2 of the series, with the following changes from v1: Patch 2/9 is new. Patch 4/9: remove an unnecessary memcpy(). (This change doesn't affect the tip of the branch because the memcpy() was removed anyway in the second-to-last patch.) Patch 8/9: remove a superfluous len++, and improve the

[PATCH v2 3/9] Introduce new function real_path_if_valid()

2012-09-29 Thread Michael Haggerty
The function is like real_path(), except that it returns NULL on error instead of dying. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- abspath.c | 5 + cache.h | 1 + 2 files changed, 6 insertions(+) diff --git a/abspath.c b/abspath.c index f8a526f..40cdc46 100644 ---

[PATCH v2 4/9] longest_ancestor_length(): use string_list_split()

2012-09-29 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- path.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/path.c b/path.c index cbbdf7d..f455e8e 100644 --- a/path.c +++ b/path.c @@ -12,6 +12,7 @@ */ #include cache.h #include strbuf.h +#include

[PATCH v2 1/9] Introduce new static function real_path_internal()

2012-09-29 Thread Michael Haggerty
It accepts a new parameter, die_on_error. If die_on_error is false, it simply cleans up after itself and returns NULL rather than dying. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- abspath.c | 93 --- 1 file changed, 72

[PATCH v2 5/9] longest_ancestor_length(): explicitly filter list before loop

2012-09-29 Thread Michael Haggerty
Separate the step of filtering and normalizing elements of the prefixes list from the iteration that looks for the longest prefix. This will help keep the function testable after we not only normalize the paths, but also convert them into real paths. Signed-off-by: Michael Haggerty

[PATCH v2 6/9] longest_ancestor_length(): always add a slash to the end of prefixes

2012-09-29 Thread Michael Haggerty
Previously we stripped off any slashes that were present. Instead, add a slash if it is missing. This removes the need for an extra check that path has a slash following the prefix and makes the handling of the root directory more natural, making the way clear to use

[PATCH v2 8/9] longest_ancestor_length(): resolve symlinks before comparing paths

2012-09-29 Thread Michael Haggerty
longest_ancestor_length() relies on a textual comparison of directory parts to find the part of path that overlaps with one of the paths in prefix_list. But this doesn't work if any of the prefixes involves a symbolic link, because the directories will look different even though they might

[PATCH v2 7/9] longest_ancestor_length(): use string_list_longest_prefix()

2012-09-29 Thread Michael Haggerty
Use string_list_longest_prefix() in the implementation of longest_ancestor_length(), instead of an equivalent loop. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- path.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/path.c b/path.c index

[PATCH v2 9/9] t1504: stop resolving symlinks in GIT_CEILING_DIRECTORIES

2012-09-29 Thread Michael Haggerty
This test used to explicitly resolve symlinks in the paths derived from TRASH_DIRECTORY that were written to GIT_CEILING_DIRECTORIES, because the code handling GIT_CEILING_DIRECTORIES was confused by symlinks. This is no longer necessary. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu ---

Re: [PATCH 2/3] revision: add --grep-reflog to filter commits by reflog messages

2012-09-29 Thread Jeff King
On Fri, Sep 28, 2012 at 10:54:29PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: + if (opt-reflog_info) { + strbuf_addstr(buf, reflog ); + get_reflog_message(buf, opt-reflog_info); + strbuf_addch(buf, '\n'); + strbuf_addstr(buf,

Re: [RFC PATCH] add t3420-rebase-topology

2012-09-29 Thread Chris Webb
Martin von Zweigbergk martinv...@gmail.com writes: For consistency, it seems like git rebase -p --root should always be a no-op, while git rebase [-i/-m] --root should be no-op if the history has no merges. Also, since git rebase -i tries to fast-forward through existing commits, it seems

[PATCH] Remove the hard coded length limit on variable names in config files

2012-09-29 Thread Ben Walton
Previously while reading the variable names in config files, there was a 256 character limit with at most 128 of those characters being used by the section header portion of the variable name. This limitation was only enforced while reading the config files. It was possible to write a config

[PATCH] submodule: make 'show' an alias for 'summary'

2012-09-29 Thread Ramkumar Ramachandra
Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- Like 'git remote show', 'git stash show'. Documentation/git-submodule.txt |3 ++- git-submodule.sh|9 - 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Documentation/git-submodule.txt

[PATCH] submodule: use abbreviated sha1 in 'status' output

2012-09-29 Thread Ramkumar Ramachandra
Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- git-submodule.sh | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 1d61ebd..f8efc52 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -942,27 +942,28 @@

Re: [PATCH v4] Teach rm to remove submodules unless they contain a git directory

2012-09-29 Thread Jens Lehmann
Am 27.09.2012 18:53, schrieb Junio C Hamano: Jens Lehmann jens.lehm...@web.de writes: +/* + * Skip unmerged entries except for populated submodules + * that could loose history when removed. + */ s/loose/lose/,

Re: [PATCH] submodule: use abbreviated sha1 in 'status' output

2012-09-29 Thread Jens Lehmann
I'm not against the change per se, but do we really want to risk breaking scripts which parse the output of git submodule status without even providing a commit message explaining why we did that? Am 29.09.2012 15:43, schrieb Ramkumar Ramachandra: Signed-off-by: Ramkumar Ramachandra

Re: [PATCH] submodule: make 'show' an alias for 'summary'

2012-09-29 Thread Jens Lehmann
Am 29.09.2012 15:43, schrieb Ramkumar Ramachandra: Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- Like 'git remote show', 'git stash show'. I understand the analogy to git stash show (as that also displays a diff similar to what git submodule summary does). But git remote show

Re: [PATCH] submodule: use abbreviated sha1 in 'status' output

2012-09-29 Thread Jens Lehmann
Am 29.09.2012 16:45, schrieb Ramkumar Ramachandra: Jens Lehmann wrote: I'm not against the change per se, but do we really want to risk breaking scripts which parse the output of git submodule status without even providing a commit message explaining why we did that? Oh, I didn't realize

Re: [PATCH] submodule: make 'show' an alias for 'summary'

2012-09-29 Thread Jens Lehmann
Am 29.09.2012 17:07, schrieb Ramkumar Ramachandra: Jens Lehmann wrote: Am 29.09.2012 15:43, schrieb Ramkumar Ramachandra: Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- Like 'git remote show', 'git stash show'. I understand the analogy to git stash show (as that also displays

Re: Option for git bisect run to automatically clean up

2012-09-29 Thread Christian Couder
Hi, On Thu, Sep 27, 2012 at 6:55 PM, Laszlo Papp lp...@kde.org wrote: Hi everybody, I have just run into a problem when I had to issue an explicit cleanup for tracked files after a configure run in the Qt5 project. I have tried to suggest to the people to bring up this idea on the mailing

Re: [PATCH 2/3] revision: add --grep-reflog to filter commits by reflog messages

2012-09-29 Thread Junio C Hamano
Nguyen Thai Ngoc Duy pclo...@gmail.com writes: reflog, in terms of both the number of commits and message length, is usually short enough that slowdown does not really show, especially when used with git-log, an interactive command. You shouldn't do things you can easily tell you do not need

Re: Option for git bisect run to automatically clean up

2012-09-29 Thread Junio C Hamano
Christian Couder christian.cou...@gmail.com writes: I understand that, but I wonder what we should do if some people need a git reset --hard and if some other people need other options than -dfx. We would need both a --reset and a --clean, or perhaps even a

[PATCH 0/2] Let git submodule add fail when .git/modules/name already exists

2012-09-29 Thread Jens Lehmann
Am 26.09.2012 22:56, schrieb Jens Lehmann: Am 26.09.2012 06:18, schrieb Jonathan Johnson: To reproduce 1) add a git submodule in a specific location (we'll say it's at `./submodule/location`) 2) go through the normal steps of removing a submodule, as listed here -

[PATCH 1/2] Teach git submodule add the --name option

2012-09-29 Thread Jens Lehmann
git submodule add initializes the name of a submodule to its path. This was ok as long as the .git directory lived inside the submodule's work tree, but since 1.7.8 it is stored in the .git/modules/name directory of the superproject, making the submodule name survive the removal of the submodule's

[PATCH 2/2] submodule add: Fail when .git/modules/name already exists

2012-09-29 Thread Jens Lehmann
When adding a new submodule it can happen that .git/modules/name already contains a submodule repo, e.g. when a submodule is removed from the work tree and another submodule is added at the same path. But then the work tree of the submodule will be populated using the existing repository and not

Re: [PATCH] gitk: refresh the index before running diff-files

2012-09-29 Thread Paul Mackerras
On Fri, Sep 28, 2012 at 04:50:54PM -0400, Jeff King wrote: +proc refresh_index {} { +global need_index_refresh +if { $need_index_refresh } { + exec sh -c git update-index --refresh /dev/null 21 || true + set need_index_refresh false +} +} Unfortunately this will wait

Re: [PATCH] gitk: refresh the index before running diff-files

2012-09-29 Thread Jeff King
On Sun, Sep 30, 2012 at 10:05:27AM +1000, Paul Mackerras wrote: On Fri, Sep 28, 2012 at 04:50:54PM -0400, Jeff King wrote: +proc refresh_index {} { +global need_index_refresh +if { $need_index_refresh } { + exec sh -c git update-index --refresh /dev/null 21 || true + set

Re: [PATCH] Remove the hard coded length limit on variable names in config files

2012-09-29 Thread Michael Haggerty
On 09/29/2012 12:19 PM, Ben Walton wrote: Previously while reading the variable names in config files, there was a 256 character limit with at most 128 of those characters being used by the section header portion of the variable name. This limitation was only enforced while reading the config

Re: [RFC/PATCH 0/3] git log --pretty=lua

2012-09-29 Thread Nguyen Thai Ngoc Duy
On Tue, Sep 25, 2012 at 7:23 AM, Jeff King p...@peff.net wrote: Why Lua? I don't especially like it as a language. But it's designed for this purpose, which makes it very lightweight and relatively simple to embed. Another option is tcl. String-based approach feels more natural for pretty.c

Re: [PATCH 0/2] Let git submodule add fail when .git/modules/name already exists

2012-09-29 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: The only long term solution I can think of is to use some kind of UUID for the name, so that the names of newly added submodules won't have a chance to clash anymore. For the short term aborting git submodule add when a submodule of that name already