Re: inotify support, nearly there

2014-01-29 Thread Duy Nguyen
On Wed, Jan 29, 2014 at 2:44 PM, Mike Hommey wrote: > Haven't looked at the code, so I don't know if you've done that, but in > case you haven't, it would be nice to have an environment variable or a > config option to make git use the file-watcher *and* normal lstat > operations, to check consist

commit-msg hook and merges

2014-01-29 Thread Søren Holm
Hi. I'm running a speciallized commit-msg hook to help me fill out commit messages. This all works nicely for alle commits except for merges. What I normally do to circumvent this is this : $ git merge somebranch $ git commit --ammend Is that intentional or an error ? -- Søren Holm --

[PATCH] Makefile: add cppcheck target

2014-01-29 Thread Elia Pinto
Add cppcheck target to Makefile. Cppcheck is a static analysis tool for C/C++ code. Cppcheck primarily detects the types of bugs that the compilers normally do not detect. It is an useful target for doing QA analysis. Signed-off-by: Elia Pinto --- Makefile |6 ++ config.mak.in |

Re: [PATCH 3/4] combine-diff: Optimize combine_diff_path sets intersection

2014-01-29 Thread Kirill Smelkov
On Tue, Jan 28, 2014 at 01:55:09PM -0800, Junio C Hamano wrote: > Kirill Smelkov writes: > > > diff --git a/combine-diff.c b/combine-diff.c > > index 3b92c448..98c2562 100644 > > --- a/combine-diff.c > > +++ b/combine-diff.c > > @@ -15,8 +15,8 @@ > > ... > > + while (1) { > > ... > > +

git clone on out-of-space device causes incorrect errors

2014-01-29 Thread Armin Ronacher
Hi, When cloning onto a device that is out of space to fulfill the whole clone operation, git will report that the remove repository does not exist: $ git clone https://github.com/mozilla/flask Cloning into 'flask'... remote: Repository not found. fatal: repository 'https://github.com/mozilla/

[PATCH] archive.c: reduce scope of variables

2014-01-29 Thread Elia Pinto
Signed-off-by: Elia Pinto --- archive.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archive.c b/archive.c index 346f3b2..49b79f8 100644 --- a/archive.c +++ b/archive.c @@ -112,7 +112,6 @@ static int write_archive_entry(const unsigned char *sha1, const char *base,

[PATCH] bisect.c: reduce scope of variable

2014-01-29 Thread Elia Pinto
Signed-off-by: Elia Pinto --- bisect.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bisect.c b/bisect.c index 37200b4..8448d27 100644 --- a/bisect.c +++ b/bisect.c @@ -685,7 +685,6 @@ static void mark_expected_rev(char *bisect_rev_hex) static int bisect_checkout(char

[PATCH 2/2] builtin/apply.c: reduce scope of variables

2014-01-29 Thread Elia Pinto
Signed-off-by: Elia Pinto --- builtin/apply.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index b0d0986..a7e72d5 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -1943,13 +1943,7 @@ static int parse_chunk(char *buffer,

[PATCH 3/3] builtin/blame.c: reduce scope of variables

2014-01-29 Thread Elia Pinto
Signed-off-by: Elia Pinto --- builtin/blame.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index e44a6bb..967a7c6 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -1580,14 +1580,14 @@ static const char *format_time(unsigned lo

[PATCH 4/4] builtin/clean.c: reduce scope of variable

2014-01-29 Thread Elia Pinto
Signed-off-by: Elia Pinto --- builtin/clean.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/clean.c b/builtin/clean.c index 2f26297..a1f8969 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -154,7 +154,7 @@ static int remove_dirs(struct strbuf *path, const

[PATCH 5/5] builtin/commit.c: reduce scope of variables

2014-01-29 Thread Elia Pinto
Signed-off-by: Elia Pinto --- builtin/commit.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index 3767478..eea4421 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -307,7 +307,6 @@ static char *prepare_index(int argc,

[PATCH 6/6] builtin/fetch.c: reduce scope of variable

2014-01-29 Thread Elia Pinto
Signed-off-by: Elia Pinto --- builtin/fetch.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index 025bc3e..55f457c 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -1026,7 +1026,6 @@ static int fetch_multiple(struct string_list *list

[PATCH 7/7] builtin/gc.c: reduce scope of variables

2014-01-29 Thread Elia Pinto
Signed-off-by: Elia Pinto --- builtin/gc.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/builtin/gc.c b/builtin/gc.c index c19545d..5bbb5e3 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -188,13 +188,12 @@ static int need_to_gc(void) static const char *lock_repo_fo

Re: [PATCH v2] repack.c: Use move_temp_to_file() instead of rename()

2014-01-29 Thread Junio C Hamano
Torsten Bögershausen writes: > In a1bbc6c0 a shell command "mv -f" was replaced with the rename() function. > > Use move_temp_to_file() from sha1_file.c instead of rename(). > This is in line with the handling of other Git internal tmp files, > and calls adjust_shared_perm() > > Signed-off-by: T

Re: [PATCH] Makefile: add cppcheck target

2014-01-29 Thread Junio C Hamano
Elia Pinto writes: > Add cppcheck target to Makefile. Cppcheck is a static > analysis tool for C/C++ code. Cppcheck primarily detects > the types of bugs that the compilers normally do not detect. > It is an useful target for doing QA analysis. > > Signed-off-by: Elia Pinto > --- > Makefile

Re: [PATCH] archive.c: reduce scope of variables

2014-01-29 Thread Junio C Hamano
Elia Pinto writes: > Signed-off-by: Elia Pinto > --- Either the patch is whitespace damaged during the mail transport, or you are incorrectly indenting the lines with all spaces. > archive.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/archive.c b/archive.c

Re: [PATCH v2 3/3] diff: turn skip_stat_unmatch on selectively

2014-01-29 Thread Junio C Hamano
Duy Nguyen writes: > On Tue, Jan 28, 2014 at 02:51:45PM -0800, Junio C Hamano wrote: >> >> This replaces 'diff: turn off skip_stat_unmatch on "diff --cached"' >> >> The previous patch obviously leaves skip_stat_unmatch on in "diff >> >> " and maybe other cases. >> > >> > Oops, I lost track.

Re: [PATCH v3 00/17] Add interpret-trailers builtin

2014-01-29 Thread Christian Couder
From: Junio C Hamano > > Is this from the same Christian? Yes, ... > The series seems to have unusually high rate of style violations > compared to the usual submission, like these: > > ERROR: open brace '{' following function declarations go on the next line > #78: FILE: trailer.c:44: > +stati

Re: [PATCH v3 17/17] Documentation: add documentation for 'git interpret-trailers'

2014-01-29 Thread Christian Couder
From: Junio C Hamano Subject: Re: [PATCH v3 17/17] Documentation: add documentation for 'git interpret-trailers' Date: Mon, 27 Jan 2014 13:20:18 -0800 > Christian Couder writes: > +'git interpret-trailers' [--trim-empty] [--infile=file] [...] >>> >>> Would it be more consistent wit

Re: [PATCH 5/5] builtin/commit.c: reduce scope of variables

2014-01-29 Thread Eric Sunshine
On Wed, Jan 29, 2014 at 8:48 AM, Elia Pinto wrote: > diff --git a/builtin/commit.c b/builtin/commit.c > index 3767478..eea4421 100644 > --- a/builtin/commit.c > +++ b/builtin/commit.c > @@ -1510,7 +1511,6 @@ int cmd_commit(int argc, const char **argv, const char > *prefix) > struct ref_lo

Re: [PATCH v3 17/17] Documentation: add documentation for 'git interpret-trailers'

2014-01-29 Thread Junio C Hamano
Christian Couder writes: >> I find it a bad taste to allow unbound set of on the LHS of >> '=' on the command line, but that is a separate issue in the design, >> not in the documentation of the design. > > I don't understand this sentence, sorry. It is a bad design taste to structure the comma

C standard compliance?

2014-01-29 Thread David Kastrup
Hi, I am wondering if I may compare pointers with < that have been created using different calls of malloc. The C standard does not allow this (inequalities are only allowed for pointers into the same structure) to allow for some cheapskate sort of comparison in segmented architectures. Now of c

Re: C standard compliance?

2014-01-29 Thread Junio C Hamano
David Kastrup writes: > Hi, I am wondering if I may compare pointers with < that have been > created using different calls of malloc. > > The C standard does not allow this (inequalities are only allowed for > pointers into the same structure) to allow for some cheapskate sort of > comparison in

Re: C standard compliance?

2014-01-29 Thread David Kastrup
Junio C Hamano writes: > David Kastrup writes: > >> Hi, I am wondering if I may compare pointers with < that have been >> created using different calls of malloc. >> >> The C standard does not allow this (inequalities are only allowed for >> pointers into the same structure) to allow for some ch

git-draw - draws nearly the full content of a tiny git repository as a graph

2014-01-29 Thread Flo
I just want to present a small tool I wrote. I use it at work to have a tool visualizing the Git basic concepts and data structures which "are really really really simple" (Linus' words). That helps me teaching my colleagues about Git and answering their questions when Git did not behave as they ex

Bug: Branch rename breaks local downstream branches

2014-01-29 Thread Alex Vallée
When tracking a local branch, renaming the tracked branch will not update the downstream branch. See transcript: avallee@gust:/tmp/repo (master)$ git co -b foo Switched to branch 'foo' avallee@gust:/tmp/repo (foo)$ git co -b bar --track Branch bar set up to track local branch foo.

What's cooking in git.git (Jan 2014, #06; Wed, 29)

2014-01-29 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 second release candidate is expected to happen this weekend. You can find the changes described here in the integration branches of the rep

Re: C standard compliance?

2014-01-29 Thread Philip Oakley
From: "David Kastrup" Junio C Hamano writes: David Kastrup writes: Hi, I am wondering if I may compare pointers with < that have been created using different calls of malloc. The C standard does not allow this (inequalities are only allowed for pointers into the same structure) to allow f

Re: C standard compliance?

2014-01-29 Thread brian m. carlson
On Wed, Jan 29, 2014 at 09:52:45PM +0100, David Kastrup wrote: > Junio C Hamano writes: > > Hmm... if you were to implement a set of pointers in such a way that > > you can cheaply tell if an unknown pointer belongs to that set, you > > would use a hashtable, keyed with something that is derived f

Re* [RFC PATCH 2/1] Make request-pull able to take a refspec of form local:remote

2014-01-29 Thread Junio C Hamano
Junio C Hamano writes: > So there are two remaining items, I think. > > - After creating a tags/for-linus signed tag and pushing it to >tags/for-linus, asking request-pull to request that tag to be >pulled seems to lose the tag message from the output. > > - Docs. > > [Footnote] > > *1*

Re: C standard compliance?

2014-01-29 Thread David Kastrup
"brian m. carlson" writes: > On Wed, Jan 29, 2014 at 09:52:45PM +0100, David Kastrup wrote: >> Junio C Hamano writes: >> > Hmm... if you were to implement a set of pointers in such a way that >> > you can cheaply tell if an unknown pointer belongs to that set, you >> > would use a hashtable, key

Re: Re* [RFC PATCH 2/1] Make request-pull able to take a refspec of form local:remote

2014-01-29 Thread brian m. carlson
On Wed, Jan 29, 2014 at 03:34:32PM -0800, Junio C Hamano wrote: > The previous two steps were meant to stop promoting the explicit > refname the user gave to the command to a different ref that points > at it. Most notably, we no longer substitute a branch name the user > used with a name of the t

Re: Re* [RFC PATCH 2/1] Make request-pull able to take a refspec of form local:remote

2014-01-29 Thread Linus Torvalds
On Wed, Jan 29, 2014 at 3:34 PM, Junio C Hamano wrote: > > I am not yet doing the docs, but here is a minimal (and I think is > the most sensible) fix to the "If I asked a tag to be pulled, I used > to get the message from the tag in the output---the updated code no > longer does so" problem. Tha

Feature Request Google Authenticator Support

2014-01-29 Thread Max Rahm
Github supports google authenticator 2-step authentication. I enabled it and how can't figure out how to connect to my github account through git. I've looked pretty hard in the man pages and on google and can't seem to find anything on how to set up git to work with a repository with 2-step verifi

Re: Feature Request Google Authenticator Support

2014-01-29 Thread Andrew Ardill
On 30 January 2014 15:07, Max Rahm wrote: > Github supports google authenticator 2-step authentication. I enabled it > and how can't figure out how to connect to my github account through git. > I've looked pretty hard in the man pages and on google and can't seem to > find anything on how to set

Re: [PATCH v2 3/3] diff: turn skip_stat_unmatch on selectively

2014-01-29 Thread Duy Nguyen
On Thu, Jan 30, 2014 at 2:25 AM, Junio C Hamano wrote: >> On Tue, Jan 28, 2014 at 02:51:45PM -0800, Junio C Hamano wrote: > This however shows that the existing test *KNEW* that it was enough > to check just a few cases (especially, there is no reason to make > sure that blob vs file-in-working-tr

Questions on local clone and push back

2014-01-29 Thread Arshavir Grigorian
Hi, I have the following use case - I have a set of files that are used for various adhoc projects, each project is in its own directory, and the files sometime need to be customized/enhanced for a specific project. Ideally some of these enhancements should be merged to a "central" place. I realize

Re: [PATCH] pager: set LV=-c alongside LESS=FRSX

2014-01-29 Thread Anders Kaseorg
On 01/06/2014 09:14 PM, Jonathan Nieder wrote: +test_expect_success TTY 'LESS and LV envvars are set for pagination' ' + ( + sane_unset LESS LV && + PAGER="env >pager-env.out" && + export PAGER && + + test_terminal git log + ) &&

[PATCH v4 00/17] Add interpret-trailers builtin

2014-01-29 Thread Christian Couder
This patch series implements a new command: git interpret-trailers and an infrastructure to process trailers that can be reused, for example in "commit.c". 1) Rationale: This command should help with RFC 822 style headers, called "trailers", that are found at the end of commit messages.

[PATCH v4 01/17] Add data structures and basic functions for commit trailers

2014-01-29 Thread Christian Couder
We will use a doubly linked list to store all information about trailers and their configuration. This way we can easily remove or add trailers to or from trailer lists while traversing the lists in either direction. Signed-off-by: Christian Couder --- Makefile | 1 + trailer.c | 48 +

[PATCH v4 03/17] trailer: read and process config information

2014-01-29 Thread Christian Couder
This patch implements reading the configuration to get trailer information, and then processing it and storing it in a doubly linked list. The config information is stored in the list whose first item is pointed to by: static struct trailer_item *first_conf_item; Signed-off-by: Christian Couder

[PATCH v4 06/17] trailer: parse trailers from input file

2014-01-29 Thread Christian Couder
This patch reads trailers from an input file, parses them and puts the result into a doubly linked list. Signed-off-by: Christian Couder --- trailer.c | 62 ++ 1 file changed, 62 insertions(+) diff --git a/trailer.c b/trailer.c index f

[PATCH v4 13/17] trailer: execute command from 'trailer..command'

2014-01-29 Thread Christian Couder
Signed-off-by: Christian Couder --- trailer.c | 56 1 file changed, 56 insertions(+) diff --git a/trailer.c b/trailer.c index 430ff39..dc8908a 100644 --- a/trailer.c +++ b/trailer.c @@ -1,4 +1,5 @@ #include "cache.h" +#include "run-comman

[PATCH v4 08/17] trailer: add interpret-trailers command

2014-01-29 Thread Christian Couder
This patch adds the "git interpret-trailers" command. This command uses the previously added process_trailers() function in trailer.c. Signed-off-by: Christian Couder --- .gitignore | 1 + Makefile | 1 + builtin.h| 1 + builtin/interp

[PATCH v4 05/17] strbuf: add strbuf_isspace()

2014-01-29 Thread Christian Couder
This helper function checks if a strbuf contains only space chars or not. Signed-off-by: Christian Couder --- strbuf.c | 7 +++ strbuf.h | 1 + 2 files changed, 8 insertions(+) diff --git a/strbuf.c b/strbuf.c index 83caf4a..2124bb8 100644 --- a/strbuf.c +++ b/strbuf.c @@ -124,6 +124,13 @@

[PATCH v4 17/17] Documentation: add documentation for 'git interpret-trailers'

2014-01-29 Thread Christian Couder
Signed-off-by: Christian Couder --- Documentation/git-interpret-trailers.txt | 132 +++ 1 file changed, 132 insertions(+) create mode 100644 Documentation/git-interpret-trailers.txt diff --git a/Documentation/git-interpret-trailers.txt b/Documentation/git-interpret-

[PATCH v4 10/17] trailer: if no input file is passed, read from stdin

2014-01-29 Thread Christian Couder
It is simpler and more natural if the "git interpret-trailers" is made a filter as its output already goes to sdtout. Signed-off-by: Christian Couder --- builtin/interpret-trailers.c | 2 +- t/t7513-interpret-trailers.sh | 7 +++ trailer.c | 15 +-- 3 files

[PATCH v4 11/17] trailer: add new_trailer_item() function

2014-01-29 Thread Christian Couder
This is a small refactoring to prepare for the next steps. Signed-off-by: Christian Couder --- trailer.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/trailer.c b/trailer.c index 73a65e0..430ff39 100644 --- a/trailer.c +++ b/trailer.c @@ -3

[PATCH v4 16/17] trailer: add tests for commands using env variables

2014-01-29 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t7513-interpret-trailers.sh | 20 1 file changed, 20 insertions(+) diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh index 2d50b7a..00894a8 100755 --- a/t/t7513-interpret-trailers.sh +++ b/t/t7513-interpret-trail

[PATCH v4 09/17] trailer: add tests for "git interpret-trailers"

2014-01-29 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t7513-interpret-trailers.sh | 208 ++ 1 file changed, 208 insertions(+) create mode 100755 t/t7513-interpret-trailers.sh diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh new file mode 100755

[PATCH v4 12/17] strbuf: add strbuf_replace()

2014-01-29 Thread Christian Couder
Signed-off-by: Christian Couder --- strbuf.c | 7 +++ strbuf.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/strbuf.c b/strbuf.c index 2124bb8..e45e513 100644 --- a/strbuf.c +++ b/strbuf.c @@ -197,6 +197,13 @@ void strbuf_splice(struct strbuf *sb, size_t pos, size_t len, s

[PATCH v4 07/17] trailer: put all the processing together and print

2014-01-29 Thread Christian Couder
This patch adds the process_trailers() function that calls all the previously added processing functions and then prints the results on the standard output. Signed-off-by: Christian Couder --- trailer.c | 40 1 file changed, 40 insertions(+) diff --git a

[PATCH v4 04/17] trailer: process command line trailer arguments

2014-01-29 Thread Christian Couder
This patch parses the trailer command line arguments and put the result into an arg_tok doubly linked list. Signed-off-by: Christian Couder --- trailer.c | 77 +++ 1 file changed, 77 insertions(+) diff --git a/trailer.c b/trailer.c ind

[PATCH v4 02/17] trailer: process trailers from file and arguments

2014-01-29 Thread Christian Couder
This patch implements the logic that process trailers from file and arguments. At the beginning trailers from file are in their own infile_tok doubly linked list, and trailers from arguments are in their own arg_tok doubly linked list. The lists are traversed and when an arg_tok should be "applie

[PATCH v4 14/17] trailer: add tests for trailer command

2014-01-29 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t7513-interpret-trailers.sh | 27 +++ 1 file changed, 27 insertions(+) diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh index f5ef81f..2d50b7a 100755 --- a/t/t7513-interpret-trailers.sh +++ b/t/t7513-interpre

[PATCH v4 15/17] trailer: set author and committer env variables

2014-01-29 Thread Christian Couder
Signed-off-by: Christian Couder --- trailer.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/trailer.c b/trailer.c index dc8908a..e29b7f2 100644 --- a/trailer.c +++ b/trailer.c @@ -1,5 +1,6 @@ #include "cache.h" #include "run-command.h" +#incl