You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by vb...@apache.org on 2008/04/16 18:41:24 UTC
svn commit: r648744 - /incubator/buildr/trunk/doc/scripts/buildr-git.rb
Author: vborja
Date: Wed Apr 16 09:41:19 2008
New Revision: 648744
URL: http://svn.apache.org/viewvc?rev=648744&view=rev
Log:
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
Modified:
incubator/buildr/trunk/doc/scripts/buildr-git.rb
Modified: incubator/buildr/trunk/doc/scripts/buildr-git.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/doc/scripts/buildr-git.rb?rev=648744&r1=648743&r2=648744&view=diff
==============================================================================
--- incubator/buildr/trunk/doc/scripts/buildr-git.rb (original)
+++ incubator/buildr/trunk/doc/scripts/buildr-git.rb Wed Apr 16 09:41:19 2008
@@ -332,9 +332,19 @@
# Start the pager
run_pager
+ puts
+
+
+ old_origin = `git config --get remote.origin.url`.chomp
+ if member && old_origin !~ /@/
+ puts "Switching to authenticated origin #{origin}", ""
+ `git config remote.origin.url "#{origin}"`
+ elsif !member && old_origin =~ /@/
+ puts "Switching to anonymous origin #{origin}", ""
+ `git config remote.origin.url "#{origin}"`
+ end
# Configure user name and email for git sake (and github's gravatar)
- puts
puts "You claim to be #{user_name.inspect} <#{user_email}> "
puts "with apache-svn user: #{svn_user}" if svn_user
puts