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

2015-07-08 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 v6 1/7] refs.c: add err arguments to reflog functions

2015-07-08 Thread Michael Haggerty
On 07/08/2015 07:11 PM, Junio C Hamano wrote: > Michael Haggerty 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 the >> trans

[PATCH v8 01/11] t6302: for-each-ref tests for ref-filter APIs

2015-07-08 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 Mentored-by: Christian Couder Mentored-by: Matthieu Moy Sign

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

2015-07-08 Thread Junio C Hamano
Paul Tan 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 free it". free(NU

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

2015-07-08 Thread Junio C Hamano
David Turner 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, but we probably should step back a bit and clearly define what we are trying to achiev

Re: [PATCH v8 01/11] t6302: for-each-ref tests for ref-filter APIs

2015-07-08 Thread Karthik Nayak
On Wed, Jul 8, 2015 at 9:16 PM, Matthieu Moy wrote: > Karthik Nayak writes: > >> On Wed, Jul 8, 2015 at 2:37 PM, Matthieu Moy >> wrote: >>> Torsten Bögershausen writes: >>> Could we have a tweak for people without gpg? >>> >>> I guess we need stg like >>> >>> if ! test_have_prereq GPG; the

Re: suboptimal behavior of fast-import in some cases with "from"

2015-07-08 Thread Mike Hommey
On Thu, Jul 09, 2015 at 02:03:15PM +0900, Mike Hommey wrote: > On Mon, Jul 06, 2015 at 03:54:35PM -0700, Junio C Hamano wrote: > > Mike Hommey writes: > > > > > One of the first things parse_from does is unconditionally throw away > > > the tree for the given branch, and then the "from" tree is l

Re: suboptimal behavior of fast-import in some cases with "from"

2015-07-08 Thread Mike Hommey
On Mon, Jul 06, 2015 at 03:54:35PM -0700, Junio C Hamano wrote: > Mike Hommey writes: > > > One of the first things parse_from does is unconditionally throw away > > the tree for the given branch, and then the "from" tree is loaded. So > > when the "from" commit is the current head of the branch,

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

2015-07-08 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 committish. However, some operations that require updating the notes tree require a strict ref name, because they wo

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

2015-07-08 Thread David Turner
On Wed, 2015-07-08 at 16:23 -0700, Junio C Hamano wrote: > Johannes Sixt writes: > > >> We could reduce the number from two to one by providing a new > >> git-am-status command which outputs one of "CHERRY-PICKING", > >> "REVERTING", or "" (or maybe it would also handle rebase and am). We > >> c

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

2015-07-08 Thread David Turner
On Wed, 2015-07-08 at 23:14 +0200, Johannes Sixt wrote: > Am 08.07.2015 um 21:16 schrieb David Turner: > > On Wed, 2015-07-08 at 19:46 +0200, Johannes Sixt wrote: > >> Am 08.07.2015 um 02:55 schrieb David Turner: > >>> Instead of directly writing to and reading from files in > >>> $GIT_DIR, use ref

Re: [PATCH v2 0/9] icase match on non-ascii

2015-07-08 Thread Duy Nguyen
On Wed, Jul 8, 2015 at 10:36 PM, Junio C Hamano wrote: >> Patch 5 is "funny". The patch itself is in iso-8859-1, but my name in >> the commit message is in utf-8. > > As an e-mail message is a single file, by definition that is not merely > "funny" but just "broken", no matter what encoding your M

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

2015-07-08 Thread Junio C Hamano
Johannes Sixt writes: >> We could reduce the number from two to one by providing a new >> git-am-status command which outputs one of "CHERRY-PICKING", >> "REVERTING", or "" (or maybe it would also handle rebase and am). We >> could also generalize it to "git-prompt-helper" or something by moving

Re: Subject: [PATCH] git am: Transform and skip patches via new hook

2015-07-08 Thread Junio C Hamano
Eric Sunshine writes: >> I forgot to mention in the previous review that this change probably >> ought to be accompanied by tests. However, before spending more time >> refining the patch, it might be worthwhile to wait to hear from Junio >> whether he's even interested in this new hook. (Based u

MCSI 2015

2015-07-08 Thread Maria Delgao
MCSI 2015 2nd Int. Conf. on Mathematics and Computers in Sciences and Industry Sliema, Malta, August 17-19, 2015 www.mcsi-conf.org PLENARY SPEAKERS Plenary Lecture: P

Re: Subject: [PATCH] git am: Transform and skip patches via new hook

2015-07-08 Thread Eric Sunshine
(resending with 'git' list included; somehow it got dropped accidentally) On Wed, Jul 8, 2015 at 3:48 PM, Eric Sunshine wrote: > On Wed, Jul 08, 2015 at 11:26:33AM +1200, Robert Collins wrote: >> The current git am offers a pre-applypatch that actual runs after >> applying the patch, and so does

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

2015-07-08 Thread Johannes Sixt
Am 08.07.2015 um 21:16 schrieb David Turner: On Wed, 2015-07-08 at 19:46 +0200, Johannes Sixt wrote: Am 08.07.2015 um 02:55 schrieb David Turner: Instead of directly writing to and reading from files in $GIT_DIR, use ref API to interact with CHERRY_PICK_HEAD and REVERT_HEAD. Signed-off-by: Dav

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

2015-07-08 Thread 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 lately, I wondered why I haven't seen these failures

Re: Git force push fails after a rejected push (unpack failed)?

2015-07-08 Thread Johannes Sixt
Am 08.07.2015 um 20:05 schrieb Jeff King: We also don't write objects directly, of course; we write to a temporary file and try to link them into place. It really sounds more like the "objects/d9" directory is where the permission problems are. But, hmm... Not on Windows: A read-only file canno

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

2015-07-08 Thread Phil Hord
On Mon, Jun 15, 2015 at 5:06 PM, Heiko Voigt 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 revisions. At the moment this is quite hard since a > caller would need to read t

Re: [PATCH 12/12] t3901: test git-am encoding conversion

2015-07-08 Thread Johannes Sixt
Am 02.07.2015 um 20:16 schrieb Paul Tan: Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am supported the --utf8 and --no-utf8 options, and if set, would pass the -u flag and the -k flag respectively. git mailinfo -u will re-code the commit log message and authorship info in

[PATCH v2] check_and_freshen_file: fix reversed success-check

2015-07-08 Thread Jeff King
On Wed, Jul 08, 2015 at 12:24:41PM -0700, Junio C Hamano wrote: > > If our utime() call fails, we treat this the same as not > > having the object in the first place; the safe thing to do > > is write out another copy. However, the loose-object check > > accidentally inverst the utime() check; it

Re: Git force push fails after a rejected push (unpack failed)?

2015-07-08 Thread X H
Le 8/07/2015 20:05, Jeff King a écrit : On Wed, Jul 08, 2015 at 07:41:48PM +0200, Johannes Sixt wrote: Yes, but remember that git stores all of the objects for all of the commits. So for some reason your push is perhaps trying to send an object that the other side already has. Usually this does

Re: [PATCH v7 7/8] update-ref and tag: add --create-reflog arg

2015-07-08 Thread David Turner
On Wed, 2015-07-08 at 15:44 +0200, Michael Haggerty wrote: > Should the "verify" command also create a reflog, at least if the > reference is not being verified to be missing? I don't see why it should. "verify" does not sound like a command that should change anything. -- To unsubscribe from th

Re: [PATCH v6 6/7] git-reflog: add create and exists functions

2015-07-08 Thread David Turner
On Wed, 2015-07-08 at 15:16 +0200, Michael Haggerty wrote: > On 07/08/2015 02:49 AM, David Turner wrote: > > On Mon, 2015-07-06 at 18:51 +0200, Michael Haggerty wrote: > >> [...] > >> So all in all, I think it is unwise to allow a reflog to be created > >> without its corresponding reference. > >>

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

2015-07-08 Thread David Turner
On Wed, 2015-07-08 at 13:36 +0200, Michael Haggerty wrote: > On 07/08/2015 02:55 AM, David Turner wrote: > > 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(err

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

2015-07-08 Thread Junio C Hamano
Jeff King writes: > Subject: check_and_freshen_file: fix reversed success-check > > When we want to write out a loose object file, we have > always first made sure we don't already have the object > somewhere. Since 33d4221 (write_sha1_file: freshen existing > objects, 2014-10-15), we also update

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

2015-07-08 Thread David Turner
On Wed, 2015-07-08 at 19:46 +0200, Johannes Sixt wrote: > Am 08.07.2015 um 02:55 schrieb David Turner: > > Instead of directly writing to and reading from files in > > $GIT_DIR, use ref API to interact with CHERRY_PICK_HEAD > > and REVERT_HEAD. > > > > Signed-off-by: David Turner > > --- > ... > >

Re: [PATCH] git_open_noatime: return with errno=0 on success

2015-07-08 Thread Eric Sunshine
On Wed, Jul 8, 2015 at 8:38 AM, Clemens Buchacher wrote: > In read_sha1_file_extended we die if read_object fails with a fatal > error. We detect a fatal error if errno is non-zero and is not > ENOENT. If the object could not be read because it does not exist, > this is not considered a fatal erro

[PATCH] check_and_freshen_file: fix reversed success-check

2015-07-08 Thread Jeff King
On Wed, Jul 08, 2015 at 02:05:39PM -0400, Jeff King wrote: > The code path should be unpack-objects.c:write_object, which calls > sha1_file.cwrite_sha1_file, which then checks has_sha1_file(). These > days it uses the freshen_* functions instead of the latter, which does a > similar check. But it

Re: Git force push fails after a rejected push (unpack failed)?

2015-07-08 Thread Jeff King
On Wed, Jul 08, 2015 at 07:41:48PM +0200, Johannes Sixt wrote: > >Yes, but remember that git stores all of the objects for all of the > >commits. So for some reason your push is perhaps trying to send an > >object that the other side already has. Usually this does not happen > >(the receiver says

Different result with `git apply` and `patch`

2015-07-08 Thread Benjamin Poirier
Hi, Is it expected that `git apply` and `patch` produce a different result when given a patch that applies cleanly but with offsets? Specifically, using the source file and patch file found here: https://gist.github.com/benthaman/d4e80e1e2e5e0273f874 https://gist.github.com/benthaman/d48d017179a8

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

2015-07-08 Thread Johannes Sixt
Am 08.07.2015 um 02:55 schrieb David Turner: Instead of directly writing to and reading from files in $GIT_DIR, use ref API to interact with CHERRY_PICK_HEAD and REVERT_HEAD. Signed-off-by: David Turner --- ... diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh i

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

2015-07-08 Thread David Turner
This version uses tweak, and also includes Matthieu Moy's suggested whitespace fix. --- Many users prefer to always use --follow with logs. Rather than aliasing the command, an option might be more convenient for some. Junio C Hamano suggested using the tweak functionality for this, which is mu

Re: Git force push fails after a rejected push (unpack failed)?

2015-07-08 Thread Johannes Sixt
Am 07.07.2015 um 21:49 schrieb Jeff King: On Tue, Jul 07, 2015 at 09:31:25PM +0200, X H wrote: For the moment, I'm the only one pushing to the remote, always with the same user (second user is planned). I use git-for-windows which is based on MSYS2. I have mounted the network share with noacl o

Re: Draft of Git Rev News edition 5

2015-07-08 Thread Junio C Hamano
Christian Couder writes: > > I think sometimes the details might be interesting for different reasons. > ... > With the details, I think readers are more likely to remember the > --merges option. That unfortunately cuts both ways. With too much details, the readers are more likely to skim and sk

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

2015-07-08 Thread Junio C Hamano
Michael Haggerty 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 the > transaction. Aborting at this late stage can leave some ref

Re: [PATCH v3 18/23] checkout: retire --to option

2015-07-08 Thread Junio C Hamano
Eric Sunshine writes: > ... as the series stands, the remaining ugly intimate knowledge > between git-worktree and git-checkout is behind-the-scenes and > localized (not affecting the user experience). Hopefully. Let's run with what we have right now. -- To unsubscribe from this list: send the

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

2015-07-08 Thread Junio C Hamano
Junio C Hamano writes: > David Turner writes: > >> diff --git a/revision.c b/revision.c >> index 3ff8723..ae6d4c3 100644 >> --- a/revision.c >> +++ b/revision.c >> @@ -2322,12 +2322,21 @@ int setup_revisions(int argc, const char **argv, >> struct rev_info *revs, struct s >> >> if (revs->

Re: [PATCH v8 01/11] t6302: for-each-ref tests for ref-filter APIs

2015-07-08 Thread Matthieu Moy
Karthik Nayak writes: > On Wed, Jul 8, 2015 at 2:37 PM, Matthieu Moy > wrote: >> Torsten Bögershausen writes: >> >>> Could we have a tweak for people without gpg? >> >> I guess we need stg like >> >> if ! test_have_prereq GPG; then >> skip_all='skipping for-each-ref tests, gpg not avail

Re: [PATCH v2 0/9] icase match on non-ascii

2015-07-08 Thread Junio C Hamano
> Patch 5 is "funny". The patch itself is in iso-8859-1, but my name in > the commit message is in utf-8. As an e-mail message is a single file, by definition that is not merely "funny" but just "broken", no matter what encoding your MUA declares the contents are in, no? -- To unsubscribe from thi

Re: [PATCH 2/2] pack-objects: rename the field "type" to "real_type"

2015-07-08 Thread Jeff King
On Wed, Jul 08, 2015 at 08:57:35PM +0700, Duy Nguyen wrote: > > The definition of in_pack_type says: > > > >> enum object_type in_pack_type; /* could be delta */ > > > > so now I am confused about what exactly "type" (and now "real_type") > > means. > > I think we just overload "type" with

Re: [PATCH v8 01/11] t6302: for-each-ref tests for ref-filter APIs

2015-07-08 Thread Karthik Nayak
On Wed, Jul 8, 2015 at 2:37 PM, Matthieu Moy wrote: > Torsten Bögershausen writes: > >> Could we have a tweak for people without gpg? > > I guess we need stg like > > if ! test_have_prereq GPG; then > skip_all='skipping for-each-ref tests, gpg not available' > test_done > fi > > s

Re: [PATCH 2/2] pack-objects: rename the field "type" to "real_type"

2015-07-08 Thread Duy Nguyen
On Wed, Jul 8, 2015 at 8:47 PM, Jeff King wrote: > On Wed, Jul 08, 2015 at 06:56:31PM +0700, Nguyễn Thái Ngọc Duy wrote: > >> This is to avoid the too generic name "type" and harmonize with the >> naming in index-pack. There's a subtle difference though: real_type in >> index-pack is what the uppe

Re: [PATCH v7 8/8] git-stash: use update-ref --create-reflog instead of creating files

2015-07-08 Thread Michael Haggerty
I apologize for getting involved so late in the evolution of this patch series. Thanks for being so patient with the back-and-forth! I'm really glad that you are working on this. It is important that this area gets cleaned up if we are ever to support alternate reference backends. And I'm happy th

Re: [PATCH 2/2] pack-objects: rename the field "type" to "real_type"

2015-07-08 Thread Jeff King
On Wed, Jul 08, 2015 at 06:56:31PM +0700, Nguyễn Thái Ngọc Duy wrote: > This is to avoid the too generic name "type" and harmonize with the > naming in index-pack. There's a subtle difference though: real_type in > index-pack is what the upper level see, no delta types (after delta > resolution).

Re: [PATCH v7 7/8] update-ref and tag: add --create-reflog arg

2015-07-08 Thread Michael Haggerty
Please see my email about v6 [*] for an argument for why, at the API level, the create-reflog functionality for new references needs to be implemented within the ref_transaction API. [*] http://article.gmane.org/gmane.comp.version-control.git/273682 On 07/08/2015 02:56 AM, David Turner wrote: > u

Re: [PATCH v6 6/7] git-reflog: add create and exists functions

2015-07-08 Thread Michael Haggerty
On 07/08/2015 02:49 AM, David Turner wrote: > On Mon, 2015-07-06 at 18:51 +0200, Michael Haggerty wrote: >> [...] >> So all in all, I think it is unwise to allow a reflog to be created >> without its corresponding reference. >> >> This, in turn, suggests one or both of the following alternatives: >

Re: Draft of Git Rev News edition 5

2015-07-08 Thread Johannes Schindelin
Hi, On 2015-07-08 12:29, Christian Couder wrote: > On Wed, Jul 8, 2015 at 9:43 AM, Junio C Hamano wrote: >> Michael J Gruber writes: >> >>> Just as an example, in the section on "visualizing merge diffs after the >>> fact", few people will be interested in the detail that I pointed out >>> the "

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

2015-07-08 Thread Jacob Keller
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 replace arbitrary text. Now, refs such as `foo/bar*:foo/bar*` will be accepted.

Re: Since gc.autodetach=1 you can end up with auto-gc on every command with no user notification

2015-07-08 Thread Duy Nguyen
On Wed, Jul 8, 2015 at 7:28 PM, Ævar Arnfjörð Bjarmason wrote: > Someone at work came to me with the problem that they were getting the > "Auto packing the repository in background for optimum performance" > notice on every Git command that they ran. > > This problem is a combination of two things

[PATCH] git_open_noatime: return with errno=0 on success

2015-07-08 Thread Clemens Buchacher
In read_sha1_file_extended we die if read_object fails with a fatal error. We detect a fatal error if errno is non-zero and is not ENOENT. If the object could not be read because it does not exist, this is not considered a fatal error and we want to return NULL. Somewhere down the line, read_objec

Since gc.autodetach=1 you can end up with auto-gc on every command with no user notification

2015-07-08 Thread Ævar Arnfjörð Bjarmason
Someone at work came to me with the problem that they were getting the "Auto packing the repository in background for optimum performance" notice on every Git command that they ran. This problem is a combination of two things: * Since Nguyễn's v1.9-rc0-2-g9f673f9 where we started running "git gc

Re: [PATCH v2 0/9] icase match on non-ascii

2015-07-08 Thread Duy Nguyen
On Wed, Jul 8, 2015 at 6:32 PM, Torsten Bögershausen wrote: > On 2015-07-08 12.38, Nguyễn Thái Ngọc Duy wrote: >> Side note, I almost added the third has_non_ascii() function. Maybe we >> should consider merging the two existing has_non_ascii() functions >> back, or rename one to something else. >

[PATCH 1/2] index-pack: rename the field "type" to "in_pack_type"

2015-07-08 Thread Nguyễn Thái Ngọc Duy
We have two types in this code: in-pack and canonical. "in_pack_type" makes it clearer than plain "type". Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/index-pack.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/builtin/index-pa

[PATCH 2/2] pack-objects: rename the field "type" to "real_type"

2015-07-08 Thread Nguyễn Thái Ngọc Duy
This is to avoid the too generic name "type" and harmonize with the naming in index-pack. There's a subtle difference though: real_type in index-pack is what the upper level see, no delta types (after delta resolution). But real_type in pack-objects is the type to be written in the pack, delta type

Re: [PATCH v7 5/8] refs: new public ref function: safe_create_reflog

2015-07-08 Thread Michael Haggerty
On 07/08/2015 02:56 AM, David Turner wrote: > 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 refnam

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

2015-07-08 Thread Michael Haggerty
On 07/08/2015 02:55 AM, David Turner wrote: > 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

Re: [PATCH v2 0/9] icase match on non-ascii

2015-07-08 Thread Torsten Bögershausen
On 2015-07-08 12.38, Nguyễn Thái Ngọc Duy wrote: > Side note, I almost added the third has_non_ascii() function. Maybe we > should consider merging the two existing has_non_ascii() functions > back, or rename one to something else. > Side question: has_non_ascii can mean different things: UTF-8,

Re: [PATCH v6 5/7] refs: new public ref function: safe_create_reflog

2015-07-08 Thread Michael Haggerty
On 07/08/2015 01:18 AM, David Turner wrote: > On Mon, 2015-07-06 at 18:21 +0200, Michael Haggerty wrote: > > changes applied; will re-roll. > >>> + >>> +int safe_create_reflog(const char *refname, struct strbuf *err, int >>> force_create) >>> +{ >>> + int ret; >>> + struct strbuf sb = STRBU

Re: [PATCH v2 5/9] grep/pcre: prepare locale-dependent tables for icase matching

2015-07-08 Thread Duy Nguyen
On Wed, Jul 8, 2015 at 5:38 PM, Nguyễn Thái Ngọc Duy wrote: > diff --git a/grep.c b/grep.c > index 8fce54f..c79aa70 100644 > --- a/grep.c > +++ b/grep.c > @@ -324,11 +324,13 @@ static void compile_pcre_regexp(struct grep_pat *p, > const struct grep_opt *opt) > int erroffset; > int

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

2015-07-08 Thread Michael Haggerty
On 07/08/2015 12:41 AM, David Turner wrote: > On Mon, 2015-07-06 at 17:53 +0200, Michael Haggerty wrote: >> On 06/29/2015 10:17 PM, David Turner wrote: >>> [...] >>> @@ -3317,7 +3322,8 @@ static int commit_ref_update(struct ref_lock *lock, >>> head_sha1, &h

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

2015-07-08 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, quote 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 p

[PATCH v2 7/9] grep/pcre: support utf-8

2015-07-08 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 parse the string correctly before folding case. Not

[PATCH v2 8/9] diffcore-pickaxe: "share" regex error handling code

2015-07-08 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 --- diffcore-pickaxe.c | 16 1 file changed, 8 insertions(+),

[PATCH v2 5/9] grep/pcre: prepare locale-dependent tables for icase matching

2015-07-08 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 --- grep.c | 7 +-- grep.h

[PATCH v2 4/9] grep/icase: avoid kwsset when -F is specified

2015-07-08 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 undef

[PATCH v2 0/9] icase match on non-ascii

2015-07-08 Thread Nguyễn Thái Ngọc Duy
This series fix case insensitive matching on non-ascii charsets. "grep -i", "grep -F -i", "grep --pcre-regexp -i" and "log -i -S" are fixed. Side note, I almost added the third has_non_ascii() function. Maybe we should consider merging the two existing has_non_ascii() functions back, or rename one

[PATCH v2 3/9] grep/icase: avoid kwsset on literal non-ascii strings

2015-07-08 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 in

[PATCH v2 2/9] grep: break down an "if" stmt in preparation for next changes

2015-07-08 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 *opt) p->wo

[PATCH v2 6/9] gettext: add is_utf8_locale()

2015-07-08 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. Signed-off-by: Nguyễn Thái Ngọc Duy --- gettext.c | 7 ++- gettext.h | 5 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gettext.c b/gettext.c index 7378ba2..601bc

[PATCH v2 1/9] grep: allow -F -i combination

2015-07-08 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 --- 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 +++ b/builtin/grep.

Re: Draft of Git Rev News edition 5

2015-07-08 Thread Christian Couder
On Wed, Jul 8, 2015 at 9:43 AM, Junio C Hamano wrote: > Michael J Gruber writes: > >> Maybe a matter of taste, but I think in general we could do with a bit >> less of "narrating" and more of "summarizing". > > True. I think sometimes the details might be interesting for different reasons. >> J

[PATCH v2 - RFH] notes: Allow committish expressions as notes ref

2015-07-08 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 committish. However, some operations that require updating the notes tree require a strict ref name, because they wo

[ANNOUNCE] Git Rev News edition 5

2015-07-08 Thread Christian Couder
Hi, Git Rev News edition 5 is now available: https://git.github.io/rev_news/2015/07/08/edition-5/ Thanks a lot to all the helpers! Enjoy, Christian, Thomas and Nicola. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More ma

Re: [PATCH v8 01/11] t6302: for-each-ref tests for ref-filter APIs

2015-07-08 Thread Matthieu Moy
Torsten Bögershausen writes: > Could we have a tweak for people without gpg? I guess we need stg like if ! test_have_prereq GPG; then skip_all='skipping for-each-ref tests, gpg not available' test_done fi since we need GPG in the setup test and almost all other tests will rely

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

2015-07-08 Thread Paul Tan
On Wed, Jul 08, 2015 at 12:48:06AM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > $ git am -s ./+dt > ... > error: patch failed: builtin/update-ref.c:421 > error: builtin/update-ref.c: patch does not apply > Patch failed at 0007 update-ref and tag: add --create-reflog arg > The copy of th

Re: [PATCH v8 01/11] t6302: for-each-ref tests for ref-filter APIs

2015-07-08 Thread Torsten Bögershausen
On 2015-07-07 18.06, Karthik Nayak wrote: > 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 > Mentor

RE: Git installer questions

2015-07-08 Thread Johannes Schindelin
On 2015-07-07 23:39, McChesney, Adam wrote: > I am curious as whether or not the windows installer has silent > install flags that are configurable for automated installation? I was > looking about the documentation and haven't been able to find them, if > it does exist in the documentation could y

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

2015-07-08 Thread Junio C Hamano
Junio C Hamano writes: > Paul Tan writes: > >> This patch series rewrites git-am.sh into optimized C builtin/am.c, and is >> part of my GSoC project to rewrite git-pull and git-am into C builtins[1]. > > I merged this to 'jch' (that is somewhere in between 'next' and > 'pu', which is what I use

Re: Draft of Git Rev News edition 5

2015-07-08 Thread Junio C Hamano
Michael J Gruber writes: > Maybe a matter of taste, but I think in general we could do with a bit > less of "narrating" and more of "summarizing". True. > Just as an example, in the section on "visualizing merge diffs after the > fact", few people will be interested in the detail that I pointed

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

2015-07-08 Thread Paul Tan
On Wed, Jul 8, 2015 at 3:31 PM, Junio C Hamano wrote: > Paul Tan writes: > >> This patch series rewrites git-am.sh into optimized C builtin/am.c, and is >> part of my GSoC project to rewrite git-pull and git-am into C builtins[1]. > > I merged this to 'jch' (that is somewhere in between 'next' an

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

2015-07-08 Thread Matthieu Moy
[ Note: as much as possible, Cc the reviewers of the previous rounds when you send a new version ] David Turner writes: > +test_expect_success 'git config log.follow is overridden by --no-follow' ' nitpick: two spaces after test_expect_success. With or without the whitespace fix, the patch

Re: [PATCH v7 8/8] git-stash: use update-ref --create-reflog instead of creating files

2015-07-08 Thread Junio C Hamano
By the way, a series with 8 patches, especially that needed more than a couple of rerolls, deserve a separate cover-letter, if only to describe what was changed since the previous rounds and pointers to them to help reviewers. Thanks. -- To unsubscribe from this list: send the line "unsubscribe gi

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

2015-07-08 Thread Junio C Hamano
Paul Tan writes: > This patch series rewrites git-am.sh into optimized C builtin/am.c, and is > part of my GSoC project to rewrite git-pull and git-am into C builtins[1]. I merged this to 'jch' (that is somewhere in between 'next' and 'pu', which is what I use for everyday work) and tried it to

Re: [PATCH v8 07/10] send-email: reduce dependencies impact on parse_address_line

2015-07-08 Thread Matthieu Moy
Torsten Bögershausen writes: > (Thanks for the quick reply. > Sorry for the noise about > #!/usr/bin/perl > of course we call the right perl) No problem. > The new patch seems to be integrated in pu (I tested d08caa8e022f08d) > Test seems to pass, Good. > but some noise is on the channel: Ar

Re: [PATCH v7 8/8] git-stash: use update-ref --create-reflog instead of creating files

2015-07-08 Thread Junio C Hamano
David Turner writes: > This is in support of alternate ref backends which don't necessarily > store reflogs as files. > > Signed-off-by: David Turner > --- Thanks. The last round was already a pleasant read, and I didn't spot anything questionable in the interdiff between the last one and this

Re: Draft of Git Rev News edition 5

2015-07-08 Thread Michael J Gruber
Eric Sunshine venit, vidit, dixit 06.07.2015 01:12: > On Sun, Jul 5, 2015 at 6:35 PM, Thomas Ferris Nicolaisen > wrote: >> On Mon, Jul 6, 2015 at 12:01 AM, Eric Sunshine >> wrote: >>> Unfortunately, the non-ASCII characters >>> in Duy's name got corrupted, and the botch is present in the patch I

Re: [PATCH v8 07/10] send-email: reduce dependencies impact on parse_address_line

2015-07-08 Thread Torsten Bögershausen
(Thanks for the quick reply. Sorry for the noise about #!/usr/bin/perl of course we call the right perl) The new patch seems to be integrated in pu (I tested d08caa8e022f08d) Test seems to pass, but some noise is on the channel: Initialized empty Git repository in /Users/tb/NoBackup/projects/gi

Re: [PATCH v6 3/4] status: give more information during rebase -i

2015-07-08 Thread Matthieu Moy
Junio C Hamano writes: > By the way, does this have any potential interaction with 16cf51c7 > (git-rebase--interactive.sh: add config option for custom > instruction format, 2015-06-13)? I _think_ that the other topic > should only affect the collapsed format, so there hopefully > shouldn't be a