Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 135bc52904e74f332d0a037a046b5c11 > files > 31

ruby-icon-artist-0.1.92-1.fc13.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>push (IconArtist::GitRepo)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File lib/icon-artist/gitrepo.rb, line 131</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">push</span>(<span class="ruby-identifier">remote</span>=<span class="ruby-value str">'origin'</span>, <span class="ruby-identifier">branch</span>=<span class="ruby-value str">'master'</span>)
      <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@branches</span>[<span class="ruby-identifier">:local</span>].<span class="ruby-identifier">include?</span> <span class="ruby-identifier">branch</span>
        <span class="ruby-ivar">@git</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">remote</span>, <span class="ruby-identifier">branch</span>)
      <span class="ruby-keyword kw">else</span>
        <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Warning: branch #{branch} does not seem to exist, nothing pushed.&quot;</span>
      <span class="ruby-keyword kw">end</span>
    <span class="ruby-keyword kw">end</span></pre>
</body>
</html>