Inconsistent results obtained regarding how git decides what commits modifies a given path

2015-08-06 Thread JuanLeon Lahoz
When I use git rev-list (or git log) with the -- option to restrict commits to those that modify a path, I am getting resuls where I fail to see the consistency. Worse than that, results vary with git version (pre 1.8.4, results were consistent; in 1.8.4 or 2.5.0 they don't seem consistent to me, a

Re: [PATCH v9 02/11] ref-filter: introduce ref_formatting_state

2015-08-06 Thread Eric Sunshine
On Thu, Aug 6, 2015 at 11:53 PM, Karthik Nayak wrote: > On Fri, Aug 7, 2015 at 5:49 AM, Eric Sunshine wrote: >> On Tue, Aug 4, 2015 at 8:42 AM, Karthik Nayak wrote: >>> +static void apply_formatting_state(struct ref_formatting_state *state, >>> struct strbuf *final) >>> +{ >>> + /* More f

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

2015-08-06 Thread Eric Sunshine
On Wed, Aug 5, 2015 at 2:54 PM, Karthik Nayak wrote: > Implement an `align` atom which will act as a modifier atom and align > any string with or without an %(atom) appearing before a %(end) atom > to the right, left or middle. > > It is followed by `:,`, where the `` is > either left, right or mi

Re: [PATCH v9 02/11] ref-filter: introduce ref_formatting_state

2015-08-06 Thread Karthik Nayak
On Fri, Aug 7, 2015 at 5:49 AM, Eric Sunshine wrote: > On Tue, Aug 4, 2015 at 8:42 AM, Karthik Nayak wrote: >> Introduce a ref_formatting_state which will eventually hold the values >> of modifier atoms. Implement this within ref-filter. >> >> Signed-off-by: Karthik Nayak >> --- >> +static void

Re: [PATCH v9 02/11] ref-filter: introduce ref_formatting_state

2015-08-06 Thread Eric Sunshine
On Tue, Aug 4, 2015 at 8:42 AM, Karthik Nayak wrote: > Introduce a ref_formatting_state which will eventually hold the values > of modifier atoms. Implement this within ref-filter. > > Signed-off-by: Karthik Nayak > --- > diff --git a/ref-filter.c b/ref-filter.c > index 91482c9..2c074a1 100644 >

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

2015-08-06 Thread Eric Sunshine
On Wed, Aug 5, 2015 at 2:54 PM, Karthik Nayak wrote: > Implement an `align` atom which will act as a modifier atom and align > any string with or without an %(atom) appearing before a %(end) atom > to the right, left or middle. For someone not familiar with the evolution of this patch series, "al

Re: [PATCH v9 01/11] ref-filter: print output to strbuf for formatting

2015-08-06 Thread Karthik Nayak
On Fri, Aug 7, 2015 at 3:51 AM, Eric Sunshine wrote: > On Tue, Aug 4, 2015 at 8:42 AM, Karthik Nayak wrote: >> Introduce a strbuf `output` which will act as a substitute rather than >> printing directly to stdout. This will be used for formatting >> eventually. >> >> Signed-off-by: Karthik Nayak

wishlist: make it possible to amend commit messages after push to remote

2015-08-06 Thread Jarkko Hietaniemi
Not for the first time, and probably not for the last, I pushed a commit upstream without adding a link for the bug report as I was meaning to. Or it could have been... - Simple typos. - Broken URLs. - The impossibility of two consecutive commits referring to each other because the older one c

Re: [PATCH v9 02/11] ref-filter: introduce ref_formatting_state

2015-08-06 Thread Eric Sunshine
On Tue, Aug 4, 2015 at 8:42 AM, Karthik Nayak wrote: > Introduce a ref_formatting_state which will eventually hold the values > of modifier atoms. Implement this within ref-filter. > > Signed-off-by: Karthik Nayak > --- > +static void apply_formatting_state(struct ref_formatting_state *state, >

Re: Draft of Git Rev News edition 6

2015-08-06 Thread Thomas Ferris Nicolaisen
On Fri, Aug 7, 2015 at 1:44 AM, Mikael Magnusson wrote: > It is surprisingly difficult to get to the actual post of edition 6 > from this thread. The link in the original post is just a 404, and to > get to it from the link in this mail, which you might not have sent at > all, I had to click like

Re: Draft of Git Rev News edition 6

2015-08-06 Thread Mikael Magnusson
On Fri, Aug 7, 2015 at 12:18 AM, Thomas Ferris Nicolaisen wrote: > On Mon, Aug 3, 2015 at 10:49 PM, Thomas Ferris Nicolaisen > wrote: >> I hope we can attract more contributors in the future, so the weight >> of this doesn't lie too much on his shoulders. Perhaps we should send >> out the draft e

Re: [PATCH v3 3/4] notes: add notes.merge option to select default strategy

2015-08-06 Thread Eric Sunshine
On Sun, Aug 2, 2015 at 6:10 AM, Jacob Keller wrote: > Teach git-notes about a new configuration option "notes.merge" for > selecting the default notes merge strategy. Document the option in > config.txt and git-notes.txt > > Add tests for use of the configuration option. Include a test to ensure >

Re: [PATCH v9 01/11] ref-filter: print output to strbuf for formatting

2015-08-06 Thread Eric Sunshine
On Tue, Aug 4, 2015 at 8:42 AM, Karthik Nayak wrote: > Introduce a strbuf `output` which will act as a substitute rather than > printing directly to stdout. This will be used for formatting > eventually. > > Signed-off-by: Karthik Nayak > --- > diff --git a/ref-filter.c b/ref-filter.c > index 469

Re: Draft of Git Rev News edition 6

2015-08-06 Thread Thomas Ferris Nicolaisen
On Mon, Aug 3, 2015 at 10:49 PM, Thomas Ferris Nicolaisen wrote: > I hope we can attract more contributors in the future, so the weight > of this doesn't lie too much on his shoulders. Perhaps we should send > out the draft earlier next time, and beckon for more contributions > from the list. Jus

Re: [PATCH v2 1/3] test_terminal: redirect child process' stdin to a pty

2015-08-06 Thread Eric Sunshine
On Tue, Aug 4, 2015 at 10:08 AM, Paul Tan wrote: > When resuming, git-am detects if we are trying to feed it patches or not > by checking if stdin is a TTY. > > However, the test library redirects stdin to /dev/null. This makes it > difficult, for instance, to test the behavior of "git am -3" when

[PATCH] submodule: implement `module_name` as a builtin helper

2015-08-06 Thread Stefan Beller
This implements the helper `module_name` in C instead of shell, yielding a nice performance boost. Before this patch, I measured a time (best out of three): $ time ./t7400-submodule-basic.sh >/dev/null real0m11.066s user0m3.348s sys 0m8.534s With this patch applied

Re: [PATCH 1/2] builtin/mv: remove get_pathspec()

2015-08-06 Thread Stefan Beller
On Thu, Aug 6, 2015 at 1:18 PM, Eric Sunshine wrote: > On Thu, Aug 6, 2015 at 2:58 PM, Stefan Beller wrote: >> On Thu, Aug 6, 2015 at 11:46 AM, Eric Sunshine >> wrote: >>> On Thu, Aug 6, 2015 at 2:27 PM, Stefan Beller wrote: `get_pathspec` is deprecated and builtin/mv.c is its last caller

Re: [RFC/PATCH 0/4] parallel fetch for submodules

2015-08-06 Thread Stefan Beller
On Thu, Aug 6, 2015 at 1:08 PM, Jens Lehmann wrote: > Am 06.08.2015 um 19:35 schrieb Stefan Beller: >> >> When I was looking at the branches of Jens for work done on submodules >> not yet upstream I found a commit "WIP threaded submodule fetching[1], >> and I was side tracked wanting to present a

Re: [PATCH 1/2] builtin/mv: remove get_pathspec()

2015-08-06 Thread Eric Sunshine
On Thu, Aug 6, 2015 at 2:58 PM, Stefan Beller wrote: > On Thu, Aug 6, 2015 at 11:46 AM, Eric Sunshine > wrote: >> On Thu, Aug 6, 2015 at 2:27 PM, Stefan Beller wrote: >>> `get_pathspec` is deprecated and builtin/mv.c is its last caller, so >>> reimplement `get_pathspec` literally in builtin/mv.

Re: [RFC/PATCH 0/4] parallel fetch for submodules

2015-08-06 Thread Jens Lehmann
Am 06.08.2015 um 19:35 schrieb Stefan Beller: When I was looking at the branches of Jens for work done on submodules not yet upstream I found a commit "WIP threaded submodule fetching[1], and I was side tracked wanting to present a different approach to that. Cool. I didn't follow that route fu

Re: [PATCH 1/4] submodule: implement `module_name` as a builtin helper

2015-08-06 Thread Jens Lehmann
Am 06.08.2015 um 21:49 schrieb Jens Lehmann: And wouldn't it make more sense to keep this patch together with the "submodule: implement `module_list` as a builtin helper" in its own "submodule-helper" series and have the following three patches in a separate "parallel fetch for submodules" series

Re: [PATCH] submodule: implement `module_name` as a builtin helper

2015-08-06 Thread Jens Lehmann
Am 05.08.2015 um 23:08 schrieb Stefan Beller: This implements the helper `module_name` in C instead of shell, yielding a nice performance boost. Before this patch, I measured a time (best out of three): $ time ./t7400-submodule-basic.sh >/dev/null real 0m11.066s user 0

Re: [PATCH 1/4] submodule: implement `module_name` as a builtin helper

2015-08-06 Thread Jens Lehmann
Am 06.08.2015 um 19:35 schrieb Stefan Beller: This implements the helper `module_name` in C instead of shell, yielding a nice performance boost. Before this patch, I measured a time (best out of three): $ time ./t7400-submodule-basic.sh >/dev/null real 0m11.066s user 0

Re: [PATCH 1/2] builtin/mv: remove get_pathspec()

2015-08-06 Thread Stefan Beller
On Thu, Aug 6, 2015 at 11:46 AM, Eric Sunshine wrote: > On Thu, Aug 6, 2015 at 2:27 PM, Stefan Beller wrote: >> builtin/mv: remove get_pathspec() > > Misleading. Perhaps rephrase as: > > mv: drop dependency upon deprecated get_pathspec > >> `get_pathspec` is deprecated and builtin/mv.c is it

Re: [PATCH 3/4] argv_array: add argv_array_copy

2015-08-06 Thread Jeff King
On Thu, Aug 06, 2015 at 02:18:26PM -0400, Eric Sunshine wrote: > However, that begs the question: Why do you need argv_array_copy() at > all? Isn't the same functionality already provided by > argv_array_pushv()? To wit, a caller which wants to copy from 'src' to > 'dst' can already do: > > s

Re: [PATCH 1/2] builtin/mv: remove get_pathspec()

2015-08-06 Thread Eric Sunshine
On Thu, Aug 6, 2015 at 2:27 PM, Stefan Beller wrote: > builtin/mv: remove get_pathspec() Misleading. Perhaps rephrase as: mv: drop dependency upon deprecated get_pathspec > `get_pathspec` is deprecated and builtin/mv.c is its last caller, so > reimplement `get_pathspec` literally in builti

[PATCH 0/2] Remove get_pathspec finally

2015-08-06 Thread Stefan Beller
Remove the last caller of the get_pathspec function and the get_pathspec function itself. I stumbled into this as I was reading the documentation on pathspec, and the first sentence get_pathspec() is obsolete and should never be used in new code. made me wonder. This replaces sb/remove-get-p

[PATCH 1/2] builtin/mv: remove get_pathspec()

2015-08-06 Thread Stefan Beller
`get_pathspec` is deprecated and builtin/mv.c is its last caller, so reimplement `get_pathspec` literally in builtin/mv.c Signed-off-by: Stefan Beller --- builtin/mv.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/builtin/mv.c b/builtin/mv.c index d1d4316.

[PATCH 2/2] pathspec: remove deprecated get_pathspec

2015-08-06 Thread Stefan Beller
The function `get_pathspec` is no longer used, so remove it. The NEEDSWORK comment in pathspec.c is outdated as that happened in (fadf96aba, 2013-09-09, Merge branch 'nd/magic-pathspec') Signed-off-by: Stefan Beller --- Documentation/technical/api-setup.txt | 2 -- cache.h

Re: fetching from an hg remote fails with bare git repositories

2015-08-06 Thread Taylor Braun-Jones
On Tue, Aug 4, 2015 at 7:03 PM, Mike Hommey wrote: > Another missing detail is what you're using for mercurial support in > git. I would guess https://github.com/felipec/git-remote-hg. Yes. I was going off some outdated information on the web that told me the felipec/git-remote-hg had moved to ma

Re: [PATCH 3/4] argv_array: add argv_array_copy

2015-08-06 Thread Eric Sunshine
On Thu, Aug 6, 2015 at 1:35 PM, Stefan Beller wrote: > The copied argv array shall be an identical deep copy except for > the internal allocation value. > > Signed-off-by: Stefan Beller > --- > diff --git a/argv-array.c b/argv-array.c > index 256741d..6d9c1dd 100644 > --- a/argv-array.c > +++ b/a

[RFC/PATCH 0/4] parallel fetch for submodules

2015-08-06 Thread Stefan Beller
When I was looking at the branches of Jens for work done on submodules not yet upstream I found a commit "WIP threaded submodule fetching[1], and I was side tracked wanting to present a different approach to that. The first patch is a bit unrelated as it relates to the rewrite of git-submodule.sh

[PATCH 3/4] argv_array: add argv_array_copy

2015-08-06 Thread Stefan Beller
The copied argv array shall be an identical deep copy except for the internal allocation value. CC: Jeff King Signed-off-by: Stefan Beller --- argv-array.c | 13 + argv-array.h | 1 + 2 files changed, 14 insertions(+) diff --git a/argv-array.c b/argv-array.c index 256741d..6d9c1dd

[PATCH 1/4] submodule: implement `module_name` as a builtin helper

2015-08-06 Thread Stefan Beller
This implements the helper `module_name` in C instead of shell, yielding a nice performance boost. Before this patch, I measured a time (best out of three): $ time ./t7400-submodule-basic.sh >/dev/null real0m11.066s user0m3.348s sys 0m8.534s With this patch applied

[RFC PATCH 4/4] submodule: add infrastructure to fetch submodules in parallel

2015-08-06 Thread Stefan Beller
This makes use of the new workdispatcher to fetch a number of submodules at the same time. Still todo: sort the output of the fetch commands. I am unsure if this should be hooked into the workdispatcher as the problem of sorted output will appear likely again, so a general solution would not hurt.

[RFC PATCH 2/4] Add a workdispatcher to get work done in parallel

2015-08-06 Thread Stefan Beller
This adds infrastructure code to work a set of tasks from a thread pool. The whole life cycle of such a thread pool would look like struct workdispatcher *wd; struct return_values *rv; wd = create_workdispatcher(&command_for_task, max_parallel_jobs); for (...) { prepa

Re: [RFC/PATCH] contrib: teach completion about git-worktree options and arguments

2015-08-06 Thread Eric Sunshine
On Thu, Jul 23, 2015 at 4:49 PM, Eric Sunshine wrote: > Complete subcommands 'add' and 'prune', as well as their respective > options --force, --detach, --dry-run, --verbose, and --expire. Also > complete 'refname' in "git worktree add [-b ] > ". Ping[1]? [1]: http://article.gmane.org/gmane.com

Re: What's cooking in git.git

2015-08-06 Thread Johannes Schindelin
Hi Junio, On 2015-08-06 00:55, Junio C Hamano wrote: > * sb/submodule-helper (2015-08-05) 1 commit > - submodule: implement `module_list` as a builtin helper > > The beginning of "git submodule" rewritten in C. I am really looking forward to that, with my Windows performance hat firmly on my

Re: [PATCH] sha1_file.c: fix a declaration-after-statement

2015-08-06 Thread Ramsay Jones
On 06/08/15 10:53, Ramsay Jones wrote: > > Signed-off-by: Ramsay Jones > --- > > Hi Junio, > > Sorry for this hit-n-run patch, but I'm in a hurry ... :-D > Could you please squash this (or something like it) into > the relevant patch; Thanks! Ah, I've just read your 'What's Cooking' email and

[PATCH] sha1_file.c: fix a declaration-after-statement

2015-08-06 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Junio, Sorry for this hit-n-run patch, but I'm in a hurry ... :-D Could you please squash this (or something like it) into the relevant patch; Thanks! [I noticed this simply because I have '-Wdeclaration-after-statement' and '-Werror' (among others) set in CF

Re: [PATCH v4 1/3] clone: do not include authentication data in guessed dir

2015-08-06 Thread Patrick Steinhardt
On Wed, Aug 05, 2015 at 12:41:27PM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > For completeness, here is what I think the end result (together with > > Peff's series) of the test should look like. > > ... > > Note that ssh://user:passw@rd@host:1234/ and user:passw@rd@host:/ > > te

Re: [PATCH v3 0/6] fix repo name when cloning a server's root

2015-08-06 Thread Junio C Hamano
Torsten Bögershausen writes: > It is easy to strip the foo:: part of the url, assume that > the remote helper uses a RFC 3986 similar url syntax, so that we > can feed the reminding https://host/repo.git into the parser (see above). The thing that worries me is that foo:: syntax and external hel

Re: Error when cloning with weird local directory

2015-08-06 Thread Junio C Hamano
Junio C Hamano writes: > Torsten Bögershausen writes: > >> It looks as if >> static char *get_repo_path(const char *repo, int *is_bundle) >> in built/clone.c >> checks if there is a local directory structure looking like a >> .git directory. >> This is wrong. > > It is as designed, though, to al

Re: Error when cloning with weird local directory

2015-08-06 Thread Junio C Hamano
Torsten Bögershausen writes: > It looks as if > static char *get_repo_path(const char *repo, int *is_bundle) > in built/clone.c > checks if there is a local directory structure looking like a > .git directory. > This is wrong. It is as designed, though, to allow cloning from a local directory wi

Re: [PATCH v3 0/6] fix repo name when cloning a server's root

2015-08-06 Thread Torsten Bögershausen
On 2015-08-05 23.19, Jeff King wrote: > On Wed, Aug 05, 2015 at 10:34:34AM -0700, Junio C Hamano wrote: > >>> As you can see, there is a lot of complexity in there and I'm not >>> convinced this is better than just exposing >>> 'parse_connect_url()', which already handles everything for us. I try

Re: [PATCH/RFC] gitweb: Don't pass --full-history to git-log(1)

2015-08-06 Thread Junio C Hamano
Junio C Hamano writes: > Heh, in 2008 we already had more than a few dozen. > > I think > > (1) It is perfectly OK to add an UI option to let the web visitor > choose between simplified and full history at runtime, > optionally with a new gitweb.conf option to let the project > ow