Re: ssh admin git accidentally deleted

2015-07-07 Thread Fredrik Gustafsson
On Wed, Jul 08, 2015 at 12:32:42AM +0700, agnes retnaningsih wrote: > I use gitolite on linux. > he2nk is account that I delete on server where gitolite-admin is repository > to change gitolite configuration. I still can make editing such as add user > to access gitolite-admin but when I push it,

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

2015-07-07 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: Git grep does not support multi-byte characters (like UTF-8)

2015-07-07 Thread Junio C Hamano
Duy Nguyen writes: > On top of this, pickaxe already supports icase even kws is used. But > it only works for ascii, so either we fix it and support non-ascii, or > we remove icase support entirely from diffcore_pickaxe(). I vote the > former. I think that is a different issue. The pickaxe has

Re: [PATCH] git: add optional support for full pattern in fetch refspecs

2015-07-07 Thread Jacob Keller
On Tue, Jul 7, 2015 at 9:24 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> +remote..arbitrarypattern:: >> + When set to true, fetching from this remote will allow arbitrary >> complex >> + patterns for the fetch refspecs. For example, >> + refs/tags/prefix-*:refs/tags/prefix-*

Re: [PATCH] git: add optional support for full pattern in fetch refspecs

2015-07-07 Thread Junio C Hamano
Jacob Keller writes: > +remote..arbitrarypattern:: > + When set to true, fetching from this remote will allow arbitrary complex > + patterns for the fetch refspecs. For example, > + refs/tags/prefix-*:refs/tags/prefix-* will work as expected. Care > should be > + taken as you cou

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

2015-07-07 Thread Junio C Hamano
David Turner writes: >> IOW, I'd like to know why we need more than something like this >> change to this file, instead of the above? We didn't muck with >> revs->diff in the original when FOLLOW_RENAMES was set, but now it >> does, for example. > > We did, but we did it earlier. But I can just

Re: weaning distributions off tarballs: extended verification of git tags

2015-07-07 Thread Colin Walters
On Sat, Feb 28, 2015, at 10:48 AM, Colin Walters wrote: > Hi, > > TL;DR: Let's define a standard for embedding stronger checksums in tags and > commit messages: > https://github.com/cgwalters/homegit/blob/master/bin/git-evtag [time passes] I finally had a bit of time to pick this back up aga

Re: Git grep does not support multi-byte characters (like UTF-8)

2015-07-07 Thread Duy Nguyen
On Wed, Jul 8, 2015 at 1:08 AM, Plamen Totev wrote: > Junio C Hamano writes: > >> Plamen Totev writes: >> >> > pickaxe search also uses kwsearch so the case insensitive search with >> > it does not work (e.g. git log -i -S). Maybe this is a less of a >> > problem here as one is expected to searc

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

2015-07-07 Thread David Turner
Many users prefer to always use --follow with logs. Rather than aliasing the command, an option might be more convenient for some. Signed-off-by: David Turner --- Documentation/git-log.txt | 6 ++ builtin/log.c | 7 +++ diff.c| 5 +++-- diff.h

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

2015-07-07 Thread David Turner
On Tue, 2015-07-07 at 15:13 -0700, Junio C Hamano wrote: > 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

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

2015-07-07 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 other

[PATCH v7 4/8] refs: Break out check for reflog autocreation

2015-07-07 Thread David Turner
This is just for clarity. Signed-off-by: David Turner --- refs.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/refs.c b/refs.c index e891bed..e694359 100644 --- a/refs.c +++ b/refs.c @@ -3118,6 +3118,16 @@ static int copy_msg(char *buf, const char *msg)

[PATCH v7 3/8] bisect: treat BISECT_HEAD as a ref

2015-07-07 Thread David Turner
Instead of directly writing to and reading from files in $GIT_DIR, use ref API to interact with BISECT_HEAD. Signed-off-by: David Turner --- git-bisect.sh | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index ae3fec2..2fd8ea6 100755 --

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

2015-07-07 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 error

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

2015-07-07 Thread David Turner
This is in support of alternate ref backends which don't necessarily store reflogs as files. Signed-off-by: David Turner --- 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 --- a/git-stash.sh +++ b/g

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

2015-07-07 Thread 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 --- branch.c | 4 ++-- builtin/commit.c | 6 +++--- builtin/merge.c | 2 +- co

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

2015-07-07 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 parameter

[PATCH v7 6/8] git-reflog: add exists command

2015-07-07 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 --- Documentation/git-reflog.txt | 4 builtin/reflog.c | 33 +++

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

2015-07-07 Thread David Turner
On Mon, 2015-07-06 at 18:51 +0200, Michael Haggerty wrote: > > +{ > > + int i, status = 0, start = 0; > > It looks like start is initialized unconditionally after the first loop, > so the initialization here is a red herring. Will fix. > So, I have a philosophical question here with a practic

Re: [PATCH v3 23/23] checkout: retire --ignore-other-worktrees in favor of --force

2015-07-07 Thread Mark Levedahl
On 07/06/2015 03:40 PM, Junio C Hamano wrote: If you are extending the history of some branch, then you would want to be on that branch. Why would you want to have another worktree that will get into a confusing state once you create that commit on the checked out branch in this newly created w

Re: refspecs with '*' as part of pattern

2015-07-07 Thread Jacob Keller
On Tue, Jul 7, 2015 at 9:28 AM, Junio C Hamano wrote: > Daniel Barkalow writes: > >> On Mon, 6 Jul 2015, Junio C Hamano wrote: >> >>> I cannot seem to be able to find related discussions around that >>> patch, so this is only my guess, but I suspect that this is to >>> discourage people from doin

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

2015-07-07 Thread David Turner
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 = STRBUF_INIT; > > + > > + ret = log_ref_setup(refname, &

Re: [PATCH v3 23/23] checkout: retire --ignore-other-worktrees in favor of --force

2015-07-07 Thread Eric Sunshine
On Tue, Jul 7, 2015 at 12:20 PM, Junio C Hamano wrote: > Eric Sunshine writes: > I would not mind "git worktree add -f" to disable the "no multiple > checkouts of the same branch" safety, but I do not think it is > sensible to remove "-i-o-w" and conflate everything into "--force". > That would f

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

2015-07-07 Thread Eric Sunshine
On Tue, Jul 7, 2015 at 3:49 PM, Jeff King wrote: > 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 s

Re: Whether Git supports directory level access or not?

2015-07-07 Thread Jacob Keller
On Tue, Jul 7, 2015 at 10:03 AM, Junio C Hamano wrote: > Jacob Keller writes: > >> However, in-repo per-directory permissions make no sense, as there >> would be no way to generate commits. > > That may be the case for the current generation of Git, but I do not > think you have to be so pessimis

[PATCH] git: add optional support for full pattern in fetch refspecs

2015-07-07 Thread Jacob Keller
This patch updates the refs.c check_refname_component logic in order to allow for the possibility of using arbitrary patterns in fetch refspecs. Specifically, patterns similar to `refs/tags/prefix-*:refs/tags/prefix-*`. In order to ensure that standard users do not accidentally setup refspecs whic

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

2015-07-07 Thread David Turner
On Mon, 2015-07-06 at 17:53 +0200, Michael Haggerty wrote: > On 06/29/2015 10:17 PM, 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

What's cooking in git.git (Jul 2015, #02; Tue, 7)

2015-07-07 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. As there is at least one new topic in 2.5-rc that has a real and severe breakage (I haven't merged the fix for it to 'master' yet), we may proba

Re: [msysGit] Re: [PATCH 13/17] engine.pl: provide more debug print statements

2015-07-07 Thread Philip Oakley
From: "Sebastian Schuberth" On 25.06.2015 02:03, Philip Oakley wrote: --- a/contrib/buildsystems/engine.pl +++ b/contrib/buildsystems/engine.pl @@ -41,6 +41,7 @@ EOM # Parse command-line options while (@ARGV) { my $arg = shift @ARGV; + #print "Arg: $arg \n"; if ("$arg" eq "-h"

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

2015-07-07 Thread Junio C Hamano
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 problem, but just double checking

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

2015-07-07 Thread Junio C Hamano
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->prune_data.nr) { > co

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

2015-07-07 Thread David Turner
Many users prefer to always use --follow with logs. Rather than aliasing the command, an option might be more convenient for some. Signed-off-by: David Turner --- Documentation/git-log.txt | 6 ++ builtin/log.c | 7 +++ diff.c| 5 +++-- diff.h

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

2015-07-07 Thread David Turner
On Tue, 2015-07-07 at 23:42 +0200, Matthieu Moy wrote: > Hi, > > Thanks for your patch. Below are some comments. Some of them are just me > thinking out loudly (don't take it badly if I'm being negative), some > are more serious, but all are fixable. Thanks for the feedback! > David Turner writ

Re: No one understands diff3 "Temporary merge branch" conflict markers

2015-07-07 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> ... I would say: the >> recursive merge-base was computed internally, but not really meant to be >> shown to the user. > > I wonder if the output becomes easier to read if we unconditionally > turned off diff3-style for inner merges. Or replace

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

2015-07-07 Thread Matthieu Moy
Hi, Thanks for your patch. Below are some comments. Some of them are just me thinking out loudly (don't take it badly if I'm being negative), some are more serious, but all are fixable. David Turner writes: > From: David Turner If you configure your commiter id and your From field to the same

RE: Git installer questions

2015-07-07 Thread McChesney, Adam
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 you point me to where they might be? Thanks, Adam

Re: [PATCH 2/3] convert "enum date_mode" into a struct

2015-07-07 Thread Junio C Hamano
Jeff King writes: > OK. Do you want to leave it be, then, or would you prefer me to do the > NULL fallback? Or we could bump the enum to start with 1, and then > explicitly treat "0" as a synonym for DATE_NORMAL (in case it comes in > through a memset or similar). I didn't think about the memset

Re: [PATCH 2/3] convert "enum date_mode" into a struct

2015-07-07 Thread Jeff King
On Tue, Jul 07, 2015 at 02:05:52PM -0700, Junio C Hamano wrote: > And that is because DATE_NORMAL is defined to be 0; we can claim > that the compiler is being stupid to take one of the enum > date_mode_type values that happens to be 0 and misinterpret it as > the program wanted to pass a NULL poi

Re: [PATCH 2/3] convert "enum date_mode" into a struct

2015-07-07 Thread Junio C Hamano
Jeff King writes: > My assumption was that using the raw "0" is something we would frowned > upon in new code. There was a single historical instance that I fixed in > the series, but I wouldn't expect new ones (and actually, that instance > was "1", which would be caught by the compiler). That

Re: [PATCH 2/3] convert "enum date_mode" into a struct

2015-07-07 Thread Jeff King
On Tue, Jul 07, 2015 at 01:37:08PM -0700, Junio C Hamano wrote: > > 3. Provide a wrapper that generates the correct struct on > > the fly. The big downside is that we end up pointing to > > a single global, which makes our wrapper non-reentrant. > > But show_date is already not re

Re: [PATCH 2/3] convert "enum date_mode" into a struct

2015-07-07 Thread Junio C Hamano
Jeff King writes: > ... However, the tricky case is where we use the > enum labels as constants, like: > > show_date(t, tz, DATE_NORMAL); > > Ideally we could say: > > show_date(t, tz, &{ DATE_NORMAL }); > > but of course C does not allow that. > ... > 3. Provide a wrapper that generates t

Re: [PATCH v5 19/44] builtin-am: implement --3way, am.threeWay

2015-07-07 Thread Junio C Hamano
Paul Tan writes: > @@ -82,6 +84,8 @@ struct am_state { > /* number of digits in patch filename */ > int prec; > > + int threeway; > + > int quiet; > > int append_signoff; These "one line surrounded by blank on both sides" starts to get irritating, and the structur

Re: [PATCH v5 18/44] cache-tree: introduce write_index_as_tree()

2015-07-07 Thread Junio C Hamano
Paul Tan writes: > A caller may wish to write a temporary index as a tree. However, > write_cache_as_tree() assumes that the index was read from, and will > write to, the default index file path. Introduce write_index_as_tree() > which removes this limitation by allowing the caller to specify its

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

2015-07-07 Thread 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 option so > permissions should be handle

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

2015-07-07 Thread Paul Tan
On Wed, Jul 8, 2015 at 2:52 AM, 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]. >> >> [1] https://gist.github.com/pyokagan/1b7b0d1f4dab6ba3cef1 > >

[GSOC] Update 4: Unification of tag -l, branch -l and for-each-ref

2015-07-07 Thread Karthik Nayak
Hello All, As part of GSoC I'm working on the Unification of 'for-each-ref', 'tag -l' and 'branch -l'. Sorry for the lack of update since Jun 14, was a little busy with an exam I had. Now thats over, I will be working more on the project. Current Progress: 1. Building ref-filter.{c,h} from for-e

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

2015-07-07 Thread Junio C Hamano
Paul Tan writes: > This patch series depends on pt/pull-builtin. > > This is a re-roll of [v4]. Thanks Torsten, Stefan, Junio for the reviews last > round. Interdiff below. > > Previous versions: > > [WIP v1] http://thread.gmane.org/gmane.comp.version-control.git/270048 > [WIP v2] http://thread.g

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

2015-07-07 Thread David Turner
From: David Turner Many users prefer to always use --follow with logs. Rather than aliasing the command, an option might be more convenient for some. --- Documentation/git-log.txt | 7 +++ builtin/log.c | 7 +++ diff.c | 5

Re: [PATCH v2 00/12] Improve git-am test coverage

2015-07-07 Thread Johannes Schindelin
Hi Paul On 2015-07-07 16:08, Paul Tan wrote: > This is a re-roll of [v1]. Thanks Junio, Johannes, Paolo, Stefan for the > reviews last round. Interdiff below. Interdiff looks good to me! Thanks, Dscho -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to m

Re: Git grep does not support multi-byte characters (like UTF-8)

2015-07-07 Thread Plamen Totev
Junio C Hamano writes: > Plamen Totev writes:  >  > > pickaxe search also uses kwsearch so the case insensitive search with  > > it does not work (e.g. git log -i -S). Maybe this is a less of a  > > problem here as one is expected to search for exact string (hence  > > knows the case)  >  > You

Re: No one understands diff3 "Temporary merge branch" conflict markers

2015-07-07 Thread Junio C Hamano
Matthieu Moy writes: > ... I would say: the > recursive merge-base was computed internally, but not really meant to be > shown to the user. I wonder if the output becomes easier to read if we unconditionally turned off diff3-style for inner merges. -- To unsubscribe from this list: send the line

Re: Whether Git supports directory level access or not?

2015-07-07 Thread Junio C Hamano
Jacob Keller writes: > However, in-repo per-directory permissions make no sense, as there > would be no way to generate commits. That may be the case for the current generation of Git, but I do not think you have to be so pessimistic. Suppose that an imaginary future version of Git allowed you

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

2015-07-07 Thread Eric Sunshine
On Tue, Jul 7, 2015 at 3:52 AM, Robert Collins wrote: > From 0428b0a1248fb84c584a5a6c1f110770c6615d5e Mon Sep 17 00:00:00 2001 > From: Robert Collins > Date: Tue, 7 Jul 2015 15:43:24 +1200 > Subject: [PATCH] git am: Transform and skip patches via new hook Drop the "From sha1", "Date:", and "Subj

Re: refspecs with '*' as part of pattern

2015-07-07 Thread Junio C Hamano
Daniel Barkalow writes: > On Mon, 6 Jul 2015, Junio C Hamano wrote: > >> I cannot seem to be able to find related discussions around that >> patch, so this is only my guess, but I suspect that this is to >> discourage people from doing something like: >> >> refs/tags/*:refs/tags/foo-* >> >

Re: [PATCH v3 23/23] checkout: retire --ignore-other-worktrees in favor of --force

2015-07-07 Thread Junio C Hamano
Eric Sunshine writes: > Is receive.denyCurrentBranch worth mentioning as an argument? Although > pushing a branch into a non-bare repo where that branch is already > checked out is normally disallowed, receive.denyCurrentBranch > overrides the safeguard. Presumably, the user has experience and >

Re: No one understands diff3 "Temporary merge branch" conflict markers

2015-07-07 Thread Matthieu Moy
Edward Anderson writes: > I have the diff3 conflictstyle enabled and want to be able to > understand how to understand its output when there are criss-cross > merges requiring temporary merge branches. Eg: > > <<< HEAD > print(A); > ||| merged common ancestors > <<<

Re: [PATCH v3 22/23] worktree: add: auto-vivify new branch when is omitted

2015-07-07 Thread Junio C Hamano
Eric Sunshine writes: >> Which may be something we would want to have a test for, though. > > Good idea. How about the following as a squash-in? Sounds sensible. At this point we do not have "worktree list", but if we gained that, we may want to add this as one more postcondition after the fail

[PATCH v8 10/11] ref-filter: implement '--contains' option

2015-07-07 Thread Karthik Nayak
'tag -l' and 'branch -l' have two different ways of finding out if a certain ref contains a commit. Implement both these methods in ref-filter and give the caller of ref-filter API the option to pick which implementation to be used. 'branch -l' uses 'is_descendant_of()' from commit.c which is left

[PATCH v8 11/11] for-each-ref: add '--contains' option

2015-07-07 Thread Karthik Nayak
Add the '--contains' option provided by 'ref-filter'. The '--contains' option lists only refs which contain the mentioned commit (HEAD if no commit is explicitly given). Add documentation and tests for the same. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Naya

[PATCH v8 08/11] parse-option: rename parse_opt_with_commit()

2015-07-07 Thread Karthik Nayak
Rename parse_opt_with_commit() to parse_opt_commits() to show that it can be used to obtain a list of commits and is not constricted to usage of '--contains' option. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak --- builtin/branch.c | 4 ++-- builtin/ta

[PATCH v8 06/11] ref-filter: implement '--merged' and '--no-merged' options

2015-07-07 Thread Karthik Nayak
In 'branch -l' we have '--merged' option which only lists refs (branches) merged into the named commit and '--no-merged' option which only lists refs (branches) not merged into the named commit. Implement these two options in ref-filter.{c,h} so that other commands can benefit from this. Based-on-

[PATCH v8 07/11] for-each-ref: add '--merged' and '--no-merged' options

2015-07-07 Thread Karthik Nayak
Add the '--merged' and '--no-merged' options provided by 'ref-filter'. The '--merged' option lets the user to only list refs merged into the named commit. The '--no-merged' option lets the user to only list refs not merged into the named commit. Add documentation and tests for the same. Based-on-

[PATCH v8 09/11] parse-options.h: add macros for '--contains' option

2015-07-07 Thread Karthik Nayak
Add a macro for using the '--contains' option in parse-options.h also include an optional '--with' option macro which performs the same action as '--contains'. Make tag.c and branch.c use this new macro. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak ---

[PATCH v8 05/11] ref-filter: add parse_opt_merge_filter()

2015-07-07 Thread Karthik Nayak
Add 'parse_opt_merge_filter()' to parse '--merged' and '--no-merged' options and write macros for the same. This is copied from 'builtin/branch.c' which will eventually be removed when we port 'branch.c' to use ref-filter APIs. Based-on-patch-by: Jeff King Mentored-by: Christian Couder Mentored

Re: Git grep does not support multi-byte characters (like UTF-8)

2015-07-07 Thread Junio C Hamano
Plamen Totev writes: > pickaxe search also uses kwsearch so the case insensitive search with > it does not work (e.g. git log -i -S). Maybe this is a less of a > problem here as one is expected to search for exact string (hence > knows the case) You reasoned correctly, I think. Pickaxe, as one

[PATCH v8 02/11] tag: libify parse_opt_points_at()

2015-07-07 Thread Karthik Nayak
Rename 'parse_opt_points_at()' to 'parse_opt_object_name()' and move it from 'tag.c' to 'parse-options'. This now acts as a common parse_opt function which accepts an objectname and stores it into a sha1_array. Based-on-patch-by: Jeff King Mentored-by: Christian Couder Mentored-by: Matthieu Moy

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

2015-07-07 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] index-pack: fix allocation of sorted_by_pos array

2015-07-07 Thread Jeff King
On Tue, Jul 07, 2015 at 08:49:19AM -0700, Junio C Hamano wrote: > Duy Nguyen writes: > > > I keep tripping over this "real_type vs type" in this code. What do > > you think about renaming "type" field to "in_pack_type" and > > "real_type" to "canon_type" (or "final_type")? "Real" does not really

[PATCH v8 03/11] ref-filter: implement '--points-at' option

2015-07-07 Thread Karthik Nayak
In 'tag -l' we have '--points-at' option which lets users list only tags of a given object. Implement this option in 'ref-filter.{c,h}' so that other commands can benefit from this. This is duplicated from tag.c, we will eventually remove that when we port tag.c to use ref-filter APIs. Based-on-p

[PATCH v8 04/11] for-each-ref: add '--points-at' option

2015-07-07 Thread Karthik Nayak
Add the '--points-at' option provided by 'ref-filter'. The option lets the user to list only refs which points at the given object. Add documentation and tests for the same. Based-on-patch-by: Jeff King Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak ---

[PATCH v8 00/11] add options to for-each-ref

2015-07-07 Thread Karthik Nayak
v7 of this patch series can be found here : http://article.gmane.org/gmane.comp.version-control.git/273233 This is a continuation of my GSoC project to unify git tag -l, git branch -l and for-each-ref. Continued from this patch series : http://thread.gmane.org/gmane.comp.version-control.git/271563

Re: [PATCH] index-pack: fix allocation of sorted_by_pos array

2015-07-07 Thread Junio C Hamano
Duy Nguyen writes: > I keep tripping over this "real_type vs type" in this code. What do > you think about renaming "type" field to "in_pack_type" and > "real_type" to "canon_type" (or "final_type")? "Real" does not really > say anything in this context.. An unqualified name "type" does bother m

No one understands diff3 "Temporary merge branch" conflict markers

2015-07-07 Thread Edward Anderson
I have the diff3 conflictstyle enabled and want to be able to understand how to understand its output when there are criss-cross merges requiring temporary merge branches. Eg: <<< HEAD print(A); ||| merged common ancestors <<< Temporary merge branch 1 print(B);

Re: [PATCH] Change strbuf_read_file() to return ssize_t

2015-07-07 Thread Jeff King
On Fri, Jul 03, 2015 at 03:59:32PM +0200, Michael Haggerty wrote: > It is currently declared to return int, which could overflow for large > files. > > Signed-off-by: Michael Haggerty > --- > This patch is against maint, but it also rebases against master > without conflict. > > I couldn't find

Re: [PATCH] grep: use regcomp() for icase search with non-ascii patterns

2015-07-07 Thread Plamen Totev
On 07.07. 2015 at 02:02, Duy Nguyen  wrote:  > On Tue, Jul 7, 2015 at 3:10 AM, René Scharfe wrote: > > Am 06.07.2015 um 14:42 schrieb Nguyễn Thái Ngọc Duy: > > So the optimization before this patch was that if a string was searched for > > without -F then it would be treated as a fixed string

[PATCH v5 34/44] builtin-am: invoke applypatch-msg hook

2015-07-07 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am.sh will invoke the applypatch-msg hooks just after extracting the patch message. If the applypatch-msg hook exits with a non-zero status, git-am.sh abort before even applying the patch to the index. Re-implement this in builtin

[PATCH v5 19/44] builtin-am: implement --3way, am.threeWay

2015-07-07 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am.sh supported the --3way option, and if set, would attempt to do a 3-way merge if the initial patch application fails. Since d96a275 (git-am: add am.threeWay config variable, 2015-06-04), the setting am.threeWay configures if th

[PATCH v5 44/44] builtin-am: remove redirection to git-am.sh

2015-07-07 Thread Paul Tan
At the beginning of the rewrite of git-am.sh to C, in order to not break existing test scripts that depended on a functional git-am, a redirection to git-am.sh was introduced that would activate if the environment variable _GIT_USE_BUILTIN_AM was not defined. Now that all of git-am.sh's functional

[PATCH v5 13/44] builtin-am: implement --abort

2015-07-07 Thread Paul Tan
Since 3e5057a (git am --abort, 2008-07-16), git-am supported the --abort option that will rewind HEAD back to the original commit. Re-implement this through am_abort(). Since 7b3b7e3 (am --abort: keep unrelated commits since the last failure and warn, 2010-12-21), to prevent commits made since the

[PATCH v5 24/44] builtin-am: implement -k/--keep, --keep-non-patch

2015-07-07 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am.sh supported the -k/--keep option to pass the -k option to git-mailsplit. Since f7e5ea1 (am: learn passing -b to mailinfo, 2012-01-16), git-am.sh supported the --keep-non-patch option to pass the -b option to git-mailsplit. Re

[PATCH v5 31/44] builtin-am: implement -S/--gpg-sign, commit.gpgsign

2015-07-07 Thread Paul Tan
Since 3b4e395 (am: add the --gpg-sign option, 2014-02-01), git-am.sh supported the --gpg-sign option, and would pass it to git-commit-tree, thus GPG-signing the commit object. Re-implement this option in builtin/am.c. git-commit-tree would also sign the commit by default if the commit.gpgsign set

[PATCH v5 41/44] builtin-am: implement -i/--interactive

2015-07-07 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am.sh supported the --interactive mode. After parsing the patch mail and extracting the patch, commit message and authorship info, an interactive session will begin that allows the user to choose between: * applying the patch * a

[PATCH v5 14/44] builtin-am: reject patches when there's a session in progress

2015-07-07 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am would error out if the user gave it mbox(s) on the command-line, but there was a session in progress. Since c95b138 (Fix git-am safety checks, 2006-09-15), git-am would detect if the user attempted to feed it a mbox via stdin,

[PATCH v5 40/44] builtin-am: support and auto-detect mercurial patches

2015-07-07 Thread Paul Tan
Since 0cfd112 (am: preliminary support for hg patches, 2011-08-29), git-am.sh could convert mercurial patches to an RFC2822 mail patch suitable for parsing with git-mailinfo, and queue them in the state directory for application. Since 15ced75 (git-am foreign patch support: autodetect some patch f

[PATCH v5 26/44] builtin-am: support --keep-cr, am.keepcr

2015-07-07 Thread Paul Tan
Since ad2c928 (git-am: Add command line parameter `--keep-cr` passing it to git-mailsplit, 2010-02-27), git-am.sh supported the --keep-cr option and would pass it to git-mailsplit. Since e80d4cb (git-am: Add am.keepcr and --no-keep-cr to override it, 2010-02-27), git-am.sh supported the am.keepcr

[PATCH v5 20/44] builtin-am: implement --rebasing mode

2015-07-07 Thread Paul Tan
Since 3041c32 (am: --rebasing, 2008-03-04), git-am.sh supported the --rebasing option, which is used internally by git-rebase to tell git-am that it is being used for its purpose. It would create the empty file $state_dir/rebasing to help "completion" scripts tell if the ongoing operation is am or

[PATCH v5 38/44] builtin-am: support and auto-detect StGit patches

2015-07-07 Thread Paul Tan
Since c574e68 (git-am foreign patch support: StGIT support, 2009-05-27), git-am.sh supported converting StGit patches into RFC2822 mail patches that can be parsed with git-mailinfo. Implement this by introducing two functions in builtin/am.c: stgit_patch_to_mail() and split_mail_conv(). stgit_pat

[PATCH v5 16/44] builtin-am: exit with user friendly message on failure

2015-07-07 Thread Paul Tan
Since ced9456 (Give the user a hint for how to continue in the case that git-am fails because it requires user intervention, 2006-05-02), git-am prints additional information on how the user can re-invoke git-am to resume patch application after resolving the failure. Re-implement this through the

[PATCH v5 43/44] builtin-am: check for valid committer ident

2015-07-07 Thread Paul Tan
When commit_tree() is called, if the user does not have an explicit committer ident configured, it will attempt to construct a default committer ident based on the user's and system's info (e.g. gecos field, hostname etc.) However, if a default committer ident is unable to be constructed, commit_tr

[PATCH v5 37/44] builtin-am: rerere support

2015-07-07 Thread Paul Tan
git-am.sh will call git-rerere at the following events: * "git rerere" when a three-way merge fails to record the conflicted automerge results. Since 8389b52 (git-rerere: reuse recorded resolve., 2006-01-28) * Since cb6020b (Teach --[no-]rerere-autoupdate option to merge, revert and fri

[PATCH v5 32/44] builtin-am: invoke post-rewrite hook

2015-07-07 Thread Paul Tan
Since 96e1948 (rebase: invoke post-rewrite hook, 2010-03-12), git-am.sh will invoke the post-rewrite hook after it successfully finishes applying all the queued patches. To do this, when parsing a mail to extract its patch and metadata, in --rebasing mode git-am.sh will also store the original com

[PATCH v5 21/44] builtin-am: bypass git-mailinfo when --rebasing

2015-07-07 Thread Paul Tan
Since 5e835ca (rebase: do not munge commit log message, 2008-04-16), git am --rebasing no longer gets the commit log message from the patch, but reads it directly from the commit identified by the "From " header line. Since 43c2325 (am: use get_author_ident_from_commit instead of mailinfo when reb

[PATCH v5 39/44] builtin-am: support and auto-detect StGit series files

2015-07-07 Thread Paul Tan
Since c574e68 (git-am foreign patch support: StGIT support, 2009-05-27), git-am.sh is able to read a single StGit series file and, for each StGit patch listed in the file, convert the StGit patch into a RFC2822 mail patch suitable for parsing with git-mailinfo, and queue them in the state directory

[PATCH v5 42/44] builtin-am: implement legacy -b/--binary option

2015-07-07 Thread Paul Tan
The -b/--binary option was initially implemented in 087b674 (git-am: --binary; document --resume and --binary., 2005-11-16). The option will pass the --binary flag to git-apply to allow it to apply binary patches. However, in 2b6eef9 (Make apply --binary a no-op., 2006-09-06), --binary was been ma

[PATCH v5 30/44] builtin-am: implement --committer-date-is-author-date

2015-07-07 Thread Paul Tan
Since 3f01ad6 (am: Add --committer-date-is-author-date option, 2009-01-22), git-am.sh implemented the --committer-date-is-author-date option, which tells git-am to use the timestamp recorded in the email message as both author and committer date. Re-implement this option in builtin/am.c. Signed-o

[PATCH v5 23/44] builtin-am: implement -u/--utf8

2015-07-07 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am.sh supported the -u,--utf8 option. If set, the -u option will be passed to git-mailinfo to re-code the commit log message and authorship in the charset specified by i18n.commitencoding. If unset, the -n option will be passed to

[PATCH v5 12/44] builtin-am: implement --skip

2015-07-07 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am supported resuming from a failed patch application by skipping the current patch. Re-implement this feature by introducing am_skip(). Signed-off-by: Paul Tan --- builtin/am.c | 121

[PATCH v5 28/44] builtin-am: pass git-apply's options to git-apply

2015-07-07 Thread Paul Tan
git-am.sh recognizes some of git-apply's options, and would pass them to git-apply: * --whitespace, since 8c31cb8 (git-am: --whitespace=x option., 2006-02-28) * -C, since 67dad68 (add -C[NUM] to git-am, 2007-02-08) * -p, since 2092a1f (Teach git-am to pass -p option down to git-apply, 2007-0

[PATCH v5 35/44] builtin-am: invoke pre-applypatch hook

2015-07-07 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am.sg will invoke the pre-applypatch hook after applying the patch to the index, but before a commit is made. Should the hook exit with a non-zero status, git am will exit. Re-implement this in builtin/am.c. Signed-off-by: Paul T

[PATCH v5 36/44] builtin-am: invoke post-applypatch hook

2015-07-07 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am.sh will invoke the post-applypatch hook after the patch is applied and a commit is made. The exit code of the hook is ignored. Re-implement this in builtin/am.c. Signed-off-by: Paul Tan --- builtin/am.c | 2 ++ 1 file change

  1   2   >