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>
This commit is contained in:
Jeff Hostetler 2020-04-10 19:52:27 -04:00 коммит произвёл Derrick Stolee
Родитель 18462e2ed2
Коммит 224775d2a7
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -652,6 +652,7 @@ static int wt_deserialize_fd(const struct wt_status *cmd_s, struct wt_status *de
/*
* Copy over display-related fields from the current command.
*/
des_s->repo = cmd_s->repo;
des_s->verbose = cmd_s->verbose;
/* amend */
/* whence */