MCPcopy Index your code
hub / github.com/git/git / parse_mode

Function parse_mode

object.h:200–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198
199
200static inline const char *parse_mode(const char *str, uint16_t *modep)
201{
202 unsigned char c;
203 unsigned int mode = 0;
204
205 if (*str == ' ')
206 return NULL;
207
208 while ((c = *str++) != ' ') {
209 if (c < '0' || c > '7')
210 return NULL;
211 mode = (mode << 3) + (c - '0');
212 }
213 *modep = mode;
214 return str;
215}
216
217/*
218 * Returns the object, having parsed it to find out what it is.

Callers 5

decode_tree_entryFunction · 0.85
decode_tree_entry_rawFunction · 0.85
load_treeFunction · 0.85
file_change_mFunction · 0.85
parse_mode_or_dieFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected