lib/autobuild/import/git.rb
# Updates the git repository's configuration for the target remote
Updates the git repository's configuration for the target remote
Updates the git repository ' s configuration for the target remote
def update_remotes_configuration(package, phase)
            git = [package, phase, Autobuild.tool(:git), '--git-dir', git_dir(package, false), 'config', '--replace-all']
            Subprocess.run(*git, "remote.#{remote_name}.url", repository)
            if push_to
                Subprocess.run(*git, "remote.#{remote_name}.pushurl", push_to)
            end
            Subprocess.run(*git, "remote.#{remote_name}.fetch",  "+refs/heads/*:refs/remotes/#{remote_name}/*")
            if remote_branch && local_branch
                Subprocess.run(*git, "remote.#{remote_name}.push",  "refs/heads/#{local_branch}:refs/heads/#{remote_branch}")
            else
                Subprocess.run(*git, "remote.#{remote_name}.push",  "refs/heads/*:refs/heads/*")
            end
            if local_branch
                Subprocess.run(*git, "branch.#{local_branch}.remote",  remote_name)
                Subprocess.run(*git, "branch.#{local_branch}.merge", "refs/heads/#{local_branch}")
            end
        end
def update_remotes_configuration ( package , phase ) git = [ package , phase , Autobuild . tool ( :git ) , '--git-dir' , git_dir ( package , false ) , 'config' , '--replace-all' ] Subprocess . run ( * git , "remote.#{remote_name}.url" , repository ) if push_to Subprocess . run ( * git , "remote.#{remote_name}.pushurl" , push_to ) end Subprocess . run ( * git , "remote.#{remote_name}.fetch" , "+refs/heads/*:refs/remotes/#{remote_name}/*" ) if remote_branch && local_branch Subprocess . run ( * git , "remote.#{remote_name}.push" , "refs/heads/#{local_branch}:refs/heads/#{remote_branch}" ) else Subprocess . run ( * git , "remote.#{remote_name}.push" , "refs/heads/*:refs/heads/*" ) end if local_branch Subprocess . run ( * git , "branch.#{local_branch}.remote" , remote_name ) Subprocess . run ( * git , "branch.#{local_branch}.merge" , "refs/heads/#{local_branch}" ) end end
Updates the git repository's configuration for the target remote
Updates the git repository ' s configuration for the target remote
package
<not_specific>
phase
<not_specific>