Re: Whether Git supports directory level access or not?

2015-07-07 Thread Junio C Hamano
Jacob Keller jacob.kel...@gmail.com 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

[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 :

[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 p...@peff.net Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu

[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.

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 robe...@robertcollins.net wrote: From 0428b0a1248fb84c584a5a6c1f110770c6615d5e Mon Sep 17 00:00:00 2001 From: Robert Collins rbtcoll...@hp.com Date: Tue, 7 Jul 2015 15:43:24 +1200 Subject: [PATCH] git am: Transform and skip patches via new hook

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

2015-07-07 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com 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 me

Re: No one understands diff3 Temporary merge branch conflict markers

2015-07-07 Thread Matthieu Moy
Edward Anderson nil...@nilbus.com 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

[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.

[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 christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by:

[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.

[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 christian.cou...@gmail.com Mentored-by: Matthieu Moy

[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

[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 christian.cou...@gmail.com Mentored-by: Matthieu Moy

Re: refspecs with '*' as part of pattern

2015-07-07 Thread Junio C Hamano
Daniel Barkalow barka...@iabervon.iabervon.org 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:

Re: No one understands diff3 Temporary merge branch conflict markers

2015-07-07 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr 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

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 pclo...@gmail.com 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 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 p...@peff.net Mentored-by: Christian Couder

[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 p...@peff.net Mentored-by: Christian Couder

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

2015-07-07 Thread Junio C Hamano
Plamen Totev plamen.to...@abv.bg 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.

[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 p...@peff.net Mentored-by: Christian

Re: [PATCH 02/12] t4150: am fails if index is dirty

2015-07-07 Thread Paul Tan
On Sun, Jul 5, 2015 at 11:38 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: On 2015-07-02 20:16, Paul Tan wrote: diff --git a/t/t4150-am.sh b/t/t4150-am.sh index 3f54bdf..0a19136 100755 --- a/t/t4150-am.sh +++ b/t/t4150-am.sh @@ -154,6 +154,17 @@ test_expect_success 'am applies

Re: undocumented core.sharedRepository=2 set by git init --shared=world

2015-07-07 Thread Torsten Bögershausen
On 2015-07-06 21.25, Joey Hess wrote: joey@darkstar:~/tmpgit init --shared=world testrepo Initialized empty shared Git repository in /home/joey/tmp/testrepo/.git/ joey@darkstar:~/tmpgrep shared testrepo/.git/config sharedrepository = 2 This magic value of 2 seems to be undocumented,

Re: Whether Git supports directory level access or not?

2015-07-07 Thread Torsten Bögershausen
On 07.07.15 08:40, saur...@stockal.com wrote: Hi, Please let me know whether Git supports directory level access or not. For example :- Consider the structure with one repository consisting of sub directories for each product. main_repo: dir1 dir dir2 dir shared-dir dir

Want know whether Git support directory love access?

2015-07-07 Thread saurabh
Hi, Please let me know whether Git supports directory level access or not. For example :- Consider the structure with one repository consisting of sub directories for each product. main_repo: dir1 dir dir2 dir shared-dir dir private dir One group(user) of developers has access to

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

2015-07-07 Thread Plamen Totev
Nguyen, thanks for the help and the patch. Also the escaping suggested by  Scharfe seems as good choice. But i dig some more into the problem and I found some other thing. That's why I replied on the main thread not on the patch. I hope you'll excuse me if this is a bad practice. git grep -i -P

Re: undocumented core.sharedRepository=2 set by git init --shared=world

2015-07-07 Thread John Keeping
On Tue, Jul 07, 2015 at 10:14:28AM +0200, Johannes Schindelin wrote: Hi Joey, On 2015-07-06 21:25, Joey Hess wrote: joey@darkstar:~/tmpgit init --shared=world testrepo Initialized empty shared Git repository in /home/joey/tmp/testrepo/.git/ joey@darkstar:~/tmpgrep shared

Re: [PATCH 09/12] t4150: am with post-applypatch hook

2015-07-07 Thread Paul Tan
On Sun, Jul 5, 2015 at 11:58 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: On 2015-07-02 20:16, Paul Tan wrote: diff --git a/t/t4150-am.sh b/t/t4150-am.sh index dd6fe81..62b678c 100755 --- a/t/t4150-am.sh +++ b/t/t4150-am.sh @@ -275,6 +275,48 @@ test_expect_success 'am with

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

2015-07-07 Thread Eric Sunshine
On Mon, Jul 6, 2015 at 3:41 PM, Junio C Hamano gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com writes: Now that git worktree add has achieved user-facing feature-parity with git checkout --to, retire the latter. [...] This effectively reverts changes to checkout.c by 529fef2

Re: [PATCH 09/12] t4150: am with post-applypatch hook

2015-07-07 Thread Johannes Schindelin
Hi Paul, On 2015-07-07 08:47, Paul Tan wrote: On Sun, Jul 5, 2015 at 11:58 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: On 2015-07-02 20:16, Paul Tan wrote: diff --git a/t/t4150-am.sh b/t/t4150-am.sh index dd6fe81..62b678c 100755 --- a/t/t4150-am.sh +++ b/t/t4150-am.sh @@

Re: [PATCH v4 27/44] builtin-am: implement --[no-]scissors

2015-07-07 Thread Paul Tan
On Sun, Jun 28, 2015 at 10:05 PM, Paul Tan pyoka...@gmail.com wrote: diff --git a/builtin/am.c b/builtin/am.c index 2387726..55989e5 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -74,6 +74,12 @@ enum keep_type { KEEP_NON_PATCH /* pass -b flag to git-mailinfo */ }; +enum

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

2015-07-07 Thread Eric Sunshine
On Mon, Jul 6, 2015 at 3:40 PM, Junio C Hamano gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com writes: As a safeguard, checking out a branch already checked out by a different worktree is disallowed. This behavior can be overridden with --ignore-other-worktrees, however, this

Whether Git supports directory level access or not?

2015-07-07 Thread saurabh
Hi, Please let me know whether Git supports directory level access or not. For example :- Consider the structure with one repository consisting of sub directories for each product. main_repo: dir1 dir dir2 dir shared-dir dir private dir One group(user) of developers has access to

Re: Whether Git supports directory level access or not?

2015-07-07 Thread Jacob Keller
Hi On Mon, Jul 6, 2015 at 11:40 PM, saur...@stockal.com wrote: Hi, Please let me know whether Git supports directory level access or not. For example :- Consider the structure with one repository consisting of sub directories for each product. main_repo: dir1 dir dir2 dir

Re: refspecs with '*' as part of pattern

2015-07-07 Thread Jacob Keller
On Mon, Jul 6, 2015 at 7:33 PM, Jacob Keller jacob.kel...@gmail.com wrote: On Mon, Jul 6, 2015 at 7:20 PM, Daniel Barkalow barka...@iabervon.iabervon.org wrote: On Mon, 6 Jul 2015, Junio C Hamano wrote: Jacob Keller jacob.kel...@gmail.com writes: I've been looking at the refspecs for git

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

2015-07-07 Thread Robert Collins
From 0428b0a1248fb84c584a5a6c1f110770c6615d5e Mon Sep 17 00:00:00 2001 From: Robert Collins rbtcoll...@hp.com Date: Tue, 7 Jul 2015 15:43:24 +1200 Subject: [PATCH] git am: Transform and skip patches via new hook A thing I need to do quite a lot of is extracting stuff from Python to backported

Re: undocumented core.sharedRepository=2 set by git init --shared=world

2015-07-07 Thread Johannes Schindelin
Hi Joey, On 2015-07-06 21:25, Joey Hess wrote: joey@darkstar:~/tmpgit init --shared=world testrepo Initialized empty shared Git repository in /home/joey/tmp/testrepo/.git/ joey@darkstar:~/tmpgrep shared testrepo/.git/config sharedrepository = 2 This magic value of 2 seems to be

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

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 handled

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

2015-07-07 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com 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]

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

2015-07-07 Thread Plamen Totev
Junio C Hamano gits...@pobox.com writes: Plamen Totev plamen.to...@abv.bg 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 

[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

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 gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com 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]

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

2015-07-07 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com 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

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

2015-07-07 Thread David Turner
From: David Turner dtur...@twitter.com 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

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

2015-07-07 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com 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

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

2015-07-07 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com 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

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

2015-07-07 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com 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

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

2015-07-07 Thread Junio C Hamano
Jeff King p...@peff.net 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

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: No one understands diff3 Temporary merge branch conflict markers

2015-07-07 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@grenoble-inp.fr 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

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

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

2015-07-07 Thread Junio C Hamano
Jeff King p...@peff.net 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).

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

2015-07-07 Thread Junio C Hamano
Jeff King p...@peff.net 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

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,

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 dtur...@twopensource.com writes: From: David Turner dtur...@twitter.com If you configure your

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

2015-07-07 Thread Junio C Hamano
David Turner dtur...@twopensource.com 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) {

[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 dtur...@twopensource.com --- Documentation/git-log.txt | 6 ++ builtin/log.c | 7 +++ diff.c|

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 p...@peff.net 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

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: snip 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, sb, err,

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

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

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 gits...@pobox.com wrote: Daniel Barkalow barka...@iabervon.iabervon.org 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

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

2015-07-07 Thread Philip Oakley
From: Sebastian Schuberth sschube...@gmail.com 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

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(errno) to

[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

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 gits...@pobox.com wrote: Jacob Keller jacob.kel...@gmail.com 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

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

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 gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com 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

Re: [PATCH v4 04/44] builtin-am: implement patch queue mechanism

2015-07-07 Thread Paul Tan
On Mon, Jun 29, 2015 at 1:08 PM, Stefan Beller sbel...@google.com wrote: (optional nit, bikeshedding) In conjunction with the previous patch I just wonder when we put a TODO and when we want to put a NEEDSWORK, or if we're being inconsistent here as both issues will be resolved in a later

Re: undocumented core.sharedRepository=2 set by git init --shared=world

2015-07-07 Thread John Keeping
On Tue, Jul 07, 2015 at 01:32:13PM +0200, Johannes Schindelin wrote: Hi John, On 2015-07-07 11:10, John Keeping wrote: On Tue, Jul 07, 2015 at 10:14:28AM +0200, Johannes Schindelin wrote: Hi Joey, On 2015-07-06 21:25, Joey Hess wrote: joey@darkstar:~/tmpgit init --shared=world

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

2015-07-07 Thread Duy Nguyen
On Tue, Jul 7, 2015 at 3:58 PM, Plamen Totev plamen.to...@abv.bg wrote: Nguyen, thanks for the help and the patch. Also the escaping suggested by Scharfe seems as good choice. But i dig some more into the problem and I found some other thing. That's why I replied on the main thread not on the

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 4:24 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Mon, Jul 6, 2015 at 3:40 PM, Junio C Hamano gits...@pobox.com 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

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

2015-07-07 Thread Torsten Bögershausen
#!/usr/bin/perl Should we have hard-coded PATH to perl here ? /usr/bin/perl --version This is perl, v5.10.0 built for darwin-thread-multi-2level (with 2 registered patches, see perl -V for more detail) + +my $is_passing = Test::More-builder-is_passing; +exit($is_passing ? 0 : 1); This

Re: undocumented core.sharedRepository=2 set by git init --shared=world

2015-07-07 Thread Johannes Schindelin
Hi John, On 2015-07-07 11:10, John Keeping wrote: On Tue, Jul 07, 2015 at 10:14:28AM +0200, Johannes Schindelin wrote: Hi Joey, On 2015-07-06 21:25, Joey Hess wrote: joey@darkstar:~/tmpgit init --shared=world testrepo Initialized empty shared Git repository in

[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 dtur...@twopensource.com --- Documentation/git-reflog.txt | 4

[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 dtur...@twopensource.com --- 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

[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 dtur...@twopensource.com --- git-bisect.sh | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index

[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

[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 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 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 dtur...@twopensource.com --- branch.c | 4 ++-- builtin/commit.c | 6 +++--- builtin/merge.c

[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

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

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 practical

[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

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 plamen.to...@abv.bg wrote: Junio C Hamano gits...@pobox.com writes: Plamen Totev plamen.to...@abv.bg 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

[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 dtur...@twopensource.com --- Documentation/git-log.txt | 6 ++ builtin/log.c | 7 +++ diff.c|

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 dtur...@twopensource.com 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,

[PATCH v2 04/12] t4150: am refuses patches when paused

2015-07-07 Thread Paul Tan
Since c95b138 (Fix git-am safety checks, 2006-09-15), when there is a session in progress, git-am will check the command-line arguments and standard input to ensure that the user does not pass it any patches. Add a test for this. Signed-off-by: Paul Tan pyoka...@gmail.com --- t/t4150-am.sh | 14

[PATCH v2 03/12] t4151: am --abort will keep dirty index intact

2015-07-07 Thread Paul Tan
Since 7b3b7e3 (am --abort: keep unrelated commits since the last failure and warn, 2010-12-21), git-am --abort will not touch the index if on the previous invocation, git-am failed because the index is dirty. This is to ensure that the user's modifications to the index are not discarded. Add a

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

2015-07-07 Thread 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 the charset specified by

[PATCH v2 07/12] t4150: am with applypatch-msg hook

2015-07-07 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am 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 abort before even applying the patch to the index. Add tests for this hook.

[PATCH v2 01/12] t4150: am.messageid really adds the message id

2015-07-07 Thread Paul Tan
Since a078f73 (git-am: add --message-id/--no-message-id, 2014-11-25), the am.messageid setting determines whether the --message-id option is set by default. Add a test for this. Reviewed-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paul Tan pyoka...@gmail.com --- Notes: v2

[PATCH v2 02/12] t4150: am fails if index is dirty

2015-07-07 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am will ensure that the index is clean before applying the patch. This is to prevent changes unrelated to the patch from being committed. Add a test for this check. Signed-off-by: Paul Tan pyoka...@gmail.com --- Notes: v2

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

2015-07-07 Thread Paul Tan
This is a re-roll of [v1]. Thanks Junio, Johannes, Paolo, Stefan for the reviews last round. Interdiff below. Previous versions: [v1] http://thread.gmane.org/gmane.comp.version-control.git/273254 Increase test coverage of git-am.sh to help prevent regressions that could arise from the rewrite

[PATCH v2 06/12] t4150: am --resolved fails if index has unmerged entries

2015-07-07 Thread Paul Tan
Since c1d1128 (git-am --resolved: more usable error message., 2006-04-28), git-am --resolved will check to see if there are any unmerged entries, and will error out with a user-friendly error message if there are. Add a test for this. Signed-off-by: Paul Tan pyoka...@gmail.com --- t/t4150-am.sh

[PATCH v2 09/12] t4150: am with 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. Add tests for this hook. Helped-by: Junio C Hamano gits...@pobox.com Signed-off-by: Paul Tan

[PATCH v2 11/12] t3418: non-interactive rebase --continue with rerere enabled

2015-07-07 Thread Paul Tan
Since 8389b52 (git-rerere: reuse recorded resolve., 2006-01-28), git-am will call git-rerere to re-use recorded merge conflict resolutions if any occur in a threeway merge. Add a test to ensure that git-rerere is called by git-am (which handles the non-interactive rebase). Signed-off-by: Paul

[PATCH v2 08/12] t4150: am with 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. Add tests for this hook. Helped-by: Junio C Hamano

[PATCH v2 05/12] t4150: am --resolved fails if index has no changes

2015-07-07 Thread Paul Tan
Since 6d28644 (git-am: do not allow empty commits by mistake., 2006-02-23), git-am --resolved will check to see if the index has any changes to prevent the user from creating an empty commit by mistake. Add a test for this. Signed-off-by: Paul Tan pyoka...@gmail.com --- t/t4150-am.sh | 12

[PATCH v2 10/12] t4150: tests for am --[no-]scissors

2015-07-07 Thread Paul Tan
Since 017678b (am/mailinfo: Disable scissors processing by default, 2009-08-26), git-am supported the --[no-]scissors option, passing it to git-mailinfo. Add tests to ensure that git-am will pass the --scissors option to git-mailinfo, and that --no-scissors will override the configuration setting

  1   2   >