git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Riesen" <raa.lkml@gmail.com>
To: "Junio C Hamano" <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: cygwin, 44k files: how to commit only index?
Date: Fri, 8 Dec 2006 09:43:49 +0100	[thread overview]
Message-ID: <81b0412b0612080043y6ff3462ev5f8b4c4cf40182f5@mail.gmail.com> (raw)
In-Reply-To: <81b0412b0612072327x77477584jb9131b26b0854f2@mail.gmail.com>

On 12/8/06, Alex Riesen <raa.lkml@gmail.com> wrote:
> 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);
 				}
+			}
 		}


  parent reply	other threads:[~2006-12-08  8:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-07 14:27 cygwin, 44k files: how to commit only index? Alex Riesen
2006-12-07 19:16 ` Junio C Hamano
2006-12-07 19:26   ` Shawn Pearce
2006-12-07 19:35     ` Shawn Pearce
2006-12-07 21:26       ` Christian MICHON
2006-12-09  8:27         ` Torgil Svensson
2006-12-07 19:57     ` Junio C Hamano
2006-12-07 20:29       ` Shawn Pearce
2006-12-07 21:53         ` Junio C Hamano
2006-12-07 22:15   ` Alex Riesen
2006-12-07 22:29     ` Junio C Hamano
2006-12-08  5:27       ` Alex Riesen
2006-12-08  6:54         ` Junio C Hamano
2006-12-08  7:27           ` Alex Riesen
2006-12-08  7:36             ` Junio C Hamano
2006-12-08  7:48               ` Alex Riesen
2006-12-08  8:43             ` Alex Riesen [this message]
2006-12-08 14:16     ` Alex Riesen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81b0412b0612080043y6ff3462ev5f8b4c4cf40182f5@mail.gmail.com \
    --to=raa.lkml@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).