[PATCH v3 3/5] config: make parsing stack struct independent from actual data source

2013-05-09 Thread Heiko Voigt
. A new source can use this to store its custom data. Signed-off-by: Heiko Voigt --- config.c | 66 ++-- 1 file changed, 44 insertions(+), 22 deletions(-) diff --git a/config.c b/config.c index 046642b..2390458 100644 --- a/config.c +++ b

[PATCH v3 2/5] config: drop cf validity check in get_next_char()

2013-05-09 Thread Heiko Voigt
; get_next_char -> parse_value -> get_next_char -> get_base_var -> get_next_char -> get_extended_base_var -> get_next_char The variable is initialized in do_config_from. Signed-off-by

[PATCH v3 1/5] config: factor out config file stack management

2013-05-09 Thread Heiko Voigt
Because a config callback may start parsing a new file, the global context regarding the current config file is stored as a stack. Currently we only need to manage that stack from git_config_from_file. Let's factor it out to allow new sources of config data. Signed-off-by: Heiko

Re: Re: [PATCH v2 4/4] teach config parsing to read from strbuf

2013-03-18 Thread Heiko Voigt
Hi Peff, On Thu, Mar 14, 2013 at 03:39:14AM -0400, Jeff King wrote: On Thu, Mar 14, 2013 at 03:10:46AM -0400, Jeff King wrote: > I looked into this a little. The first sticking point is that > git_config_with_options needs to support the alternate source. Here's a > sketch of what I think the s

Re: [PATCH v2 4/4] teach config parsing to read from strbuf

2013-03-13 Thread Heiko Voigt
On Tue, Mar 12, 2013 at 03:29:59PM -0400, Jeff King wrote: > On Tue, Mar 12, 2013 at 05:42:54PM +0100, Heiko Voigt wrote: > > > > Your series does not actually add any callers of the new function. The > > > obvious "patch 5/4" would be to plumb it into "gi

Re: [PATCH v2 1/4] config: factor out config file stack management

2013-03-13 Thread Heiko Voigt
On Tue, Mar 12, 2013 at 03:04:56PM -0400, Jeff King wrote: > On Tue, Mar 12, 2013 at 04:44:35PM +0100, Heiko Voigt wrote: > > > > Can we throw in a comment at the top here with the expected usage? In > > > particular, do_config_from is expecting the caller to have filled

Re: [PATCH v2 4/4] teach config parsing to read from strbuf

2013-03-12 Thread Heiko Voigt
On Tue, Mar 12, 2013 at 07:18:06AM -0400, Jeff King wrote: > On Sun, Mar 10, 2013 at 06:00:52PM +0100, Heiko Voigt wrote: > > > This can be used to read configuration values directly from gits > > database. > > > > Signed-off-by: Heiko Voigt > > This is l

Re: [PATCH v2 3/4] config: make parsing stack struct independent from actual data source

2013-03-12 Thread Heiko Voigt
On Tue, Mar 12, 2013 at 07:03:55AM -0400, Jeff King wrote: > On Sun, Mar 10, 2013 at 05:59:40PM +0100, Heiko Voigt wrote: > > > diff --git a/config.c b/config.c > > index f55c43d..fe1c0e5 100644 > > --- a/config.c > > +++ b/config.c > > @@ -10,20 +10,42 @@ &g

Re: [PATCH v2 2/4] config: drop file pointer validity check in get_next_char()

2013-03-12 Thread Heiko Voigt
On Tue, Mar 12, 2013 at 05:00:56PM +0100, Heiko Voigt wrote: > On Tue, Mar 12, 2013 at 07:00:03AM -0400, Jeff King wrote: > > On Sun, Mar 10, 2013 at 05:58:57PM +0100, Heiko Voigt wrote: > > > > > The only location where cf is set in this file is in do_config_from(). >

Re: [PATCH v2 2/4] config: drop file pointer validity check in get_next_char()

2013-03-12 Thread Heiko Voigt
On Tue, Mar 12, 2013 at 07:00:03AM -0400, Jeff King wrote: > On Sun, Mar 10, 2013 at 05:58:57PM +0100, Heiko Voigt wrote: > > > The only location where cf is set in this file is in do_config_from(). > > This function has only one callsite which is config_from_file(). In > >

Re: [PATCH v2 1/4] config: factor out config file stack management

2013-03-12 Thread Heiko Voigt
On Tue, Mar 12, 2013 at 06:52:00AM -0400, Jeff King wrote: > On Sun, Mar 10, 2013 at 05:57:53PM +0100, Heiko Voigt wrote: > > > Because a config callback may start parsing a new file, the > > global context regarding the current config file is stored > > as a stack. C

Re: rebase: strange failures to apply patc 3-way

2013-03-12 Thread Heiko Voigt
On Mon, Mar 11, 2013 at 09:10:04PM -0400, Jeff King wrote: > On Mon, Mar 11, 2013 at 09:03:42PM -0400, Andrew Wong wrote: > > > On 03/11/13 21:01, Jeff King wrote: > > > From "git help config": > > > > > > core.trustctime > > > If false, the ctime differences between the index and the workin

[RFC/PATCH] submodule: allow common rewind when merging submodules

2013-03-11 Thread Heiko Voigt
Allow merge of two commits that are contained in each other and do the same rewind. The rewind is calculated using the commit recorded in the merge base of the superproject. Signed-off-by: Heiko Voigt --- On Sun, Mar 10, 2013 at 06:09:53PM +0100, Heiko Voigt wrote: > On Sat, Mar 09, 2013 at

Re: [RFC/PATCH] Documentation/technical/api-fswatch.txt: start with outline

2013-03-11 Thread Heiko Voigt
On Mon, Mar 11, 2013 at 01:47:03AM +0530, Ramkumar Ramachandra wrote: > git operations are slow on repositories with lots of files, and lots > of tiny filesystem calls like lstat(), getdents(), open() are > reposible for this. On the linux-2.6 repository, for instance, the > numbers for "git statu

Re: [PATCH/RFC] Changing submodule foreach --recursive to be depth-first, --parent option to execute command in supermodule as well

2013-03-11 Thread Heiko Voigt
On Sat, Mar 09, 2013 at 07:18:48PM +0100, Jens Lehmann wrote: > Am 05.03.2013 22:17, schrieb Phil Hord: > > In a shell, it usually goes like this: > > > >git submodule foreach --recursive '${cmd}' > >{30-ish} > > > > It'd be easier if I could just include a switch for this, and maybe > >

Re: Merging submodules - best merge-base

2013-03-10 Thread Heiko Voigt
On Sat, Mar 09, 2013 at 06:45:56PM +0100, Jens Lehmann wrote: > Am 07.03.2013 19:59, schrieb Heiko Voigt: > > On Thu, Mar 07, 2013 at 10:49:09AM +0100, Daniel Bratell wrote: > >> Den 2013-03-06 19:12:05 skrev Heiko Voigt : > >>> So to summarize what you are requesti

[PATCH v2 4/4] teach config parsing to read from strbuf

2013-03-10 Thread Heiko Voigt
This can be used to read configuration values directly from gits database. Signed-off-by: Heiko Voigt --- .gitignore | 1 + Makefile | 1 + cache.h| 2 ++ config.c | 48 t/t1300-repo

[PATCH v2 3/4] config: make parsing stack struct independent from actual data source

2013-03-10 Thread Heiko Voigt
. A new source can use this to store its custom data. Signed-off-by: Heiko Voigt --- config.c | 63 +++ 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/config.c b/config.c index f55c43d..fe1c0e5 100644 --- a/config.c +++ b

[PATCH v2 2/4] config: drop file pointer validity check in get_next_char()

2013-03-10 Thread Heiko Voigt
The only location where cf is set in this file is in do_config_from(). This function has only one callsite which is config_from_file(). In config_from_file() its ensured that the f member is set to non-zero. Signed-off-by: Heiko Voigt --- config.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v2 1/4] config: factor out config file stack management

2013-03-10 Thread Heiko Voigt
Because a config callback may start parsing a new file, the global context regarding the current config file is stored as a stack. Currently we only need to manage that stack from git_config_from_file. Let's factor it out to allow new sources of config data. Signed-off-by: Heiko

[PATCH v2 0/4] allow more sources for config values

2013-03-10 Thread Heiko Voigt
] incorporated. [1] http://thread.gmane.org/gmane.comp.version-control.git/217018/ Heiko Voigt (4): config: factor out config file stack management config: drop file pointer validity check in get_next_char() config: make parsing stack struct independent from actual data source teach config parsing

Re: [PATCH 4/4] teach config parsing to read from strbuf

2013-03-10 Thread Heiko Voigt
Hi, On Thu, Mar 07, 2013 at 06:42:43PM +, Ramsay Jones wrote: > Heiko Voigt wrote: > > +int git_config_from_strbuf(config_fn_t fn, struct strbuf *strbuf, void > > *data) > > +{ > > + struct config top; > > + struct config_strbuf str; > > + > >

Re: Merging submodules - best merge-base

2013-03-07 Thread Heiko Voigt
On Thu, Mar 07, 2013 at 10:49:09AM +0100, Daniel Bratell wrote: > Den 2013-03-06 19:12:05 skrev Heiko Voigt : > > >On Mon, Feb 25, 2013 at 05:44:05PM +0100, Daniel Bratell wrote: > >>A submodule change can be merged, but only if the merge is a > >>"fast-forw

Re: Merging submodules - best merge-base

2013-03-06 Thread Heiko Voigt
On Mon, Feb 25, 2013 at 05:44:05PM +0100, Daniel Bratell wrote: > I can phrase this in two ways and I'll start with the short way: > > Why does a merge of a git submodule use as merge-base the commit that was > active in the merge-base of the parent repo, rather than the merge-base of > the tw

Re: [PATCH v6] submodule: add 'deinit' command

2013-03-05 Thread Heiko Voigt
On Tue, Mar 05, 2013 at 07:45:22AM -0800, Junio C Hamano wrote: > Heiko Voigt writes: > > >> + if test -z "$force" > >> + then > >> + git rm -n "$sm_path" || > >> +

Re: git repo on Win 2008

2013-03-05 Thread Heiko Voigt
Hi, wrong mailing list for Windows questions. This is the correct one: http://groups.google.com/group/msysgit On Mon, Mar 04, 2013 at 04:43:27PM -0700, J.V. wrote: > What is the best way to host a shared git repo on a Windows 2008 > box? I would like to create a repo on the 2008 box (that every

Re: [PATCH/RFC] Changing submodule foreach --recursive to be depth-first, --parent option to execute command in supermodule as well

2013-03-04 Thread Heiko Voigt
On Mon, Mar 04, 2013 at 03:00:45PM -0800, Junio C Hamano wrote: > So if you want a single boolean to toggle between the current > behaviour and the other one, it would be --post-order. But you may > at least want to consider pros and cons of allowing users to give > two separate commands, one for

Re: [PATCH v6] submodule: add 'deinit' command

2013-03-04 Thread Heiko Voigt
Hi, On Mon, Mar 04, 2013 at 10:20:24PM +0100, Jens Lehmann wrote: > diff --git a/git-submodule.sh b/git-submodule.sh > index 004c034..44f70c4 100755 > --- a/git-submodule.sh > +++ b/git-submodule.sh > @@ -547,6 +548,80 @@ cmd_init() > } > [...] > + > + module_list "$@" | > + while read m

Re: [PATCH 2/4] config: drop file pointer validity check in get_next_char()

2013-02-27 Thread Heiko Voigt
On Thu, Feb 28, 2013 at 01:41:47AM +0100, Heiko Voigt wrote: > On Wed, Feb 27, 2013 at 08:52:57AM +0100, Heiko Voigt wrote: > > On Tue, Feb 26, 2013 at 03:05:56PM -0500, Jeff King wrote: > > > On Tue, Feb 26, 2013 at 08:40:23PM +0100, Heiko Voigt wrote: > > > > >

Re: [PATCH 2/4] config: drop file pointer validity check in get_next_char()

2013-02-27 Thread Heiko Voigt
On Wed, Feb 27, 2013 at 08:52:57AM +0100, Heiko Voigt wrote: > On Tue, Feb 26, 2013 at 03:05:56PM -0500, Jeff King wrote: > > On Tue, Feb 26, 2013 at 08:40:23PM +0100, Heiko Voigt wrote: > > > > > The only location where cf is set in this file is in do_config_from(). >

Re: [PATCH 1/4] config: factor out config file stack management

2013-02-26 Thread Heiko Voigt
On Tue, Feb 26, 2013 at 02:12:23PM -0800, Junio C Hamano wrote: > Heiko Voigt writes: > > > The "do_config_from" means "parse from whatever is in 'top'". Later in > > the series its type changes from config_file to struct config. > > Yuck

Re: [PATCH 2/4] config: drop file pointer validity check in get_next_char()

2013-02-26 Thread Heiko Voigt
On Tue, Feb 26, 2013 at 03:05:56PM -0500, Jeff King wrote: > On Tue, Feb 26, 2013 at 08:40:23PM +0100, Heiko Voigt wrote: > > > The only location where cf is set in this file is in do_config_from(). > > This function has only one callsite which is config_from_file(). In > >

Re: [PATCH 1/4] config: factor out config file stack management

2013-02-26 Thread Heiko Voigt
On Tue, Feb 26, 2013 at 02:10:03PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > I wonder if it would be more obvious with the more usual OO-struct > > functions, like: > > > > struct config_source { > > ... > > }; > > void config_source_init_file(struct config_source *,

Re: [PATCH 1/4] config: factor out config file stack management

2013-02-26 Thread Heiko Voigt
On Tue, Feb 26, 2013 at 02:54:49PM -0500, Jeff King wrote: > On Tue, Feb 26, 2013 at 08:38:50PM +0100, Heiko Voigt wrote: > > +static int do_config_from(struct config_file *top, config_fn_t fn, void > > *data) > > +{ > > + int ret; > > + > > +

[PATCH 2/4] config: drop file pointer validity check in get_next_char()

2013-02-26 Thread Heiko Voigt
The only location where cf is set in this file is in do_config_from(). This function has only one callsite which is config_from_file(). In config_from_file() its ensured that the f member is set to non-zero. Signed-off-by: Heiko Voigt --- config.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 4/4] teach config parsing to read from strbuf

2013-02-26 Thread Heiko Voigt
This can be used to read configuration values directly from gits database. Signed-off-by: Heiko Voigt --- .gitignore | 1 + Makefile | 1 + cache.h| 1 + config.c | 47 +++ t/t1300-repo

[PATCH 3/4] config: make parsing stack struct independent from actual data source

2013-02-26 Thread Heiko Voigt
. A new source can use this to store its custom data. Signed-off-by: Heiko Voigt --- config.c | 57 - 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/config.c b/config.c index f55c43d..19aa205 100644 --- a/config.c +++ b

[PATCH 1/4] config: factor out config file stack management

2013-02-26 Thread Heiko Voigt
Because a config callback may start parsing a new file, the global context regarding the current config file is stored as a stack. Currently we only need to manage that stack from git_config_from_file. Let's factor it out to allow new sources of config data. Signed-off-by: Heiko Voigt ---

[PATCH 0/4] allow more sources for config values

2013-02-26 Thread Heiko Voigt
y for inclusion. [1] http://article.gmane.org/gmane.comp.version-control.git/217018 [2] http://article.gmane.org/gmane.comp.version-control.git/217155 Heiko Voigt (4): config: factor out config file stack management config: drop file pointer validity check in get_next_char() config: make parsing stack str

Re: [RFC/WIP PATCH 1/3] teach config parsing to read from strbuf

2013-02-25 Thread Heiko Voigt
Hi Junio, On Sun, Feb 24, 2013 at 09:54:43PM -0800, Junio C Hamano wrote: > Heiko Voigt writes: > > > diff --git a/config.c b/config.c > > index aefd80b..f995e98 100644 > > --- a/config.c > > +++ b/config.c > > @@ -13,6 +13,9 @@ > > typedef struct conf

[RFC/WIP PATCH 3/3] submodule: simplify decision tree whether to or not to fetch

2013-02-24 Thread Heiko Voigt
To make extending this logic later easier. Signed-off-by: Heiko Voigt --- submodule.c | 50 +++--- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/submodule.c b/submodule.c index b603000..a6fe16e 100644 --- a/submodule.c +++ b

[RFC/WIP PATCH 2/3] implement fetching of moved submodules

2013-02-24 Thread Heiko Voigt
using the null sha1. Signed-off-by: Heiko Voigt --- Makefile| 1 + submodule-config-cache.c| 96 ++ submodule-config-cache.h| 34 submodule.c | 196 ++-- t/t5526-fetch

[RFC/WIP PATCH 1/3] teach config parsing to read from strbuf

2013-02-24 Thread Heiko Voigt
This can be used to read configuration values directly from gits database. Signed-off-by: Heiko Voigt --- .gitignore | 1 + Makefile | 1 + cache.h| 1 + config.c | 119 ++--- t/t1300-repo

[RFC/WIP PATCH 0/3] fetch moved submodules on-demand

2013-02-24 Thread Heiko Voigt
e approach. Let me know what you think. Cheers Heiko Heiko Voigt (3): teach config parsing to read from strbuf implement fetching of moved submodules submodule: simplify decision tree whether to or not to fetch .gitignore | 1 + Makefile| 2

Re: Re: "sha1 information is lacking or useless" when rebasing with a submodule pointer conflict

2013-01-30 Thread Heiko Voigt
Hi, On Wed, Jan 30, 2013 at 10:56:15PM +0100, Heiko Voigt wrote: > On Wed, Jan 30, 2013 at 12:43:31PM -0600, Michael Sims wrote: > > I'm seeing what might be a bug that was introduced in git 1.7.12 (also > > observed in 1.8.1.2). If not a bug, it's a changed behavior f

Re: "sha1 information is lacking or useless" when rebasing with a submodule pointer conflict

2013-01-30 Thread Heiko Voigt
Hi, On Wed, Jan 30, 2013 at 12:43:31PM -0600, Michael Sims wrote: > I'm seeing what might be a bug that was introduced in git 1.7.12 (also > observed in 1.8.1.2). If not a bug, it's a changed behavior from > previous versions that I don't understand. > > Here's the scenario: > * I have a remote

Re: Re: [PATCH] Remove the suggestion to use parsecvs, which is currently broken.

2013-01-06 Thread Heiko Voigt
Hi, On Fri, Dec 28, 2012 at 11:42:00PM -0500, Eric S. Raymond wrote: > Heiko Voigt : > > Maybe you could add that information to the parsecvs compile > > instructions? I think just because it takes some effort to compile does > > not justify to remove this useful poi

Re: [PATCH] Remove the suggestion to use parsecvs, which is currently broken.

2012-12-28 Thread Heiko Voigt
Hi, On Fri, Dec 28, 2012 at 11:20:25AM -0500, Eric S. Raymond wrote: > The parsecvs code has been neglected for a long time, and the only > public version does not even build correctly. I have been handed > control of the project and intend to fix this, but until I do it > cannot be recommended.

Re: cvsps, parsecvs, svn2git and the CVS exporter mess

2012-12-23 Thread Heiko Voigt
ultiple > checkout directories. Please share so we can have a look. BTW, where can I find your cvsps code? > Anybody who is still interested in this problem should contribute > tests. Heiko Voigt, I'd particularly like you in on this. If it does not take to much effort I could p

Re: Re: Re: Re: Change in cvsps maintainership, abd a --fast-export option

2012-12-23 Thread Heiko Voigt
On Sat, Dec 22, 2012 at 09:15:19AM -0500, Eric S. Raymond wrote: > sr@snark:~/WWW/cvsps/fixrepos$ git clone http://repo.or.cz/w/cvsps-hv.git > Cloning into 'cvsps-hv'... > fatal: http://repo.or.cz/w/cvsps-hv.git/info/refs not valid: is this a git > repository? That link refers to the webpage of t

Re: Re: Re: Change in cvsps maintainership, abd a --fast-export option

2012-12-22 Thread Heiko Voigt
Hi, On Sat, Dec 22, 2012 at 01:21:18AM -0500, Eric S. Raymond wrote: > Heiko Voigt : > > Back then when I was converting some repositories to git and I also > > wrote a quick testsuite for cvsps in an attempt to fix the bugs but gave > > up. That was the point when I w

Re: Re: Change in cvsps maintainership, abd a --fast-export option

2012-12-21 Thread Heiko Voigt
Hi, On Fri, Dec 21, 2012 at 05:44:37AM -0500, Eric S. Raymond wrote: > Michael Haggerty : > > In 2009 I added tests demonstrating some of the erroneous behavior of > > git-cvsimport. The failing tests in t9601-t9603 are concrete examples > > of the problems mentioned in the manpage. > > Thanks,

Re: [PATCH v8 1/3] submodule: add get_submodule_config helper funtion

2012-12-21 Thread Heiko Voigt
On Wed, Dec 19, 2012 at 11:03:31AM -0500, wk...@tremily.us wrote: > diff --git a/git-submodule.sh b/git-submodule.sh > index 2365149..263a60c 100755 > --- a/git-submodule.sh > +++ b/git-submodule.sh > @@ -153,6 +153,32 @@ die_if_unmatched () [...] > +get_submodule_config () { > + name="$1" > +

Re: [PATCH v8 0/3] submodule update: add --remote for submodule's upstream changes

2012-12-21 Thread Heiko Voigt
Hi, On Wed, Dec 19, 2012 at 11:03:30AM -0500, wk...@tremily.us wrote: > From: "W. Trevor King" > > Comments on v7 seem to have petered out, so here's v8. Changes since > v7: > > * Series based on gitster/master instead of v1.8.0. > * In Documentation/config.txt, restored trailing line of > s

Re: Re: [PATCH] completion: add option --recurse-submodules to "git push"

2012-12-18 Thread Heiko Voigt
Hi, sorry for the late reply. On Fri, Dec 07, 2012 at 09:21:33AM -0800, Junio C Hamano wrote: > Steffen Jaeckel writes: > > > Signed-off-by: Steffen Jaeckel > > --- > > contrib/completion/git-completion.bash | 9 + > > 1 file changed, 9 insertions(+) > > > > diff --git a/contrib/compl

Re: Submodule not updated automatically on merge conflict

2012-12-17 Thread Heiko Voigt
Hi, On Thu, Dec 13, 2012 at 01:46:43PM +0800, ?A???Y wrote: > If there are merge conflict files, then changed submodules are not > updated automatically. > Why not submodules? > Files do try to merge / update. This is work in progress, currently you still have to use submodule update to get them

Re: Re: [PATCH v4 0/4] git-submodule add: Add --local-branch option

2012-11-27 Thread Heiko Voigt
Hi, On Tue, Nov 27, 2012 at 02:01:05PM -0500, W. Trevor King wrote: > On Tue, Nov 27, 2012 at 07:31:25PM +0100, Heiko Voigt wrote: > The v4 series leaves the remote branch amigious, but it helps you > point the local branch at the right hash so that future calls to > > $ git su

Re: Re: [PATCH v4 0/4] git-submodule add: Add --local-branch option

2012-11-27 Thread Heiko Voigt
Hi, I just realized that I gave you an confusing suggestion. On Tue, Nov 27, 2012 at 07:31:25PM +0100, Heiko Voigt wrote: > if test "$subsha1" != "$sha1" > then > handle_on_demand_fetch_update ... > else > handle_t

Re: [PATCH v4 3/4] git-submodule update: Add --branch option

2012-11-27 Thread Heiko Voigt
On Mon, Nov 26, 2012 at 04:00:18PM -0500, W. Trevor King wrote: > From: "W. Trevor King" > > This allows users to checkout the current > superproject-recorded-submodule-sha as a branch, avoiding the detached > head state that the standard submodule update creates. This may be > useful for the ex

Re: [PATCH v4 0/4] git-submodule add: Add --local-branch option

2012-11-27 Thread Heiko Voigt
Hi, On Mon, Nov 26, 2012 at 04:00:15PM -0500, W. Trevor King wrote: > From: "W. Trevor King" > > On Fri, Nov 23, 2012 at 12:54:02PM -0500, W. Trevor King wrote: > > We could add > > > > $ git submodule update --branch > > > > to checkout the gitlinked SHA1 as submodule..branch in each of > > t

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-23 Thread Heiko Voigt
On Tue, Nov 20, 2012 at 07:19:12AM -0500, W. Trevor King wrote: > The benefit is that Ævar's > > $ git submodule foreach 'git checkout $(git config --file > $toplevel/.gitmodules submodule.$name.branch) && git pull' > > becomes > > $ git submodule update --pull There is an important questi

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-23 Thread Heiko Voigt
On Tue, Nov 20, 2012 at 11:52:46AM -0800, Junio C Hamano wrote: > "W. Trevor King" writes: > > > The superproject gitlink should only be updated after > > > > $ git submodule update --pull > > > > A plain > > > > $ git submodule update > > > > would still checkout the previously-recorded SHA,

Re: git bash does not access drive f:

2012-11-23 Thread Heiko Voigt
Hi, On Thu, Nov 22, 2012 at 08:07:55AM +0100, Angelo Borsotti wrote: > I have attached an external disc, which appears on Windows as drive f: > in Windows Explorer. > Right-clicking on it displays a context menu showing (among other > items) Git Init Here, Git Gui and > Git Bash. The first two wor

Re: Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-17 Thread Heiko Voigt
On Sat, Nov 17, 2012 at 02:20:27PM -0500, W. Trevor King wrote: > On Sat, Nov 17, 2012 at 04:30:07PM +0100, Heiko Voigt wrote: > > > > (2) "git diff [$path]" and friends in the superproject compares the > > > > HEAD of thecheckout of the submodule at $

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-17 Thread Heiko Voigt
Hi, On Sun, Nov 11, 2012 at 10:00:48AM -0500, W. Trevor King wrote: > On Sun, Nov 11, 2012 at 02:33:45AM -0800, Junio C Hamano wrote: > In order to avoid losing (or creating) local-only submodule commits, > I'll probably bail (with an error) on non-fast-forward pulls. Can > anyone else think of o

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-17 Thread Heiko Voigt
Hi, sorry for the late reply but my git time is limited. On Sat, Nov 10, 2012 at 02:02:32PM -0500, W. Trevor King wrote: > On Fri, Nov 09, 2012 at 05:29:27PM +0100, Heiko Voigt wrote: > > I think we should agree on a behavior for this option and implement it > > the same time

[PATCH 3/3] fix corner case for relative submodule path calculation

2012-11-13 Thread Heiko Voigt
A trailing /. for the superprojects origin is treated as a full path component. This is wrong. Lets add a test and fix this. Signed-off-by: Heiko Voigt --- git-submodule.sh | 22 ++ t/t7400-submodule-basic.sh | 44 2

[PATCH 2/3] ensure that relative submodule url needs ./ or ../

2012-11-13 Thread Heiko Voigt
Even though a relative path can be without them the documentation explicitely talks about them. Lets ensure that behavior with a test. Signed-off-by: Heiko Voigt --- t/t7400-submodule-basic.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t7400-submodule-basic.sh b/t/t7400

[PATCH 1/3] Fix relative submodule setup of submodule tests

2012-11-13 Thread Heiko Voigt
to correct these tests. Later tests expect the submodules origin to be in a directory underneath the tests root. Lets remove the origin from super (which points directly at the tests root directory) to keep these tests expectations. Signed-off-by: Heiko Voigt --- t/t7403-submodule-sync.sh| 2 +

[PATCH 0/3] fix cloning superprojects from "."

2012-11-13 Thread Heiko Voigt
Hi, On Fri, Nov 09, 2012 at 07:42:26PM +0100, Heiko Voigt wrote: > Since this is a change in behaviour I would like to further think about > the implications this brings if we fix this. Not sure how many people > clone from ".". The correct behavior (as documented) is the one y

Re: git commit/push can fail silently when clone omits ".git"

2012-11-09 Thread Heiko Voigt
Hi, On Thu, Nov 08, 2012 at 01:56:43PM -0500, Jeff King wrote: > Unfortunately, the patch below which does that seems to make t7407 very > unhappy. It looks like the submodule test uses "git clone ." and > "git-submodule add" expects the "/." to still be at the end of the > configured URL when pro

Re: [PATCH v3 2/3] git-submodule foreach: export .gitmodules settings as variables

2012-11-09 Thread Heiko Voigt
Hi, On Thu, Nov 08, 2012 at 10:35:13PM -0500, W. Trevor King wrote: > From: "W. Trevor King" > > This makes it easy to access per-submodule variables. For example, > > git submodule foreach 'git checkout $(git config --file > $toplevel/.gitmodules submodule.$name.branch) && git pull' > > c

Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-09 Thread Heiko Voigt
Hi, On Thu, Nov 08, 2012 at 11:34:54PM -0800, Junio C Hamano wrote: > "W. Trevor King" writes: > > > By remaining agnostic on the variable usage, this patch makes > > submodule setup more convenient for all parties. > > I personally do not think "remaining agnostic on the usage" is a > good thi

Re: why '--init' in git-submodule update

2012-11-05 Thread Heiko Voigt
Hi, On Mon, Nov 05, 2012 at 05:30:51PM +0100, Francis Moreau wrote: > I'm wondering why the --init option from git-submodule-update is not > at least the defaut. Or even wilder, why this option exists at all and > git-submodule-update always behave like --init was always passed. That was a design

Re: [PATCH] help: correct behavior for is_executable on Windows

2012-08-16 Thread Heiko Voigt
Hi Junio, On Wed, Aug 15, 2012 at 07:02:31PM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > My preference is to remove "static int is_executable()" function > > from help.c, have an... > > ... I wouldn't mind seeing the implementation of posix_is_executable() > > in help.c, which wi

Re: [PATCH] help: correct behavior for is_executable on Windows

2012-08-15 Thread Heiko Voigt
Hi Junio, On Wed, Aug 15, 2012 at 10:53:55AM -0700, Junio C Hamano wrote: > Heiko Voigt writes: > > > On Mon, Aug 13, 2012 at 10:48:14AM -0700, Junio C Hamano wrote: > >> Heiko Voigt writes: > >> > What do you think? > >> > >> Does having the

[PATCH v2] add some bash style we prefer

2012-08-15 Thread Heiko Voigt
During discussion of other patches these preferences have been revealed. Lets add them to the guidelines. Signed-off-by: Heiko Voigt --- Here an updated version of the patch. On Tue, Aug 14, 2012 at 02:09:35PM -0700, Junio C Hamano wrote: > Heiko Voigt writes: > > @@ -97,6 +102,7 @@

Re: [PATCH] help: correct behavior for is_executable on Windows

2012-08-15 Thread Heiko Voigt
Hi Junio, On Mon, Aug 13, 2012 at 10:48:14AM -0700, Junio C Hamano wrote: > Heiko Voigt writes: > > What do you think? > > Does having the "stat()" help on Windows in any way? Does it ever > return an executable bit by itself? No, AFAIK it does not return anythin

[PATCH] Document bash style we prefer for if and functions

2012-08-14 Thread Heiko Voigt
During discussion of other patches these preferences have been revealed. Lets add them to the guidelines. Signed-off-by: Heiko Voigt --- Documentation/CodingGuidelines | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index

[PATCH v3] Let submodule command exit with error status if path does not exist

2012-08-14 Thread Heiko Voigt
the special tag '#unmatched'. This is then used by all reader from module_list to die with an error code. The error message that there is an unmatched pathspec comes through stderr directly from ls-files. So the user still gets a hint whats going on. Signed-off-by: Heiko Voigt --- Hi Ju

Re: [PATCH] help: correct behavior for is_executable on Windows

2012-08-13 Thread Heiko Voigt
On Sat, Aug 11, 2012 at 09:30:06PM -0700, Junio C Hamano wrote: > Heiko Voigt writes: > > > help.c | 15 --- > > 1 file changed, 12 insertions(+), 3 deletions(-) > > > > diff --git a/help.c b/help.c > > index 662349d..b41fa21 100644 > > --

Re: [PATCH v2] Let submodule command exit with error status if path does not exist

2012-08-13 Thread Heiko Voigt
Hi Junio, thanks for such a thorough review. On Sat, Aug 11, 2012 at 10:43:22PM -0700, Junio C Hamano wrote: > Heiko Voigt writes: > > > I did not know that you prefer a space after the function name. I simply > > imitated the style from C and there we do not have sp

[PATCH] help: correct behavior for is_executable on Windows

2012-08-11 Thread Heiko Voigt
after restart. Signed-off-by: Heiko Voigt --- help.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/help.c b/help.c index 662349d..b41fa21 100644 --- a/help.c +++ b/help.c @@ -103,10 +103,19 @@ static int is_executable(const char *name) return 0

[PATCH v2] Let submodule command exit with error status if path does not exist

2012-08-10 Thread Heiko Voigt
checks for such a submodule specification, exits with 1 and the exit code is propagated. Signed-off-by: Heiko Voigt --- On Thu, Aug 09, 2012 at 01:42:20PM -0700, Junio C Hamano wrote: > Heiko Voigt writes: > A plausible hack, assuming all the problematic readers of the pipe > are of

[PATCH] Let submodule command exit with error status if path does not exist

2012-08-09 Thread Heiko Voigt
piped commands are run in parallel the status code of module_list was swallowed. We work around this by introducing a new function module_list_valid which is used to check the leftover commandline parameters passed to module_list. Signed-off-by: Heiko Voigt --- git-submodule.sh | 19

[PATCH v2] link_alt_odb_entry: fix read over array bounds reported by valgrind

2012-07-30 Thread Heiko Voigt
pfxlen can be longer than the path in objdir when relative_base contains the path to Git's object directory. Signed-off-by: Heiko Voigt --- On Sun, Jul 29, 2012 at 05:54:02PM -0700, Junio C Hamano wrote: > Heiko Voigt writes: > > > pfxlen can be longer than the pa

Re: Bug: Recursive submodules fail when the repo path contains spaces

2012-07-28 Thread Heiko Voigt
On Tue, Jul 24, 2012 at 01:33:44PM -0700, Justin Spahr-Summers wrote: > Here's some real output, with a couple specific names removed, starting from > the root of the top-level repository (where External/twui is a submodule): > > $ cd External/twui > $ git submodule add git://github.com/petejkim/

[PATCH] link_alt_odb_entry: fix read over array bounds reported by valgrind

2012-07-28 Thread Heiko Voigt
pfxlen can be longer than the path in objdir when relative_base contains the path to gits object directory. Signed-off-by: Heiko Voigt --- sha1_file.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index 4ccaf7a..631d0dd 100644 --- a

Re: t1450-fsck (sometimes/often) failes on Mac OS X

2012-07-28 Thread Heiko Voigt
Hi, just to verify that this is unlikely just a hardware issue on one machine. I today experienced this failure on master as well. On Mon, Jul 16, 2012 at 06:06:26PM +0200, Torsten B?gershausen wrote: > > Am 16.07.2012 um 09:57 schrieb Thomas Rast: > > > Torsten Bögershausen writes: > > What O

[PATCH] cleanup argument passing in submodule status command

2012-07-28 Thread Heiko Voigt
everything was already behaving as expected. Signed-off-by: Heiko Voigt --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-submodule.sh b/git-submodule.sh index dba4d39..3a3f0a4 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -961,7 +961,7 @@

Re: [PATCH] Enable parallelism in git submodule update.

2012-07-28 Thread Heiko Voigt
Hi, On Fri, Jul 27, 2012 at 04:25:58PM -0700, Junio C Hamano wrote: > Stefan Zager writes: > > > On Fri, Jul 27, 2012 at 2:38 PM, Junio C Hamano wrote: > > > >> Stefan Zager writes: > >> > >> > + module_list "$@" | awk '{print $4}' | xargs -L 1 -P > >> "$jobs" git submodule update

Re: [PATCH] Enable parallelism in git submodule update.

2012-07-28 Thread Heiko Voigt
Hi Stefan, neat patch. See below for a few notes. On Fri, Jul 27, 2012 at 11:37:34AM -0700, Stefan Zager wrote: > diff --git a/git-submodule.sh b/git-submodule.sh > index dba4d39..761420a 100755 > --- a/git-submodule.sh > +++ b/git-submodule.sh > @@ -491,6 +492,20 @@ cmd_update() >

Re: The GitTogether

2012-07-26 Thread Heiko Voigt
Hi Scott, On Thu, Jul 26, 2012 at 03:28:00PM -0700, Scott Chacon wrote: > For those of you who *have* been to a GitTogether, what did you find > useful and/or useless about it? What did you get out of it and would > like to see again? For those of you who have never been, what do you > think wou

<    1   2   3   4