Skip to content

Commit a1081b4

Browse files
jeffhostetlervdye
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 <jeffhost@microsoft.com>
1 parent ec2cef5 commit a1081b4

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
@@ -656,6 +656,7 @@ static int wt_deserialize_fd(const struct wt_status *cmd_s, struct wt_status *de
656656
/*
657657
* Copy over display-related fields from the current command.
658658
*/
659+
des_s->repo = cmd_s->repo;
659660
des_s->verbose = cmd_s->verbose;
660661
/* amend */
661662
/* whence */

0 commit comments

Comments
 (0)