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

Re: [PATCH 5/9] Add "skip_unmerged" option to unpack_trees.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 5, 2008, 01:32 UTC
Message-ID
<alpine.LSU.1.00.0802050129570.8543@racer.site>
In-Reply-To
<alpine.LNX.1.00.0802041335530.13593@iabervon.org>
Hi,
On Mon, 4 Feb 2008, Daniel Barkalow wrote:
Show 9 quoted lines
>  		if (any_files) {
> -			if (o->merge) {
> +			if (skip_entry) {
> +				do
> +					o->pos++;
> +				while (o->pos < active_nr &&
> +				       !strcmp(active_cache[o->pos]->name,
> +					       src[0]->name));
> +			} else if (o->merge) {
Maybe it is just me, but I would have thought
				while (++o->pos < active_nr)
					if (strcmp(active_cache[o->pos]->name,
							src[0]->name))
						break;

more readable. But that's maybe because I have trouble with do ... while constructs logically (I like to see the loop condition first, then the loop body).

Ciao, Dscho

Previous: Daniel BarkalowNext: Daniel Barkalow
Message 2 of 6 in “Add "skip_unmerged" option to unpack_trees.”
  1. 5/9 Add "skip_unmerged" option to unpack_trees.Daniel Barkalow, Feb 4, 2008
  2. Johannes SchindelinFeb 5, 2008
  3. Daniel BarkalowFeb 5, 2008
  4. Johannes SchindelinFeb 5, 2008
  5. Junio C HamanoFeb 5, 2008
  6. Daniel BarkalowFeb 6, 2008

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.