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

Re: Two bugs with renaming

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Mar 20, 2008, 04:22 UTC
Message-ID
<alpine.LFD.1.00.0803192120410.3020@woody.linux-foundation.org>
In-Reply-To
<alpine.LFD.1.00.0803192059120.3020@woody.linux-foundation.org>
On Wed, 19 Mar 2008, Linus Torvalds wrote:
Show 5 quoted lines
> 
> With the new unpack-trees logic it's pretty easy to *not* unpack with DF 
> conflicts (add a flag that tells us to use "base_name_compare()" instead 
> of "df_name_compare()" in do_compare_entry()), and maybe we can then make 
> builtin-merge-recursive.c set that flag. [...]

Looking at that, the first thing we should probably do is to make those existing flags be bitfields rather than "int" before we add even more flags there.

Hmm?
			Linus
---
 unpack-trees.h |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/unpack-trees.h b/unpack-trees.h
index 50453ed..ad8cc65 100644
--- a/unpack-trees.h
+++ b/unpack-trees.h
@@ -9,16 +9,16 @@ typedef int (*merge_fn_t)(struct cache_entry **src,
 		struct unpack_trees_options *options);
 
 struct unpack_trees_options {
-	int reset;
-	int merge;
-	int update;
-	int index_only;
-	int nontrivial_merge;
-	int trivial_merges_only;
-	int verbose_update;
-	int aggressive;
-	int skip_unmerged;
-	int gently;
+	unsigned int reset:1,
+		     merge:1,
+		     update:1,
+		     index_only:1,
+		     nontrivial_merge:1,
+		     trivial_merges_only:1,
+		     verbose_update:1,
+		     aggressive:1,
+		     skip_unmerged:1,
+		     gently:1;
 	const char *prefix;
 	int pos;
 	struct dir_struct *dir;
Previous: Linus TorvaldsNext: Junio C Hamano
Message 8 of 9 in “Two bugs with renaming”
  1. John GoerzenMar 19, 2008
  2. Junio C HamanoMar 20, 2008
  3. Jeff KingMar 20, 2008
  4. John GoerzenMar 20, 2008
  5. Jeff KingMar 20, 2008
  6. Björn SteinbrinkMar 20, 2008
  7. Linus TorvaldsMar 20, 2008
  8. Linus TorvaldsMar 20, 2008
  9. Junio C HamanoMar 20, 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.