Skip to content

Commit 5812b3f

Browse files
committed
Merge branch 'bw/ls-files-sans-the-index'
Code clean-up. * bw/ls-files-sans-the-index: ls-files: factor out tag calculation ls-files: factor out debug info into a function ls-files: convert show_files to take an index ls-files: convert show_ce_entry to take an index ls-files: convert prune_cache to take an index ls-files: convert ce_excluded to take an index ls-files: convert show_ru_info to take an index ls-files: convert show_other_files to take an index ls-files: convert show_killed_files to take an index ls-files: convert write_eolinfo to take an index ls-files: convert overlay_tree_on_cache to take an index tree: convert read_tree to take an index parameter convert: convert renormalize_buffer to take an index convert: convert convert_to_git to take an index convert: convert convert_to_git_filter_fd to take an index convert: convert crlf_to_git to take an index convert: convert get_cached_convert_stats_ascii to take an index
2 parents 1c3d87c + a84f3e5 commit 5812b3f

15 files changed

+168
-123
lines changed

apply.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2256,7 +2256,7 @@ static int read_old_data(struct stat *st, const char *path, struct strbuf *buf)
22562256
case S_IFREG:
22572257
if (strbuf_read_file(buf, path, st->st_size) != st->st_size)
22582258
return error(_("unable to open or read %s"), path);
2259-
convert_to_git(path, buf->buf, buf->len, buf, 0);
2259+
convert_to_git(&the_index, path, buf->buf, buf->len, buf, 0);
22602260
return 0;
22612261
default:
22622262
return -1;

blame.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt,
229229
if (strbuf_read(&buf, 0, 0) < 0)
230230
die_errno("failed to read from stdin");
231231
}
232-
convert_to_git(path, buf.buf, buf.len, &buf, 0);
232+
convert_to_git(&the_index, path, buf.buf, buf.len, &buf, 0);
233233
origin->file.ptr = buf.buf;
234234
origin->file.size = buf.len;
235235
pretend_sha1_file(buf.buf, buf.len, OBJ_BLOB, origin->blob_oid.hash);

builtin/commit.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ static int list_paths(struct string_list *list, const char *with_tree,
253253

254254
if (with_tree) {
255255
char *max_prefix = common_prefix(pattern);
256-
overlay_tree_on_cache(with_tree, max_prefix ? max_prefix : prefix);
256+
overlay_tree_on_index(&the_index, with_tree,
257+
max_prefix ? max_prefix : prefix);
257258
free(max_prefix);
258259
}
259260

0 commit comments

Comments
 (0)