diff --git a/builtin/reset.c b/builtin/reset.c
index 27b342661dc62dda32fca57fb73114ea03195610..811e8e252c1c6a54e65179557203daf2bc42bdb9 100644 (file)
--- a/builtin/reset.c
+++ b/builtin/reset.c
for (i = 0; i < q->nr; i++) {
struct diff_filespec *one = q->queue[i]->one;
- if (one->mode) {
+ if (one->mode && !is_null_sha1(one->sha1)) {
struct cache_entry *ce;
ce = make_cache_entry(one->mode, one->sha1, one->path,
0, 0);