Re: [PATCH] status: display the SHA1 of the commit being currently processed
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 18, 2013, 16:32 UTC
- Message-ID
- <7v61xb752k.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <2dc2004fbf61d625515c2b6f62cc104e@ensibm.imag.fr>
Mathieu Liénard--Mayor <mathieu.lienard--mayor@ensimag.fr> writes:
Show 8 quoted lines
> Le 2013-06-17 20:37, Junio C Hamano a écrit : > ... >> Extend wt_status_state structure to hold the necessary info, query >> the state from the filesystem in that function, and display the info >> (but not collect info) in show_rebase_in_progress(), to keep the >> clean division of labor between these two places. > > Do you mean that we should include the stopped_SHA in wt_status_state ?
That would be a good first step. In the longer term, we would want other external interfaces that read from wt-status-state, pick bits necessary and summarize them for particular use cases. You can for example easily imagine the prompt support that collects different pieces of breadcrumbs from .git/ can instead ask wt-status-state for necessary pieces information.
Separating the logic to collect state information and the code to show the result of collection is necessary for that kind of usage.