Skip to content

Commit fceef64

Browse files
committed
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 01b976c commit fceef64

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
@@ -649,6 +649,7 @@ static int wt_deserialize_fd(const struct wt_status *cmd_s, struct wt_status *de
649649
/*
650650
* Copy over display-related fields from the current command.
651651
*/
652+
des_s->repo = cmd_s->repo;
652653
des_s->verbose = cmd_s->verbose;
653654
/* amend */
654655
/* whence */

0 commit comments

Comments
 (0)