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
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
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
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
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
Signed-off-by: Felipe Contreras
---
Documentation/git-stage.txt| 45 +
Makefile | 2 +-
builtin.h | 1 +
builtin/stage.c| 52 ++
contrib
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
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
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
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
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
--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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 +
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
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
'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
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
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
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
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
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
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
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
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
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
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,
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.
> >>
> >>
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
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
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
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
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
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);
>> +}
>>
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);
>>
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
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
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
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
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
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
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
>>
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
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
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
>>>
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
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
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
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
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
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 ++
Signed-off-by: Felipe Contreras
---
Notes:
Somebody forgot to do this.
Makefile | 1 +
builtin/shortlog.c | 184 +
shortlog.c | 181
shortlog.h | 6 ++
4
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
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
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
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
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"
+#
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
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
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"
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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(
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
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
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
"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/
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
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
901 - 1000 of 3330 matches
Mail list logo