public
Rubygem
Description: Apache Buildr
Homepage: http://incubator.apache.org/buildr
Clone URL: git://github.com/vic/buildr.git
Search Repo:
If user supplies --auth or --anon options and is already running on a 
buildr-git clone,
the remote.origin.url is updated. This way when an anonymous user becomes 
a
committer he just needs to run buildr-git.rb --auth


git-svn-id: https://svn.apache.org/repos/asf/incubator/buildr/trunk@648744 
13f79535-47bb-0310-9956-ffa450edef68
vic (author)
Wed Apr 16 09:41:19 -0700 2008
commit  c6e1eb7d55589dfba45e5b60ac055661555b24f4
tree    8330638db2e2ece81b6fbc16d3c71eb481daf07c
parent  d85e0e5eef9bdbba7be3d1d4e263433cef084b90
...
332
333
334
 
 
 
 
 
 
 
 
 
 
 
335
336
337
338
339
340
...
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
 
348
349
350
0
@@ -332,9 +332,19 @@ def perform(options)
0
     
0
     # Start the pager
0
     run_pager
0
+ puts
0
+
0
+
0
+ old_origin = `git config --get remote.origin.url`.chomp
0
+ if member && old_origin !~ /@/
0
+ puts "Switching to authenticated origin #{origin}", ""
0
+ `git config remote.origin.url "#{origin}"`
0
+ elsif !member && old_origin =~ /@/
0
+ puts "Switching to anonymous origin #{origin}", ""
0
+ `git config remote.origin.url "#{origin}"`
0
+ end
0
     
0
     # Configure user name and email for git sake (and github's gravatar)
0
- puts
0
     puts "You claim to be #{user_name.inspect} <#{user_email}> "
0
     puts "with apache-svn user: #{svn_user}" if svn_user
0
     puts

Comments

    No one has commented yet.