[PATCH v10 07/13] ref-filter: support printing N lines from tag annotation

2015-08-09 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com In 'tag.c' we can print N lines from the annotation of the tag using the '-nnum' 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

[PATCH v10 06/13] ref-filter: add option to filter only tags

2015-08-09 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com 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

Re: [PATCH v2] send-email: provide whitelist of SMTP AUTH mechanisms

2015-08-09 Thread Eric Sunshine
On Wed, Aug 5, 2015 at 3:17 AM, Jan Viktorin vikto...@rehivetech.com wrote: Do I understand well that you are complaining about too narrow commmit message? Yes, I'm a complainer. ;-) It's minor, though, not a big deal, and certainly not worth a re-roll if that was the only issue. In fact, other

Re: [PATCH v2] send-email: provide whitelist of SMTP AUTH mechanisms

2015-08-09 Thread Eric Sunshine
On Sun, Aug 2, 2015 at 2:57 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sun, Aug 2, 2015 at 12:42 PM, Jan Viktorin vikto...@rehivetech.com wrote: @@ -1136,6 +1141,10 @@ sub smtp_auth_maybe { Authen::SASL-import(qw(Perl)); }; + if($smtp_auth !~

An option to sign the push by default

2015-08-09 Thread Agostino Sarubbo
Hello folks, during the configuration of git, client side, to sign all commit I used: git config --global commit.gpgsign 1 Since at push time I use: git push --signed I'm wondering if there is a git config option which put something in the config file and avoid to type --signed. If there

[PATCH v10 09/13] ref-filter: add option to match literal pattern

2015-08-09 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com 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

[PATCH v10 04/13] utf8: add function to align a string into given strbuf

2015-08-09 Thread Karthik Nayak
Add strbuf_utf8_align() which will align a given string into a strbuf as per given align_type and width. If the width is greater than the string length then no alignment is performed. Helped-by: Eric Sunshine sunsh...@sunshineco.com Mentored-by: Christian Couder christian.cou...@gmail.com

[PATCH v10 05/13] ref-filter: implement an `align` atom

2015-08-09 Thread Karthik Nayak
Implement an `align` atom which left-, middle-, or right-aligns the content between %(align:..) and %(end). It is followed by `:position,width`, where the `position` is either left, right or middle and `width` is the size of the area into which the content will be placed. If the content between

[PATCH v10 02/13] ref-filter: print output to strbuf for formatting

2015-08-09 Thread Karthik Nayak
Introduce a strbuf `output` which will act as a substitute rather than printing directly to stdout. This will be used for formatting eventually. Rename some functions to reflect the changes made: print_value() - format_quote_value() emit()- append_non_atom() Mentored-by: Christian Couder

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

2015-08-09 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com 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.

[PATCH v10 01/13] ref-filter: move `struct atom_value` to ref-filter.c

2015-08-09 Thread Karthik Nayak
Since atom_value is only required for the internal working of ref-filter it doesn't belong in the public header. Helped-by: Eric Sunshine sunsh...@sunshineco.com Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik

[PATCH v10 00/13] port tag.c to use ref-filter APIs

2015-08-09 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 This series consists of porting tag.c over to using the ref-filter APIs Version 8 can

[PATCH v10 08/13] ref-filter: add support to sort by version

2015-08-09 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com 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

[PATCH v10 03/13] ref-filter: introduce ref_formatting_state

2015-08-09 Thread Karthik Nayak
Introduce a ref_formatting_state which will eventually hold the values of modifier atoms. Implement this within ref-filter. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak karthik@gmail.com ---

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

2015-08-09 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com 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.

[PATCH v10 12/13] tag.c: implement '--format' option

2015-08-09 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com 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

[PATCH v10 13/13] tag.c: implement '--merged' and '--no-merged' options

2015-08-09 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com 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

[PATCH v10 11/13] tag.c: use 'ref-filter' APIs

2015-08-09 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com 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

Re: [PATCH] config.mak.uname: Cygwin: Use renames for creation

2015-08-09 Thread Adam Dinwoodie
On 09/08/2015 10:01, Johannes Schindelin wrote: On 2015-08-09 04:01, Adam Dinwoodie wrote: I do not see any difference between the situation here and the situation for MinGW, which is fundamentally a Cygwin fork, but which already has this build option set for it in config.mak.uname. This is

Re: Fetch and refs/remotes/refname/HEAD

2015-08-09 Thread Jeff King
On Mon, Aug 03, 2015 at 01:28:05PM +, Dror Livne wrote: I have noticed that when cloning a repository, I get a refs/remotes/origin/HEAD symbolic ref. On the other hand, when fetching a new remote, the remote HEAD is not set by git-fetch (but can be added later by `git remote set-head

Re: git pull --rebase fails if pager.pull is true, after producing a colorized diff it cannot apply

2015-08-09 Thread Jeff King
On Mon, Aug 03, 2015 at 05:21:43PM +0200, Per Cederqvist wrote: If you run: git config pager.pull true in the hope of getting the output of git pull via a pager, you are in for a surpise the next time you run git pull --rebase and it has to rebase your work. It will fail with a

Re: git blame breaking on repository with CRLF files

2015-08-09 Thread Torsten Bögershausen
On 2015-08-08 07.58, Torsten Bögershausen wrote: On 2015-08-07 18.32, Benkstein, Frank wrote: Hello, I am working working on Linux and am examining code in a git repository I do not know much about. I am only looking at files, not changing anything. On some files in the repository I get

Re: [PATCH 06/14] tempfile: add several functions for creating temporary files

2015-08-09 Thread Michael Haggerty
On 06/10/2015 07:48 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: Add several functions for creating temporary files with automatically-generated names, analogous to mkstemps(), but also arranging for the files to be deleted on program exit. The functions are

Re: [PATCH 07/14] register_tempfile(): new function to handle an existing temporary file

2015-08-09 Thread Michael Haggerty
On 06/10/2015 07:55 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: Allow an existing file to be registered with the tempfile-handling infrastructure; in particular, arrange for it to be deleted on program exit. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu

[PATCH 1/2] pager_in_use: use git_env_bool

2015-08-09 Thread Jeff King
This function basically reimplements git_env_bool (because it predates it). Let's reuse that helper, which is shorter and avoids repeating a string literal. Signed-off-by: Jeff King p...@peff.net --- pager.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pager.c b/pager.c

Re: git pull --rebase fails if pager.pull is true, after producing a colorized diff it cannot apply

2015-08-09 Thread Jeff King
On Sun, Aug 09, 2015 at 07:42:38PM -0400, Jeff King wrote: It looks like the use of a pager is fooling our should we colorize the diff check when generating the patches. Usually we check isatty(1) to see if we should use color, so git format-patch patches does the right thing. But if a pager

[PATCH 2/2] pager_in_use: make sure output is still going to pager

2015-08-09 Thread Jeff King
When we start a pager, we set GIT_PAGER_IN_USE=1 in the environment. This lets sub-processes know that even though isatty(1) is not true, it is because it is connected to a pager (and we should still turn on human-readable niceties like auto-color). Unfortunately, this is too inclusive for

Re: [PATCH v9 03/11] ref-filter: implement an `align` atom

2015-08-09 Thread Karthik Nayak
On Sun, Aug 9, 2015 at 1:49 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sun, Aug 9, 2015 at 4:09 AM, Karthik Nayak karthik@gmail.com wrote: On Sun, Aug 9, 2015 at 1:34 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sun, Aug 9, 2015 at 2:55 AM, Karthik Nayak

Re: [PATCH v2] send-email: provide whitelist of SMTP AUTH mechanisms

2015-08-09 Thread Eric Sunshine
On Sun, Aug 9, 2015 at 1:19 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sun, Aug 2, 2015 at 2:57 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sun, Aug 2, 2015 at 12:42 PM, Jan Viktorin vikto...@rehivetech.com wrote: @@ -1136,6 +1141,10 @@ sub smtp_auth_maybe {

Re: [PATCH v2] worktree: list operation

2015-08-09 Thread Andreas Schwab
Michael Rappazzo rappa...@gmail.com writes: @@ -36,7 +37,7 @@ static int prune_worktree(const char *id, struct strbuf *reason) fd = open(git_path(worktrees/%s/gitdir, id), O_RDONLY); if (fd 0) { strbuf_addf(reason, _(Removing worktrees/%s: unable to read gitdir

Re: [PATCH v9 03/11] ref-filter: implement an `align` atom

2015-08-09 Thread Karthik Nayak
On Sun, Aug 9, 2015 at 9:12 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sat, Aug 8, 2015 at 2:35 AM, Karthik Nayak karthik@gmail.com wrote: On Fri, Aug 7, 2015 at 8:57 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Wed, Aug 5, 2015 at 2:54 PM, Karthik Nayak

Re: [PATCH v2] worktree: list operation

2015-08-09 Thread Eric Sunshine
Thanks for the patch. Comments below... On Sat, Aug 8, 2015 at 8:19 PM, Michael Rappazzo rappa...@gmail.com wrote: worktree: list operation Imperative mood: worktree: add 'list' command 'git worktree list' will list the main worktree followed by any linked worktrees which were created

Re: [PATCH v9 03/11] ref-filter: implement an `align` atom

2015-08-09 Thread Matthieu Moy
Le 8 août 2015 09:03:03 GMT+02:00, Karthik Nayak karthik@gmail.com a écrit : On Fri, Aug 7, 2015 at 9:34 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Wed, Aug 5, 2015 at 2:54 PM, Karthik Nayak karthik@gmail.com wrote: Implement an `align` atom which will act as a modifier atom

Re: [PATCH v9 03/11] ref-filter: implement an `align` atom

2015-08-09 Thread Eric Sunshine
On Sun, Aug 9, 2015 at 2:55 AM, Karthik Nayak karthik@gmail.com wrote: On Sun, Aug 9, 2015 at 9:12 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sat, Aug 8, 2015 at 2:35 AM, Karthik Nayak karthik@gmail.com wrote: On Fri, Aug 7, 2015 at 8:57 AM, Eric Sunshine

Re: [PATCH v9 03/11] ref-filter: implement an `align` atom

2015-08-09 Thread Karthik Nayak
On Sun, Aug 9, 2015 at 1:34 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sun, Aug 9, 2015 at 2:55 AM, Karthik Nayak karthik@gmail.com wrote: On Sun, Aug 9, 2015 at 9:12 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sat, Aug 8, 2015 at 2:35 AM, Karthik Nayak

Re: [PATCH v9 03/11] ref-filter: implement an `align` atom

2015-08-09 Thread Karthik Nayak
On Sun, Aug 9, 2015 at 1:30 PM, Matthieu Moy matthieu@imag.fr wrote: Le 8 août 2015 09:03:03 GMT+02:00, Karthik Nayak karthik@gmail.com a écrit : On Fri, Aug 7, 2015 at 9:34 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Wed, Aug 5, 2015 at 2:54 PM, Karthik Nayak

Re: [PATCH v9 03/11] ref-filter: implement an `align` atom

2015-08-09 Thread Eric Sunshine
On Sun, Aug 9, 2015 at 4:09 AM, Karthik Nayak karthik@gmail.com wrote: On Sun, Aug 9, 2015 at 1:34 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sun, Aug 9, 2015 at 2:55 AM, Karthik Nayak karthik@gmail.com wrote: On Sun, Aug 9, 2015 at 9:12 AM, Eric Sunshine

Re: [PATCH] config.mak.uname: Cygwin: Use renames for creation

2015-08-09 Thread Johannes Schindelin
Hi Adam, On 2015-08-09 04:01, Adam Dinwoodie wrote: I do not see any difference between the situation here and the situation for MinGW, which is fundamentally a Cygwin fork, but which already has this build option set for it in config.mak.uname. This is incorrect. MinGW is distinctly *not* a