Reset sometimes updates mtime

2015-07-09 Thread Dennis Kaarsemaker
I'm seeing some behaviour with git reset that I find odd. Basically if I do git fetch \ git reset --hard simple-tag-that-points-to-the-current-commit sometimes the reset will update the mtime of all files and directories in the repo and sometimes it will leave them alone. Changing it to git

Re: [PATCH v4] log: add log.follow config option

2015-07-09 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: David Turner dtur...@twopensource.com writes: This version uses tweak, and also includes Matthieu Moy's suggested whitespace fix. This comment should come below the --- after the commit message (right before the diffstat). Otherwise, Junio

Re: [PATCH v5 1/4] implement submodule config API for lookup of .gitmodules values

2015-07-09 Thread Jeff King
On Thu, Jul 09, 2015 at 02:09:01PM +0200, Heiko Voigt wrote: Instead of test-submodule-config.c to test this new module, it could be useful to implement these as extensions to rev-parse: git rev-parse --submodule-name [ref:]path git rev-parse --submodule-path [ref:]name

Re: [PATCH] clone: Make use of the strip_suffix() helper method

2015-07-09 Thread Sebastian Schuberth
On Thu, Jul 9, 2015 at 7:00 PM, Jeff King p...@peff.net wrote: If you wanted to get really fancy, I think you could put a ternary operator in the middle of the strip_suffix call. That makes it clear that len is set in all code paths, but I think some people find ternary operators unreadable.

[PATCH] clone: Make use of the strip_suffix() helper method

2015-07-09 Thread Sebastian Schuberth
Signed-off-by: Sebastian Schuberth sschube...@gmail.com --- builtin/clone.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c index 00535d0..d35b2b9 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -147,6 +147,7 @@ static char

Re: [PATCH] clone: Make use of the strip_suffix() helper method

2015-07-09 Thread Jeff King
On Thu, Jul 09, 2015 at 03:33:46PM +, Sebastian Schuberth wrote: @@ -174,19 +175,17 @@ static char *guess_dir_name(const char *repo, int is_bundle, int is_bare) * Strip .{bundle,git}. */ if (is_bundle) { - if (end - start 7 !strncmp(end - 7, .bundle,

[PATCH v2] clone: Simplify string handling in guess_dir_name()

2015-07-09 Thread Sebastian Schuberth
Signed-off-by: Sebastian Schuberth sschube...@gmail.com --- builtin/clone.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c index 00535d0..afdc004 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -147,6 +147,7 @@ static

Re: [PATCH v4] log: add log.follow config option

2015-07-09 Thread David Turner
On Thu, 2015-07-09 at 10:23 -0700, Junio C Hamano wrote: snip If I were David and sending this v4 patch, it would have looked like this. -- 8 -- From: David Turner dtur...@twopensource.com Date: Tue, 7 Jul 2015 21:29:34 -0400 Subject: [PATCH v4] log: add log.follow configuration variable

Building git 2.4.5 on AIX 6.1 problems

2015-07-09 Thread John Norris
I am trying to compile git 2.4.5 which I downloaded as a tar file on AIX 6.1. The machine has gcc installed. Having read through the INSTALL file, there appear to be several ways, either using configure, make, make install or just make, make install with prefix of where to install. Anyway

Re: [PATCH v2] clone: Simplify string handling in guess_dir_name()

2015-07-09 Thread Sebastian Schuberth
On Thu, Jul 9, 2015 at 8:05 PM, Junio C Hamano gits...@pobox.com wrote: Subject: Re: [PATCH v2] clone: Simplify string handling in guess_dir_name() We seem not to capitalize the first word on the subject line. Will change that. Content-Type: multipart/mixed;

Re: [PATCH v2] clone: Simplify string handling in guess_dir_name()

2015-07-09 Thread Junio C Hamano
Sebastian Schuberth sschube...@gmail.com writes: On Thu, Jul 9, 2015 at 8:05 PM, Junio C Hamano gits...@pobox.com wrote: Content-Type: multipart/mixed; boundary==_Part_8_836493213.1436462597065 Please don't. This seems to come from submitgit, I've filed an issue about it:

Re: [PATCH v2] clone: Simplify string handling in guess_dir_name()

2015-07-09 Thread Junio C Hamano
Sebastian Schuberth sschube...@gmail.com writes: Subject: Re: [PATCH v2] clone: Simplify string handling in guess_dir_name() We seem not to capitalize the first word on the subject line. Content-Type: multipart/mixed; boundary==_Part_8_836493213.1436462597065 Please don't.

Re: Building git 2.4.5 on AIX 6.1 problems

2015-07-09 Thread Junio C Hamano
John Norris j...@norricorp.f9.co.uk writes: I am trying to compile git 2.4.5 which I downloaded as a tar file on AIX 6.1. The machine has gcc installed. Having read through the INSTALL file, there appear to be several ways, either using configure, make, make install or just make, make install

[PATCH v3] clone: Simplify string handling in guess_dir_name()

2015-07-09 Thread Sebastian Schuberth
Signed-off-by: Sebastian Schuberth sschube...@gmail.com --- builtin/clone.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c index 00535d0..ebcb849 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -147,6 +147,7 @@ static

[PATCH v4] clone: simplify string handling in guess_dir_name()

2015-07-09 Thread Sebastian Schuberth
Signed-off-by: Sebastian Schuberth sschube...@gmail.com --- builtin/clone.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c index 00535d0..ebcb849 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -147,6 +147,7 @@ static

Re: Reset sometimes updates mtime

2015-07-09 Thread Junio C Hamano
Dennis Kaarsemaker den...@kaarsemaker.net writes: I'm seeing some behaviour with git reset that I find odd. Basically if I do git fetch \ git reset --hard simple-tag-that-points-to-the-current-commit sometimes the reset will update the mtime of all files and directories in the repo and

Re: [PATCH v4] log: add log.follow config option

2015-07-09 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: On Thu, 2015-07-09 at 10:23 -0700, Junio C Hamano wrote: snip If I were David and sending this v4 patch, it would have looked like this. -- 8 -- From: David Turner dtur...@twopensource.com Date: Tue, 7 Jul 2015 21:29:34 -0400 Subject:

Re: [PATCH v3] notes: Allow committish expressions as notes ref

2015-07-09 Thread Johan Herland
On Thu, Jul 9, 2015 at 4:48 AM, Mike Hommey m...@glandium.org wrote: init_notes() is the main point of entry to the notes API. It is an arbitrary restriction that all it allows as input is a strict ref name, when callers may want to give an arbitrary committish. However, some operations that

Re: Building git 2.4.5 on AIX 6.1 problems

2015-07-09 Thread Jeff King
On Fri, Jul 10, 2015 at 04:32:37AM +, John Norris wrote: But there are a few archive commands before I get to linking credentials-store. Is there something special about credentials store? Not really. It is just the first program alphabetically, so it comes first in the Makefile. You can

Re: Building git 2.4.5 on AIX 6.1 problems

2015-07-09 Thread Junio C Hamano
John Norris j...@norricorp.f9.co.uk writes: But there are a few archive commands before I get to linking credentials-store. Is there something special about credentials store? And is the collect2 an AIX library or general library used by git? Wow, that's a blast from the past. My

Re: [PATCH v7 2/8] cherry-pick: treat CHERRY_PICK_HEAD and REVERT_HEAD as refs

2015-07-09 Thread Michael Haggerty
On 07/10/2015 12:06 AM, Junio C Hamano wrote: David Turner dtur...@twopensource.com writes: OK, here's my current best idea: 1. A pseudoref is an all-caps file in $GIT_DIR/ that always contains at least a SHA1. CHERRY_PICK_HEAD and REVERT_HEAD are examples. Because HEAD might be a

Re: Building git 2.4.5 on AIX 6.1 problems

2015-07-09 Thread John Norris
Hi Junio, thank you for this - I will run make with V=1 as you suggested and try and talk to some IBM AIX people. But there are a few archive commands before I get to linking credentials-store. Is there something special about credentials store? And is the collect2 an AIX library or general

[PATCH v4] notes: Allow treeish expressions as notes ref

2015-07-09 Thread Mike Hommey
init_notes() is the main point of entry to the notes API. It is an arbitrary restriction that all it allows as input is a strict ref name, when callers may want to give an arbitrary treeish. However, some operations that require updating the notes tree require a strict ref name, because they

Re: [PATCH v2] refs: loosen restrictions on wildcard '*' refspecs

2015-07-09 Thread Jacob Keller
On Wed, Jul 8, 2015 at 6:00 AM, Jacob Keller jacob.kel...@gmail.com wrote: This patch updates the check_refname_component logic in order to allow for a less strict refspec format in regards to REFNAME_REFSPEC_PATTERN. Previously the '*' could only replace a single full component, and could not

Re: Merge after rename

2015-07-09 Thread Jacob Keller
On Thu, Jul 9, 2015 at 1:44 PM, Phil Susi ps...@ubuntu.com wrote: I'm trying to cherry pick an old change from an old branch onto the current master, and since the old change, the directory structure was altered and the modified files were moved. Instead of detecting the new location of the

[PATCH v2 10/10] tag.c: implement '--merged' and '--no-merged' options

2015-07-09 Thread Karthik Nayak
Using 'ref-filter' APIs 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 v2 08/10] tag.c: use 'ref-filter' APIs

2015-07-09 Thread Karthik Nayak
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 'ref-filter' to filter out tags based on the

[PATCH v2 09/10] tag.c: implement '--format' option

2015-07-09 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 v8 01/11] t6302: for-each-ref tests for ref-filter APIs

2015-07-09 Thread Karthik Nayak
Add a test suite for testing the ref-filter APIs used by for-each-ref. We just intialize the test suite for now. More tests will be added in the following patches as more options are added to for-each-ref. Based-on-patch-by: Jeff King p...@peff.net Mentored-by: Christian Couder

Re: [PATCH v4] log: add log.follow config option

2015-07-09 Thread Matthieu Moy
David Turner dtur...@twopensource.com writes: This version uses tweak, and also includes Matthieu Moy's suggested whitespace fix. This comment should come below the --- after the commit message (right before the diffstat). Otherwise, Junio will get this as the commit message when applying, and

Re: [PATCH v5 00/44] Make git-am a builtin

2015-07-09 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: So the fix would be to remove the assert()s, as follows: What I pushed out tonight should have SQUASH??? (or fixup!) that splits this into appropriate steps in your series. Please check. Note that you do not have to say if the variable has something, then

Re: [PATCH v6 1/7] refs.c: add err arguments to reflog functions

2015-07-09 Thread Michael Haggerty
On 07/08/2015 07:11 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: I think your v7 of this patch goes too far, by turning a failure to write to the reflog into a failure of the whole transaction. The problem is that this failure comes too late, in the commit phase of

[PATCH] fast-import: Do less work when given from matches current branch head

2015-07-09 Thread Mike Hommey
When building a fast-import stream, it's easy to forget the fact that for non-merge commits happening on top of the current branch head, there is no need for a from command. That is corroborated by the fact that at least git-p4, hg-fast-export and felipec's git-remote-hg all unconditionally use a

Re: [PATCH v5 1/4] implement submodule config API for lookup of .gitmodules values

2015-07-09 Thread Heiko Voigt
On Wed, Jul 08, 2015 at 04:52:14PM -0400, Phil Hord wrote: On Mon, Jun 15, 2015 at 5:06 PM, Heiko Voigt hvo...@hvoigt.net wrote: In a superproject some commands need to interact with submodules. They need to query values from the .gitmodules file either from the worktree of from certain

Re: [PATCH v2 06/10] Documentation/tag: remove double occurance of pattern

2015-07-09 Thread Christian Couder
On Thu, Jul 9, 2015 at 12:27 PM, Karthik Nayak karthik@gmail.com wrote: Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak karthik@gmail.com --- Documentation/git-tag.txt | 1 - 1 file changed,

[PATCH v2 00/10] Port tag.c to use ref-filter APIs

2015-07-09 Thread Karthik Nayak
This is part of my GSoC project to unify git tag -l, git branch -l, git for-each-ref This patch series is continued from: http://article.gmane.org/gmane.comp.version-control.git/273569 The previous RFC version is here: http://thread.gmane.org/gmane.comp.version-control.git/272654 Changes in this

[PATCH v2 01/10] ref-filter: add %(refname:shortalign=X) option

2015-07-09 Thread Karthik Nayak
Add support for %(refname:shortalign=X) where X is a number. This will print a shortened refname aligned to the left followed by spaces for a total length of X characters. If X is less than the shortened refname size, the entire shortened refname is printed. Mentored-by: Christian Couder

[PATCH v2 03/10] ref-filter: support printing N lines from tag annotation

2015-07-09 Thread Karthik Nayak
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 christian.cou...@gmail.com Mentored-by: Matthieu Moy

[PATCH v2 05/10] ref-filter: add option to match literal pattern

2015-07-09 Thread Karthik Nayak
Since 'ref-filter' only has an option to match path names add an option for regular pattern matching. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak karthik@gmail.com --- builtin/for-each-ref.c | 1

[PATCH v2 07/10] tag.c: use 'ref-filter' data structures

2015-07-09 Thread Karthik Nayak
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. As this is a temporary step, most of the

[PATCH v2 04/10] ref-filter: add support to sort by version

2015-07-09 Thread Karthik Nayak
Add support to sort by version using the v:refname and version:refname option. This is achieved by using the 'version_cmp()' function as the comparing function for qsort. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by:

[PATCH v2 02/10] ref-filter: add option to filter only tags

2015-07-09 Thread Karthik Nayak
Add an option in 'filter_refs()' to use 'for_each_tag_ref()' and filter refs. This type checking is done by adding a 'FILTER_REFS_TAGS' in 'ref-filter.h' Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak

Re: [PATCH v2 01/10] ref-filter: add %(refname:shortalign=X) option

2015-07-09 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: Add support for %(refname:shortalign=X) where X is a number. This will print a shortened refname aligned to the left followed by spaces for a total length of X characters. If X is less than the shortened refname size, the entire shortened refname

Re: [PATCH v2 03/10] ref-filter: support printing N lines from tag annotation

2015-07-09 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: In 'tag.c' we can print N lines from the annotation of the tag using the '-nnum' option. Not only annotation of the tag, but also from the commit message for lightweight tags. --- a/builtin/tag.c +++ b/builtin/tag.c @@ -185,6 +185,10 @@ static

Re: [PATCH v2 08/10] tag.c: use 'ref-filter' APIs

2015-07-09 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: Documentation/git-tag.txt | 16 ++- builtin/tag.c | 343 ++ t/t7004-tag.sh| 8 +- This patch was sent with Thunderbird unlike the others in the series. It has some line wrapping

Re: [PATCH v2 08/10] tag.c: use 'ref-filter' APIs

2015-07-09 Thread Karthik Nayak
On Thu, Jul 9, 2015 at 6:18 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Karthik Nayak karthik@gmail.com writes: Documentation/git-tag.txt | 16 ++- builtin/tag.c | 343 ++ t/t7004-tag.sh| 8 +- This patch

Re: [PATCH v2 06/10] Documentation/tag: remove double occurance of pattern

2015-07-09 Thread Karthik Nayak
On Thu, Jul 9, 2015 at 5:49 PM, Christian Couder christian.cou...@gmail.com wrote: On Thu, Jul 9, 2015 at 12:27 PM, Karthik Nayak karthik@gmail.com wrote: Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik

Re: [PATCH v2 04/10] ref-filter: add support to sort by version

2015-07-09 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: Add support to sort by version using the v:refname and version:refname option. This is achieved by using the 'version_cmp()' function as the comparing function for qsort. You should elaborate on why you need this. Given the context, I can guess that

Re: [PATCH v2 05/10] ref-filter: add option to match literal pattern

2015-07-09 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: Since 'ref-filter' only has an option to match path names add an option for regular pattern matching. Here also, a hint on why this is needed would be welcome. --- a/ref-filter.c +++ b/ref-filter.c @@ -956,6 +956,20 @@ static int

Re: [PATCH v2 08/10] tag.c: use 'ref-filter' APIs

2015-07-09 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: + s-atom = parse_ref_filter_atom(arg, arg+len); Spaces around +. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v2 08/10] tag.c: use 'ref-filter' APIs

2015-07-09 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: If anyone can help, this is what it's saying. [Net::SMTP::SSL] Connection closed at Perhaps your SMTP server thought you were sending too many emails to too many people and closed the connection thinking you were a spammer. If you're having this

Re: git svn timezone issue?

2015-07-09 Thread Stefan Tatschner
On Do, 2015-07-09 at 15:28 +0200, Stefan Tatschner wrote: Hi, at work we use svn, so I used git svn to import that stuff to git. Now it seems that there are some timezone issues. git log shows + as timezone, while git svn log shows the correct timezone +0200. Ok, I just discovered

git svn timezone issue?

2015-07-09 Thread Stefan Tatschner
Hi, at work we use svn, so I used git svn to import that stuff to git. Now it seems that there are some timezone issues. git log shows + as timezone, while git svn log shows the correct timezone +0200. $ git log -1 commit ceb8a8647e257d6caf2ad0ecc2298f8b269c9727 Author: John Doe

Re: [PATCH] fast-import: Do less work when given from matches current branch head

2015-07-09 Thread Junio C Hamano
Mike Hommey m...@glandium.org writes: Cc'ed a few people who appear at the top of shortlog --no-merges; I think the end result is not incorrect, but I want to hear second opinions on this one. I do not know Shawn still remembers this code, but what is under discussion seems to have come mostly

Merge after rename

2015-07-09 Thread Phil Susi
I'm trying to cherry pick an old change from an old branch onto the current master, and since the old change, the directory structure was altered and the modified files were moved. Instead of detecting the new location of the file and applying the changes to it, git is re-adding the old file

Re: [PATCH] check_and_freshen_file: fix reversed success-check

2015-07-09 Thread Johannes Sixt
Am 08.07.2015 um 23:03 schrieb Johannes Sixt: Am 08.07.2015 um 20:33 schrieb Jeff King: ...or maybe in the utime() step there is actually a bug, and we report failure for no good reason. Ugh. Ah! That code is less than a year old. When I began to adopt a workflow requiring force-pushes

Re: [PATCH v4] clone: simplify string handling in guess_dir_name()

2015-07-09 Thread Junio C Hamano
Sebastian Schuberth sschube...@gmail.com writes: - if (is_bare) { - struct strbuf result = STRBUF_INIT; - strbuf_addf(result, %.*s.git, (int)(end - start), start); - dir = strbuf_detach(result, NULL); - } else + if (is_bare) + dir

Re: [PATCH v4] clone: simplify string handling in guess_dir_name()

2015-07-09 Thread Sebastian Schuberth
On Thu, Jul 9, 2015 at 11:21 PM, Junio C Hamano gits...@pobox.com wrote: - if (is_bare) { - struct strbuf result = STRBUF_INIT; - strbuf_addf(result, %.*s.git, (int)(end - start), start); - dir = strbuf_detach(result, NULL); - } else + if

Re: [PATCH v5 1/4] implement submodule config API for lookup of .gitmodules values

2015-07-09 Thread Jens Lehmann
Am 09.07.2015 um 17:49 schrieb Jeff King: On Thu, Jul 09, 2015 at 02:09:01PM +0200, Heiko Voigt wrote: Instead of test-submodule-config.c to test this new module, it could be useful to implement these as extensions to rev-parse: git rev-parse --submodule-name [ref:]path git

Re: [PATCH v5 1/4] implement submodule config API for lookup of .gitmodules values

2015-07-09 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: How does git-submodule access this information? It looks like it just hits git config -f .gitmodules directly. Perhaps whatever interface is designed should be suitable for its use here (and if there really is no more interesting interface needed, then

Re: [PATCH] fast-import: Do less work when given from matches current branch head

2015-07-09 Thread Junio C Hamano
Mike Hommey m...@glandium.org writes: Does that mean the original code was doing a release that was unnecessary? Or does it mean this patch changes what happens on that codepath, namely (1) leaking resource, and/or (2) keeping a tree of the original 'b' that does not have anything to do with

Re: [PATCH] fast-import: Do less work when given from matches current branch head

2015-07-09 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Mike Hommey m...@glandium.org writes: Does that mean the original code was doing a release that was unnecessary? Or does it mean this patch changes what happens on that codepath, namely (1) leaking resource, and/or (2) keeping a tree of the original

Re: [PATCH] check_and_freshen_file: fix reversed success-check

2015-07-09 Thread Jeff King
On Thu, Jul 09, 2015 at 10:51:50PM +0200, Johannes Sixt wrote: Ah! That code is less than a year old. When I began to adopt a workflow requiring force-pushes lately, I wondered why I haven't seen these failures earlier, because I did do force pushes in the past, but not that frequently. I

[PATCH v8 1/7] refs.c: add err arguments to reflog functions

2015-07-09 Thread David Turner
Add an err argument to log_ref_setup that can explain the reason for a failure. This then eliminates the need to manage errno through this function since we can just add strerror(errno) to the err string when meaningful. No callers relied on errno from this function for anything else than the

[PATCH v8 2/7] refs: Break out check for reflog autocreation

2015-07-09 Thread David Turner
This is just for clarity. Signed-off-by: David Turner dtur...@twopensource.com --- refs.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/refs.c b/refs.c index 03e7505..903b401 100644 --- a/refs.c +++ b/refs.c @@ -3118,6 +3118,16 @@ static int copy_msg(char

[PATCH v8 0/7] ref backend preamble

2015-07-09 Thread David Turner
The current state of the discussion on alternate ref backends is that we're going to continue to store pseudorefs (e.g. CHERRY_PICK_HEAD) as files in $GIT_DIR. So this re-roll of the refs backend preamble doesn't do anything to pseudorefs. It just does reflog stuff. In addition, this version

[PATCH v8 3/7] refs: new public ref function: safe_create_reflog

2015-07-09 Thread David Turner
The safe_create_reflog function creates a reflog, if it does not already exist. The log_ref_setup function becomes private and gains a force_create parameter to force the creation of a reflog even if log_all_ref_updates is false or the refname is not one of the special refnames. The new

[PATCH v8 4/7] git-reflog: add exists command

2015-07-09 Thread David Turner
Theis are necessary because alternate ref backends might store reflogs somewhere other than .git/logs. Code that now directly manipulates .git/logs should instead go through git-reflog. Signed-off-by: David Turner dtur...@twopensource.com --- Documentation/git-reflog.txt | 4

[PATCH v8 6/7] update-ref and tag: add --create-reflog arg

2015-07-09 Thread David Turner
Allow the creation of a ref (e.g. stash) with a reflog already in place. For most refs (e.g. those under refs/heads), this happens automatically, but for others, we need this option. Currently, git does this by pre-creating the reflog, but alternate ref backends might store reflogs somewhere

[PATCH v8 7/7] git-stash: use update-ref --create-reflog instead of creating files

2015-07-09 Thread David Turner
This is in support of alternate ref backends which don't necessarily store reflogs as files. Signed-off-by: David Turner dtur...@twopensource.com --- git-stash.sh | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/git-stash.sh b/git-stash.sh index 8e9e2cd..1d5ba7a 100755

[PATCH v8 5/7] refs: add REF_FORCE_CREATE_REFLOG flag

2015-07-09 Thread David Turner
Add a flag to allow forcing the creation of a reflog even if the ref name and core.logAllRefUpdates setting would not ordinarily cause ref creation. In a moment, we will use this to add options to git tag and git update-ref to force reflog creation. Signed-off-by: David Turner

Re: [PATCH v2 9/9] diffcore-pickaxe: support case insensitive match on non-ascii

2015-07-09 Thread Eric Sunshine
On Wed, Jul 8, 2015 at 6:38 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: Similar to the grep -F -i case, we can't use kws on icase search outside ascii range, quote we quote the string and pass it to regcomp s/quote we quote/so we quote/ (or something) as a basic regexp and let regex

Re: [PATCH v7 2/8] cherry-pick: treat CHERRY_PICK_HEAD and REVERT_HEAD as refs

2015-07-09 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: OK, here's my current best idea: 1. A pseudoref is an all-caps file in $GIT_DIR/ that always contains at least a SHA1. CHERRY_PICK_HEAD and REVERT_HEAD are examples. Because HEAD might be a symbolic ref, it is not a pseudoref. Refs backends

Re: [PATCH v7 2/8] cherry-pick: treat CHERRY_PICK_HEAD and REVERT_HEAD as refs

2015-07-09 Thread David Turner
On Wed, 2015-07-08 at 22:55 -0700, Junio C Hamano wrote: David Turner dtur...@twopensource.com writes: I didn't see this until after I had sent my previous message. I think the multiple working trees argument is strong enough that I will change the code (and tests). Not just code,

Re: [PATCH] fast-import: Do less work when given from matches current branch head

2015-07-09 Thread Mike Hommey
On Thu, Jul 09, 2015 at 01:37:02PM -0700, Junio C Hamano wrote: Mike Hommey m...@glandium.org writes: Cc'ed a few people who appear at the top of shortlog --no-merges; I think the end result is not incorrect, but I want to hear second opinions on this one. I do not know Shawn still