[PATCH v3 13/15] ref-filter: introduce remote_ref_atom_parser()

2016-01-05 Thread Karthik Nayak
Introduce remote_ref_atom_parser() which will parse the '%(upstream)' and '%(push)' atoms and store information into the 'used_atom' structure based on the modifiers used along with the corresponding atom. Helped-by: Ramsay Jones Helped-by: Eric Sunshine

[PATCH v3 15/15] ref-filter: introduce objectname_atom_parser()

2016-01-05 Thread Karthik Nayak
Introduce objectname_atom_parser() which will parse the '%(objectname)' atom and store information into the 'used_atom' structure based on the modifiers used along with the atom. Helped-by: Ramsay Jones Helped-by: Eric Sunshine

[PATCH v3 00/15] ref-filter: use parsing functions

2016-01-05 Thread Karthik Nayak
This series cleans up populate_value() in ref-filter, by moving out the parsing part of atoms to separate parsing functions. This ensures that parsing is only done once and also improves the modularity of the code. v1: http://thread.gmane.org/gmane.comp.version-control.git/281180 v2:

[PATCH v3 08/15] ref-filter: introduce color_atom_parser()

2016-01-05 Thread Karthik Nayak
Introduce color_atom_parser() which will parse a "color" atom and store its color in the "used_atom" structure for further usage in populate_value(). Helped-by: Ramsay Jones Helped-by: Eric Sunshine Signed-off-by: Karthik Nayak

[PATCH v3 12/15] ref-filter: align: introduce long-form syntax

2016-01-05 Thread Karthik Nayak
Introduce optional prefixes "width=" and "position=" for the align atom so that the atom can be used as "%(align:width=,position=)". Add Documetation and tests for the same. Helped-by: Eric Sunshine Signed-off-by: Karthik Nayak ---

[PATCH v3 14/15] ref-filter: introduce contents_atom_parser()

2016-01-05 Thread Karthik Nayak
Introduce contents_atom_parser() which will parse the '%(contents)' atom and store information into the 'used_atom' structure based on the modifiers used along with the atom. Helped-by: Ramsay Jones Helped-by: Eric Sunshine Signed-off-by:

[PATCH v3 10/15] ref-filter: introduce parse_align_position()

2016-01-05 Thread Karthik Nayak
>From align_atom_parser() form parse_align_position() which given a string would give us the alignment position. This is a preparatory patch as to introduce prefixes for the %(align) atom and avoid redundancy in the code. Helped-by: Eric Sunshine Signed-off-by: Karthik

[PATCH v3 01/15] strbuf: introduce strbuf_split_str_omit_term()

2016-01-05 Thread Karthik Nayak
The current implementation of 'strbuf_split_buf()' includes the terminator at the end of each strbuf post splitting. Add an option wherein we can drop the terminator if desired. In this context introduce a wrapper function 'strbuf_split_str_omit_term()' which splits a given string into strbufs

[PATCH v3 05/15] ref-filter: introduce parsing functions for each valid atom

2016-01-05 Thread Karthik Nayak
Parsing atoms is done in populate_value(), this is repetitive and hence expensive. Introduce a parsing function which would let us parse atoms beforehand and store the required details into the 'used_atom' structure for further usage. Helped-by: Eric Sunshine

[PATCH v3 09/15] ref-filter: introduce align_atom_parser()

2016-01-05 Thread Karthik Nayak
Introduce align_atom_parser() which will parse an 'align' atom and store the required alignment position and width in the 'used_atom' structure for further usage in populate_value(). Helped-by: Eric Sunshine Helped-by: Ramsay Jones

Re: [PATCH v4] git-svn: add support for prefixed globs in config

2016-01-05 Thread Eric Wong
Junio C Hamano wrote: > Victor Leschuk writes: > > + branches = branches/release_*:refs/remotes/project-a/branches/release_* > > Hmph, if you are going this route, I wonder if there is a reason to > limit yourself only to "prefix". Would allowing

Re: [PATCH] Add a test for subtree rebase that loses commits

2016-01-05 Thread Dennis Kaarsemaker
On di, 2016-01-05 at 09:47 +0100, Torsten Bögershausen wrote: > Need to drop > David Greene > from List, no MX record seahawk:~$ dig MX obbligato.org obbligato.org. 1800IN MX 10 mail.obbligato.org. seahawk:~$ dig mail.obbligato.org

[PATCH 1/3] t6050-replace: make failing editor test more robust

2016-01-05 Thread SZEDER Gábor
'git replace --edit' should error out when the invoked editor fails, but the test checking this behavior would not notice if this weren't the case. The test in question, ever since it was added in 85f98fc037ae (replace: add tests for --edit, 2014-05-17), has simulated a failing editor in an

Re: [PATCH] Add a test for subtree rebase that loses commits

2016-01-05 Thread Torsten Bögershausen
Need to drop David Greene from List, no MX record On 2016-01-05 05.40, David Greene wrote: > From: "David A. Greene" > > This test merges an external tree in as a subtree, makes some commits > on top of it and splits it back out. In the process

Git 2.7.0 gitignore behaviour regression

2016-01-05 Thread Mike McQuaid
Hi folks, Firstly, thanks for all your hard work on Git. It makes my life much easier. Homebrew has a series of convoluted .gitignore rules due to our special/weird use-case of wanting to ignore everything in a working directory except a select few files/directories. We experienced a bug with

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2016-01-05 Thread David Turner
On Wed, 2015-12-23 at 14:34 +0100, Michael Haggerty wrote: > On 12/03/2015 01:35 AM, David Turner wrote: > > git init learns a new argument --refs-backend-type. Presently, > > only > > "files" is supported, but later we will add other backends. > > > > When this argument is used, the

Advice regarding inherited git repository

2016-01-05 Thread Danielle
Hi all, I inherited a web site and a git repository. the git repository is cloned to the website and a sandbox website (two clones). No commits have been done in more than 6 months. The main site has been updated a lot of times, the sandbox has lots of test and exploratory code. To bring

Re: Detecting redundant commits

2016-01-05 Thread David Greene
On January 4, 2016 10:00:26 PM CST, Jeff King wrote: >Or do you mean commits that, when applied, we find turn out to have >empty changes (e.g., because we have a set of commits that have >different patch-ids, but do roughly the same thing)? I don't think you >can find that with

Re: [PATCH v2] git-p4.py: add support for filetype change

2016-01-05 Thread Romain Picard
Le 04.01.2016 23:16, Luke Diamand a écrit : On 4 January 2016 at 10:52, Romain Picard wrote: After changing the type of a file in the git repository, it is not possible to "git p4 publish" the commit to perforce. This is due to the fact that the git "T" status is

Re: [PATCH] for-each-ref: document `creatordate` and `creator` fields

2016-01-05 Thread Junio C Hamano
Eric Wong writes: > These were introduced back in 2006 at 3175aa1ec28c but > never documented. Thanks, and I totally forgot about the feature ;-) > Signed-off-by: Eric Wong > --- > And I just found these very useful, today! > > I also noticed

Re: [PATCH 11/16] refs: move duplicate check to common code

2016-01-05 Thread David Turner
On Wed, 2015-12-23 at 07:27 +0100, Michael Haggerty wrote: > > +static int ref_update_reject_duplicates(struct ref_transaction > > *transaction, > > + struct string_list > > *refnames, > > + struct strbuf *err) > > I like that

Re: [PATCH] contrib/subtree: Remove --annotate

2016-01-05 Thread Junio C Hamano
David Greene writes: > From: "David A. Greene" > > Remove --annotate. This obviates the need for an --unannotate > command, which is both an obvious addition and difficult to define > due to the numerous ways one might want to specify how to edit >

Segmentation fault found while fuzzing .pack file under 2.7.0.rc3

2016-01-05 Thread Jacek Wielemborek
Hello, Steps to reproduce: 1. base64 -d and unpack the .tar.gz file from here: https://gist.github.com/d33tah/4e976f2e043718594a85 2. cd into it, run "git log" I'll be happy to guide you through the fuzzing process - I stopped it at the first crash. Cheers, d33tah signature.asc

Re: [PATCH 03/16] refs: add methods for the ref iterators

2016-01-05 Thread Michael Haggerty
On 01/04/2016 08:01 PM, Junio C Hamano wrote: > David Aguilar writes: > [...] >> My only comment is that it seems like having a single static global >> the_refs_backend seems like it should be avoided. >> [...] > > I think the ship is sailing in a different direction. The API

Re: Segmentation fault found while fuzzing .pack file under 2.7.0.rc3

2016-01-05 Thread Jeff King
On Tue, Jan 05, 2016 at 02:44:49PM +0100, Jacek Wielemborek wrote: > Steps to reproduce: > > 1. base64 -d and unpack the .tar.gz file from here: > https://gist.github.com/d33tah/4e976f2e043718594a85 > > 2. cd into it, run "git log" > > I'll be happy to guide you through the fuzzing process - I

[ANNOUNCE] Git for Windows 2.7.0

2016-01-05 Thread Johannes Schindelin
Happy new year! It is my pleasure to announce that Git for Windows 2.7.0 is available from: https://git-for-windows.github.io/ Changes since Git for Windows v2.6.4 (December 14th 2015) New Features * Comes with Git v2.7.0. Bug Fixes * Non-ASCII command-lines are now passed

Re: [PATCH] commit: ensure correct permissions of the commit message

2016-01-05 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Junio, > > On Mon, 4 Jan 2016, Junio C Hamano wrote: > >> Johannes Schindelin writes: >> >> >> I do not know fcreate_or_truncate() is a good name, though. >> > >> > So what would be a good name? >> >>

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2016-01-05 Thread Junio C Hamano
David Turner writes: > I'm working on the rest now, but wanted to comment on this first. I > went ahead and made this change, but I'm not sure I like it. In the > git codebase, the concept will continue to be called "backend"; there > are already-accepted patches

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2016-01-05 Thread David Turner
On Tue, 2016-01-05 at 10:03 -0800, Junio C Hamano wrote: > David Turner writes: > > > I'm working on the rest now, but wanted to comment on this first. > > I > > went ahead and made this change, but I'm not sure I like it. In > > the > > git codebase, the concept

Re: [PATCH 03/16] refs: add methods for the ref iterators

2016-01-05 Thread Junio C Hamano
Michael Haggerty writes: > Actually, maybe we will never have to rewrite all callers. I rather > think that we will retain one simplified API for dealing with "*this* > repository's references" and a second for dealing with other repos' refs. Yeah, I think the similarity

Re: [PATCH v3 01/15] strbuf: introduce strbuf_split_str_omit_term()

2016-01-05 Thread Junio C Hamano
Karthik Nayak writes: > The current implementation of 'strbuf_split_buf()' includes the > terminator at the end of each strbuf post splitting. Add an option > wherein we can drop the terminator if desired. In this context > introduce a wrapper function

Re: [PATCH] Add a test for subtree rebase that loses commits

2016-01-05 Thread Eric Sunshine
On Mon, Jan 4, 2016 at 11:40 PM, David Greene wrote: > This test merges an external tree in as a subtree, makes some commits > on top of it and splits it back out. In the process the added commits > are lost. This is marked to expect failure so that we don't forget to >

Re: [PATCH v3 08/15] ref-filter: introduce color_atom_parser()

2016-01-05 Thread Junio C Hamano
Karthik Nayak writes: > Introduce color_atom_parser() which will parse a "color" atom and > store its color in the "used_atom" structure for further usage in > populate_value(). > > Helped-by: Ramsay Jones > Helped-by: Eric Sunshine

Re: Git 2.7.0 gitignore behaviour regression

2016-01-05 Thread Jeff King
On Tue, Jan 05, 2016 at 02:40:16PM +, Mike McQuaid wrote: > Homebrew has a series of convoluted .gitignore rules due to our > special/weird use-case of wanting to ignore everything in a working > directory except a select few files/directories. We experienced a bug > with our .gitignore file

Re: [PATCH 1/3] t6050-replace: make failing editor test more robust

2016-01-05 Thread Jeff King
On Tue, Jan 05, 2016 at 11:33:30AM +0100, SZEDER Gábor wrote: > However, this editor doesn't actually modify the edited object, > because start_command() turns this editor into: > > /bin/sh -c './fakeeditor;false "$@"' './fakeeditor;false' \ > '.../.git/REPLACE_EDITOBJ' Thanks for

Re: [PATCH v2 2/2] do_compare_entry: use already-computed path

2016-01-05 Thread David Turner
On Mon, 2015-12-21 at 17:34 -0500, David Turner wrote: > In traverse_trees, we generate the complete traverse path for a Please replace with the attached version, which eliminates an unnecessary check.From 520cfbff15faa6de50d37b4a476b21dbe1598433 Mon Sep 17 00:00:00 2001 From: David Turner

[PATCH] Expand documentation describing --signoff

2016-01-05 Thread David A. Wheeler
Modify various document (man page) files to explain in more detail what --signoff means. This was inspired by https://lwn.net/Articles/669976/ where paulj noted, "adding [the] '-s' argument to [a] git commit doesn't really mean you have even heard of the DCO...". Extending git's documentation

Re: [PATCH v3 01/15] strbuf: introduce strbuf_split_str_omit_term()

2016-01-05 Thread Karthik Nayak
On Wed, Jan 6, 2016 at 12:54 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> The current implementation of 'strbuf_split_buf()' includes the >> terminator at the end of each strbuf post splitting. Add an option >> wherein we can drop the

Re: Segmentation fault found while fuzzing .pack file under 2.7.0.rc3

2016-01-05 Thread Jeff King
On Tue, Jan 05, 2016 at 04:23:33PM -0800, Jonathan Nieder wrote: > > Git packfiles come from two places: > > > > 1. Local maintenance repacks loose and already-packed objects into a > > new packfile. We trust the local repack process to generate a valid > > packfile (though the

Re: [PATCH v3 08/15] ref-filter: introduce color_atom_parser()

2016-01-05 Thread Karthik Nayak
On Wed, Jan 6, 2016 at 2:19 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> Introduce color_atom_parser() which will parse a "color" atom and >> store its color in the "used_atom" structure for further usage in >> populate_value(). >> >>

Re: "git send-email" thru Gmail incurs few minutes delay

2016-01-05 Thread Geert Uytterhoeven
On Sun, Jan 3, 2016 at 2:52 PM, Andrey Utkin wrote: > After "Send this email? ([y]es|[n]o|[q]uit|[a]ll): y" prompt and > before "Password for 'smtp://x...@gmail.com@smtp.gmail.com:587':" > prompt I always have a delay of 2-3 minutes. It is weird! "Unsafe >

Re: [PATCH] Add a test for subtree rebase that loses commits

2016-01-05 Thread Torsten Bögershausen
On 2016-01-05 10.57, Dennis Kaarsemaker wrote: > On di, 2016-01-05 at 09:47 +0100, Torsten Bögershausen wrote: >> Need to drop >> David Greene >> from List, no MX record > > seahawk:~$ dig MX obbligato.org > obbligato.org.1800IN MX 10 >

Re: [PATCH 1/3] t6050-replace: make failing editor test more robust

2016-01-05 Thread SZEDER Gábor
Erm, subject says "[PATCH 1/3]", but I messed up, this is a standalone patch. Gábor -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v3 11/15] ref-filter: convert variable 'width' to an unsigned int

2016-01-05 Thread Junio C Hamano
Karthik Nayak writes: > In align_atom_parser() the 'width' variable is an int, which requires > an explicit type conversion when used in strtoul_ui(). Hence make it > an unsigned int. > > Helped-by: Eric Sunshine > Signed-off-by: Karthik Nayak

Re: [PATCH v3 08/15] ref-filter: introduce color_atom_parser()

2016-01-05 Thread Junio C Hamano
Karthik Nayak writes: > @@ -90,7 +105,7 @@ static struct { > { "symref" }, > { "flag" }, > { "HEAD" }, > - { "color" }, > + { "color", FIELD_STR, color_atom_parser }, > { "align" }, > { "end" }, > }; This is minor, as I do not think

[PATCH v4] reflog-walk: don't segfault on non-commit sha1's in the reflog

2016-01-05 Thread Dennis Kaarsemaker
git reflog (ab)uses the log machinery to display its list of log entries. To do so it must fake commit parent information for the log walker. For refs in refs/heads this is no problem, as they should only ever point to commits. Tags and other refs however can point to anything, thus their reflog

Re: [PATCH] contrib/subtree: Remove --annotate

2016-01-05 Thread David A. Greene
Junio C Hamano writes: > David Greene writes: > >> From: "David A. Greene" >> >> Remove --annotate. This obviates the need for an --unannotate >> command, which is both an obvious addition and difficult to define >> due to the

Re: [PATCH] Add a test for subtree rebase that loses commits

2016-01-05 Thread David A. Greene
Eric Sunshine writes: > On Mon, Jan 4, 2016 at 11:40 PM, David Greene wrote: >> This test merges an external tree in as a subtree, makes some commits >> on top of it and splits it back out. In the process the added commits >> are lost. This is

Re: [PATCH v3 14/15] ref-filter: introduce contents_atom_parser()

2016-01-05 Thread Junio C Hamano
Karthik Nayak writes: > Introduce contents_atom_parser() which will parse the '%(contents)' > atom and store information into the 'used_atom' structure based on the > modifiers used along with the atom. > > Helped-by: Ramsay Jones > Helped-by:

Re: [PATCH v3 15/15] ref-filter: introduce objectname_atom_parser()

2016-01-05 Thread Junio C Hamano
Karthik Nayak writes: > @@ -467,15 +482,17 @@ static void *get_obj(const unsigned char *sha1, struct > object **obj, unsigned lo > } > > static int grab_objectname(const char *name, const unsigned char *sha1, > - struct atom_value *v) > +

git test repository creator

2016-01-05 Thread Thomas Koch
I don't know whether I dreamed of such a tool or whether I just can't find it anymore: Specify characteristics (size, dir depth, files count, history length) of a repository and the tools creates a random git repository with this characteristics. Such a tool is obviously useful for testing and I

Re: [PATCH v4] reflog-walk: don't segfault on non-commit sha1's in the reflog

2016-01-05 Thread Eric Sunshine
On Tue, Jan 5, 2016 at 4:12 PM, Dennis Kaarsemaker wrote: > git reflog (ab)uses the log machinery to display its list of log > entries. To do so it must fake commit parent information for the log > walker. > > For refs in refs/heads this is no problem, as they should only

Re: [PATCH/RFC v2 0/2] add regex match flags to git describe

2016-01-05 Thread Mostyn Bramley-Moore
On 01/04/2016 06:46 PM, Junio C Hamano wrote: Mostyn Bramley-Moore writes: On 12/31/2015 01:23 AM, Junio C Hamano wrote: ... Swapping the option key and value may not be a bad idea, but one problem that the above does not solve, which I outlined in the message you are

Re: [PATCH v4] reflog-walk: don't segfault on non-commit sha1's in the reflog

2016-01-05 Thread Dennis Kaarsemaker
On di, 2016-01-05 at 20:05 -0500, Eric Sunshine wrote: > On Tue, Jan 5, 2016 at 4:12 PM, Dennis Kaarsemaker > wrote: > > git reflog (ab)uses the log machinery to display its list of log > > entries. To do so it must fake commit parent information for the > > log > >

Re: [PATCH v4] reflog-walk: don't segfault on non-commit sha1's in the reflog

2016-01-05 Thread Eric Sunshine
On Tue, Jan 5, 2016 at 8:20 PM, Dennis Kaarsemaker wrote: > On di, 2016-01-05 at 20:05 -0500, Eric Sunshine wrote: >> On Tue, Jan 5, 2016 at 4:12 PM, Dennis Kaarsemaker >> > + git update-ref --create-reflog -m "Creating ref" \ >> > +

Re: [PATCH 12/16] refs: always handle non-normal refs in files backend

2016-01-05 Thread David Turner
On Wed, 2015-12-23 at 09:02 +0100, Michael Haggerty wrote: > + * We move other non-normal ref updates with into a specially > > -created > > + * files-backend transaction > > + */ > > Extra word? s/with//? Fixed, thanks. > > + add_update_obj(files_transaction, update); > > +

Re: Segmentation fault found while fuzzing .pack file under 2.7.0.rc3

2016-01-05 Thread Jonathan Nieder
Jeff King wrote: > Git packfiles come from two places: > > 1. Local maintenance repacks loose and already-packed objects into a > new packfile. We trust the local repack process to generate a valid > packfile (though the contents of individual objects may be > untrusted, of

Re: [PATCH] Expand documentation describing --signoff

2016-01-05 Thread Junio C Hamano
"David A. Wheeler" writes: > Modify various document (man page) files to explain > in more detail what --signoff means. > > This was inspired by https://lwn.net/Articles/669976/ where > paulj noted, "adding [the] '-s' argument to [a] git commit > doesn't really mean you

[PATCH v9] ls-files: Add eol diagnostics

2016-01-05 Thread Torsten Bögershausen
When working in a cross-platform environment, a user wants to check if text files are stored normalized in the repository and if .gitattributes are set appropriately. Make it possible to let Git show the line endings in the index and in the working tree and the effective text/eol attributes. The

Re: [PATCH] commit: ensure correct permissions of the commit message

2016-01-05 Thread Johannes Schindelin
Hi Junio, On Mon, 4 Jan 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> I do not know fcreate_or_truncate() is a good name, though. > > > > So what would be a good name? > > Have been thinking about it, but I did not come up with anything. I >

Re: [PATCH v4] reflog-walk: don't segfault on non-commit sha1's in the reflog

2016-01-05 Thread Eric Sunshine
On Tue, Jan 5, 2016 at 8:28 PM, Eric Sunshine wrote: > On Tue, Jan 5, 2016 at 8:20 PM, Dennis Kaarsemaker > wrote: >> On di, 2016-01-05 at 20:05 -0500, Eric Sunshine wrote: >>> Hmm, this test is successful for me on OS X even without the >>>