Skip to content

Commit f92d62e

Browse files
committed
Merge branch 'nd/maint-fix-replace'
* nd/maint-fix-replace: parse_object: pass on the original sha1, not the replaced one
2 parents cd1547d + 2e3400c commit f92d62e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ struct object *parse_object(const unsigned char *sha1)
199199
return NULL;
200200
}
201201

202-
obj = parse_object_buffer(repl, type, size, buffer, &eaten);
202+
obj = parse_object_buffer(sha1, type, size, buffer, &eaten);
203203
if (!eaten)
204204
free(buffer);
205205
return obj;

t/t6050-replace.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ test_expect_success 'fetch branch with replacement' '
209209

210210
test_expect_success 'bisect and replacements' '
211211
git bisect start $HASH7 $HASH1 &&
212-
test "$S" = "$(git rev-parse --verify HEAD)" &&
212+
test "$PARA3" = "$(git rev-parse --verify HEAD)" &&
213213
git bisect reset &&
214214
GIT_NO_REPLACE_OBJECTS=1 git bisect start $HASH7 $HASH1 &&
215215
test "$HASH4" = "$(git rev-parse --verify HEAD)" &&

0 commit comments

Comments
 (0)