Re: [PATCH v4 02/10] ref-filter: make the 'color' use ref_formatting_state

2015-07-24 Thread Karthik Nayak
On Sat, Jul 25, 2015 at 3:16 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> Make color which was considered as an atom, to use >> ref_formatting_state and act as a pseudo atom. This allows >> interchangeability between 'align' and 'color'. >> >> Helped-by: Junio C Hamano >> Mentored-by:

Re: [PATCH v4 01/10] ref-filter: add option to align atoms to the left

2015-07-24 Thread Karthik Nayak
On Sat, Jul 25, 2015 at 4:30 AM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Karthik Nayak writes: >> >>> -if (!ref->value) { >>> -populate_value(ref); >>> +/* >>> + * If the atom is a pseudo_atom then we re-populate the value >>> + * into the ref_formatting_s

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-24 Thread Jeff King
On Fri, Jul 24, 2015 at 08:07:49AM -0700, Junio C Hamano wrote: > > I am not entirely convinced this won't bite somebody who gets a sha1 > > from some other source, and then wants to run: > > > > git log $some_other_sha1 > > > > who might be quite confused to start a first-parent traversal from

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-24 Thread Jeff King
On Fri, Jul 24, 2015 at 06:36:34PM -0700, Jeff King wrote: > > I think in the cycle we merged Couder's trailer stuff we updated the > > helper functions to locate where the S-o-b should go in an existing > > message and consolidated (or, at least "talked about consolidating") > > them into a singl

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-24 Thread Jeff King
On Fri, Jul 24, 2015 at 08:31:55AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > Whoops. Usually I "format-patch -s" and then add any notes while > > sending. But the wifi at OSCON was so abysmal that instead I wrote the > > notes directly into the commit message to send the whole thing

Re: [PATCH v4 01/10] ref-filter: add option to align atoms to the left

2015-07-24 Thread Junio C Hamano
Junio C Hamano writes: > Karthik Nayak writes: > >> -if (!ref->value) { >> -populate_value(ref); >> +/* >> + * If the atom is a pseudo_atom then we re-populate the value >> + * into the ref_formatting_state stucture. >> + */ >> +if (!ref->value || ref->value[a

Re: [PATCH v4 01/10] ref-filter: add option to align atoms to the left

2015-07-24 Thread Junio C Hamano
Karthik Nayak writes: > - if (!ref->value) { > - populate_value(ref); > + /* > + * If the atom is a pseudo_atom then we re-populate the value > + * into the ref_formatting_state stucture. > + */ > + if (!ref->value || ref->value[atom].pseudo_atom) { > +

Re: [PATCH v4 02/10] ref-filter: make the 'color' use ref_formatting_state

2015-07-24 Thread Junio C Hamano
Karthik Nayak writes: > Make color which was considered as an atom, to use > ref_formatting_state and act as a pseudo atom. This allows > interchangeability between 'align' and 'color'. > > Helped-by: Junio C Hamano > Mentored-by: Christian Couder > Mentored-by: Matthieu Moy > Signed-off-by: K

Re: Can we get a git clone flag to override the "required empty directory" behaviour?

2015-07-24 Thread Junio C Hamano
Mike Kasprzak writes: > What I would like to do is git clone inside that directory. Alas, git > will not let you clone in any directory containing a file. In the ideal world, I think both of these two commands: $ git clone $URL somewhere $ cd somewhere && git clone $URL . should behave

Re: [PATCH 6/6] Documentation/git-tools: drop references to defunct tools

2015-07-24 Thread Eric Sunshine
On Fri, Jul 24, 2015 at 11:03:54AM -0700, Junio C Hamano wrote: > Eric Sunshine writes: > > Cogito -- unmaintained since late 2006[1] > > pg -- URL dead; web searches reveal no information > > quilt2git -- URL dead; web searches reveal no information > > (h)gct -- URL dead; no repository activity

Re: [PATCH 6/9] pseudorefs: create and use pseudoref update and delete functions

2015-07-24 Thread Junio C Hamano
David Turner writes: > On Fri, 2015-07-24 at 12:25 -0700, Junio C Hamano wrote: >> David Turner writes: >> >> > Pseudorefs should not be updated through the ref API, because the ref >> > API is for real refs. Instead, use a dedicated pseudoref API. >> > >> > This patch changes writes to CHERRY

Re: [PATCH 1/9] refs: Introduce pseudoref and per-worktree ref concepts

2015-07-24 Thread Junio C Hamano
David Turner writes: > I meant "and that contain a line consisting of a SHA" to exclude HEAD, > but I need to add a "always" in there, since detached HEAD would > otherwise apply. I do not think "always" is as a good escape hatch as an explicit exclusion of "HEAD". The latter is more direct and

Re: [PATCH v3 08/18] rerere: explain the rerere I/O abstraction

2015-07-24 Thread Junio C Hamano
Junio C Hamano writes: > +/* > + * Write a conflict marker to io->output (if defined). > + */ > static void rerere_io_putconflict(int ch, int size, struct rerere_io *io) > { > char buf[64]; This is unrelated to the topic of this step, but this function seems to be very poorly put togethe

Re: [PATCH 6/9] pseudorefs: create and use pseudoref update and delete functions

2015-07-24 Thread David Turner
On Fri, 2015-07-24 at 12:25 -0700, Junio C Hamano wrote: > David Turner writes: > > > Pseudorefs should not be updated through the ref API, because the ref > > API is for real refs. Instead, use a dedicated pseudoref API. > > > > This patch changes writes to CHERRY_PICK_HEAD, REVERT_HEAD, and OR

Re: [PATCH 1/9] refs: Introduce pseudoref and per-worktree ref concepts

2015-07-24 Thread David Turner
On Fri, 2015-07-24 at 20:52 +0100, Philip Oakley wrote: > From: "David Turner" > > Add glossary entries for both concepts. > > > > Pseudorefs and per-worktree refs do not yet have special handling, > > because the files refs backend already handles them correctly. Later, > > we will make the LMDB

Re: [PATCH 1/9] refs: Introduce pseudoref and per-worktree ref concepts

2015-07-24 Thread David Turner
On Fri, 2015-07-24 at 12:20 -0700, Junio C Hamano wrote: > David Turner writes: > > > +[[def_pseudoref]]pseudoref:: > > + Files under `$GIT_DIR` whose names are all-caps, and that > > + contain a line consisting of a <> followed by > > + a newline, and optionally some additional data. `MER

Re: [PATCH v3 07/18] rerere: stop looping unnecessarily

2015-07-24 Thread Junio C Hamano
Junio C Hamano writes: > handle_cache() loops 3 times starting from an index entry that is > unmerged, while ignoring an entry for a path that is different from > what we are looking for. > > As the index is sorted, once we see a different path, we know we saw > all stages for the path we are int

Re: [PATCH 1/9] refs: Introduce pseudoref and per-worktree ref concepts

2015-07-24 Thread Philip Oakley
From: "David Turner" Add glossary entries for both concepts. Pseudorefs and per-worktree refs do not yet have special handling, because the files refs backend already handles them correctly. Later, we will make the LMDB backend call out to the files backend to handle per-worktree refs. Signed

Re: [PATCH v3 01/18] rerere: fix an off-by-one non-bug

2015-07-24 Thread Junio C Hamano
Junio C Hamano writes: > When ac49f5ca (rerere "remaining", 2011-02-16) split out a new > helper function check_one_conflict() out of find_conflict() > function, so that the latter will use the returned value from the > new helper to update the loop control variable that is an index into > active

Re: Arrow keys broken in gitk

2015-07-24 Thread Sven van Haastregt
Roland Lutz hedmen.org> writes: > in gitk on Debian jessie (Git version 2.1.4), the left/right arrow > keys don't work in the text input fields. When I click into the SHA > ID field or either search field and press the left or right arrow > key, nothing happens. I'd expect the text cursor to mo

Re: [PATCH 6/9] pseudorefs: create and use pseudoref update and delete functions

2015-07-24 Thread Junio C Hamano
David Turner writes: > Pseudorefs should not be updated through the ref API, because the ref > API is for real refs. Instead, use a dedicated pseudoref API. > > This patch changes writes to CHERRY_PICK_HEAD, REVERT_HEAD, and ORIG_HEAD. This feels somewhat backwards, and it makes me wonder if it

Re: [PATCH 1/9] refs: Introduce pseudoref and per-worktree ref concepts

2015-07-24 Thread Junio C Hamano
David Turner writes: > +[[def_pseudoref]]pseudoref:: > + Files under `$GIT_DIR` whose names are all-caps, and that > + contain a line consisting of a <> followed by > + a newline, and optionally some additional data. `MERGE_HEAD` > + and `CHERRY_PICK_HEAD` are examples. Unlike..

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

2015-07-24 Thread Karthik Nayak
From: Karthik Nayak Using 'ref-filter' APIs implement the '--merged' and '--no-merged' options into 'tag.c'. The '--merged' option lets the user to only list tags merged into the named commit. The '--no-merged' option lets the user to only list tags not merged into the named commit. If no object

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

2015-07-24 Thread Karthik Nayak
From: Karthik Nayak Implement the '--format' option provided by 'ref-filter'. This lets the user list tags as per desired format similar to the implementation in 'git for-each-ref'. Add tests and documentation for the same. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by

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

2015-07-24 Thread Karthik Nayak
From: Karthik Nayak Make 'tag.c' use 'ref-filter' APIs for iterating through refs sorting and printing of refs. This removes most of the code used in 'tag.c' replacing it with calls to the 'ref-filter' library. Make 'tag.c' use the 'filter_refs()' function provided by 'ref-filter' to filter out

[PATCH v4 06/10] ref-filter: add option to match literal pattern

2015-07-24 Thread Karthik Nayak
From: Karthik Nayak Since 'ref-filter' only has an option to match path names add an option for plain fnmatch pattern-matching. This is to support the pattern matching options which are used in `git tag -l` and `git branch -l` where we can match patterns like `git tag -l foo*` which would match

[PATCH v4 01/10] ref-filter: add option to align atoms to the left

2015-07-24 Thread Karthik Nayak
From: Karthik Nayak Add a new atom "align" and support %(align:X) where X is a number. This will align the preceeding atom value to the left followed by spaces for a total length of X characters. If X is less than the item size, the entire atom value is printed. Helped-by: Duy Nguyen Helped-by:

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

2015-07-24 Thread Karthik Nayak
From: Karthik Nayak In 'tag.c' we can print N lines from the annotation of the tag using the '-n' option. Copy code from 'tag.c' to 'ref-filter' and modify 'ref-filter' to support printing of N lines from the annotation of tags. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-of

[PATCH v4 03/10] ref-filter: add option to filter only tags

2015-07-24 Thread Karthik Nayak
From: Karthik Nayak Add a functions called 'for_each_tag_ref_fullpath()' to refs.{c,h} which iterates through each tag ref without trimming the path. Add an option in 'filter_refs()' to use 'for_each_tag_ref_fullpath()' and filter refs. This type checking is done by adding a 'FILTER_REFS_TAGS' i

[PATCH v4 05/10] ref-filter: add support to sort by version

2015-07-24 Thread Karthik Nayak
From: Karthik Nayak Add support to sort by version using the "v:refname" and "version:refname" option. This is achieved by using the 'versioncmp()' function as the comparing function for qsort. This option is included to support sorting by versions in `git tag -l` which will eventaully be ported

[PATCH v4 02/10] ref-filter: make the 'color' use ref_formatting_state

2015-07-24 Thread Karthik Nayak
Make color which was considered as an atom, to use ref_formatting_state and act as a pseudo atom. This allows interchangeability between 'align' and 'color'. Helped-by: Junio C Hamano Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak --- ref-filter.c | 16 ++

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

2015-07-24 Thread Karthik Nayak
From: Karthik Nayak Make 'tag.c' use 'ref-filter' data structures and make changes to support the new data structures. This is a part of the process of porting 'tag.c' to use 'ref-filter' APIs. This is a temporary step before porting 'tag.c' to use 'ref-filter' completely. As this is a temporary

[PATCH v4 0/10] port tag.c to use ref-filter APIs

2015-07-24 Thread Karthik Nayak
This is part of my GSoC project to unify git tag -l, git branch -l, git for-each-ref. This patch series is continued from: Git (next) https://github.com/git/git/commit/bf5418f49ff0cebc6e5ce04ad1417e1a47c81b61 Version 3 can be found here http://thread.gmane.org/gmane.comp.version-control.git/27416

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-24 Thread Jeff King
On Fri, Jul 24, 2015 at 08:04:21AM -0700, Junio C Hamano wrote: > > I think a really simple example is something like: > > > > 1. somebody implements as feature. It needs to handle cases a, b, and > > c, but it only handles case a. Therefore it is buggy. > > > > 2. During review, somebody

Re: "git am" and then "git am -3" regression?

2015-07-24 Thread Jeff King
On Fri, Jul 24, 2015 at 10:48:18AM -0700, Junio C Hamano wrote: > Hmm, there seems to be some glitches around running "am -3" > after a failed "am" between 'maint' and 'master'. > > When I try the following sequence, the 'am' from 'maint' succeeds, > but 'am' in 'master' fails: > > * Save Eric'

Can we get a git clone flag to override the "required empty directory" behaviour?

2015-07-24 Thread Mike Kasprzak
Hi, I run a project with 2 repositories. One is a vagrant based toolchain (a VM that runs a LAMP server), and the other is the source code. Because I want my users to keep and make their changes to a clone of the source repository, we can't use submodules. They make their changes, test locally, an

Re: [PATCH 6/6] Documentation/git-tools: drop references to defunct tools

2015-07-24 Thread Junio C Hamano
Eric Sunshine writes: > Cogito -- unmaintained since late 2006[1] > pg -- URL dead; web searches reveal no information > quilt2git -- URL dead; web searches reveal no information > (h)gct -- URL dead; no repository activity since 2007[2] > > [1]: http://git.or.cz/cogito/ > [2]: http://repo.or.cz/

"git am" and then "git am -3" regression?

2015-07-24 Thread Junio C Hamano
Hmm, there seems to be some glitches around running "am -3" after a failed "am" between 'maint' and 'master'. When I try the following sequence, the 'am' from 'maint' succeeds, but 'am' in 'master' fails: * Save Eric's "minor documetation improvements" $gmane/274537 to a file. * "git chec

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-24 Thread Junio C Hamano
Jeff King writes: > Whoops. Usually I "format-patch -s" and then add any notes while > sending. But the wifi at OSCON was so abysmal that instead I wrote the > notes directly into the commit message to send the whole thing later. > And of course format-patch is not smart enough to know that I mea

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-24 Thread Junio C Hamano
Jeff King writes: > On Thu, Jul 23, 2015 at 03:46:33PM -0700, Junio C Hamano wrote: > >> Admittedly, that >> merely is saying that "--first-parent" is not a solution to such a >> project, and does not say much about the usefulness of the new >> configuration, so I'd queue it as-is. > > Yeah, I ag

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-24 Thread Junio C Hamano
Jeff King writes: > I think a really simple example is something like: > > 1. somebody implements as feature. It needs to handle cases a, b, and > c, but it only handles case a. Therefore it is buggy. > > 2. During review, somebody notices case b, and a new commit is made to > fix i

Git Plugin: Semantic Versioning

2015-07-24 Thread Mark Challoner
Hi all, First off apologies for the spam, but I thought it may be useful for a few git users out there. I have put together a git plugin for easy Semantic Versioning (http://semver.org). It comes with its own plugin architecture to allow you to check project files have been updated with corr

Re: git send-email Connection Closed

2015-07-24 Thread Stefan Agner
On 2015-07-24 14:59, Stefan Agner wrote: > Hi Juston, > > On 2015-07-15 07:11, Juston Li wrote: >> Recently, I have had trouble using git send-email to send a patchset. >> After the confirmation to send the email I get the following: >> Send this email? ([y]es|[n]o|[q]uit|[a]ll): y >> [Net::SMTP::

Re: git history in a file

2015-07-24 Thread Josh Boyer
On Fri, Jul 24, 2015 at 8:46 AM, Andreas Schwab wrote: > Josh Boyer writes: > >> I'm trying to figure out how to generate a file that contains the git >> history and changes from one revision to another, such that when the >> file is applied to a different tree starting at the same ancestor, the

Re: git send-email Connection Closed

2015-07-24 Thread Stefan Agner
Hi Juston, On 2015-07-15 07:11, Juston Li wrote: > Recently, I have had trouble using git send-email to send a patchset. > After the confirmation to send the email I get the following: > Send this email? ([y]es|[n]o|[q]uit|[a]ll): y > [Net::SMTP::SSL] Connection closed at /usr/lib/git-core/git-sen

Re: git history in a file

2015-07-24 Thread Andreas Schwab
Josh Boyer writes: > I'm trying to figure out how to generate a file that contains the git > history and changes from one revision to another, such that when the > file is applied to a different tree starting at the same ancestor, the > resulting tree is identical. See git-bundle(1). Andreas.

git history in a file

2015-07-24 Thread Josh Boyer
Hello, I'm trying to figure out how to generate a file that contains the git history and changes from one revision to another, such that when the file is applied to a different tree starting at the same ancestor, the resulting tree is identical. E.g. git v4.2-rc3..master would produce this file

Private Placement

2015-07-24 Thread Mr. Lopati T
Hello, I work for a company as the investment procurement executive,Our proposal has to do with investing/providing finance for your Company. kindly get back to me with a reconfirmation of your company name, area of specialization,address and your position in the Company. Upon your response to m

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-24 Thread Jeff King
On Fri, Jul 24, 2015 at 12:46:57AM -0700, Jacob Keller wrote: > On Fri, Jul 24, 2015 at 12:40 AM, Jeff King wrote: > > Whoops. Usually I "format-patch -s" and then add any notes while > > sending. But the wifi at OSCON was so abysmal that instead I wrote the > > notes directly into the commit mes

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-24 Thread Jacob Keller
On Fri, Jul 24, 2015 at 12:40 AM, Jeff King wrote: > Whoops. Usually I "format-patch -s" and then add any notes while > sending. But the wifi at OSCON was so abysmal that instead I wrote the > notes directly into the commit message to send the whole thing later. > And of course format-patch is not

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-24 Thread Jacob Keller
On Fri, Jul 24, 2015 at 12:34 AM, Jeff King wrote: > On Thu, Jul 23, 2015 at 11:07:58PM -0700, Jacob Keller wrote: > >> I think some projects definitely benefit from the first-parent setup, >> and it could be valuable, but I do tend to agree with Junio here that >> the mess is always helpful. If m

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-24 Thread Jeff King
On Thu, Jul 23, 2015 at 03:14:50PM -0700, Stefan Beller wrote: > Github pull request messages > are similar to cover letters, so you could send a series with a > good cover letter, but crappy unfinished patches inside the series. > After applying all patches it could be all nice, i.e. compiles, te

Re: [PATCH 1/9] refs: Introduce pseudoref and per-worktree ref concepts

2015-07-24 Thread Eric Sunshine
On Fri, Jul 24, 2015 at 12:45 AM, David Turner wrote: > Add glossary entries for both concepts. > > Pseudorefs and per-worktree refs do not yet have special handling, > because the files refs backend already handles them correctly. Later, > we will make the LMDB backend call out to the files back

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-24 Thread Jeff King
On Thu, Jul 23, 2015 at 11:07:58PM -0700, Jacob Keller wrote: > I think some projects definitely benefit from the first-parent setup, > and it could be valuable, but I do tend to agree with Junio here that > the mess is always helpful. If may be helpful if people's commit > messages on that mess a

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-24 Thread Jeff King
On Thu, Jul 23, 2015 at 03:46:33PM -0700, Junio C Hamano wrote: > Admittedly, that > merely is saying that "--first-parent" is not a solution to such a > project, and does not say much about the usefulness of the new > configuration, so I'd queue it as-is. Yeah, I agree that this patch does not m

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-24 Thread Jeff King
On Thu, Jul 23, 2015 at 03:46:33PM -0700, Junio C Hamano wrote: > While I can see the reasoning behind the above [*1*], I am not sure > if the output with "--first-parent" would always be a good match for > the "simple" version. Wouldn't the people who keep these messy > histories also those who