[PATCH v10 09/15] contrib: related: add support for more roles

2013-10-12 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/related/git-related| 14 -- contrib/related/test-related.t | 8 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/contrib/related/git-related b/contrib/related/git-related index 04c56f5..f94f5f4 100755 --- a

[PATCH 13/20] transport-helper: trivial style fix

2013-10-12 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- transport-helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/transport-helper.c b/transport-helper.c index b32e2d6..673b7c2 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -269,6 +269,7 @@ static const char *unsupported_options

[PATCH try2 08/14] submodule: add --staged options

2013-10-12 Thread Felipe Contreras
Synonym for --cached. Signed-off-by: Felipe Contreras --- Documentation/git-submodule.txt | 8 ++-- git-submodule.sh| 10 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index

[PATCH v3 07/10] fast-import: add support to delete refs

2013-10-12 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Documentation/git-fast-import.txt | 3 +++ fast-import.c | 13 ++--- t/t9300-fast-import.sh| 18 ++ 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/Documentation/git-fast-import.txt b

[PATCH try2 12/14] reset: add --stage and --work options

2013-10-12 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Documentation/git-reset.txt | 8 builtin/reset.c | 20 2 files changed, 28 insertions(+) diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt index f445cb3..5cd75a8 100644 --- a/Documentation/git

[PATCH try2 01/14] Add proper 'stage' command

2013-10-12 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Documentation/git-stage.txt| 45 + Makefile | 2 +- builtin.h | 1 + builtin/stage.c| 52 ++ contrib

[PATCH try2 02/14] stage: add edit command

2013-10-12 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Documentation/git-stage.txt| 5 +++ builtin/stage.c| 74 ++ contrib/completion/git-completion.bash | 4 +- 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/Documentation/git

[PATCH try2 11/14] completion: update --staged options

2013-10-12 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 2b81e78..1dde51f 100644 --- a/contrib/completion/git

[PATCH try2 07/14] stash: add --stage to pop and apply

2013-10-12 Thread Felipe Contreras
Synonym of --index. Signed-off-by: Felipe Contreras --- Documentation/git-stash.txt | 8 git-stash.sh| 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 75b4cc6..b4066fd 100644 --- a

[PATCH v3 05/10] fast-export: add new --refspec option

2013-10-12 Thread Felipe Contreras
So that we can covert the exported ref names. Signed-off-by: Felipe Contreras --- Documentation/git-fast-export.txt | 4 builtin/fast-export.c | 30 ++ t/t9350-fast-export.sh| 7 +++ 3 files changed, 41 insertions(+) diff --git a

[PATCH try2 04/14] grep: add --staged option

2013-10-12 Thread Felipe Contreras
Synonym for --cached. Signed-off-by: Felipe Contreras --- Documentation/git-grep.txt | 5 - builtin/grep.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index 8497aa4..9f7899c 100644 --- a

[PATCH try2 06/14] stash: add --stage option to save

2013-10-12 Thread Felipe Contreras
--no-stage is synonym for --keep-index. Signed-off-by: Felipe Contreras --- Documentation/git-stash.txt | 6 +++--- git-stash.sh| 8 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index db7e803

[PATCH v3 01/10] transport-helper: add 'force' to 'export' helpers

2013-10-12 Thread Felipe Contreras
Otherwise they cannot know when to force the push or not (other than hacks). Signed-off-by: Felipe Contreras --- transport-helper.c | 5 + 1 file changed, 5 insertions(+) diff --git a/transport-helper.c b/transport-helper.c index 63cabc3..cd913af 100644 --- a/transport-helper.c +++ b

[PATCH v3 08/10] fast-export: add support to delete refs

2013-10-12 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- builtin/fast-export.c | 14 ++ t/t9350-fast-export.sh | 11 +++ 2 files changed, 25 insertions(+) diff --git a/builtin/fast-export.c b/builtin/fast-export.c index 7f314f0..9b728ca 100644 --- a/builtin/fast-export.c +++ b/builtin/fast

[PATCH v3 10/10] transport-helper: don't update refs in dry-run

2013-10-12 Thread Felipe Contreras
The remote helper namespace should not be updated. Signed-off-by: Felipe Contreras --- transport-helper.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/transport-helper.c b/transport-helper.c index ddb3309..d94eaf4 100644 --- a/transport-helper.c +++ b/transport

[PATCH try2 05/14] rm: add --staged option

2013-10-12 Thread Felipe Contreras
Synonym for --cached. Signed-off-by: Felipe Contreras --- Documentation/git-rm.txt | 5 - builtin/rm.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/git-rm.txt b/Documentation/git-rm.txt index 1d876c2..156b40d 100644 --- a/Documentation/git

[PATCH v3 00/10] transport-helper: updates

2013-10-12 Thread Felipe Contreras
does not support 'force'", data->name); + } helper = get_helper(transport); Felipe Contreras (10): transport-helper: add 'force' to 'export' helpers transport-helper: fix extra lines transport-helper: check for 'forced update' message

[PATCH try2 13/14] reset: allow --keep with --stage

2013-10-12 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Documentation/git-reset.txt | 2 +- builtin/reset.c | 13 ++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt index 5cd75a8..a1419c9 100644 --- a/Documentation/git

[PATCH v3 09/10] transport-helper: add support to delete branches

2013-10-12 Thread Felipe Contreras
For remote-helpers that use 'export' to push. Signed-off-by: Felipe Contreras --- t/t5801-remote-helpers.sh | 8 transport-helper.c| 8 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh ind

[PATCH v3 02/10] transport-helper: fix extra lines

2013-10-12 Thread Felipe Contreras
Commit 9c51558 (transport-helper: trivial code shuffle) moved these lines above, but 99d9ec0 (Merge branch 'fc/transport-helper-no-refspec') had a wrong merge conflict and readded them. Reported-by: Richard Hansen Signed-off-by: Felipe Contreras --- transport-helper.c | 3 --- 1 fi

[PATCH try2 00/14] Officially start moving to the term 'staging area'

2013-10-12 Thread Felipe Contreras
C C --stage B C C --work C C C It might be possible to do 'git reset --no-stage --work', to reset the working directory, but leave the staging area alone. For more reference about the previous

[PATCH v3] Add core.mode configuration

2013-10-12 Thread Felipe Contreras
So that we can specify general modes of operation, specifically, add the 'next' mode, which makes Git pre v2.0 behave as Git v2.0. Signed-off-by: Felipe Contreras --- builtin/add.c | 13 cache.h| 6 ++ config.c | 13 env

[PATCH v2 5/5] remote-helpers: add exec-path links

2013-10-12 Thread Felipe Contreras
This way we don't have to modify the PATH ourselves and it's easier to test without 'make'. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/Makefile | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/remote-helpers/Makefile b/co

[PATCH try2 14/14] completion: update 'git reset' new stage options

2013-10-12 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 1dde51f..082f207 100644 --- a/contrib/completion/git

[PATCH v2 4/5] remote-helpers: allow direct test execution

2013-10-12 Thread Felipe Contreras
Previously 'make' was the only option, or manually specifying the 'TEST_DIRECTORY'. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/Makefile | 1 + contrib/remote-helpers/test-bzr.t | 3 ++- contrib/remote-helpers/test-hg-bidi.t | 3 ++- contrib/re

[PATCH v2 0/5] remote-helpers: test reorganization

2013-10-12 Thread Felipe Contreras
Now we use PYTHON_PATH properly, and also we are able to do: make -C contrib/remote-helpers install Felipe Contreras (5): remote-helpers: generate scripts build: fix installation of scripts remote-helpers: rename tests remote-helpers: allow direct test execution remote-helpers: add

[PATCH v3 try2] build: add default aliases

2013-10-12 Thread Felipe Contreras
For now simply add a few common aliases. co = checkout ci = commit rb = rebase st = status Signed-off-by: Felipe Contreras --- Documentation/git-checkout.txt | 5 + Documentation/git-commit.txt | 5 + Documentation/git-rebase.txt | 5 + Documentation/git-status.txt

[PATCH v2 2/5] build: fix installation of scripts

2013-10-12 Thread Felipe Contreras
They need the gitexecdir. Signed-off-by: Felipe Contreras --- Makefile | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 3588ca1..e51b92e 100644 --- a/Makefile +++ b/Makefile @@ -511,12 +511,14 @@ build-perl-script: $(SCRIPT_PERL_GEN

[PATCH v4 3/7] pull: add --merge option

2013-10-12 Thread Felipe Contreras
Also, deprecate --no-rebase since there's no need for it any more. Signed-off-by: Felipe Contreras --- Documentation/git-pull.txt | 8 ++-- git-pull.sh| 6 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Documentation/git-pull.txt b/Documentatio

[PATCH v4 1/7] pull: rename pull.rename to pull.mode

2013-10-12 Thread Felipe Contreras
Also 'branch..rebase' to 'branch..pullmode'. This way 'pull.mode' can be set to 'merge', and the default can be something else. The old configurations still work, but get deprecated. Signed-off-by: Felipe Contreras --- Documentation/config.txt | 22 +

[PATCH v4 7/7] pull: add documentation about non-ff merges

2013-10-12 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Documentation/git-pull.txt | 18 ++ 1 file changed, 18 insertions(+) diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index 6d55737..b4053a8 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -23,6

[PATCH v4 0/7] Reject non-ff pulls by default

2013-10-12 Thread Felipe Contreras
echo "$(gettext "warning: the pull was not fast-forward, in the future you would have to choose a merge or a rebase, falling back to old style for now (git pull --merge). -Read 'git pull --help' for more information." +Read 'git pull --help' for mor

[PATCH v4 6/7] pull: cleanup documentation

2013-10-12 Thread Felipe Contreras
'origin/master' is very clear, no need to specify the 'remotes/' prefix, or babysit the user. Signed-off-by: Felipe Contreras --- Documentation/git-pull.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-pull.txt b/Documentatio

[PATCH v4 4/7] pull: add merge-ff-only option

2013-10-12 Thread Felipe Contreras
ode = merge-ff-only. Later on this mode can be enabled by default (e.g. in v2.0). For the full discussion you can read: http://thread.gmane.org/gmane.comp.version-control.git/225146/focus=225305 Signed-off-by: Felipe Contreras --- Documentation/config.txt | 8 +--- git-pull.sh

[PATCH v4 5/7] pull: add warning on non-ff merges

2013-10-12 Thread Felipe Contreras
omes, they know what to type without interrupting or changing their workflow. Signed-off-by: Felipe Contreras --- git-pull.sh | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/git-pull.sh b/git-pull.sh index 6e6b887..d1b07d8 100755 --- a/git-pull.sh +++ b/git-pull.s

[PATCH v4 2/7] pull: refactor $rebase variable into $mode

2013-10-12 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- git-pull.sh | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/git-pull.sh b/git-pull.sh index 8363647..f53d193 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -48,8 +48,7 @@ if test -z "$mode" then

[PATCH try2 2/2] branch: reorganize verbose options

2013-10-12 Thread Felipe Contreras
Showing the upstream tracking branch is more important than how many commits are ahead/behind, so now 'git branch -v' shows the upstream, but not the tracking info, and 'git branch -vv' shows all information (as before). Signed-off-by: Felipe Contreras --- builtin/b

[PATCH try2 0/2] branch: improve verbose option

2013-10-12 Thread Felipe Contreras
ld be easy to revert if needed. Felipe Contreras (2): branch: trivial cleanup branch: reorganize verbose options builtin/branch.c | 33 +++-- t/t6040-tracking-info.sh | 8 2 files changed, 19 insertions(+), 22 deletions(-) -- 1.8.4-fc -- To unsubs

[PATCH try2 1/2] branch: trivial cleanup

2013-10-12 Thread Felipe Contreras
No functional changes. Signed-off-by: Felipe Contreras --- builtin/branch.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index 0836890..ac17b18 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -425,16 +425,15

Re: [PATCH v3 1/5] pull: rename pull.rename to pull.mode

2013-10-11 Thread Felipe Contreras
On Fri, Oct 11, 2013 at 11:40 PM, Richard Hansen wrote: > On 2013-10-11 22:08, Felipe Contreras wrote: >> I'm fine with 'echo "warning: foo" >&2', but still, if you really >> cared about consistency, there would be a warn() function > > So

Re: [PATCH v3 1/5] pull: rename pull.rename to pull.mode

2013-10-11 Thread Felipe Contreras
On Fri, Oct 11, 2013 at 8:25 PM, Jeff King wrote: > On Fri, Oct 11, 2013 at 08:15:46PM -0500, Felipe Contreras wrote: > >> >> You are free to go ahead and implement 'warning ()' in git-sh-setup.sh, >> >> in the >> >> meantime no shell s

Re: [PATCH v3 1/5] pull: rename pull.rename to pull.mode

2013-10-11 Thread Felipe Contreras
On Fri, Oct 11, 2013 at 7:50 PM, Jeff King wrote: > On Fri, Oct 11, 2013 at 06:56:23PM -0500, Felipe Contreras wrote: > >> > >>> > These deprecation warning messages should be written to stderr, and >> > >>> > should probably be prefixed

Re: [PATCH v3 1/5] pull: rename pull.rename to pull.mode

2013-10-11 Thread Felipe Contreras
Matthieu Moy wrote: > Felipe Contreras writes: > > > On Mon, Sep 9, 2013 at 9:21 PM, Jeff King wrote: > >> On Mon, Sep 09, 2013 at 05:49:36PM -0500, Felipe Contreras wrote: > >> > >>> > These deprecation warning messages should be written to stderr,

Re: [PATCH v3 1/5] pull: rename pull.rename to pull.mode

2013-10-11 Thread Felipe Contreras
Richard Hansen wrote: > On 2013-09-09 18:49, Felipe Contreras wrote: > > On Mon, Sep 9, 2013 at 4:23 PM, Richard Hansen wrote: > >> On 2013-09-08 21:23, Felipe Contreras wrote: > >>> The old configurations still work, but get deprecated. > >> > >>

Re: [ANNOUNCE] git-related-0.1

2013-10-10 Thread Felipe Contreras
On Thu, Oct 10, 2013 at 5:24 PM, Andrew Ardill wrote: > On 11 October 2013 08:43, Felipe Contreras wrote: >> After gathering all the relevant >> people, it groups them to show what exactly was their role when the >> participated in the development of the relevant commi

Re: [ANNOUNCE] git-related-0.1

2013-10-10 Thread Felipe Contreras
On Thu, Oct 10, 2013 at 4:43 PM, Felipe Contreras wrote: > Just put git-related in your PATH, and enjoy :) And of course I forgot the link: https://github.com/felipec/git-related -- Felipe Contreras -- To unsubscribe from this list: send the line "unsubscribe git" in the body of

[ANNOUNCE] git-related-0.1

2013-10-10 Thread Felipe Contreras
master..fc/transport/improv Junio C Hamano (signer: 90%, author: 5%) Felipe Contreras (author: 25%, reviewer: 2%) Sverre Rabbelier (author: 17%, acker: 2%, signer: 7%) Jeff King (acker: 17%, author: 10%) Shawn O. Pearce (author: 5%, signer: 2%, cced: 2%) Elijah Newren (author: 10

[PATCH] build: fix installation of scripts

2013-09-29 Thread Felipe Contreras
They need the gitexecdir. Signed-off-by: Felipe Contreras --- Otherwise this makes it difficult to package contrib scripts in certain distributions. For example, if you have a proper Makefile in contrib: --- TESTS := $(wildcard test*.sh) SCRIPTS := $(wildcard git-remote-*.py) export T

Re: [PATCH] Makefile: suppress false positive warnings of empty format string.

2013-09-29 Thread Felipe Contreras
an gcc, but perhaps we can do what Linux does: cc-disable-warning = $(call try-run,\ $(CC) $(CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) CFLAGS = -g -O2 -Wall $(call cc-disable-warning,format-zero-length,) -- Felipe Contreras -- To unsubscribe from this

Re: [PATCH v2 13/44] ruby: bind setup_git_directory()

2013-09-28 Thread Felipe Contreras
On Sun, Sep 29, 2013 at 12:11 AM, Ramkumar Ramachandra wrote: > Felipe Contreras wrote: >> +static inline VALUE cstr_to_str(const char *str) >> +{ >> + if (str == NULL) >> + return Qnil; >> + return rb_str_new2(str); >> +} >>

Re: [PATCH v2 14/44] ruby: bind dwim_ref()

2013-09-28 Thread Felipe Contreras
On Sun, Sep 29, 2013 at 12:17 AM, Ramkumar Ramachandra wrote: > Felipe Contreras wrote: >> static void git_ruby_init(void) >> { >> rb_define_global_function("setup_git_directory", >> git_rb_setup_git_directory, 0); >>

Re: [PATCH v2 02/44] ruby: add support for internal ruby programs

2013-09-28 Thread Felipe Contreras
On Sat, Sep 28, 2013 at 11:56 PM, Felipe Contreras wrote: > On Sat, Sep 28, 2013 at 11:40 PM, Ramkumar Ramachandra >>> diff --git a/ruby.c b/ruby.c >>> index ee6a0e7..339e376 100644 >>> --- a/ruby.c >>> +++ b/ruby.c >>> @@ -52,5 +52,22 @@ stati

Re: [PATCH v2 02/44] ruby: add support for internal ruby programs

2013-09-28 Thread Felipe Contreras
On Sat, Sep 28, 2013 at 11:40 PM, Ramkumar Ramachandra wrote: > Felipe Contreras wrote: >> +$(RUBY_PROGRAMS): git-ruby$X >> + $(QUIET_BUILT_IN)$(RM) $@ && \ >> + ln >lt; $@ 2>/dev/null || \ >> + ln -s >lt; $@ 2>/dev/null || \ >&g

Re: [PATCH v2 01/44] Add support for ruby commands

2013-09-28 Thread Felipe Contreras
On Sat, Sep 28, 2013 at 11:30 PM, Ramkumar Ramachandra wrote: > Felipe Contreras wrote: >> +test_expect_success 'argument passing' ' >> + cat > script <<-"EOF" && >> + p($0) >> + p(ARGV) >> + E

Re: [PATCH v2 00/44] Ruby support

2013-09-28 Thread Felipe Contreras
On Sat, Sep 28, 2013 at 11:13 PM, Ramkumar Ramachandra wrote: > Felipe Contreras wrote: >> Felipe Contreras (44): > > Thanks! In the meantime, can you publish this work somewhere so we can > easily try it out? Sure: https://github.com/felipec/git/commits/fc/ruby -- Feli

Re: [PATCH v3] build: add default aliases

2013-09-28 Thread Felipe Contreras
On Sat, Sep 28, 2013 at 10:18 PM, Michael Haggerty wrote: > On 09/29/2013 12:41 AM, Felipe Contreras wrote: >> On Tue, Sep 24, 2013 at 1:39 PM, Jonathan Nieder wrote: >>>> On Sat, Sep 21, 2013 at 02:20:21PM -0500, Felipe Contreras wrote: >>>>> For

Re: [PATCH v2 42/44] ruby: remove GIT_PAGER from environment

2013-09-28 Thread Felipe Contreras
On Sat, Sep 28, 2013 at 6:27 PM, Stefan Beller wrote: > On 09/29/2013 12:04 AM, Felipe Contreras wrote: >> We are not calling any git commands any more. >> >> Signed-off-by: Felipe Contreras >> --- >> git-request-pull.rb | 2 -- >> 1 file changed, 2 dele

Re: [PATCH/RFC 0/7] Support for Ruby

2013-09-28 Thread Felipe Contreras
On Sat, Sep 21, 2013 at 6:56 PM, brian m. carlson wrote: > On Sat, Sep 21, 2013 at 05:52:05PM -0500, Felipe Contreras wrote: >> On Sat, Sep 21, 2013 at 4:29 PM, brian m. carlson >> wrote: >> Now, if anybody has ideas into how the bindings could be more object >>

Re: [PATCH/RFC 0/7] Support for Ruby

2013-09-28 Thread Felipe Contreras
onal languages, some previous warning > would be appropriate. As I said, I wouldn't be able to deploy a git > using Ruby immediately, and I'm sure I'm not the only one. If we're not > going to be adding another language, then obviously the issue becomes > moot. You

Re: [PATCH/RFC 0/7] Support for Ruby

2013-09-28 Thread Felipe Contreras
On Mon, Sep 23, 2013 at 1:17 PM, Felipe Contreras wrote: > Junio C Hamano wrote: >> In other words, now the Git user and developer community are strong >> and thriving, >> we should strive to make the core smaller, not larger, and encourage people >> to >> form

Re: [PATCH v3] build: add default aliases

2013-09-28 Thread Felipe Contreras
On Tue, Sep 24, 2013 at 1:39 PM, Jonathan Nieder wrote: > Jeff King wrote: >> On Sat, Sep 21, 2013 at 02:20:21PM -0500, Felipe Contreras wrote: > >>> For now simply add a few common aliases. >>> >>> co = checkout >>> ci = commit >>>

[PATCH v2 44/44] request-pull: rewrite to C

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Makefile | 3 +- builtin.h | 1 + builtin/request-pull.c | 275 + git-request-pull.rb| 199 --- git.c | 1 + 5 files changed

[PATCH v2 33/44] shortlog: add missing declaration

2013-09-28 Thread Felipe Contreras
Otherwise we would have to include commit.h. Signed-off-by: Felipe Contreras --- shortlog.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shortlog.h b/shortlog.h index de4f86f..54bc07c 100644 --- a/shortlog.h +++ b/shortlog.h @@ -19,6 +19,8 @@ struct shortlog { struct

[PATCH v2 42/44] ruby: remove GIT_PAGER from environment

2013-09-28 Thread Felipe Contreras
We are not calling any git commands any more. Signed-off-by: Felipe Contreras --- git-request-pull.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/git-request-pull.rb b/git-request-pull.rb index fde8d1a..941ff72 100755 --- a/git-request-pull.rb +++ b/git-request-pull.rb @@ -2,8 +2,6

[PATCH v2 29/44] ruby: request-pull: use native commit info

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: We could use a bit more of the internal parsing in C, or we could export more, but there's no need to, parse_buffer() is relatively simple in Ruby. git-request-pull.rb | 47 +-- 1 file change

[PATCH v2 21/44] ruby: request-pull: use get_sha1()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: To minimize the changes in the rest of the script, the sha1 is converted by to a hex. git-request-pull.rb | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/git-request-pull.rb b/git-request-pull.rb index 25dc04d

[PATCH v2 23/44] ruby: bind get_merge_bases()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: We could call it get_merge_bases_many(), but the fact that it's awkward to pass arrays in C is a limitation we don't have in Ruby. We can pass as many commits as we want easily. ruby.c | 36 ++

[PATCH v2 34/44] shortlog: split builtin from common code

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: Somebody forgot to do this. Makefile | 1 + builtin/shortlog.c | 184 + shortlog.c | 181 shortlog.h | 6 ++ 4

[PATCH v2 38/44] ruby: bind diff_tree_sha1()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- ruby.c | 12 1 file changed, 12 insertions(+) diff --git a/ruby.c b/ruby.c index d59aafd..b491754 100644 --- a/ruby.c +++ b/ruby.c @@ -360,6 +360,17 @@ static VALUE git_rb_shortlog(VALUE self, VALUE commits) return Qnil; } +static

[PATCH v2 27/44] ruby: request-pull: use native remote and transport

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- git-request-pull.rb | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/git-request-pull.rb b/git-request-pull.rb index 79a26dc..869f160 100755 --- a/git-request-pull.rb +++ b/git-request-pull.rb @@ -45,16 +45,15

[PATCH v2 37/44] ruby: request-pull: use shortlog()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- git-request-pull.rb | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/git-request-pull.rb b/git-request-pull.rb index 233981f..0db64c3 100755 --- a/git-request-pull.rb +++ b/git-request-pull.rb @@ -79,6 +79,11 @@ def parse_buffer(buffer

[PATCH v2 41/44] ruby: request-pull: remove rescue block

2013-09-28 Thread Felipe Contreras
We are not calling any git commands any more. Signed-off-by: Felipe Contreras --- git-request-pull.rb | 61 - 1 file changed, 27 insertions(+), 34 deletions(-) diff --git a/git-request-pull.rb b/git-request-pull.rb index e884d0d..fde8d1a

[PATCH v2 39/44] ruby: bind log_tree_diff_flush()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- ruby.c | 12 1 file changed, 12 insertions(+) diff --git a/ruby.c b/ruby.c index b491754..71d5cb6 100644 --- a/ruby.c +++ b/ruby.c @@ -8,6 +8,7 @@ #include "revision.h" #include "diff.h" #include "shortlog.h" +#

[PATCH v2 22/44] ruby: add Commit class

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: The Commit class inherits from the Object class, so commit.sha1() just works, even though it's an Object method. For now we don't define initializers or allocators, so Git::Commit.new() cannot really be used, but it&#x

[PATCH v2 35/44] ruby: add RevInfo and DiffOptions

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: This time we use an initializer and alloc function, so we could do: ri = Git::RevInfo.new() ri.setup(args) Or: ri = Git::RevInfo.setup(args) The effect is the same. Also, we use the extremely

[PATCH v2 32/44] revision: add missing include

2013-09-28 Thread Felipe Contreras
Otherwise we might not have 'struct diff_options'. Signed-off-by: Felipe Contreras --- revision.h | 1 + 1 file changed, 1 insertion(+) diff --git a/revision.h b/revision.h index 95859ba..4aa5c5a 100644 --- a/revision.h +++ b/revision.h @@ -5,6 +5,7 @@ #include "grep.h"

[PATCH v2 43/44] ruby: add simpler option parser

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: We could use Git's internap parseopt, but the resulting code in Ruby wouldn't look very good, and the complexity to bind it wouldn't be trivial either (I tried). Instead, let's use the advantage of Ruby blocks

[PATCH v2 36/44] ruby: bind shortlog()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: There's no need to bind all the shortlog functions, we can easily pass all the commits we want in Ruby. ruby.c | 17 + 1 file changed, 17 insertions(+) diff --git a/ruby.c b/ruby.c index d9ee985..d59aafd 100644 --- a/r

[PATCH v2 26/44] ruby: bind remote and transport stuff

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: Only the few fields that will be needed later on. ruby.c | 89 ++ 1 file changed, 89 insertions(+) diff --git a/ruby.c b/ruby.c index cc8fe0e..ee548dc 100644 --- a/ruby.c +++ b

[PATCH v2 31/44] ruby: request-pull: use read_sha1_file()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- git-request-pull.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git-request-pull.rb b/git-request-pull.rb index 5f40901..233981f 100755 --- a/git-request-pull.rb +++ b/git-request-pull.rb @@ -165,7 +165,8 @@ for you to fetch changes

[PATCH v2 25/44] ruby: request-pull: trivial cleanups

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: The fist override of a native class, which is one of the strong points of Ruby. We could use skip_prefix(str, prefix) like in C, but str.skip_prefix(prefix) is more natrual in Ruby. git-rb-setup.rb | 6 ++ git-request

[PATCH v2 24/44] ruby: request-pull: use get_merge_bases()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: Now headrev and baserev become Git::Commit objects, fortunately 'puts("#{commit}")' or 'printf("%s\n", commit) convert the commit to a String (commit.to_s()), which is the hex sha1, so the rest of the scr

[PATCH v2 28/44] ruby: bind find_unique_abbrev()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- ruby.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/ruby.c b/ruby.c index ee548dc..7496c18 100644 --- a/ruby.c +++ b/ruby.c @@ -258,6 +258,13 @@ static VALUE git_rb_ref_old_sha1(VALUE self) return sha1_to_str(ref->old_s

[PATCH v2 30/44] ruby: bind read_sha1_file()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- ruby.c | 13 + 1 file changed, 13 insertions(+) diff --git a/ruby.c b/ruby.c index 7496c18..360515f 100644 --- a/ruby.c +++ b/ruby.c @@ -265,6 +265,18 @@ static VALUE git_rb_find_unique_abbrev(VALUE self, VALUE sha1, VALUE len) return

[PATCH v2 40/44] ruby: request-pull: use native diff_tree stuff

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: We finally got rid of all the system() calls, and thus all the forks. git-request-pull.rb | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/git-request-pull.rb b/git-request-pull.rb index 0db64c3..e884d0d

[PATCH v2 10/44] ruby: rewrite 'request-pull'

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: The objective is to be as close to the original as possible, to minimize regressions, even if the style is not very Ruby-ish. Makefile| 3 +- git-rb-setup.rb | 17 ++ git-request-pull.rb | 146

[PATCH v2 16/44] ruby: bind git_config()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: Our first usage of Ruby blocks. Notice how the code inside the block is in the same scope as the code outside. cb_data = "config" git_config() do |key, value| puts "%s: %s=%s" % [cb_data, k

[PATCH v2 09/44] request-pull: t: add missing cat

2013-09-28 Thread Felipe Contreras
Otherwise we wouldn't know why it failed. Signed-off-by: Felipe Contreras --- t/t5150-request-pull.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh index 9375912..60a38be 100755 --- a/t/t5150-request-pull.sh +++ b/t/t5150-request-pu

[PATCH v2 07/44] request-pull: trivial simplification

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- git-request-pull.sh | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/git-request-pull.sh b/git-request-pull.sh index c970244..d8b4c3c 100755 --- a/git-request-pull.sh +++ b/git-request-pull.sh @@ -86,25 +86,19 @@ find_matching_ref

[PATCH v2 15/44] ruby: request-pull: use native dwim_ref()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: Our first real usage of the bindings doesn't look too different from what it would look like in C. In Ruby all variables are pointers to objects, and there's no concept of pointer to variables, so what in C looks like &q

[PATCH v2 08/44] request-pull: t: trivial whitespace style fixes

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- t/t5150-request-pull.sh | 14 -- 1 file changed, 14 deletions(-) diff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh index 73f0369..9375912 100755 --- a/t/t5150-request-pull.sh +++ b/t/t5150-request-pull.sh @@ -5,7 +5,6

[PATCH v2 18/44] ruby: bind read_ref()/peel_ref()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- ruby.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/ruby.c b/ruby.c index 36de943..92c636c 100644 --- a/ruby.c +++ b/ruby.c @@ -65,12 +65,30 @@ static VALUE git_rb_git_config(VALUE self) return INT2FIX(r); } +static VALUE

[PATCH v2 14/44] ruby: bind dwim_ref()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- ruby.c | 11 +++ t/t1-ruby.sh | 11 +++ 2 files changed, 22 insertions(+) diff --git a/ruby.c b/ruby.c index c2ef72e..0ab56de 100644 --- a/ruby.c +++ b/ruby.c @@ -41,10 +41,21 @@ static VALUE git_rb_for_each_ref(void

[PATCH v2 20/44] ruby: request-pull: simplify tag fetching

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Notes: For the moment we use "str[10..-1]" to denote the equivalent of "str + 10" in C, even though Ruby has nicer constructs than that. git-request-pull.rb | 15 --- 1 file changed, 12 insertions(+), 3 deletions(

[PATCH v2 06/44] request-pull: fix exact match checking

2013-09-28 Thread Felipe Contreras
It obviously never worked, refs don't start with '/'. Signed-off-by: Felipe Contreras --- git-request-pull.sh | 10 -- t/t5150-request-pull.sh | 21 + 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/git-request-pull.sh b/git-reques

[PATCH v2 19/44] ruby: bind get_sha1()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- ruby.c | 11 +++ t/t1-ruby.sh | 8 2 files changed, 19 insertions(+) diff --git a/ruby.c b/ruby.c index 92c636c..45111e6 100644 --- a/ruby.c +++ b/ruby.c @@ -81,6 +81,16 @@ static VALUE git_rb_peel_ref(VALUE self, VALUE refname

[PATCH v2 13/44] ruby: bind setup_git_directory()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- ruby.c | 16 t/t1-ruby.sh | 13 + 2 files changed, 29 insertions(+) diff --git a/ruby.c b/ruby.c index 339e376..c2ef72e 100644 --- a/ruby.c +++ b/ruby.c @@ -12,6 +12,21 @@ static inline VALUE sha1_to_str(const

[PATCH v2 05/44] request-pull: use appropriate ref

2013-09-28 Thread Felipe Contreras
"Are you sure you pushed 'HEAD'?" doesn't say anything helpful. Signed-off-by: Felipe Contreras --- git-request-pull.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git-request-pull.sh b/git-request-pull.sh index 3c9a982..3e510ca 100755 --- a/

[PATCH v2 17/44] ruby: request-pull: use native git_config()

2013-09-28 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- git-request-pull.rb | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/git-request-pull.rb b/git-request-pull.rb index 416f880..0f85024 100755 --- a/git-request-pull.rb +++ b/git-request-pull.rb @@ -14,6 +14,13 @@ EOF exit 1

[PATCH v2 11/44] ruby: request-pull: rewrite perl script

2013-09-28 Thread Felipe Contreras
Ruby can do it just fine, no need for perl. Signed-off-by: Felipe Contreras --- Notes: I'm mostly ignoring the comment, my hope is that it would be redundant, as the code would be self-documenting. git-request-pull.rb | 65 + 1

<    5   6   7   8   9   10   11   12   13   14   >