Sha256: 44538c4027cb160936b3d303e11f26b3cf5fb88d95599342fbbd9e92e1b22bd5

Contents?: true

Size: 1.73 KB

Versions: 5

Compression:

Stored size: 1.73 KB

Contents

<?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>[] (Grit::GitRuby::Internal::PackStorage)</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/grit/git-ruby/internal/pack.rb, line 108</span>
        <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">sha1</span>)
          <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">obj</span> = <span class="ruby-ivar">@cache</span>[<span class="ruby-identifier">sha1</span>]
            <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">obj</span>
          <span class="ruby-keyword kw">end</span>

          <span class="ruby-identifier">offset</span> = <span class="ruby-identifier">find_object</span>(<span class="ruby-identifier">sha1</span>)
          <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">offset</span>
          <span class="ruby-ivar">@cache</span>[<span class="ruby-identifier">sha1</span>] = <span class="ruby-identifier">obj</span> = <span class="ruby-identifier">parse_object</span>(<span class="ruby-identifier">offset</span>)
          <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">obj</span>
        <span class="ruby-keyword kw">end</span></pre>
</body>
</html>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ginst-2009.12.8 vendor/plugins/grit/doc/classes/Grit/GitRuby/Internal/PackStorage.src/M000246.html
ginst-2009.11.24 vendor/plugins/grit/doc/classes/Grit/GitRuby/Internal/PackStorage.src/M000246.html
ginst-2009.11.23 vendor/plugins/grit/doc/classes/Grit/GitRuby/Internal/PackStorage.src/M000246.html
ginst-2.0.1 vendor/plugins/grit/doc/classes/Grit/GitRuby/Internal/PackStorage.src/M000246.html
ginst-2.0.0 vendor/plugins/grit/doc/classes/Grit/GitRuby/Internal/PackStorage.src/M000246.html