Git development
 help / color / mirror / Atom feed
* Re: Summary of core GIT while you are away.
From: Junio C Hamano @ 2005-05-27  3:36 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Kay Sievers, Linus Torvalds, pasky, braddr, nico, david,
	Git Mailing List
In-Reply-To: <42967CFE.7030007@zytor.com>

>>>>> "HPA" == H Peter Anvin <hpa@zytor.com> writes:

HPA> Junio C Hamano wrote:
KS> The cgi doesn't need it. Cogito has the spec file and the
KS> Mekefile with support for it - that was the reason the RPM
KS> made it on the machines there.
>> Ah, just installation convenience.  I see.

HPA> Not "just" an installation convenience.  Right now cogito and git-core
HPA> *conflict*.  That's why cogito really needs to be broken out from
HPA> git-core, so git-core can be updated independently.

What I learned from this thread are these:

 (1) CGI does not need Cogito but just needs core GIT.
 (2) Nobody said he uses Cogito on kernel.org machines.
 (3) But Cogito is installed nevertheless.
 (4) Installation of Cogito is done via RPM "with Makefiles and
     spec files" and both Cogito and core GIT comes bundled in.
 (5) I gather that there is no core GIT only RPM (nobody said
     this explicitly in this thread, though, so I may be
     mistaken about this point).

And that was where my comment about "just an installation
convenience" came from.

If somebody said Cogito _is_ used on kernel.org machines, then I
would not have said "just" nor "convenience".  That would mean
there is a real need to have Cogito and having just core GIT
would not be enough.


^ permalink raw reply

* [PATCH] check_file_directory_conflict path fix
From: David Meybohm @ 2005-05-27  2:59 UTC (permalink / raw)
  To: git

check_file_directory_conflict can give the wrong answers. This is
because the wrong length is passed to cache_name_pos. The length
passed should be the length of the whole path from the root, not
the length of each path subcomponent.

	$ git-init-db
	defaulting to local storage area
	$ mkdir path && touch path/file
	$ git-update-cache --add path/file
	$ rm path/file
	$ mkdir path/file && touch path/file/f
	$ git-update-cache --add path/file/f  <-- Conflict ignored
	$

Signed-off-by: David Meybohm <dmeybohmlkml@bellsouth.net>
---
Index: read-cache.c
===================================================================
--- ca5fef50fb68a3afbb35e1a48ac622f7a964f021/read-cache.c  (mode:100644)
+++ uncommitted/read-cache.c  (mode:100644)
@@ -172,11 +172,13 @@
 	cp = pathbuf;
 	while (1) {
 		char *ep = strchr(cp, '/');
+		int len;
 		if (!ep)
 			break;
 		*ep = 0;    /* first cut it at slash */
+		len = ep - pathbuf;
 		pos = cache_name_pos(pathbuf,
-				     htons(create_ce_flags(ep-cp, stage)));
+				     htons(create_ce_flags(len, stage)));
 		if (0 <= pos) {
 			/* Our leading path component is registered as a file,
 			 * and we are trying to make it a directory.  This is

^ permalink raw reply

* [PATCH cogito] adds cg-mirror-add and cg-mirror-sync
From: Michael Frank @ 2005-05-27  2:17 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 659 bytes --]

The attached patch adds the two programs cg-mirror-add and
cg-mirror-sync.  Say you do all of your work on your laptop and you want
to make a mirror of your repository available to the public.  You
specify the location of the mirror with cg-mirror-add:

$ cg-mirror-add scp://my.server:/var/www/repos/project.git

which locally creates the file .git/mirrors.  When you want to upload
your changes, you run cg-mirror-sync.

Michael


Signed-Off-By: Michael Frank <msfrank@syntaxjockey.com>

-- 

Michael Frank               .~.
msfrank@syntaxjockey.com    /v\
                           // \\
                          /(   )\
                           ^`-'^

[-- Attachment #2: mirror.patch --]
[-- Type: text/x-patch, Size: 2426 bytes --]

diff -pruN cogito.old/cg-mirror-add cogito.new/cg-mirror-add
--- cogito.old/cg-mirror-add	1969-12-31 16:00:00.000000000 -0800
+++ cogito.new/cg-mirror-add	2005-05-26 18:46:16.357489808 -0700
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+#
+# Add new mirror to the GIT repository.
+# Copyright (c) Michael Frank, 2005
+#
+# Takes the mirror location as parameter.  Location can be
+# an rsync URI, as in:
+#     $ cg-mirror add rsync://your.server:/path/to/project.git
+#
+# or an scp URI (rsync is still used to copy the files):
+#     $ cg-mirror add scp://user@your.server:/project/path.git
+#
+
+. ${COGITO_LIB}cg-Xlib
+
+location=$1
+
+([ "$location" ]) || die "usage: cg-mirror-add MIRROR_LOC"
+if [ -e $_git/mirrors ]; then
+    grep -xq $location $_git/mirrors && die "mirror already exists"
+fi
+echo "$location" >> $_git/mirrors
diff -pruN cogito.old/cg-mirror-sync cogito.new/cg-mirror-sync
--- cogito.old/cg-mirror-sync	1969-12-31 16:00:00.000000000 -0800
+++ cogito.new/cg-mirror-sync	2005-05-26 18:37:35.408686064 -0700
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+#
+# Pushes changes from the local GIT repository to mirrors.
+# Copyright (c) Michael Frank, 2005
+#
+
+. ${COGITO_LIB}cg-Xlib
+
+[ -r $_git/mirrors ] || die "No mirrors to sync!"
+
+uri=
+for mirror in `cat $_git/mirrors`; do
+    if echo $mirror | grep -q "^scp://"; then
+        uri=`echo $mirror | sed -e "s/^scp:\/\///"`
+        echo "syncing $mirror ..."
+        rsync -a -v -z --exclude=mirrors $_git/* $uri
+        echo ""
+    elif echo $mirror | grep -q "^rsync://"; then
+        echo "syncing $mirror ..."
+        rsync -a -v -z --exclude=mirrors $_git/* $mirror
+        echo ""
+    else
+        echo "skipping $mirror; mirror uses unknown transport"
+    fi
+done
diff -pruN cogito.old/Makefile cogito.new/Makefile
--- cogito.old/Makefile	2005-05-26 19:15:25.412593016 -0700
+++ cogito.new/Makefile	2005-05-26 17:44:43.348912448 -0700
@@ -55,7 +55,8 @@ PROG=   git-update-cache git-diff-files 
 SCRIPT=	commit-id tree-id parent-id cg-add cg-admin-lsobj cg-admin-uncommit \
 	cg-branch-add cg-branch-ls cg-cancel cg-clone cg-commit cg-diff \
 	cg-export cg-help cg-init cg-log cg-ls cg-merge cg-mkpatch cg-patch \
-	cg-pull cg-restore cg-rm cg-seek cg-status cg-tag cg-tag-ls cg-update
+	cg-pull cg-restore cg-rm cg-seek cg-status cg-tag cg-tag-ls cg-update \
+	cg-mirror-add cg-mirror-sync
 
 LIB_SCRIPT=cg-Xlib cg-Xdiffdo cg-Xmergefile
 

^ permalink raw reply

* Re: Summary of core GIT while you are away.
From: H. Peter Anvin @ 2005-05-27  1:50 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Kay Sievers, Linus Torvalds, pasky, braddr, nico, david,
	Git Mailing List
In-Reply-To: <7vll618rnw.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
> 
> KS> The cgi doesn't need it. Cogito has the spec file and the
> KS> Mekefile with support for it - that was the reason the RPM
> KS> made it on the machines there.
> 
> Ah, just installation convenience.  I see.
> 

Not "just" an installation convenience.  Right now cogito and git-core 
*conflict*.  That's why cogito really needs to be broken out from 
git-core, so git-core can be updated independently.

	-hpa

^ permalink raw reply

* BEWARE: mkdelta is broken
From: Nicolas Pitre @ 2005-05-27  1:32 UTC (permalink / raw)
  To: git

Please don't use mkdelta on a valuable repository for the time being.

The current delta loop detection logic is broken.  So if you have 
multiple merged branches or you have a changeset that revert things then 
you might end up with a delta loop and fsck-cache will effectively 
complain about unresolved deltas and assorted dangling/broken object 
links.

I'm working on a fix right now.


Nicolas

^ permalink raw reply

* [PATCH] allow pathspec to end with a slash (take #2)
From: Junio C Hamano @ 2005-05-27  0:52 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Git Mailing List
In-Reply-To: <7vis157ate.fsf@assigned-by-dhcp.cox.net>

Oops, wrong patch; I am an idiot.

------------
Recent rewrite broke "git-whatchanged -v -p drivers/usb/" but 
"git-whatchanged -v -p drivers/usb" still works.  Just strip out
the trailing slashes internally to make it work again.

It uses compare-thing-with-number comparison order instead of
visual comparison order ;-).

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
cd /opt/packrat/playpen/public/in-place/git/git.junio/
jit-diff 1: diffcore-pathspec.c
# - linus: [PATCH] Make ls-* output consistent with diff-* output format.
# + (working tree)
diff --git a/diffcore-pathspec.c b/diffcore-pathspec.c
--- a/diffcore-pathspec.c
+++ b/diffcore-pathspec.c
@@ -45,8 +45,12 @@ void diffcore_pathspec(const char **path
 	speccnt = i;
 	spec = xmalloc(sizeof(*spec) * speccnt);
 	for (i = 0; pathspec[i]; i++) {
+		int l;
 		spec[i].spec = pathspec[i];
-		spec[i].len = strlen(pathspec[i]);
+		l = strlen(pathspec[i]);
+		while (l > 0 && pathspec[i][l-1] == '/')
+			l--;
+		spec[i].len = l;
 	}
 
 	for (i = 0; i < q->nr; i++) {

Compilation finished at Thu May 26 17:50:40


^ permalink raw reply

* [PATCH] allow pathspec to end with a slash
From: Junio C Hamano @ 2005-05-27  0:49 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Git Mailing List
In-Reply-To: <Pine.LNX.4.58.0505261731050.17207@ppc970.osdl.org>

Recent rewrite broke "git-whatchanged -v -p drivers/usb/" but 
"git-whatchanged -v -p drivers/usb" still works.  Just strip out
the trailing slashes internally to make it work again.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
# - linus: [PATCH] Make ls-* output consistent with diff-* output format.
# + (working tree)
diff --git a/diffcore-pathspec.c b/diffcore-pathspec.c
--- a/diffcore-pathspec.c
+++ b/diffcore-pathspec.c
@@ -45,8 +45,12 @@ void diffcore_pathspec(const char **path
 	speccnt = i;
 	spec = xmalloc(sizeof(*spec) * speccnt);
 	for (i = 0; pathspec[i]; i++) {
+		int l;
 		spec[i].spec = pathspec[i];
-		spec[i].len = strlen(pathspec[i]);
+		l = strlen(pathspec[i]);
+		while (pathspec[i][l-1] == '/')
+			l--;
+		spec[i].len = l;
 	}
 
 	for (i = 0; i < q->nr; i++) {

Compilation finished at Thu May 26 17:46:56


^ permalink raw reply

* Re: Broken directory pathname pruning..
From: Junio C Hamano @ 2005-05-27  0:42 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Git Mailing List
In-Reply-To: <Pine.LNX.4.58.0505261731050.17207@ppc970.osdl.org>

Agreed in both counts.


^ permalink raw reply

* Re: Summary of core GIT while you are away.
From: Junio C Hamano @ 2005-05-27  0:40 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Linus Torvalds, pasky, braddr, nico, david, Git Mailing List
In-Reply-To: <20050526235944.GB6215@vrfy.org>

>>>>> "KS" == Kay Sievers <kay.sievers@vrfy.org> writes:

KS> I see what you mean, but allow to pass any charater through a cgi to a
KS> invoked shell as a command-line option is a nightmare without being very
KS> carful.

You are absolutely right that you must be careful.  But being
careful is not that hard.

I do not know what you are using to parse the data coming from
the browser (presumably application/x-www-form-urlencoded or
somesuch), but once you got the raw data out of it in a variable
in your host language (sorry I do not know what language you are
writing in, either), quoting that value safely for shell command
line is very simple and easy.  You can emulate what sq_expand()
in diff.c does.

Essentially you take advantage of single quote quoting which
lets you pass anything other than single quotes as literals, and
deal with single quotes by stepping out temporarily of the
single quote environment every time you see a single quote,
quote that single quote with a backslash, and immediately after
that you go back into single quote environment again and continue.

  original     sq_expand     result
  name     ==> name      ==> 'name'
  a b      ==> a b       ==> 'a b'
  a'b      ==> a'\''b    ==> 'a'\''b'

So in shell, using sed, you would do something like this:

------------
#!/bin/sh

orig="foo '"'\bar	b
az'

script="s/'/'\\\\\\''/g" ;# change (') to ('\'')

sq_inside=`echo "$orig" | sed "$script"`

echo "'$sq_inside'" ;# and enclose the whole thing in sq pair
------------


^ permalink raw reply

* Broken directory pathname pruning..
From: Linus Torvalds @ 2005-05-27  0:41 UTC (permalink / raw)
  To: Junio C Hamano, Git Mailing List


The directory-based pathname pruning doesn't work any more.

I used to just say

	git-whatchanged -v -p drivers/usb/

and I just noticed that it doesn't work any more.

It _does_ work if I leave the final '/' off the thing.

diff-tree itself does this right: that's shown by the fact that with the
slash in place, we still do get the right _changelog_ that is restricted
to drivers/usb changes, but the diffs themselves are missing.

So it seems to be purely "diffcore_pathspec()" that is broken.

Btw, I don't think we should call "diffcore_pathspec()" at all in
diff-tree, because diff-tree already handles "interesting" paths correctly
(and has to do so for performance reasons, since it's not acceptable to
expand all the trees and diff them).

So in the "git-whatchanged"  case the fix is as simple as just removing
those two lines, but the bug then continues to exist in the other *diff* 
programs..

Junio?

		Linus

diff --git a/diff-tree.c b/diff-tree.c
--- a/diff-tree.c
+++ b/diff-tree.c
@@ -268,8 +268,6 @@ static int call_diff_flush(void)
 		diff_flush(DIFF_FORMAT_NO_OUTPUT, 0);
 		return 0;
 	}
-	if (nr_paths)
-		diffcore_pathspec(paths);
 	if (header) {
 		if (diff_output_format == DIFF_FORMAT_MACHINE) {
 			const char *ep, *cp;


^ permalink raw reply

* Re: Summary of core GIT while you are away.
From: Kay Sievers @ 2005-05-27  0:22 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Linus Torvalds, pasky, braddr, nico, david, Git Mailing List
In-Reply-To: <7vfyw98qvp.fsf@assigned-by-dhcp.cox.net>

On Thu, May 26, 2005 at 05:16:42PM -0700, Junio C Hamano wrote:
> >>>>> "KS" == Kay Sievers <kay.sievers@vrfy.org> writes:
> 
> KS> On Thu, May 26, 2005 at 03:25:17PM -0700, Junio C Hamano wrote:
> >> >>>>> "KS" == Kay Sievers <kay.sievers@vrfy.org> writes:
> >> 
> KS> Nice, thanks. Here is a very first try. It searches the commit messages
> KS> and uses pickaxe to search in the file content:
> KS> http://ehlo.org/~kay/gitweb.cgi?p=git/git.git;a=search;s=symlink
> >> 
> >> Nice, thanks for using pickaxe ;-).  One request, knowing well
> >> that what you have on ehlo is your first cut.
> 
> KS> Yeah, I like it a lot. Nice work.
> 
> KS> Any idea, what's the reason, it doesn't find anything here in the
> KS> kernel tree:
> KS>   git-rev-list HEAD | git-diff-tree -S'TIMEOUT' --stdin
> 
> Dies this work for you?  Notice "-r".
> 
> git-rev-list HEAD | git-diff-tree -r -S'TIMEOUT' --stdin

Yes, works perfect! Sorry, I need to get used to repositories with subdirectories. :)

Thanks,
Kay

^ permalink raw reply

* Re: Summary of core GIT while you are away.
From: Junio C Hamano @ 2005-05-27  0:16 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Linus Torvalds, pasky, braddr, nico, david, Git Mailing List
In-Reply-To: <20050526235944.GB6215@vrfy.org>

>>>>> "KS" == Kay Sievers <kay.sievers@vrfy.org> writes:

KS> On Thu, May 26, 2005 at 03:25:17PM -0700, Junio C Hamano wrote:
>> >>>>> "KS" == Kay Sievers <kay.sievers@vrfy.org> writes:
>> 
KS> Nice, thanks. Here is a very first try. It searches the commit messages
KS> and uses pickaxe to search in the file content:
KS> http://ehlo.org/~kay/gitweb.cgi?p=git/git.git;a=search;s=symlink
>> 
>> Nice, thanks for using pickaxe ;-).  One request, knowing well
>> that what you have on ehlo is your first cut.

KS> Yeah, I like it a lot. Nice work.

KS> Any idea, what's the reason, it doesn't find anything here in the
KS> kernel tree:
KS>   git-rev-list HEAD | git-diff-tree -S'TIMEOUT' --stdin

Dies this work for you?  Notice "-r".

git-rev-list HEAD | git-diff-tree -r -S'TIMEOUT' --stdin


^ permalink raw reply

* Re: Summary of core GIT while you are away.
From: Junio C Hamano @ 2005-05-26 23:59 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Linus Torvalds, pasky, braddr, nico, david, Git Mailing List
In-Reply-To: <20050526232953.GA6215@vrfy.org>

>>>>> "KS" == Kay Sievers <kay.sievers@vrfy.org> writes:

KS> The cgi doesn't need it. Cogito has the spec file and the
KS> Mekefile with support for it - that was the reason the RPM
KS> made it on the machines there.

Ah, just installation convenience.  I see.



^ permalink raw reply

* Re: Summary of core GIT while you are away.
From: Kay Sievers @ 2005-05-26 23:59 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Linus Torvalds, pasky, braddr, nico, david, Git Mailing List
In-Reply-To: <7vy8a18w1e.fsf@assigned-by-dhcp.cox.net>

On Thu, May 26, 2005 at 03:25:17PM -0700, Junio C Hamano wrote:
> >>>>> "KS" == Kay Sievers <kay.sievers@vrfy.org> writes:
> 
> KS> Nice, thanks. Here is a very first try. It searches the commit messages
> KS> and uses pickaxe to search in the file content:
> KS>   http://ehlo.org/~kay/gitweb.cgi?p=git/git.git;a=search;s=symlink
> 
> Nice, thanks for using pickaxe ;-).  One request, knowing well
> that what you have on ehlo is your first cut.

Yeah, I like it a lot. Nice work.

Any idea, what's the reason, it doesn't find anything here in the
kernel tree:
  git-rev-list HEAD | git-diff-tree -S'TIMEOUT' --stdin

while:
  git-rev-list --header HEAD | grep -z TIMEOUT

prints the commit:
  6897089c5f7989603ccb9c696050470ba1dbd262

with the following change:
  git-diff-tree -p 6897089c5f7989603ccb9c696050470ba1dbd262 6f31e42221c7deae4527136ce0dd73990d8bc1d1
  diff --git a/drivers/base/firmware_class.c
  b/drivers/base/firmware_class.c
  --- a/drivers/base/firmware_class.c
  +++ b/drivers/base/firmware_class.c
  @@ -102,9 +102,6 @@ firmware_class_hotplug(struct class_devi
          if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &len,
                          "FIRMWARE=%s", fw_priv->fw_id))
                  return -ENOMEM;
  -       if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size,
          &len,
  -                       "TIMEOUT=%i", loading_timeout))
  -               return -ENOMEM;
   
          envp[i] = NULL;

> The pickaxe really shines when you can paste a couple of lines
> of code in the version you are having trouble with (or just you
> are curious about) in order to see where they came from.  For
> example, I did an equivalent of the following command back to
> figure out which patch and author to give credit to when I stole
> the tagged output format for git-ls-files from Cogito branch:
> 
> git-rev-list pasky |
> git-diff-tree -v -p --stdin \
> -S'static const char *tag_cached = "";
> static const char *tag_unmerged = "";
> static const char *tag_removed = "";'

Nice feature, maybe we can add it later (see next).

> Since this is primarily about program code, forbidding '*' is
> rather nasty, and not being able to do multiple lines makes it
> quite less useful than it could be.

I see what you mean, but allow to pass any charater through a cgi to a
invoked shell as a command-line option is a nightmare without being very
carful. That's why only a few character allowed now. I'm not sure how
to do that without creating possibly a big hole in the webserver. :)

Kay

^ permalink raw reply

* Re: git full diff output issues..
From: Linus Torvalds @ 2005-05-26 23:49 UTC (permalink / raw)
  To: Chris Wedgwood; +Cc: Junio C Hamano, Git Mailing List
In-Reply-To: <faf0d98cb35ad4b51c55d23d851093b5.ANY@taniwha.stupidest.org>



On Thu, 26 May 2005, Chris Wedgwood wrote:
>
> On Thu, May 26, 2005 at 12:19:21PM -0700, Linus Torvalds wrote:
> 
> > 	deleted file mode 100644 arch/um/kernel/checksum.c
> 
> why do we care about the mode here?

Junio makes the (correct) argument that patches should be reversible.

And the reverse of a delete is a create. And thus the file mode of the
file that got deleted matters.

		Linus

^ permalink raw reply

* Re: git full diff output issues..
From: Chris Wedgwood @ 2005-05-26 23:34 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Junio C Hamano, Git Mailing List
In-Reply-To: <Pine.LNX.4.58.0505261214140.2307@ppc970.osdl.org>

On Thu, May 26, 2005 at 12:19:21PM -0700, Linus Torvalds wrote:

> 	deleted file mode 100644 arch/um/kernel/checksum.c

why do we care about the mode here?

^ permalink raw reply

* Re: Summary of core GIT while you are away.
From: Kay Sievers @ 2005-05-26 23:29 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Linus Torvalds, pasky, braddr, nico, david, Git Mailing List
In-Reply-To: <7vd5rdbtif.fsf@assigned-by-dhcp.cox.net>

On Thu, May 26, 2005 at 01:51:36PM -0700, Junio C Hamano wrote:
> >>>>> "KS" == Kay Sievers <kay.sievers@vrfy.org> writes:
> 
> KS> Before someone asks: kernel.org needs to wait until cogito has catched up and
> KS> released a new version and it is installed on the machines.
> 
> Just from curiosity, does anybody runs (need to run) Cogito on
> kernel.org machine(s)?  Or is it that gitweb depends on Cogito,
> not running directly on top of Plumbing?

The cgi doesn't need it. Cogito has the spec file and the Mekefile
with support for it - that was the reason the RPM made it on the machines
there.
Splitting the git-core stuff completely out of Cogito and install
Cogito with a dependency on the git package is the only sane option I
think.

Kay

^ permalink raw reply

* [PATCH] fix and testcase for git-commit-tree option
From: Rene Scharfe @ 2005-05-26 23:03 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git

Actually use GIT_COMMITTER_DATE in git-commit-tree.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>

---
commit 00a2437bb75c5c3521f199faa044481783de45aa
tree 97976f550804169368e1e30cd26ead9980461a84
parent 2eab945e865317cb7d390aec214303f1d931b53a
author lsr <lsr@linux> Fri, 27 May 2005 00:53:30 +0200
committer lsr <lsr@linux> Fri, 27 May 2005 00:53:30 +0200

 commit-tree.c                  |    2 -
 t/t1100-commit-tree-options.sh |   45 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 1 deletion(-)

Index: commit-tree.c
===================================================================
--- dbec0de73e52d5b6d0740dd2e226d3ce8e2e51fd/commit-tree.c  (mode:100644)
+++ 97976f550804169368e1e30cd26ead9980461a84/commit-tree.c  (mode:100644)
@@ -153,7 +153,7 @@
 		parse_date(audate, date, sizeof(date));
 	cmdate = gitenv("GIT_COMMITTER_DATE");
 	if (cmdate)
-		parse_date(audate, realdate, sizeof(realdate));
+		parse_date(cmdate, realdate, sizeof(realdate));
 
 	remove_special(gecos); remove_special(realgecos); remove_special(commitgecos);
 	remove_special(email); remove_special(realemail); remove_special(commitemail);
Index: t/t1100-commit-tree-options.sh
===================================================================
--- /dev/null  (tree:dbec0de73e52d5b6d0740dd2e226d3ce8e2e51fd)
+++ 97976f550804169368e1e30cd26ead9980461a84/t/t1100-commit-tree-options.sh  (mode:100755)
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# Copyright (C) 2005 Rene Scharfe
+#
+
+test_description='git-commit-tree options test
+
+This test checks that git-commit-tree can create a specific commit
+object by defining all environment variables that it understands.
+'
+
+. ./test-lib.sh
+
+cat >expected <<EOF
+tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
+author Author Name <author@email> 1117148400 +0000
+committer Committer Name <committer@email> 1117150200 +0000
+
+comment text
+EOF
+
+test_expect_success \
+    'test preparation: write empty tree' \
+    'git-write-tree >treeid'
+
+test_expect_success \
+    'construct commit' \
+    'echo comment text |
+     GIT_AUTHOR_NAME="Author Name" \
+     GIT_AUTHOR_EMAIL="author@email" \
+     GIT_AUTHOR_DATE="2005-05-26 23:00" \
+     GIT_COMMITTER_NAME="Committer Name" \
+     GIT_COMMITTER_EMAIL="committer@email" \
+     GIT_COMMITTER_DATE="2005-05-26 23:30" \
+     TZ= git-commit-tree `cat treeid` >commitid 2>/dev/null'
+
+test_expect_success \
+    'read commit' \
+    'git-cat-file commit `cat commitid` >commit'
+
+test_expect_success \
+    'compare commit' \
+    'diff expected commit'
+
+test_done

^ permalink raw reply

* Re: Summary of core GIT while you are away.
From: Junio C Hamano @ 2005-05-26 22:25 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Linus Torvalds, pasky, braddr, nico, david, Git Mailing List
In-Reply-To: <20050526202712.GA6024@vrfy.org>

>>>>> "KS" == Kay Sievers <kay.sievers@vrfy.org> writes:

KS> Nice, thanks. Here is a very first try. It searches the commit messages
KS> and uses pickaxe to search in the file content:
KS>   http://ehlo.org/~kay/gitweb.cgi?p=git/git.git;a=search;s=symlink

Nice, thanks for using pickaxe ;-).  One request, knowing well
that what you have on ehlo is your first cut.

The pickaxe really shines when you can paste a couple of lines
of code in the version you are having trouble with (or just you
are curious about) in order to see where they came from.  For
example, I did an equivalent of the following command back to
figure out which patch and author to give credit to when I stole
the tagged output format for git-ls-files from Cogito branch:

git-rev-list pasky |
git-diff-tree -v -p --stdin \
-S'static const char *tag_cached = "";
static const char *tag_unmerged = "";
static const char *tag_removed = "";'

Since this is primarily about program code, forbidding '*' is
rather nasty, and not being able to do multiple lines makes it
quite less useful than it could be.



^ permalink raw reply

* Re: Summary of core GIT while you are away.
From: H. Peter Anvin @ 2005-05-26 22:11 UTC (permalink / raw)
  To: Kay Sievers
  Cc: Linus Torvalds, Junio C Hamano, pasky, braddr, nico, david,
	Git Mailing List
In-Reply-To: <20050526202712.GA6024@vrfy.org>

Kay Sievers wrote:
> 
> Nice, thanks. Here is a very first try. It searches the commit messages
> and uses pickaxe to search in the file content:
>   http://ehlo.org/~kay/gitweb.cgi?p=git/git.git;a=search;s=symlink
> 
> Before someone asks: kernel.org needs to wait until cogito has catched up and
> released a new version and it is installed on the machines.
> 

Petr, it seems we need a new Cogito release soon.  0.10 really has 
fallen behind a lot.  Also, separating out Cogito from git-core would be 
nice.

	-hpa

^ permalink raw reply

* Re: [PATCH Cogito] Fix cg-log -f behavior
From: Linus Torvalds @ 2005-05-26 22:13 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Marcel Holtmann, Petr Baudis, GIT Mailing List
In-Reply-To: <7voeaxae0r.fsf@assigned-by-dhcp.cox.net>



On Thu, 26 May 2005, Junio C Hamano wrote:
> 
> The suggestion I made this morning is to make ls-tree and
> ls-files use SP inside metadata and TAB before path.  If we
> can agree on that is the way to go, then the output from these
> commands would become:

Yes, let's make it so.

		Linus

^ permalink raw reply

* [PATCH Cogito] Make ls-* output consistent with diff-* output format.
From: Junio C Hamano @ 2005-05-26 21:38 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Marcel Holtmann, Petr Baudis, GIT Mailing List
In-Reply-To: <1117142741.12036.66.camel@pegasus>

>>>>> "MH" == Marcel Holtmann <marcel@holtmann.org> writes:

>> This is why I asked Linus about a slight format change for
>> git-ls-tree (and git-ls-files) this morning.

MH> To what is it changing?

Linus, we await your decree ;-).

To save your time reading backissues of the thread, here is the
summary of the problem this patch addresses:

    This is why I asked Linus about a slight format change for
    git-ls-tree (and git-ls-files) this morning.

    Currently, there are three incompatible format floating around.

      - diff-* brothers show the metadata (separated internally with
        SP), TAB, and path.  If it is a rename diff, another TAB and
        path follow them.

      - ls-tree gives everything with TAB separated.

      - ls-files gives everything with SP separated.

    The suggestion I made this morning is to make ls-tree and
    ls-files use SP inside metadata and TAB before path.  If we
    can agree on that is the way to go, then the output from these
    commands would become:

      - diff-* brothers:

        mode SP mode SP sha1 SP sha1 SP status TAB path [ TAB path ]

      - ls-tree:

        mode SP kind SP sha1 TAB path

      - ls-files --stage :

        mode SP sha1 SP stage TAB path

    What this means is the above piece of code can now be rewritten
    to parse with something like this, and it does not matter what
    command you have upstream:

            echo
            # List all files for for the initial commit
            if [ -z $tree2 ]; then
                    git-ls-tree "$tree1"
            else
                    git-diff-tree -r "$tree1" "$tree2"
            fi |
            cut -f2 |
            while read file; do
                ...

    Note that the above code is totally untested.  I do not use
    "cut" myself and I am writing this in my e-mail buffer.

------------
Use SP as the column separator except the ones before path which
uses TAB, to make the output format consistent across ls-* and
diff-* commands.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---

ls-files.c                  |    2 
ls-tree.c                   |    2 
t/t0000-basic.sh            |   46 ++++++++++----------
t/t1000-read-tree-m-3way.sh |   98 ++++++++++++++++++++++----------------------
t/t3100-ls-tree-restrict.sh |   40 ++++++++---------
5 files changed, 94 insertions(+), 94 deletions(-)

diff --git a/ls-files.c b/ls-files.c
--- a/ls-files.c
+++ b/ls-files.c
@@ -262,7 +262,7 @@ static void show_files(void)
 				       tag_cached,
 				       ce->name, line_terminator);
 			else
-				printf("%s%06o %s %d %s%c",
+				printf("%s%06o %s %d\t%s%c",
 				       ce_stage(ce) ? tag_unmerged :
 				       tag_cached,
 				       ntohl(ce->ce_mode),
diff --git a/ls-tree.c b/ls-tree.c
--- a/ls-tree.c
+++ b/ls-tree.c
@@ -127,7 +127,7 @@ static void list_recursive(void *buffer,
 		 * print out the info
 		 */
 		if (!matches || (matched != NULL && mtype == 0)) {
-			printf("%06o\t%s\t%s\t", mode,
+			printf("%06o %s %s\t", mode,
 			       S_ISDIR(mode) ? "tree" : "blob",
 			       sha1_to_hex(sha1));
 			print_path_prefix(&this_prefix);
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -92,14 +92,14 @@ test_expect_success \
     'git-ls-files --stage >current'
 
 cat >expected <<\EOF
-100644 f87290f8eb2cbbea7857214459a0739927eab154 0 path0
-120000 15a98433ae33114b085f3eb3bb03b832b3180a01 0 path0sym
-100644 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 0 path2/file2
-120000 d8ce161addc5173867a3c3c730924388daedbc38 0 path2/file2sym
-100644 0aa34cae68d0878578ad119c86ca2b5ed5b28376 0 path3/file3
-120000 8599103969b43aff7e430efea79ca4636466794f 0 path3/file3sym
-100644 00fb5908cb97c2564a9783c0c64087333b3b464f 0 path3/subp3/file3
-120000 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c 0 path3/subp3/file3sym
+100644 f87290f8eb2cbbea7857214459a0739927eab154 0	path0
+120000 15a98433ae33114b085f3eb3bb03b832b3180a01 0	path0sym
+100644 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 0	path2/file2
+120000 d8ce161addc5173867a3c3c730924388daedbc38 0	path2/file2sym
+100644 0aa34cae68d0878578ad119c86ca2b5ed5b28376 0	path3/file3
+120000 8599103969b43aff7e430efea79ca4636466794f 0	path3/file3sym
+100644 00fb5908cb97c2564a9783c0c64087333b3b464f 0	path3/subp3/file3
+120000 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c 0	path3/subp3/file3sym
 EOF
 test_expect_success \
     'validate git-ls-files output for a known tree.' \
@@ -116,10 +116,10 @@ test_expect_success \
     'showing tree with git-ls-tree' \
     'git-ls-tree $tree >current'
 cat >expected <<\EOF
-100644	blob	f87290f8eb2cbbea7857214459a0739927eab154	path0
-120000	blob	15a98433ae33114b085f3eb3bb03b832b3180a01	path0sym
-040000	tree	58a09c23e2ca152193f2786e06986b7b6712bdbe	path2
-040000	tree	21ae8269cacbe57ae09138dcc3a2887f904d02b3	path3
+100644 blob f87290f8eb2cbbea7857214459a0739927eab154	path0
+120000 blob 15a98433ae33114b085f3eb3bb03b832b3180a01	path0sym
+040000 tree 58a09c23e2ca152193f2786e06986b7b6712bdbe	path2
+040000 tree 21ae8269cacbe57ae09138dcc3a2887f904d02b3	path3
 EOF
 test_expect_success \
     'git-ls-tree output for a known tree.' \
@@ -129,17 +129,17 @@ test_expect_success \
     'showing tree with git-ls-tree -r' \
     'git-ls-tree -r $tree >current'
 cat >expected <<\EOF
-100644	blob	f87290f8eb2cbbea7857214459a0739927eab154	path0
-120000	blob	15a98433ae33114b085f3eb3bb03b832b3180a01	path0sym
-040000	tree	58a09c23e2ca152193f2786e06986b7b6712bdbe	path2
-100644	blob	3feff949ed00a62d9f7af97c15cd8a30595e7ac7	path2/file2
-120000	blob	d8ce161addc5173867a3c3c730924388daedbc38	path2/file2sym
-040000	tree	21ae8269cacbe57ae09138dcc3a2887f904d02b3	path3
-100644	blob	0aa34cae68d0878578ad119c86ca2b5ed5b28376	path3/file3
-120000	blob	8599103969b43aff7e430efea79ca4636466794f	path3/file3sym
-040000	tree	3c5e5399f3a333eddecce7a9b9465b63f65f51e2	path3/subp3
-100644	blob	00fb5908cb97c2564a9783c0c64087333b3b464f	path3/subp3/file3
-120000	blob	6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c	path3/subp3/file3sym
+100644 blob f87290f8eb2cbbea7857214459a0739927eab154	path0
+120000 blob 15a98433ae33114b085f3eb3bb03b832b3180a01	path0sym
+040000 tree 58a09c23e2ca152193f2786e06986b7b6712bdbe	path2
+100644 blob 3feff949ed00a62d9f7af97c15cd8a30595e7ac7	path2/file2
+120000 blob d8ce161addc5173867a3c3c730924388daedbc38	path2/file2sym
+040000 tree 21ae8269cacbe57ae09138dcc3a2887f904d02b3	path3
+100644 blob 0aa34cae68d0878578ad119c86ca2b5ed5b28376	path3/file3
+120000 blob 8599103969b43aff7e430efea79ca4636466794f	path3/file3sym
+040000 tree 3c5e5399f3a333eddecce7a9b9465b63f65f51e2	path3/subp3
+100644 blob 00fb5908cb97c2564a9783c0c64087333b3b464f	path3/subp3/file3
+120000 blob 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c	path3/subp3/file3sym
 EOF
 test_expect_success \
     'git-ls-tree -r output for a known tree.' \
diff --git a/t/t1000-read-tree-m-3way.sh b/t/t1000-read-tree-m-3way.sh
--- a/t/t1000-read-tree-m-3way.sh
+++ b/t/t1000-read-tree-m-3way.sh
@@ -81,60 +81,60 @@ test_expect_success \
     '3-way merge with git-read-tree -m' \
     "git-read-tree -m $tree_O $tree_A $tree_B"
 
-strip_object_id='s/^\([0-7]*\) [0-9a-f]* \([0-3].*\)$/\1 \2/'
-
+_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
+_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
 test_expect_success \
     'git-ls-files --stage of the merge result' \
     'git-ls-files --stage >current- &&
-     sed -e "$strip_object_id" <current- >current'
+     sed -e "s/ $_x40 / X /" <current- >current'
 
 cat >expected <<\EOF
-100644 2 AA
-100644 3 AA
-100644 2 AN
-100644 1 DD
-100644 3 DF
-100644 2 DF/DF
-100644 1 DM
-100644 3 DM
-100644 1 DN
-100644 3 DN
-100644 2 LL
-100644 3 LL
-100644 1 MD
-100644 2 MD
-100644 1 MM
-100644 2 MM
-100644 3 MM
-100644 0 MN
-100644 3 NA
-100644 1 ND
-100644 2 ND
-100644 0 NM
-100644 0 NN
-100644 0 SS
-100644 1 TT
-100644 2 TT
-100644 3 TT
-100644 2 Z/AA
-100644 3 Z/AA
-100644 2 Z/AN
-100644 1 Z/DD
-100644 1 Z/DM
-100644 3 Z/DM
-100644 1 Z/DN
-100644 3 Z/DN
-100644 1 Z/MD
-100644 2 Z/MD
-100644 1 Z/MM
-100644 2 Z/MM
-100644 3 Z/MM
-100644 0 Z/MN
-100644 3 Z/NA
-100644 1 Z/ND
-100644 2 Z/ND
-100644 0 Z/NM
-100644 0 Z/NN
+100644 X 2	AA
+100644 X 3	AA
+100644 X 2	AN
+100644 X 1	DD
+100644 X 3	DF
+100644 X 2	DF/DF
+100644 X 1	DM
+100644 X 3	DM
+100644 X 1	DN
+100644 X 3	DN
+100644 X 2	LL
+100644 X 3	LL
+100644 X 1	MD
+100644 X 2	MD
+100644 X 1	MM
+100644 X 2	MM
+100644 X 3	MM
+100644 X 0	MN
+100644 X 3	NA
+100644 X 1	ND
+100644 X 2	ND
+100644 X 0	NM
+100644 X 0	NN
+100644 X 0	SS
+100644 X 1	TT
+100644 X 2	TT
+100644 X 3	TT
+100644 X 2	Z/AA
+100644 X 3	Z/AA
+100644 X 2	Z/AN
+100644 X 1	Z/DD
+100644 X 1	Z/DM
+100644 X 3	Z/DM
+100644 X 1	Z/DN
+100644 X 3	Z/DN
+100644 X 1	Z/MD
+100644 X 2	Z/MD
+100644 X 1	Z/MM
+100644 X 2	Z/MM
+100644 X 3	Z/MM
+100644 X 0	Z/MN
+100644 X 3	Z/NA
+100644 X 1	Z/ND
+100644 X 2	Z/ND
+100644 X 0	Z/NM
+100644 X 0	Z/NN
 EOF
 
 test_expect_success \
diff --git a/t/t3100-ls-tree-restrict.sh b/t/t3100-ls-tree-restrict.sh
--- a/t/t3100-ls-tree-restrict.sh
+++ b/t/t3100-ls-tree-restrict.sh
@@ -34,7 +34,7 @@ test_expect_success \
 _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
 _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
 test_output () {
-    sed -e "s/	$_x40	/	X	/" <current >check
+    sed -e "s/ $_x40	/ X	/" <current >check
     diff -u expected check
 }
 
@@ -42,9 +42,9 @@ test_expect_success \
     'ls-tree plain' \
     'git-ls-tree $tree >current &&
      cat >expected <<\EOF &&
-100644	blob	X	path0
-120000	blob	X	path1
-040000	tree	X	path2
+100644 blob X	path0
+120000 blob X	path1
+040000 tree X	path2
 EOF
      test_output'
 
@@ -52,13 +52,13 @@ test_expect_success \
     'ls-tree recursive' \
     'git-ls-tree -r $tree >current &&
      cat >expected <<\EOF &&
-100644	blob	X	path0
-120000	blob	X	path1
-040000	tree	X	path2
-040000	tree	X	path2/baz
-100644	blob	X	path2/baz/b
-120000	blob	X	path2/bazbo
-100644	blob	X	path2/foo
+100644 blob X	path0
+120000 blob X	path1
+040000 tree X	path2
+040000 tree X	path2/baz
+100644 blob X	path2/baz/b
+120000 blob X	path2/bazbo
+100644 blob X	path2/foo
 EOF
      test_output'
 
@@ -74,8 +74,8 @@ test_expect_success \
     'ls-tree filtered' \
     'git-ls-tree $tree path1 path0 >current &&
      cat >expected <<\EOF &&
-100644	blob	X	path0
-120000	blob	X	path1
+100644 blob X	path0
+120000 blob X	path1
 EOF
      test_output'
 
@@ -83,11 +83,11 @@ test_expect_success \
     'ls-tree filtered' \
     'git-ls-tree $tree path2 >current &&
      cat >expected <<\EOF &&
-040000	tree	X	path2
-040000	tree	X	path2/baz
-100644	blob	X	path2/baz/b
-120000	blob	X	path2/bazbo
-100644	blob	X	path2/foo
+040000 tree X	path2
+040000 tree X	path2/baz
+100644 blob X	path2/baz/b
+120000 blob X	path2/bazbo
+100644 blob X	path2/foo
 EOF
      test_output'
 
@@ -95,8 +95,8 @@ test_expect_success \
     'ls-tree filtered' \
     'git-ls-tree $tree path2/baz >current &&
      cat >expected <<\EOF &&
-040000	tree	X	path2/baz
-100644	blob	X	path2/baz/b
+040000 tree X	path2/baz
+100644 blob X	path2/baz/b
 EOF
      test_output'
 
------------------------------------------------


^ permalink raw reply

* Re: git full diff output issues..
From: Junio C Hamano @ 2005-05-26 21:33 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Anton Altaparmakov, Git Mailing List
In-Reply-To: <Pine.LNX.4.58.0505261402470.2307@ppc970.osdl.org>

>>>>> "LT" == Linus Torvalds <torvalds@osdl.org> writes:

LT> On Thu, 26 May 2005, Junio C Hamano wrote:
>> 
>> So what do you want from me at this point?  Nothing?

LT> Yeah, I'm happy. Sorry for the false alarm.

No problem.  I still kinda like Anton's proposal for conceptual
cleanness, but if the tool can cope with what we already have
then less cluttering in the output is better for human eyes.

Let me again remind you about git-external-diff-script patch.
When you encounter more gotcha in the built-in diff output
format in the future, it would be a valuable tool to experiment
and express what you would like to have git-apply to parse.


^ permalink raw reply

* Re: [PATCH Cogito] Fix cg-log -f behavior
From: Marcel Holtmann @ 2005-05-26 21:25 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Linus Torvalds, Petr Baudis, GIT Mailing List
In-Reply-To: <7voeaxae0r.fsf@assigned-by-dhcp.cox.net>

Hi Junio,

> MH> I am not sure, because I never tried it. Does it use a different format?
> 
> I am not a Cogito user, but I am a bit wondering if you have
> read what is around what you are modifying.
> 
> 	# List all files for for the initial commit
> 	if [ -z $tree2 ]; then
> 		list_cmd="git-ls-tree $tree1"
> 	else
> 		list_cmd="git-diff-tree -r $tree1 $tree2"
> 	fi
> 	echo
> 	$list_cmd | while read modes type sha1s file; do
> 
> The code you changed is fed by either git-ls-tree or
> git-diff-tree, depending on whether you are talking about
> initial commit.  git-ls-tree gives "mode type sha1 file".

I assumed that both have the same output format.

> This is why I asked Linus about a slight format change for
> git-ls-tree (and git-ls-files) this morning.

To what is it changing?

Regards

Marcel



^ permalink raw reply

* Re: [PATCH Cogito] Fix cg-log -f behavior
From: Junio C Hamano @ 2005-05-26 21:11 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: Linus Torvalds, Petr Baudis, GIT Mailing List
In-Reply-To: <1117139740.12036.59.camel@pegasus>

>>>>> "MH" == Marcel Holtmann <marcel@holtmann.org> writes:

MH> Hi Junio,

>> Doesn't that still break one-tree case (i.e. [ -z $tree2 ])?

MH> I am not sure, because I never tried it. Does it use a different format?

I am not a Cogito user, but I am a bit wondering if you have
read what is around what you are modifying.

	# List all files for for the initial commit
	if [ -z $tree2 ]; then
		list_cmd="git-ls-tree $tree1"
	else
		list_cmd="git-diff-tree -r $tree1 $tree2"
	fi
	echo
	$list_cmd | while read modes type sha1s file; do

The code you changed is fed by either git-ls-tree or
git-diff-tree, depending on whether you are talking about
initial commit.  git-ls-tree gives "mode type sha1 file".

This is why I asked Linus about a slight format change for
git-ls-tree (and git-ls-files) this morning.

Currently, there are three incompatible format floating around.

  - diff-* brothers show the metadata (separated internally with
    SP), TAB, and path.  If it is a rename diff, another TAB and
    path follow them.

  - ls-tree gives everything with TAB separated.

  - ls-files gives everything with SP separated.

The suggestion I made this morning is to make ls-tree and
ls-files use SP inside metadata and TAB before path.  If we
can agree on that is the way to go, then the output from these
commands would become:

  - diff-* brothers:

    mode SP mode SP sha1 SP sha1 SP status TAB path [ TAB path ]

  - ls-tree:

    mode SP kind SP sha1 TAB path

  - ls-files --stage :

    mode SP sha1 SP stage TAB path

What this means is the above piece of code can now be rewritten
to parse with something like this, and it does not matter what
command you have upstream:

	echo
	# List all files for for the initial commit
	if [ -z $tree2 ]; then
        	git-ls-tree "$tree1"
	else
		git-diff-tree -r "$tree1" "$tree2"
	fi |
        cut -f2 |
	while read file; do
            ...

Note that the above code is totally untested.  I do not use
"cut" myself and I am writing this in my e-mail buffer.





^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox