summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-27 22:01:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-02-27 22:01:40 (GMT)
commit8336832ad99832d21e5ee588bd3d03369048c05a (patch)
tree787d8c70b31315c46780323e95c3cc713a961914 /read-cache.c
parent795dd116bb655f8aa8c206ecaf415527871cb7a6 (diff)
parentb4b313f94ab06fabe78fa91b3f2ebbc7ef08b012 (diff)
downloadgit-8336832ad99832d21e5ee588bd3d03369048c05a.zip
git-8336832ad99832d21e5ee588bd3d03369048c05a.tar.gz
git-8336832ad99832d21e5ee588bd3d03369048c05a.tar.bz2
Merge branch 'nd/reset-intent-to-add'
* nd/reset-intent-to-add: reset: support "--mixed --intent-to-add" mode
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c
index 29c1047..6d8ee3a 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -584,7 +584,7 @@ static struct cache_entry *create_alias_ce(struct cache_entry *ce, struct cache_
return new;
}
-static void record_intent_to_add(struct cache_entry *ce)
+void set_object_name_for_intent_to_add_entry(struct cache_entry *ce)
{
unsigned char sha1[20];
if (write_sha1_file("", 0, blob_type, sha1))
@@ -670,7 +670,7 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st,
if (index_path(ce->sha1, path, st, HASH_WRITE_OBJECT))
return error("unable to index file %s", path);
} else
- record_intent_to_add(ce);
+ set_object_name_for_intent_to_add_entry(ce);
if (ignore_case && alias && different_name(ce, alias))
ce = create_alias_ce(ce, alias);