Skip to content

Commit a5cdf7c

Browse files
jeffhostetlerderrickstolee
authored andcommitted
wt-status-deserialize: fix crash when -v is used
Fix crash in `git status -v` by setting `des_s->repo` to a non-null value. Upstream changes to eliminate use of `the_repository` added a `repo` field to `struct status`. And calls in `wt-status.c` to `repo_init_revisions()` were changed to pass `s->repo` rather than `the_repository`. The status deserialization code was not updated to actually set `s->repo` before common code passed the value to OID routines. This caused a segfault when verbose output was requested. Signed-off-by: Jeff Hostetler <[email protected]>
1 parent bf02b18 commit a5cdf7c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

wt-status-deserialize.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,7 @@ static int wt_deserialize_fd(const struct wt_status *cmd_s, struct wt_status *de
652652
/*
653653
* Copy over display-related fields from the current command.
654654
*/
655+
des_s->repo = cmd_s->repo;
655656
des_s->verbose = cmd_s->verbose;
656657
/* amend */
657658
/* whence */

0 commit comments

Comments
 (0)