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

Re: cygwin, 44k files: how to commit only index?

From
Alex Riesen <raa.lkml@gmail.com>
Date
Dec 8, 2006, 08:43 UTC
Message-ID
<81b0412b0612080043y6ff3462ev5f8b4c4cf40182f5@mail.gmail.com>
In-Reply-To
<81b0412b0612072327x77477584jb9131b26b0854f2@mail.gmail.com>
On 12/8/06, Alex Riesen <raa.lkml@gmail.com> wrote:
Show 10 quoted lines
> On 12/8/06, Junio C Hamano <junkio@cox.net> wrote:
> > In 'pu' (jc/diff topic), I have a very generic code to walk the
> > index, working tree and zero or more trees in parallel, taking
> > advantage of cache-tree.  If somebody is interested to learn the
> > internals of git, some of the code could be lifted from there
> > and simplified to walk just the index and a single tree, and I
> > think that would optimize "diff-index --cached" quite a bit.
>
> Will try to look at it.
>

And now I'm playing with that (against test-para.c from pu). I expect it to be broken by that webGmail, so it may not apply to anything, but you'll get the idea. More clearly than from me trying to explain.

commit 83642cdaca6dc1a2f94aa41923bc9e8f02d0e12f
Author: Alex Riesen <raa.lkml@gmail.com>
Date:   Fri Dec 8 09:38:18 2006 +0100
    add --quiet to test-para: stop at the first difference
diff --git a/test-para.c b/test-para.c
index bce5f0c..99d3792 100644
--- a/test-para.c
+++ b/test-para.c
@@ -21,6 +21,7 @@ int main(int ac, const char **av)
 	unsigned char trees[64][20];
 	int num_tree = 0, i, using_head, show_all = 0;
 	int index_wanted = 1, work_wanted = 1, tree_wanted = 0;
+	int quiet = 0;
 	const char *prefix;
 	const char **pathspec;

@@ -43,6 +44,8 @@ int main(int ac, const char **av)
 			work_wanted = 0;
 		else if (!strcmp(av[1] + 2, "no-index"))
 			index_wanted = 0;
+		else if (!strcmp(av[1] + 2, "quiet"))
+			quiet = 1;
 		else if (!av[1][2])
 			break;
 		else
@@ -118,7 +121,9 @@ int main(int ac, const char **av)
 				show_one(z, e->name, e->namelen,
 					 e->hash, e->mode);
 			}
-			else
+			else {
+				if (quiet)
+					exit(1);
 				for (i = 0; i < w.num_trees + 2; i++) {
 					char numbuf[10];

@@ -149,6 +154,7 @@ int main(int ac, const char **av)
 					show_one(z, e->name, e->namelen,
 						 e->hash, e->mode);
 				}
+			}
 		}
Previous: Alex RiesenNext: Alex Riesen
Message 17 of 18 in “cygwin, 44k files: how to commit only index?”
  1. Alex RiesenDec 7, 2006
  2. Junio C HamanoDec 7, 2006
  3. Shawn PearceDec 7, 2006
  4. Shawn PearceDec 7, 2006
  5. Christian MICHONDec 7, 2006
  6. Torgil SvenssonDec 9, 2006
  7. Junio C HamanoDec 7, 2006
  8. Shawn PearceDec 7, 2006
  9. Junio C HamanoDec 7, 2006
  10. Alex RiesenDec 7, 2006
  11. Junio C HamanoDec 7, 2006
  12. Alex RiesenDec 8, 2006
  13. Junio C HamanoDec 8, 2006
  14. Alex RiesenDec 8, 2006
  15. Junio C HamanoDec 8, 2006
  16. Alex RiesenDec 8, 2006
  17. Alex RiesenDec 8, 2006
  18. Alex RiesenDec 8, 2006

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.