Kiln » Dependencies » Dulwich Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master, master-1, and master-0

Only determine hexsha when really necessary.

Changeset d374936cdefb

Parent 623bf1c9878e

by Jelmer Vernooij

Changes to one file · Browse files at d374936cdefb Showing diff from parent 623bf1c9878e Diff from another changeset...

 
114
115
116
117
 
118
119
120
 
122
123
124
 
 
125
126
127
 
114
115
116
 
117
118
119
120
 
122
123
124
125
126
127
128
129
@@ -114,7 +114,7 @@
  hexsha = name   elif len(name) == 20:   sha = name - hexsha = sha_to_hex(name) + hexsha = None   else:   raise AssertionError   for pack in self.packs: @@ -122,6 +122,8 @@
  return pack.get_raw(sha, self.get_raw)   except KeyError:   pass + if hexsha is None: + hexsha = sha_to_hex(name)   ret = self._get_shafile(hexsha)   if ret is not None:   return ret.as_raw_string()