Git's http handling takes care of redirects by setting
CURLOPT_FOLLOWLOCATION, and just assuming curl will handle the details.
For the most part, this works, but there are a few downsides:
1. We do extra round-trips for subsequent requests, as we
always feed curl the original URL, and it
When we ask curl to access a URL, it may follow one or more
redirects to reach the final location. We have no idea
this has happened, as curl takes care of the details and
simply returns the final content to us.
The final URL that we ended up with can be accessed via
CURLINFO_EFFECTIVE_URL. Let's
When we are handling a curl response code in http_request or
in the remote-curl RPC code, we use the handle_curl_result
helper to translate curl's response into an easy-to-use
code. When we see an HTTP 401, we do one of two things:
1. If we already had a filled-in credential, we mark it as
Over time, the http_get_strbuf function has grown several
optional parameters. We now have a bitfield with multiple
boolean options, as well as an optional strbuf for returning
the content-type of the response. And a future patch in this
series is going to add another strbuf option.
Treating
If a caller asks the http_get_* functions to go to a
particular URL and we end up elsewhere due to a redirect,
the effective_url field can tell us where we went.
It would be nice to remember this redirect and short-cut
further requests for two reasons:
1. It's more efficient. Otherwise we
In the discover_refs function, we use a strbuf named
buffer for multiple purposes. First we build the info/refs
URL in it, and then detach that to a bare pointer. Then, we
use the same strbuf to store the result of fetching the
refs.
Let's instead keep a separate refs_url strbuf. This is less
For efficiency and security reasons, an earlier commit in
this series taught http_get_* to re-write the base url based
on redirections we saw while making a specific request.
This commit wires that option into the info/refs request,
meaning that a redirect from
We use a strbuf to generate the string containing the remote
URL, but then detach it to a bare pointer. This makes it
harder to later manipulate the URL, as we have forgotten the
length (and the allocation semantics are not as clear).
Let's instead keep the strbuf around. As a bonus, this
On 09/26/2013 12:17 PM, Felipe Contreras wrote:
On Thu, Sep 26, 2013 at 3:32 AM, Stefan Beller
static const char *const git_repack_usage[] = {
@@ -22,6 +23,9 @@ static int repack_config(const char *var, const char
*value, void *cb)
delta_base_offset = git_config_bool(var,
On 09/26/2013 01:42 PM, Duy Nguyen wrote:
On Thu, Sep 26, 2013 at 3:32 PM, Stefan Beller
stefanbel...@googlemail.com wrote:
This is just a direct translation of
http://article.gmane.org/gmane.comp.version-control.git/235396
So I don't consider this is ready for inclusion.
Some notes:
We
Hello Jonathan,
On Sep 27, 2013, at 8:52 PM, Jonathan Nieder jrnie...@gmail.com wrote:
The latest maintenance release Git v1.8.4.1 is now available.
I can't find the following three minor doc fixes
http://article.gmane.org/gmane.comp.version-control.git/235234
On 09/26/2013 12:54 AM, Nicolas Pitre wrote:
On Tue, 24 Sep 2013, Jeff King wrote:
I think most of this problem is the way that we fetch tags straight into
the refs/tags hierarchy. You would not do:
[remote origin]
fetch = +refs/heads/*:refs/heads/*
prune = true
unless you wanted to
On 2013-09-27 23.56, Jonathan Nieder wrote:
Nguyễn Thái Ngọc Duy wrote:
commit 6000334 (clone: allow cloning local paths with colons in them -
2013-05-04) is added to make it possible to specify a path that has
colons in it without file://, e.g. ../foo:bar/somewhere. But the check
is a bit
git rebase -i collapses ids on todo list to 7 hexdigits.
Let's use core.abbrev config option instead, if it's set.
Signed-off-by: Kirill A. Shutemov kirill.shute...@linux.intel.com
---
git-rebase--interactive.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
git clone /foo/bar:baz or git clone ../foo/bar:baz
are meant to clone from the local file system, and not to clone
from a remote server over git-over-ssh.
Signed-off-by: Torsten Bögershausen tbo...@web.de
---
connect.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
Kirill A. Shutemov wrote:
git rebase -i collapses ids on todo list to 7 hexdigits.
Let's use core.abbrev config option instead, if it's set.
Signed-off-by: Kirill A. Shutemov kirill.shute...@linux.intel.com
---
git-rebase--interactive.sh | 3 ++-
1 file changed, 2 insertions(+), 1
fix: Git for Windows crashes when clone Japanese multibyte repository.
Reproduce condition:
- Japanese Base Encoding is Shift-JIS.
- It happens Japanese multibyte directory name and too-long directory path
- Linux(ex. Ubuntu 13.04 amd64) can clone normally.
- example repository is here:
git
On Sat, Sep 28, 2013 at 2:20 PM, Michael Haggerty mhag...@alum.mit.edu wrote:
I just reviewed that old thread to determine its relevance to the
present discussion. For the benefit of the other readers, here is a
summary of the main points that I got out of it.
I want to thank you immensely
Felipe Contreras (10):
transport-helper: trivial style fix
describe: trivial style fixes
pretty: trivial style fix
revision: trivial style fixes
revision: add missing include
shortlog: add missing declaration
diff: trivial style fix
run-command: trivial style fixes
revision:
Otherwise we might not have 'struct diff_options'.
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
revision.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/revision.h b/revision.h
index e7f1d21..89132df 100644
--- a/revision.h
+++ b/revision.h
@@ -5,6 +5,7 @@
#include
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
revision.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/revision.c b/revision.c
index 3ebd558..4049867 100644
--- a/revision.c
+++ b/revision.c
@@ -1503,7 +1503,7 @@ struct cmdline_pathspec {
static void
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
run-command.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/run-command.c b/run-command.c
index 1b7f88e..3914d9c 100644
--- a/run-command.c
+++ b/run-command.c
@@ -406,13 +406,12 @@ fail_pipe:
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
revision.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/revision.c b/revision.c
index 0173e01..3ebd558 100644
--- a/revision.c
+++ b/revision.c
@@ -2971,7 +2971,7 @@ static struct commit
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
pretty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pretty.c b/pretty.c
index b4e32b7..962e82b 100644
--- a/pretty.c
+++ b/pretty.c
@@ -497,7 +497,7 @@ void pp_user_info(struct pretty_print_context *pp,
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
setup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/setup.c b/setup.c
index f08dd64..c717db4 100644
--- a/setup.c
+++ b/setup.c
@@ -566,7 +566,7 @@ static const char *setup_git_directory_gently_1(int
Otherwise we would have to include commit.h.
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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 {
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
builtin/describe.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/builtin/describe.c b/builtin/describe.c
index b9d3603..6f62109 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -9,7 +9,7 @@
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
builtin/diff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/diff.c b/builtin/diff.c
index 2fb8c5d..adb93a9 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -169,7 +169,7 @@ static int
The was just not doing anything, reporting an appropriately tagged ref
worked only by luck.
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
git-request-pull.sh | 2 +-
t/t5150-request-pull.sh | 15 +++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
Makefile | 9 +
ruby.c | 19 ++-
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 2fdee15..27e61c0 100644
--- a/Makefile
+++ b/Makefile
@@ -429,6 +429,7 @@
This is a different patch series that tries a different approach.
First, this series allows external scripts to also access libgit through Ruby
bindings:
git ruby EOF
for_each_ref() do |name, sha1, flags|
puts %s: %s % [name, sha1_to_hex(sha1)]
end
EOF
This way third party script
Wether we use a symbolic ref, or we specify the branch directly
shouldn't really matter, we would want the branch description either
way.
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
git-request-pull.sh | 13 +
t/t5150-request-pull.sh | 32
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
Notes:
With this support, third parties would be able to write scripts more easily
and
access libgit facilities.
Also, it could help developers by allowing easier prototyping
git ruby actual EOF
Are you sure you pushed 'HEAD'? doesn't say anything helpful.
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
---
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Ruby can do it just fine, no need for perl.
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
@@
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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 felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
Notes:
Let's start deviating from the original script.
There are no functional changes though.
git-request-pull.rb | 34 --
1 file changed, 16 insertions(+), 18 deletions(-)
diff --git
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Otherwise we wouldn't know why it failed.
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
+++
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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 felipe.contre...@gmail.com
---
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, key,
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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 script doesn't
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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 @@
We are not calling any git commands any more.
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
+++
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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 felipe.contre...@gmail.com
---
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)
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
+++
We are not calling any git commands any more.
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
git-request-pull.rb | 61 -
1 file changed, 27 insertions(+), 34 deletions(-)
diff --git a/git-request-pull.rb b/git-request-pull.rb
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
+#include
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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,
Otherwise we might not have 'struct diff_options'.
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
Makefile | 3 +-
builtin.h | 1 +
builtin/request-pull.c | 275 +
git-request-pull.rb| 199 ---
git.c
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
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
On Tue, Sep 24, 2013 at 1:39 PM, Jonathan Nieder jrnie...@gmail.com 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
rb = rebase
st = status
Are these the best definitions
On Mon, Sep 23, 2013 at 1:17 PM, Felipe Contreras
felipe.contre...@gmail.com 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 more third party
On Sun, Sep 22, 2013 at 8:41 PM, brian m. carlson
sand...@crustytoothpaste.net wrote:
On Sun, Sep 22, 2013 at 05:00:44PM -0700, Junio C Hamano wrote:
- Moving away from higher-level scripting languages such as shell and Perl.
Recent clean --interactive may have added some code that could be
On Sat, Sep 21, 2013 at 6:56 PM, brian m. carlson
sand...@crustytoothpaste.net 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
sand...@crustytoothpaste.net wrote:
Now, if anybody has ideas into how the bindings could
Hi,
On Sun, 29 Sep 2013, Wataru Noguchi wrote:
--- a/convert.c
+++ b/convert.c
@@ -724,6 +724,11 @@ static void convert_attrs(struct conv_attrs *ca, const
char *path)
{
int i;
static struct git_attr_check ccheck[NUM_CONV_ATTRS];
+
+ if (NUM_CONV_ATTRS != 0) {
+
On 09/29/2013 12:04 AM, Felipe Contreras wrote:
We are not calling any git commands any more.
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
git-request-pull.rb | 2 --
1 file changed, 2 deletions(-)
diff --git a/git-request-pull.rb b/git-request-pull.rb
index
On Sat, Sep 28, 2013 at 6:27 PM, Stefan Beller
stefanbel...@googlemail.com 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 felipe.contre...@gmail.com
---
git-request-pull.rb | 2 --
1 file changed, 2
On Sun, Sep 29, 2013 at 2:37 AM, Torsten Bögershausen tbo...@web.de wrote:
git clone /foo/bar:baz or git clone ../foo/bar:baz
are meant to clone from the local file system, and not to clone
from a remote server over git-over-ssh.
I don't think this is necessary. Commit 6000334 should detect
On Sat, Sep 28, 2013 at 5:10 PM, Kirill A. Shutemov
kirill.shute...@linux.intel.com wrote:
collapse_todo_ids() uses `git rev-parse --short=7' to abbrev commit ids.
Let's drop argument from --short to use default (7) or config value
instead.
Signed-off-by: Kirill A. Shutemov
On 09/29/2013 12:41 AM, Felipe Contreras wrote:
On Tue, Sep 24, 2013 at 1:39 PM, Jonathan Nieder jrnie...@gmail.com 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
rb = rebase
st = status
On Sat, Sep 28, 2013 at 11:13 PM, Ramkumar Ramachandra
artag...@gmail.com 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
--
Felipe Contreras
Felipe Contreras wrote:
Felipe Contreras (44):
Thanks! In the meantime, can you publish this work somewhere so we can
easily try it out?
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at
Felipe Contreras wrote:
+$(RUBY_PROGRAMS): git-ruby$X
+ $(QUIET_BUILT_IN)$(RM) $@ \
+ ln lt; $@ 2/dev/null || \
+ ln -s lt; $@ 2/dev/null || \
+ cp lt; $@
Why so many fallbacks? Will the hard-link (the first ln) ever fail?
diff --git a/ruby.c b/ruby.c
index
Sorry, but spammers are using a...@purpletech.com and I'm not, so I'm retiring
it. If you really want to reach me, you can find out my real email address at
http://alexchaffee.com
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to
On Sat, Sep 28, 2013 at 11:30 PM, Ramkumar Ramachandra
artag...@gmail.com wrote:
Felipe Contreras wrote:
+test_expect_success 'argument passing' '
+ cat script -EOF
+ p($0)
+ p(ARGV)
+ EOF
+ git ruby script foo bar actual
+ cat expected -EOF
+
On Sat, Sep 28, 2013 at 11:40 PM, Ramkumar Ramachandra
artag...@gmail.com wrote:
Felipe Contreras wrote:
+$(RUBY_PROGRAMS): git-ruby$X
+ $(QUIET_BUILT_IN)$(RM) $@ \
+ ln lt; $@ 2/dev/null || \
+ ln -s lt; $@ 2/dev/null || \
+ cp lt; $@
Why so many fallbacks? Will
Felipe Contreras wrote:
Makefile| 3 +-
git-rb-setup.rb | 17 ++
git-request-pull.rb | 146 +++
git-request-pull.sh | 160
Excellent: git-request-pull is now an ELF
Felipe Contreras wrote:
git-request-pull.rb | 65
+
1 file changed, 30 insertions(+), 35 deletions(-)
Arguably, more pretty and terse. Again, all tests pass.
Looks reasonable.
--
To unsubscribe from this list: send the line unsubscribe git
On Sat, Sep 28, 2013 at 11:56 PM, Felipe Contreras
felipe.contre...@gmail.com 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 @@ static int run_ruby_command(const char *cmd,
Felipe Contreras wrote:
+static inline VALUE cstr_to_str(const char *str)
+{
+ if (str == NULL)
+ return Qnil;
+ return rb_str_new2(str);
+}
+
+static VALUE git_rb_setup_git_directory(VALUE self)
+{
+ int nongit_ok;
+ const char *prefix;
+
Felipe Contreras wrote:
static void git_ruby_init(void)
{
rb_define_global_function(setup_git_directory,
git_rb_setup_git_directory, 0);
rb_define_global_function(for_each_ref, git_rb_for_each_ref, 0);
+ rb_define_global_function(dwim_ref, git_rb_dwim_ref, 1);
}
On Sun, Sep 29, 2013 at 12:17 AM, Ramkumar Ramachandra
artag...@gmail.com wrote:
Felipe Contreras wrote:
static void git_ruby_init(void)
{
rb_define_global_function(setup_git_directory,
git_rb_setup_git_directory, 0);
rb_define_global_function(for_each_ref,
On Sun, Sep 29, 2013 at 12:11 AM, Ramkumar Ramachandra
artag...@gmail.com wrote:
Felipe Contreras wrote:
+static inline VALUE cstr_to_str(const char *str)
+{
+ if (str == NULL)
+ return Qnil;
+ return rb_str_new2(str);
+}
+
+static VALUE
91 matches
Mail list logo