git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/5] Revamping "git status"

From
Thomas Rast <trast@student.ethz.ch>
Date
Aug 5, 2009, 20:14 UTC
Message-ID
<200908052214.13512.trast@student.ethz.ch>
In-Reply-To
<7v3a862fnj.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 8 quoted lines
> Thomas Rast <trast@student.ethz.ch> writes:
> 
> > So it detects there are worktree changes, but then decides not to show
> > them because it's an unmerged entry.  I think the following should go
> > in 3/5, but note that I haven't looked at the rest of the code to
> > check if it breaks anything:
> 
> Thanks.  Shouldn't it go in 4/5 instead, though?
Er, yeah. *sigh*
Show 19 quoted lines
> > -- 8< --
> > diff --git i/wt-status.c w/wt-status.c
> > index 6370fe2..5a68297 100644
> > --- i/wt-status.c
> > +++ w/wt-status.c
> > @@ -400,7 +400,8 @@ static int wt_status_check_worktree_changes(struct wt_status *s)
> >  	for (i = 0; i < s->change.nr; i++) {
> >  		struct wt_status_change_data *d;
> >  		d = s->change.items[i].util;
> > -		if (!d->worktree_status)
> > +		if (!d->worktree_status
> > +		    || d->index_status == DIFF_STATUS_UNMERGED)
> >  			continue;
> >  		changes = 1;
> >  		if (d->worktree_status == DIFF_STATUS_DELETED)
> > -- >8 --
> 
> Not "d->worktree_status"?  That would be more consistent with what
> wt_status_print_changed() actually ends up checking.

Hmm, true. I just picked index_status because unmerged state is an index property. It's probably better if the two functions agree on the criterion.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Junio C Hamano
Message 22 of 22 in “Revamping "git status"”
  1. 0/5 Revamping "git status"Junio C Hamano, Aug 5, 2009
  2. 1/5 diff-index: report unmerged new entriesJunio C Hamano, Aug 5, 2009
  3. 2/5 diff-index: keep the original index intactJunio C Hamano, Aug 5, 2009
  4. 3/5 wt-status.c: rework the way changes to the index and work tree are summarizedJunio C Hamano, Aug 5, 2009
  5. 4/5 status: show worktree status of conflicted paths separatelyJunio C Hamano, Aug 5, 2009
  6. 5/5 shortstatus: a new commandJunio C Hamano, Aug 5, 2009
  7. Jeff KingAug 6, 2009
  8. Breaking "git status" (was Re: [PATCH 5/5] shortstatus: a new command)Junio C Hamano, Aug 6, 2009
  9. Jeff KingAug 6, 2009
  10. Junio C HamanoAug 6, 2009
  11. Sverre RabbelierAug 6, 2009
  12. Jeff KingAug 6, 2009
  13. Jeff KingAug 6, 2009
  14. Junio C HamanoAug 6, 2009
  15. Thomas RastAug 5, 2009
  16. Junio C HamanoAug 5, 2009
  17. Thomas RastAug 5, 2009
  18. Thomas RastAug 5, 2009
  19. Junio C HamanoAug 5, 2009
  20. Thomas RastAug 5, 2009
  21. Junio C HamanoAug 5, 2009
  22. Thomas RastAug 5, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.