Re: [PATCH v3 4/4] wt-status.c: Set the committable flag in the collect phase.

2018-09-24 Thread Junio C Hamano
Stephen Smith writes: > I can see three solutions and could support any of the three: > 1) Move the free calls to run_status() and cmd_status(). > 2) Move the calls calls to wt_status_print since that is the last function > from wt_status.c that is called befor the structure goes out of scope

Re: [PATCH v3 4/4] wt-status.c: Set the committable flag in the collect phase.

2018-09-23 Thread Stephen Smith
On Friday, September 7, 2018 3:31:55 PM MST Junio C Hamano wrote: > For example, I noticed that both of the old > callsites of wt_status_get_state() have free() of a few fiedls in > the structure, and I kept the code as close to the original, but I > suspect they should not be freed there in the

Re: [PATCH v3 4/4] wt-status.c: Set the committable flag in the collect phase.

2018-09-11 Thread Junio C Hamano
"Stephen P. Smith" writes: > On Friday, September 7, 2018 3:31:55 PM MST you wrote: >> Junio C Hamano writes: > >> The patch is mostly for illustration of the idea. >> >> The result seems to compile and pass the test suite, but I haven't >> carefully thought about what else I may be breaking

Re: [PATCH v3 4/4] wt-status.c: Set the committable flag in the collect phase.

2018-09-07 Thread Stephen P. Smith
On Friday, September 7, 2018 3:31:55 PM MST you wrote: > Junio C Hamano writes: > The patch is mostly for illustration of the idea. > > The result seems to compile and pass the test suite, but I haven't > carefully thought about what else I may be breaking with this > mechanical change. For

Re: [PATCH v3 4/4] wt-status.c: Set the committable flag in the collect phase.

2018-09-07 Thread Junio C Hamano
Junio C Hamano writes: > "Stephen P. Smith" writes: > >> void wt_status_collect(struct wt_status *s) >> { >> +struct wt_status_state state; >> wt_status_collect_changes_worktree(s); >> >> if (s->is_initial) >> @@ -746,6 +752,11 @@ void wt_status_collect(struct wt_status *s) >>

Re: [PATCH v3 4/4] wt-status.c: Set the committable flag in the collect phase.

2018-09-07 Thread Junio C Hamano
"Stephen P. Smith" writes: > void wt_status_collect(struct wt_status *s) > { > + struct wt_status_state state; > wt_status_collect_changes_worktree(s); > > if (s->is_initial) > @@ -746,6 +752,11 @@ void wt_status_collect(struct wt_status *s) > else >

[PATCH v3 4/4] wt-status.c: Set the committable flag in the collect phase.

2018-09-05 Thread Stephen P. Smith
In an update to fix a bug with "commit --dry-run" it was found that the committable flag was broken. The update was, at the time, accepted as it was better than the previous version. [1] Since the setting of the committable flag had been done in wt_longstatus_print_updated, move it to