Re: [PATCH v9 02/20] ref-filter: include reference to 'used_atom' within 'atom_value'

2016-12-27 Thread Karthik Nayak
On Wed, Dec 28, 2016 at 2:29 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> From: Karthik Nayak >> >> Ensure that each 'atom_value' has a reference to its corresponding >> 'used_atom'. This let's us use values within

Re: [PATCH v9 03/20] ref-filter: implement %(if:equals=) and %(if:notequals=)

2016-12-27 Thread Karthik Nayak
On Wed, Dec 28, 2016 at 2:30 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> This is done by introducing 'if_atom_parser()' which parses the given >> %(if) atom and then stores the data in used_atom which is later passed >> on to the used_atom of

[RFH] gpg --import entropy while running tests

2016-12-27 Thread Jeff King
I noticed a few of our test scripts taking a long time to run, even though they used to be quick. Here's one: $ time ./t7612-merge-verify-signatures.sh ok 1 - create signed commits ok 2 - merge unsigned commit with verification ok 3 - merge commit with bad signature with verification

Re: [PATCH v9 01/20] ref-filter: implement %(if), %(then), and %(else) atoms

2016-12-27 Thread Karthik Nayak
On Wed, Dec 28, 2016 at 2:28 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> >> +Some atoms like %(align) and %(if) always require a matching %(end). >> +We call them "opening atoms" and sometimes denote them as %($open). >> + >> +When a scripting

Re: Gitview Shell Injection Vulnerability

2016-12-27 Thread Jeff King
On Tue, Dec 27, 2016 at 10:45:58AM -0800, Stefan Beller wrote: > > I expect that things that start their life in the contrib/ area > > to graduate out of contrib/ once they mature, either by becoming > > projects on their own, or moving to the toplevel directory. On > > the other hand, I expect

Re: HowTo distribute a hook with the reposity.

2016-12-27 Thread Jeff King
On Tue, Dec 27, 2016 at 09:32:22PM -0800, Jacob Keller wrote: > On Tue, Dec 27, 2016 at 5:34 PM, John P. Hartmann > wrote: > > I would like a hook in .got/hooks to be made available to all who clone or > > pull a particular project. I'd also like the hook to be under git

Re: [PATCH] pathspec: give better message for submodule related pathspec error

2016-12-27 Thread Jeff King
On Tue, Dec 27, 2016 at 04:05:59PM -0800, Stefan Beller wrote: > Every once in a while someone complains to the mailing list to have > run into this weird assertion[1]. If people are running into it, it definitely should not be an assert, nor a die("BUG"). It should be a regular die(), which

Re: HowTo distribute a hook with the reposity.

2016-12-27 Thread Jacob Keller
On Tue, Dec 27, 2016 at 5:34 PM, John P. Hartmann wrote: > I would like a hook in .got/hooks to be made available to all who clone or > pull a particular project. I'd also like the hook to be under git control > (changes committed ). I added a hook, but git status does not

Re: [PATCH v9 15/20] ref-filter: modify the 'lstrip=' option to work with negative ''

2016-12-27 Thread Jacob Keller
On Tue, Dec 27, 2016 at 1:11 PM, Junio C Hamano wrote: > Karthik Nayak writes: > >> Currently the 'lstrip=' option only takes a positive value '' >> and strips '' slash-separated path components from the left. Modify >> the 'lstrip' option to also take a

HowTo distribute a hook with the reposity.

2016-12-27 Thread John P. Hartmann
I would like a hook in .got/hooks to be made available to all who clone or pull a particular project. I'd also like the hook to be under git control (changes committed ). I added a hook, but git status does not show it. Presumably git excludes its files in .git/ from version control lest

[PATCH] pathspec: give better message for submodule related pathspec error

2016-12-27 Thread Stefan Beller
Every once in a while someone complains to the mailing list to have run into this weird assertion[1]. The usual response from the mailing list is link to old discussions[2], and acknowledging the problem stating it is known. For now just improve the user visible error message. [1]

[PATCH 2/3] submodule update documentation: don't repeat ourselves

2016-12-27 Thread Stefan Beller
The documentation for the `git submodule update` command, repeats itself for each update option, "This is done when is given, or no option is given and `submodule..update` is set to . Avoid these repetitive clauses by stating the command line options take precedence over configured options.

[PATCH 0/3] Update submodule documentation

2016-12-27 Thread Stefan Beller
I think I sent out the first 2 patches once upon a time, but the review or me resending them stalled. They improve the man page for the git-submodule command. The third patch is RFC-ish and adds a background story to submodules Similar to gitattributes, gitnamespaces, gittutorial it doesn't

[PATCH 3/3] submodules: add a background story

2016-12-27 Thread Stefan Beller
Just like gitattributes, gitcredentials, gitnamespaces, gittutorial, gitmodules, we'd like to provide some background on submodules, which is not specific to the `submodule` command, but elaborates on the background and its intended usage. Signed-off-by: Stefan Beller ---

[PATCH 1/3] submodule documentation: add options to the subcommand

2016-12-27 Thread Stefan Beller
When reading up on a subcommand of `git submodule `, it is convenient to have its options nearby and not just at the top of the man page. Add the options to each subcommand. While at it, also document the `--checkout` option for `update`. Signed-off-by: Stefan Beller ---

What's cooking in git.git (Dec 2016, #08; Tue, 27)

2016-12-27 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'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. This will be the last issue of

Re: [PATCH] worktree: initialize return value for submodule_uses_worktrees

2016-12-27 Thread Junio C Hamano
Stefan Beller writes: > On Tue, Dec 27, 2016 at 2:12 PM, Junio C Hamano wrote: > >> I'm planning to disappear until early next >> year > > Safe travels! Thanks. > I assume there is no interim maintainer for such a short > period of time (which also is

Re: [PATCH] worktree: initialize return value for submodule_uses_worktrees

2016-12-27 Thread Stefan Beller
On Tue, Dec 27, 2016 at 2:12 PM, Junio C Hamano wrote: > > or even make it a helper function "is_empty_directory(const char *)". This sounds like the way to go IMHO. > I'm planning to disappear until early next > year Safe travels! I assume there is no interim maintainer

Re: git-apply: warn/fail on *changed* end of line (eol) *only*?

2016-12-27 Thread Igor Djordjevic BugA
On 27/12/2016 18:27, Junio C Hamano wrote: > To see the problem with "check existing lines", it probably is > easier to extend the above example to start from a file with one > more line, like this: > > 1 > 3 > 4 > 5 > > and extend all the example patches to remove "4 " line

Re: [PATCH] worktree: initialize return value for submodule_uses_worktrees

2016-12-27 Thread Junio C Hamano
Stefan Beller writes: > When the worktrees directory is empty, the `ret` will be returned > uninitialized. Fix it by initializing the value. > > Signed-off-by: Stefan Beller > --- > > This goes on top of 1a248cf (origin/sb/submodule-embed-gitdir); >

Re: [PATCHv5 4/4] rm: absorb a submodules git dir before deletion

2016-12-27 Thread Junio C Hamano
Stefan Beller writes: @@ -358,9 +331,6 @@ int cmd_rm(int argc, const char **argv, const char *prefix) oidclr(); if (check_local_mod(, index_only)) exit(1); - } else if (!index_only) {

Re: [PATCH v9 15/20] ref-filter: modify the 'lstrip=' option to work with negative ''

2016-12-27 Thread Junio C Hamano
Karthik Nayak writes: > Currently the 'lstrip=' option only takes a positive value '' > and strips '' slash-separated path components from the left. Modify > the 'lstrip' option to also take a negative number '' which would > only _leave_ behind 'N' slash-separated path

Re: [PATCH v9 11/20] ref-filter: introduce refname_atom_parser()

2016-12-27 Thread Junio C Hamano
Karthik Nayak writes: > +symref:: > + The ref which the given symbolic ref refers to. If not a > + symbolic ref, nothing is printed. Respects the `:short` and > + `:strip` options in the same way as `refname` above. > + I am slightly unhappy with this name.

Re: [PATCH v9 03/20] ref-filter: implement %(if:equals=) and %(if:notequals=)

2016-12-27 Thread Junio C Hamano
Karthik Nayak writes: > This is done by introducing 'if_atom_parser()' which parses the given > %(if) atom and then stores the data in used_atom which is later passed > on to the used_atom of the %(then) atom, so that it can do the required > comparisons. > > Add tests and

Re: [PATCH v9 19/20] branch: use ref-filter printing APIs

2016-12-27 Thread Junio C Hamano
Karthik Nayak writes: > static char branch_colors[][COLOR_MAXLEN] = { > - GIT_COLOR_RESET, > - GIT_COLOR_NORMAL, /* PLAIN */ > - GIT_COLOR_RED, /* REMOTE */ > - GIT_COLOR_NORMAL, /* LOCAL */ > - GIT_COLOR_GREEN,/* CURRENT

Re: [PATCH v9 02/20] ref-filter: include reference to 'used_atom' within 'atom_value'

2016-12-27 Thread Junio C Hamano
Karthik Nayak writes: > From: Karthik Nayak > > Ensure that each 'atom_value' has a reference to its corresponding > 'used_atom'. This let's us use values within 'used_atom' in the s/let's us use/lets us use/; > 'handler' function.

Re: [PATCH v9 01/20] ref-filter: implement %(if), %(then), and %(else) atoms

2016-12-27 Thread Junio C Hamano
Karthik Nayak writes: > > +Some atoms like %(align) and %(if) always require a matching %(end). > +We call them "opening atoms" and sometimes denote them as %($open). > + > +When a scripting language specific quoting is in effect, everything > +between a top-level

[PATCH 2/2] t7411: test lookup of uninitialized submodules

2016-12-27 Thread Stefan Beller
Sometimes we need to lookup information of uninitialized submodules. Make sure that works. Signed-off-by: Stefan Beller --- t/t7411-submodule-config.sh | 21 + 1 file changed, 21 insertions(+) diff --git a/t/t7411-submodule-config.sh

[PATCH 1/2] t7411: quote URLs

2016-12-27 Thread Stefan Beller
The variables may contain white spaces, so we need to quote them. By not quoting the variables we'd end up passing multiple arguments to git config, which doesn't fail for two arguments as value. Signed-off-by: Stefan Beller --- t/t7411-submodule-config.sh | 4 ++-- 1 file

[PATCH 0/2] submodule config test cleanup

2016-12-27 Thread Stefan Beller
A test cleanup and an additional test for the submodule configuration. Stefan Beller (2): t7411: quote URLs t7411: test lookup of uninitialized submodules t/t7411-submodule-config.sh | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) --

Re: Intermittent failure of t0021

2016-12-27 Thread Michael Haggerty
On 12/27/2016 08:21 PM, Michael Haggerty wrote: > I'm seeing intermittent failures of t0021. [...] Just after submitting this, I saw that the problem has already been reported and a fix proposed: http://public-inbox.org/git/dd8decbc-f856-4f68-6d77-7ea9d5f9d...@ramsayjones.plus.com/ Sorry for

Intermittent failure of t0021

2016-12-27 Thread Michael Haggerty
Hi, I'm seeing intermittent failures of t0021. If I run it as follows (using a ramdisk as temporary space, and `EXPENSIVE` turned off), it fails on average about every 40 attempts: $ make -j8 O=0 && (cd t && for i in $(seq 200); do if ./t0021-*.sh ; then echo "passed attempt $i"; else echo

Re: [PATCH v3 21/21] Documentation/git-update-index: explain splitIndex.*

2016-12-27 Thread Junio C Hamano
Christian Couder writes: > --split-index:: > --no-split-index:: > - Enable or disable split index mode. If enabled, the index is > - split into two files, $GIT_DIR/index and $GIT_DIR/sharedindex.. > - Changes are accumulated in $GIT_DIR/index while the

Re: [PATCH v3 20/21] Documentation/config: add splitIndex.sharedIndexExpire

2016-12-27 Thread Junio C Hamano
Christian Couder writes: > Signed-off-by: Christian Couder > --- > Documentation/config.txt | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/Documentation/config.txt b/Documentation/config.txt > index

Re: [PATCH v3 08/21] Documentation/git-update-index: talk about core.splitIndex config var

2016-12-27 Thread Junio C Hamano
Christian Couder writes: > Signed-off-by: Christian Couder > --- > Documentation/git-update-index.txt | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/git-update-index.txt > b/Documentation/git-update-index.txt >

Re: [PATCH v3 10/21] read-cache: regenerate shared index if necessary

2016-12-27 Thread Junio C Hamano
Christian Couder writes: > + case 0: > + return 1; /* 0% means always write a new shared index */ > + case 100: > + return 0; /* 100% means never write a new shared index */ > + default: > + ; /* do nothing: just use the

Re: [PATCH v3 06/21] t1700: add tests for core.splitIndex

2016-12-27 Thread Junio C Hamano
Christian Couder writes: > +test_expect_success 'set core.splitIndex config variable to true' ' > + git config core.splitIndex true && > + : >three && > + git update-index --add three && > + git ls-files --stage >ls-files.actual && > + cat

Re: [PATCH v3 14/21] read-cache: touch shared index files when used

2016-12-27 Thread Junio C Hamano
Christian Couder writes: > +/* > + * Signal that the shared index is used by updating its mtime. > + * > + * This way, shared index can be removed if they have not been used > + * for some time. It's ok to fail to update the mtime if we are on a > + * read only file

Re: [PATCH v3 13/21] sha1_file: make check_and_freshen_file() non static

2016-12-27 Thread Junio C Hamano
Christian Couder writes: > This function will be used in a commit soon, so let's make > it available globally. See comment on 14/21; I am not convinced that this is the function you would want to borrow.

[PATCHv6] rm: absorb a submodules git dir before deletion

2016-12-27 Thread Stefan Beller
When deleting a submodule, we need to keep the actual git directory around, such that we do not lose local changes in there and at a later checkout of the submodule we don't need to clone it again. Now that the functionality is available to absorb the git directory of a submodule, rewrite the

Re: [PATCH v3 12/21] Documentation/config: add splitIndex.maxPercentChange

2016-12-27 Thread Junio C Hamano
Christian Couder writes: > Signed-off-by: Christian Couder > --- > Documentation/config.txt | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/Documentation/config.txt b/Documentation/config.txt > index

Re: Gitview Shell Injection Vulnerability

2016-12-27 Thread Stefan Beller
+cc the author of gitview On Tue, Dec 27, 2016 at 12:29 AM, Javantea wrote: > I have found a shell injection vulnerability in contrib/gitview/gitview. > > Gitview Shell Injection Vulnerability > > Versions affected: 8cb711c8a5-1d1bdafd64 (<=2.11.0) > > Gitview executes shell

Re: [PATCHv5 4/4] rm: absorb a submodules git dir before deletion

2016-12-27 Thread Stefan Beller
On Tue, Dec 27, 2016 at 10:17 AM, Stefan Beller wrote: > On Mon, Dec 26, 2016 at 5:10 PM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> @@ -342,6 +313,8 @@ int cmd_rm(int argc, const char **argv, const char >>> *prefix) >>>

Re: What's cooking in git.git (Dec 2016, #05; Mon, 19)

2016-12-27 Thread Michael Haggerty
On 12/27/2016 06:16 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> Sorry I didn't notice this earlier, but the `LOCK_REPORT_ON_ERROR` >> constant introduced by >> >> 3f061bf "lockfile: LOCK_REPORT_ON_ERROR", 2016-12-07 >> >> sets that constant to the value

Re: [PATCHv5 4/4] rm: absorb a submodules git dir before deletion

2016-12-27 Thread Stefan Beller
On Mon, Dec 26, 2016 at 5:10 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> @@ -342,6 +313,8 @@ int cmd_rm(int argc, const char **argv, const char >> *prefix) >> exit(0); >> } >> >> +

Re: [PATCHv5 1/4] submodule.h: add extern keyword to functions

2016-12-27 Thread Stefan Beller
On Mon, Dec 26, 2016 at 5:13 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> As the upcoming series will add a lot of functions to the submodule >> header, let's first make the header consistent to the rest of the project >> by adding the extern

Re: [PATCHv5 3/4] submodule: rename and add flags to ok_to_remove_submodule

2016-12-27 Thread Stefan Beller
On Mon, Dec 26, 2016 at 4:53 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> As only 0 is understood as false, rename the function to invert the >> meaning, i.e. the return code of 0 signals the removal of the submodule >> is fine, and other values

[PATCH] worktree: initialize return value for submodule_uses_worktrees

2016-12-27 Thread Stefan Beller
When the worktrees directory is empty, the `ret` will be returned uninitialized. Fix it by initializing the value. Signed-off-by: Stefan Beller --- This goes on top of 1a248cf (origin/sb/submodule-embed-gitdir); ideally to be squashed, but as it is in next already, as a

Re: Making it possible to do “git push origin” instead of “git push origin ”, without having to one-time prepare each branch for it

2016-12-27 Thread Stefan Monov
Thanks guys!

Re: git-apply: warn/fail on *changed* end of line (eol) *only*?

2016-12-27 Thread Junio C Hamano
Junio C Hamano writes: > Imagine that the project wants LF line endings, i.e. it considers > that a line with CRLF ending has an unwanted "whitespace" at the > end. Now, you start from this source file: > > 1 > 3 > 5 > > and a patch like this comes in: > >

Re: What's cooking in git.git (Dec 2016, #05; Mon, 19)

2016-12-27 Thread Junio C Hamano
Michael Haggerty writes: > Sorry I didn't notice this earlier, but the `LOCK_REPORT_ON_ERROR` > constant introduced by > > 3f061bf "lockfile: LOCK_REPORT_ON_ERROR", 2016-12-07 > > sets that constant to the value 2,... Sorry I didn't notice this earlier, either. Thanks

Re: What's cooking in git.git (Dec 2016, #05; Mon, 19)

2016-12-27 Thread Michael Haggerty
On 12/20/2016 01:21 AM, Junio C Hamano wrote: > Here are the topics that have been cooking. Commits prefixed with > '-' are only in 'pu' (proposed updates) while commits prefixed with > '+' are in 'next'. The ones marked with '.' do not appear in any of > the integration branches, but I am still

[PATCH v9 11/20] ref-filter: introduce refname_atom_parser()

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak Using refname_atom_parser_internal(), introduce refname_atom_parser() which will parse the %(symref) and %(refname) atoms. Store the parsed information into the 'used_atom' structure based on the modifiers used along with the atoms. Now the '%(symref)'

[PATCH v9 08/20] ref-filter: add support for %(upstream:track,nobracket)

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak Add support for %(upstream:track,nobracket) which will print the tracking information without the brackets (i.e. "ahead N, behind M"). This is needed when we port branch.c to use ref-filter's printing APIs. Add test and documentation for the same.

[PATCH v9 10/20] ref-filter: introduce refname_atom_parser_internal()

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak Since there are multiple atoms which print refs ('%(refname)', '%(symref)', '%(push)', '%(upstream)'), it makes sense to have a common ground for parsing them. This would allow us to share implementations of the atom modifiers between these atoms.

[PATCH v9 13/20] ref-filter: rename the 'strip' option to 'lstrip'

2016-12-27 Thread Karthik Nayak
In preparation for the upcoming patch, where we introduce the 'rstrip' option. Rename the 'strip' option to 'lstrip' to remove ambiguity. Signed-off-by: Karthik Nayak --- Documentation/git-for-each-ref.txt | 10 +- builtin/tag.c | 4 ++--

[PATCH v9 16/20] ref-filter: add an 'rstrip=' option to atoms which deal with refnames

2016-12-27 Thread Karthik Nayak
Complimenting the existing 'lstrip=' option, add an 'rstrip=' option which strips `` slash-separated path components from the end of the refname (e.g., `%(refname:rstrip=2)` turns `refs/tags/foo` into `refs`). Signed-off-by: Karthik Nayak ---

[PATCH v9 05/20] ref-filter: move get_head_description() from branch.c

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak Move the implementation of get_head_description() from branch.c to ref-filter. This gives a description of the HEAD ref if called. This is used as the refname for the HEAD ref whenever the FILTER_REFS_DETACHED_HEAD option is used. Make it public

[PATCH v9 12/20] ref-filter: make remote_ref_atom_parser() use refname_atom_parser_internal()

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak Use the recently introduced refname_atom_parser_internal() within remote_ref_atom_parser(), this provides a common base for all the ref printing atoms, allowing %(upstream) and %(push) to also use the ':strip' option. The atoms '%(push)' and

[PATCH v9 19/20] branch: use ref-filter printing APIs

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak Port branch.c to use ref-filter APIs for printing. This clears out most of the code used in branch.c for printing and replaces them with calls made to the ref-filter library. Introduce build_format() which gets the format required for printing of refs.

[PATCH v9 14/20] ref-filter: Do not abruptly die when using the 'lstrip=' option

2016-12-27 Thread Karthik Nayak
Currently when we use the 'lstrip=' option, if 'N' is greater than the number of components available in the refname, we abruptly end program execution by calling die(). This behavior is undesired since a single refname with few components could end program execution. To avoid this, return an

[PATCH v9 18/20] branch, tag: use porcelain output

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak Call ref-filter's setup_ref_filter_porcelain_msg() to enable translated messages for the %(upstream:tack) atom. Although branch.c doesn't currently use ref-filter's printing API's, this will ensure that when it does in the future patches, we do not need

[PATCH v9 06/20] ref-filter: introduce format_ref_array_item()

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak To allow column display, we will need to first render the output in a string list to allow print_columns() to compute the proper size of each column before starting the actual output. Introduce the function format_ref_array_item() that does the

[PATCH v9 07/20] ref-filter: make %(upstream:track) prints "[gone]" for invalid upstreams

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak Borrowing from branch.c's implementation print "[gone]" whenever an unknown upstream ref is encountered instead of just ignoring it. This makes sure that when branch.c is ported over to using ref-filter APIs for printing, this feature is not lost.

[PATCH v9 09/20] ref-filter: make "%(symref)" atom work with the ':short' modifier

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak The "%(symref)" atom doesn't work when used with the ':short' modifier because we strictly match only 'symref' for setting the 'need_symref' indicator. Fix this by comparing with the valid_atom rather than the used_atom. Add tests for %(symref) and

[PATCH v9 04/20] ref-filter: modify "%(objectname:short)" to take length

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak Add support for %(objectname:short=) which would print the abbreviated unique objectname of given length. When no length is specified, the length is 'DEFAULT_ABBREV'. The minimum length is 'MINIMUM_ABBREV'. The length may be exceeded to ensure that the

[PATCH v9 20/20] branch: implement '--format' option

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak Implement the '--format' option provided by 'ref-filter'. This lets the user list branches 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 v9 01/20] ref-filter: implement %(if), %(then), and %(else) atoms

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak Implement %(if), %(then) and %(else) atoms. Used as %(if)...%(then)...%(end) or %(if)...%(then)...%(else)...%(end). If the format string between %(if) and %(then) expands to an empty string, or to only whitespaces, then the whole %(if)...%(end) expands

[PATCH v9 03/20] ref-filter: implement %(if:equals=) and %(if:notequals=)

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak Implement %(if:equals=) wherein the if condition is only satisfied if the value obtained between the %(if:...) and %(then) atom is the same as the given ''. Similarly, implement (if:notequals=) wherein the if condition is only satisfied if the value

[PATCH v9 02/20] ref-filter: include reference to 'used_atom' within 'atom_value'

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak Ensure that each 'atom_value' has a reference to its corresponding 'used_atom'. This let's us use values within 'used_atom' in the 'handler' function. Hence we can get the %(align) atom's parameters directly from the 'used_atom' therefore removing the

[PATCH v9 00/20] port branch.c to use ref-filter's printing options

2016-12-27 Thread Karthik Nayak
This is part of unification of the commands 'git tag -l, git branch -l and git for-each-ref'. This ports over branch.c to use ref-filter's printing options. Initially posted here: $(gmane/279226). It was decided that this series would follow up after refactoring ref-filter parsing mechanism,

Gitview Shell Injection Vulnerability

2016-12-27 Thread Javantea
I have found a shell injection vulnerability in contrib/gitview/gitview. Gitview Shell Injection Vulnerability Versions affected: 8cb711c8a5-1d1bdafd64 (<=2.11.0) Gitview executes shell commands using string concatenation with user supplied data, filenames and branch names. Running Gitview and