| 293 | } |
| 294 | |
| 295 | static void add_pending_object_with_path(struct rev_info *revs, |
| 296 | struct object *obj, |
| 297 | const char *name, unsigned mode, |
| 298 | const char *path) |
| 299 | { |
| 300 | struct interpret_branch_name_options options = { 0 }; |
| 301 | if (!obj) |
| 302 | return; |
| 303 | if (revs->no_walk && (obj->flags & UNINTERESTING)) |
| 304 | revs->no_walk = 0; |
| 305 | if (revs->reflog_info && obj->type == OBJ_COMMIT) { |
| 306 | struct strbuf buf = STRBUF_INIT; |
| 307 | size_t namelen = strlen(name); |
| 308 | int len = repo_interpret_branch_name(the_repository, name, |
| 309 | namelen, &buf, &options); |
| 310 | |
| 311 | if (0 < len && len < namelen && buf.len) |
| 312 | strbuf_addstr(&buf, name + len); |
| 313 | add_reflog_for_walk(revs->reflog_info, |
| 314 | (struct commit *)obj, |
| 315 | buf.buf[0] ? buf.buf: name); |
| 316 | strbuf_release(&buf); |
| 317 | return; /* do not add the commit itself */ |
| 318 | } |
| 319 | add_object_array_with_path(obj, name, &revs->pending, mode, path); |
| 320 | } |
| 321 | |
| 322 | static void add_pending_object_with_mode(struct rev_info *revs, |
| 323 | struct object *obj, |
no test coverage detected