Git development
 help / color / mirror / Atom feed
* Re: [PATCH] Add commify function to cg-Xlib
From: Frank Sorenson @ 2005-07-06 17:57 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Git Mailing List
In-Reply-To: <20050706075938.GB7054@pasky.ji.cz>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Petr Baudis wrote:
> I don't know. Could you give some supporting argumentation, please? Is
> it really that hard to read for the Americans without the commas? It is
> at least harder to read for me as an European - we don't have any
> commas in there, just spaces (if anything at all). Besides, the number
> is usually not in higher order than thousands, so... why is it worth it?

Okay.  Not a problem.  It just cleaned things up a little for me.  If I
want to keep it, I'll probably just maintain it in my local tree.

Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
frank@tuxrocks.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCzBumaI0dwg4A47wRAmKKAJ90HJymEjSHwvpKq7pjQkXf9wz7sACfXl8F
BttVqvdhovFaGYEn9PibeC0=
=N90S
-----END PGP SIGNATURE-----

^ permalink raw reply

* Re: [PATCH] Short-circuit git-clone-pack while cloning locally.
From: Junio C Hamano @ 2005-07-06 18:00 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: David S. Miller, Git Mailing List
In-Reply-To: <Pine.LNX.4.58.0507060911510.3570@g5.osdl.org>

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

LT> It would seem that you don't do anything at all for the non-local case.

Oops.

^ permalink raw reply

* Re: Tags
From: Matthias Urlichs @ 2005-07-06 18:04 UTC (permalink / raw)
  To: git
In-Reply-To: <7vy88ldpml.fsf@assigned-by-dhcp.cox.net>

Hi, Junio C Hamano wrote:

> I wanted to have something like this in the past for some reason
> I do not exactly remember anymore, but basically it was to
> record "here is the list of related objects."

One use I'd have for that is regression testing -- collect all IDs in one
bag and then say "gitk bad ^good".

OTOH, I dunno whether the core tools really need to understand that.

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
If at first you don't succeed, you must be a programmer.

^ permalink raw reply

* Re: BUG: cg-clone accepts '_' in git_ssh: URI's, but cg-push does not.
From: John Ellson @ 2005-07-06 18:26 UTC (permalink / raw)
  To: Horst von Brand; +Cc: git
In-Reply-To: <200507061658.j66Gw7Me014155@laptop11.inf.utfsm.cl>

Horst von Brand wrote:
> John Ellson <john.ellson@comcast.net> wrote:
> 
>>BUG: cg-clone accepts '_' in git+ssh: URI's, but cg-push does not.
> 
> 
> Right. '_' is illegal in domain names...


OK, but its legal in the path part of URI's, I believe, and I'm more 
bothered by the assymetry between cg-clone and cg-push.  It allowed me 
to clone a project but not to push updates back.

I was experimenting with git+ssh between two machines locally using:

  git+ssh://ontap/home/ellson/FIX/Linux.x86_64/build/cogito/.git

John

^ permalink raw reply

* BUG:  "rpmbuild -ta cogito-0.12.tar.gz" fails
From: John Ellson @ 2005-07-06 18:40 UTC (permalink / raw)
  To: git

"rpmbuild -ta cogito-0.12.tar.gz" fails because cogito.spec.in refers to
".bz2" in its "Source:" line, instead of to ".gz".



This is obviously a trivial patch.  Do I need prior approval to send 
patches to this group?     What is the the significance of 
"Signed-off-by:"     Is there a FAQ I should read?


John

^ permalink raw reply

* git-pull-script hates me
From: Greg KH @ 2005-07-06 20:31 UTC (permalink / raw)
  To: torvalds; +Cc: git

I just updated to the latest git tree, and now get the following when I
try to pull from a ssh repo:

 $ git-pull-script gregkh@someserver.org:/public_html/udev.git/
 fatal: I don't like '@'. Sue me.

So I drop the @ and then get:
 $ git-pull-script someserver.org:/public_html/udev.git/
 fatal: I don't like '_'. Sue me.

This worked just fine before I updated git :(

Any hints?  Or should I be using a different command to do pulls?

thanks,

greg k-h

^ permalink raw reply

* Re: git-pull-script hates me
From: Linus Torvalds @ 2005-07-06 20:37 UTC (permalink / raw)
  To: Greg KH; +Cc: git
In-Reply-To: <20050706203139.GA19198@kroah.com>



On Wed, 6 Jul 2005, Greg KH wrote:
>
> I just updated to the latest git tree, and now get the following when I
> try to pull from a ssh repo:
> 
>  $ git-pull-script gregkh@someserver.org:/public_html/udev.git/
>  fatal: I don't like '@'. Sue me.
> 
> So I drop the @ and then get:
>  $ git-pull-script someserver.org:/public_html/udev.git/
>  fatal: I don't like '_'. Sue me.

Heh. It really is personal.

The new git-pack handling tries to avoid special characters, because it 
passes some things off to a shell (ie it opens up an ssh connection.

But yeah, it's being a bit too anal. Just look at connect.c: shell_safe(),
and add both '_' and '@' to the safe list (and any other safe characters),
and off you go.

And if somebody wants to add code to do proper escaping of the non-safe 
ones, we can do that too. I was just lazy and added the characters I ever 
use ;)

		Linus

^ permalink raw reply

* Re: git-pull-script hates me
From: Greg KH @ 2005-07-06 20:54 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git
In-Reply-To: <20050706204627.GA19481@kroah.com>

On Wed, Jul 06, 2005 at 01:46:27PM -0700, Greg KH wrote:
> Ok, below is a patch for this.  It works, but then errors out with:
> 	bash: git-upload-pack: command not found
> 	fatal: unexpected EOF
> 
> So I'm guessing that I have to convince the server owner to update their
> version of git too?

Ok, so they did that, and the pull now works, sorry for the noise.

thanks,

greg k-h

^ permalink raw reply

* Re: git-pull-script hates me
From: Linus Torvalds @ 2005-07-06 20:58 UTC (permalink / raw)
  To: Greg KH; +Cc: git
In-Reply-To: <20050706204627.GA19481@kroah.com>



On Wed, 6 Jul 2005, Greg KH wrote:
> 
> Ok, below is a patch for this.  It works, but then errors out with:
> 	bash: git-upload-pack: command not found
> 	fatal: unexpected EOF
> 
> So I'm guessing that I have to convince the server owner to update their
> version of git too?

The easiest way is to just build git on the other end yourself, and make
sure you have

	PATH=~/bin:$PATH

in your .bashrc. That way you're not at the mercy of the sysadmin on the 
other side.

		Linus

^ permalink raw reply

* Re: Stacked GIT 0.3 (now more Quilt-like)
From: Catalin Marinas @ 2005-07-06 20:54 UTC (permalink / raw)
  To: Peter Osterlund; +Cc: GIT
In-Reply-To: <m3y88m21ln.fsf@telia.com>

On Mon, 2005-07-04 at 14:32 +0200, Peter Osterlund wrote:
> I agree with the other comments, it's probably not wise to rely on
> wiggle, and wiggle sometimes makes a mess. However, it often does the
> right thing, and with a configurable merge program and an undo
> function, this should not be a problem. Just undo and try again if you
> don't like the result.

In the today's snapshot you can get the 'stg push --undo' command which
reverts the result of a push operation (either failed or not). The patch
is reverted to its previous state. It works even if you ran 'refresh'.

The current implementation does not remove the .older/.local/.remote
files from the tree when undoing a push. I think I will first implement
a 'resolve' command which takes care of these files.

Anyway, once I fully test the current state of stgit, I will make the
0.4 release (probably this weekend).

--
Catalin

^ permalink raw reply

* Re: git-pull-script hates me
From: Greg KH @ 2005-07-06 20:46 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git
In-Reply-To: <Pine.LNX.4.58.0507061335100.4159@g5.osdl.org>

On Wed, Jul 06, 2005 at 01:37:55PM -0700, Linus Torvalds wrote:
> 
> 
> On Wed, 6 Jul 2005, Greg KH wrote:
> >
> > I just updated to the latest git tree, and now get the following when I
> > try to pull from a ssh repo:
> > 
> >  $ git-pull-script gregkh@someserver.org:/public_html/udev.git/
> >  fatal: I don't like '@'. Sue me.
> > 
> > So I drop the @ and then get:
> >  $ git-pull-script someserver.org:/public_html/udev.git/
> >  fatal: I don't like '_'. Sue me.
> 
> Heh. It really is personal.
> 
> The new git-pack handling tries to avoid special characters, because it 
> passes some things off to a shell (ie it opens up an ssh connection.
> 
> But yeah, it's being a bit too anal. Just look at connect.c: shell_safe(),
> and add both '_' and '@' to the safe list (and any other safe characters),
> and off you go.

Ok, below is a patch for this.  It works, but then errors out with:
	bash: git-upload-pack: command not found
	fatal: unexpected EOF

So I'm guessing that I have to convince the server owner to update their
version of git too?

thanks,

greg k-h

--------------------

Subject: allow _ and @ in addresses

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

diff --git a/connect.c b/connect.c
--- a/connect.c
+++ b/connect.c
@@ -57,6 +57,7 @@ static char *shell_safe(char *url)
 		['A'...'Z'] = 1,
 		['.'] = 1, ['/'] = 1,
 		['-'] = 1, ['+'] = 1,
+		['@'] = 1, ['_'] = 1,
 		[':'] = 1
 	};
 

^ permalink raw reply

* Re: git-pull-script hates me
From: Linus Torvalds @ 2005-07-06 21:36 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7v64vnwrwg.fsf@assigned-by-dhcp.cox.net>



On Wed, 6 Jul 2005, Junio C Hamano wrote:
> 
> Anybody who is interested in doing this can just move
> sq_expand() from diff.c to some public library and expose it in
> cache.h.

No, that doesn't work at all.

"sq_expand()" tries to protect things inside single quotes. That's a 
totally different problem (and btw, it does so badly: it doesn't quote '\' 
for example).

For a shell command line, there are _tons_ of special characters that you
mustn't pass through. Things like ';', '<', '>', '&' all have magic
meaning and are not valid in the destination name. Not to mention just
simple whitespace.

		Linus

^ permalink raw reply

* Re: git-pull-script hates me
From: Junio C Hamano @ 2005-07-06 21:23 UTC (permalink / raw)
  To: git; +Cc: Linus Torvalds
In-Reply-To: <Pine.LNX.4.58.0507061335100.4159@g5.osdl.org>

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

LT> But yeah, it's being a bit too anal. Just look at connect.c: shell_safe(),
LT> and add both '_' and '@' to the safe list (and any other safe characters),
LT> and off you go.

LT> And if somebody wants to add code to do proper escaping of the non-safe 
LT> ones, we can do that too. I was just lazy and added the characters I ever 
LT> use ;)

Anybody who is interested in doing this can just move
sq_expand() from diff.c to some public library and expose it in
cache.h.

I am not going to do it myself immediately so there is no worry
to race against me ;-).

^ permalink raw reply

* [PATCH 1/2] Add t/t6003 with some --topo-order tests
From: Jon Seymour @ 2005-07-07  0:50 UTC (permalink / raw)
  To: git; +Cc: torvalds, jon.seymour


Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---
Linus: the last test fails with --topo-order at the moment. I haven't
seen your most recent changes, so it may still fail for trivial 
reasons even then. If so, I'll post an update.

 t/t6003-rev-list-topo-order.sh |  417 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 417 insertions(+), 0 deletions(-)
 create mode 100755 t/t6003-rev-list-topo-order.sh

4adac54d3b1503168c54c8eb03e78ab09762c7f7
diff --git a/t/t6003-rev-list-topo-order.sh b/t/t6003-rev-list-topo-order.sh
new file mode 100755
--- /dev/null
+++ b/t/t6003-rev-list-topo-order.sh
@@ -0,0 +1,417 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Jon Seymour
+#
+
+test_description='Tests git-rev-list --topo-order functionality'
+
+. ./test-lib.sh
+. ../t6000-lib.sh # t6xxx specific functions
+
+list_duplicates()
+{
+    "$@" | sort | uniq -d
+}
+
+date >path0
+git-update-cache --add path0
+save_tag tree git-write-tree
+on_committer_date "1971-08-16 00:00:00" hide_error save_tag root unique_commit root tree
+on_committer_date "1971-08-16 00:00:01" save_tag l0 unique_commit l0 tree -p root
+on_committer_date "1971-08-16 00:00:02" save_tag l1 unique_commit l1 tree -p l0
+on_committer_date "1971-08-16 00:00:03" save_tag l2 unique_commit l2 tree -p l1
+on_committer_date "1971-08-16 00:00:04" save_tag a0 unique_commit a0 tree -p l2
+on_committer_date "1971-08-16 00:00:05" save_tag a1 unique_commit a1 tree -p a0
+on_committer_date "1971-08-16 00:00:06" save_tag b1 unique_commit b1 tree -p a0
+on_committer_date "1971-08-16 00:00:07" save_tag c1 unique_commit c1 tree -p b1
+on_committer_date "1971-08-16 00:00:08" as_author foobar@example.com save_tag b2 unique_commit b2 tree -p b1
+on_committer_date "1971-08-16 00:00:09" save_tag b3 unique_commit b2 tree -p b2
+on_committer_date "1971-08-16 00:00:10" save_tag c2 unique_commit c2 tree -p c1 -p b2
+on_committer_date "1971-08-16 00:00:11" save_tag c3 unique_commit c3 tree -p c2
+on_committer_date "1971-08-16 00:00:12" save_tag a2 unique_commit a2 tree -p a1
+on_committer_date "1971-08-16 00:00:13" save_tag a3 unique_commit a3 tree -p a2
+on_committer_date "1971-08-16 00:00:14" save_tag b4 unique_commit b4 tree -p b3 -p a3
+on_committer_date "1971-08-16 00:00:15" save_tag a4 unique_commit a4 tree -p a3 -p b4 -p c3
+on_committer_date "1971-08-16 00:00:16" save_tag l3 unique_commit l3 tree -p a4
+on_committer_date "1971-08-16 00:00:17" save_tag l4 unique_commit l4 tree -p l3
+on_committer_date "1971-08-16 00:00:18" save_tag l5 unique_commit l5 tree -p l4
+on_committer_date "1971-08-16 00:00:19" save_tag m1 unique_commit m1 tree -p a4 -p c3
+on_committer_date "1971-08-16 00:00:20" save_tag m2 unique_commit m2 tree -p c3 -p a4
+on_committer_date "1971-08-16 00:00:21" hide_error save_tag alt_root unique_commit alt_root tree
+on_committer_date "1971-08-16 00:00:22" save_tag r0 unique_commit r0 tree -p alt_root
+on_committer_date "1971-08-16 00:00:23" save_tag r1 unique_commit r1 tree -p r0
+on_committer_date "1971-08-16 00:00:24" save_tag l5r1 unique_commit l5r1 tree -p l5 -p r1
+on_committer_date "1971-08-16 00:00:25" save_tag r1l5 unique_commit r1l5 tree -p r1 -p l5
+
+
+#
+# note: as of 20/6, it isn't possible to create duplicate parents, so this
+# can't be tested.
+#
+#on_committer_date "1971-08-16 00:00:20" save_tag m3 unique_commit m3 tree -p c3 -p a4 -p c3
+hide_error save_tag e1 as_author e@example.com unique_commit e1 tree
+save_tag e2 as_author e@example.com unique_commit e2 tree -p e1
+save_tag f1 as_author f@example.com unique_commit f1 tree -p e1
+save_tag e3 as_author e@example.com unique_commit e3 tree -p e2
+save_tag f2 as_author f@example.com unique_commit f2 tree -p f1
+save_tag e4 as_author e@example.com unique_commit e4 tree -p e3 -p f2
+save_tag e5 as_author e@example.com unique_commit e5 tree -p e4
+save_tag f3 as_author f@example.com unique_commit f3 tree -p f2
+save_tag f4 as_author f@example.com unique_commit f4 tree -p f3
+save_tag e6 as_author e@example.com unique_commit e6 tree -p e5 -p f4
+save_tag f5 as_author f@example.com unique_commit f5 tree -p f4
+save_tag f6 as_author f@example.com unique_commit f6 tree -p f5 -p e6
+save_tag e7 as_author e@example.com unique_commit e7 tree -p e6
+save_tag e8 as_author e@example.com unique_commit e8 tree -p e7
+save_tag e9 as_author e@example.com unique_commit e9 tree -p e8
+save_tag f7 as_author f@example.com unique_commit f7 tree -p f6
+save_tag f8 as_author f@example.com unique_commit f8 tree -p f7
+save_tag f9 as_author f@example.com unique_commit f9 tree -p f8
+save_tag e10 as_author e@example.com unique_commit e1 tree -p e9 -p f8
+
+hide_error save_tag g0 unique_commit g0 tree
+save_tag g1 unique_commit g1 tree -p g0
+save_tag h1 unique_commit g2 tree -p g0
+save_tag g2 unique_commit g3 tree -p g1 -p h1
+save_tag h2 unique_commit g4 tree -p g2
+save_tag g3 unique_commit g5 tree -p g2
+save_tag g4 unique_commit g6 tree -p g3 -p h2
+
+tag l5 > .git/HEAD
+
+#
+# cd to t/trash and use 
+#
+#    git-rev-list ... 2>&1 | sed "$(cat sed.script)" 
+#
+# if you ever want to manually debug the operation of git-rev-list
+#
+echo "$sed_script" | tr ' ' \\012 > sed.script
+
+test_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -s " "' <<EOF
+19
+EOF
+
+test_output_expect_success 'simple topo order' 'git-rev-list --topo-order  HEAD' <<EOF
+l5
+l4
+l3
+a4
+c3
+c2
+c1
+b4
+a3
+a2
+a1
+b3
+b2
+b1
+a0
+l2
+l1
+l0
+root
+EOF
+
+test_output_expect_success 'two diamonds topo order (g6)' 'git-rev-list --topo-order  g4' <<EOF
+g4
+h2
+g3
+g2
+h1
+g1
+g0
+EOF
+
+test_output_expect_success 'multiple heads' 'git-rev-list --topo-order a3 b3 c3' <<EOF
+b3
+c3
+c2
+b2
+c1
+b1
+a3
+a2
+a1
+a0
+l2
+l1
+l0
+root
+EOF
+
+test_output_expect_success 'multiple heads, prune at a1' 'git-rev-list --topo-order a3 b3 c3 ^a1' <<EOF
+b3
+c3
+c2
+b2
+c1
+b1
+a3
+a2
+EOF
+
+test_output_expect_success 'multiple heads, prune at l1' 'git-rev-list --topo-order a3 b3 c3 ^l1' <<EOF
+b3
+c3
+c2
+b2
+c1
+b1
+a3
+a2
+a1
+a0
+l2
+EOF
+
+test_output_expect_success 'cross-epoch, head at l5, prune at l1' 'git-rev-list --topo-order l5 ^l1' <<EOF
+l5
+l4
+l3
+a4
+c3
+c2
+c1
+b4
+a3
+a2
+a1
+b3
+b2
+b1
+a0
+l2
+EOF
+
+test_output_expect_success 'duplicated head arguments' 'git-rev-list --topo-order l5 l5 ^l1' <<EOF
+l5
+l4
+l3
+a4
+c3
+c2
+c1
+b4
+a3
+a2
+a1
+b3
+b2
+b1
+a0
+l2
+EOF
+
+test_output_expect_success 'prune near topo' 'git-rev-list --topo-order a4 ^c3' <<EOF
+a4
+b4
+a3
+a2
+a1
+b3
+EOF
+
+test_output_expect_success "head has no parent" 'git-rev-list --topo-order  root' <<EOF
+root
+EOF
+
+test_output_expect_success "two nodes - one head, one base" 'git-rev-list --topo-order  l0' <<EOF
+l0
+root
+EOF
+
+test_output_expect_success "three nodes one head, one internal, one base" 'git-rev-list --topo-order  l1' <<EOF
+l1
+l0
+root
+EOF
+
+test_output_expect_success "linear prune l2 ^root" 'git-rev-list --topo-order  l2 ^root' <<EOF
+l2
+l1
+l0
+EOF
+
+test_output_expect_success "linear prune l2 ^l0" 'git-rev-list --topo-order  l2 ^l0' <<EOF
+l2
+l1
+EOF
+
+test_output_expect_success "linear prune l2 ^l1" 'git-rev-list --topo-order  l2 ^l1' <<EOF
+l2
+EOF
+
+test_output_expect_success "linear prune l5 ^a4" 'git-rev-list --topo-order  l5 ^a4' <<EOF
+l5
+l4
+l3
+EOF
+
+test_output_expect_success "linear prune l5 ^l3" 'git-rev-list --topo-order  l5 ^l3' <<EOF
+l5
+l4
+EOF
+
+test_output_expect_success "linear prune l5 ^l4" 'git-rev-list --topo-order  l5 ^l4' <<EOF
+l5
+EOF
+
+test_output_expect_success "max-count 10 - topo order" 'git-rev-list --topo-order  --max-count=10 l5' <<EOF
+l5
+l4
+l3
+a4
+c3
+c2
+c1
+b4
+a3
+a2
+EOF
+
+test_output_expect_success "max-count 10 - non topo order" 'git-rev-list --max-count=10 l5' <<EOF
+l5
+l4
+l3
+a4
+b4
+a3
+a2
+c3
+c2
+b3
+EOF
+
+test_output_expect_success '--max-age=c3, no --topo-order' "git-rev-list --max-age=$(commit_date c3) l5" <<EOF
+l5
+l4
+l3
+a4
+b4
+a3
+a2
+c3
+EOF
+
+#
+# this test fails on --topo-order - a fix is required
+#
+#test_output_expect_success '--max-age=c3, --topo-order' "git-rev-list --topo-order --max-age=$(commit_date c3) l5" <<EOF
+#l5
+#l4
+#l3
+#a4
+#c3
+#b4
+#a3
+#a2
+#EOF
+
+test_output_expect_success 'one specified head reachable from another a4, c3, --topo-order' "list_duplicates git-rev-list --topo-order a4 c3" <<EOF
+EOF
+
+test_output_expect_success 'one specified head reachable from another c3, a4, --topo-order' "list_duplicates git-rev-list --topo-order c3 a4" <<EOF
+EOF
+
+test_output_expect_success 'one specified head reachable from another a4, c3, no --topo-order' "list_duplicates git-rev-list a4 c3" <<EOF
+EOF
+
+test_output_expect_success 'one specified head reachable from another c3, a4, no --topo-order' "list_duplicates git-rev-list c3 a4" <<EOF
+EOF
+
+test_output_expect_success 'graph with c3 and a4 parents of head' "list_duplicates git-rev-list m1" <<EOF
+EOF
+
+test_output_expect_success 'graph with a4 and c3 parents of head' "list_duplicates git-rev-list m2" <<EOF
+EOF
+
+test_expect_success "head ^head --topo-order" 'git-rev-list --topo-order  a3 ^a3' <<EOF
+EOF
+
+test_expect_success "head ^head no --topo-order" 'git-rev-list a3 ^a3' <<EOF
+EOF
+
+test_output_expect_success 'simple topo order (l5r1)' 'git-rev-list --topo-order  l5r1' <<EOF
+l5r1
+r1
+r0
+alt_root
+l5
+l4
+l3
+a4
+c3
+c2
+c1
+b4
+a3
+a2
+a1
+b3
+b2
+b1
+a0
+l2
+l1
+l0
+root
+EOF
+
+test_output_expect_success 'simple topo order (r1l5)' 'git-rev-list --topo-order  r1l5' <<EOF
+r1l5
+l5
+l4
+l3
+a4
+c3
+c2
+c1
+b4
+a3
+a2
+a1
+b3
+b2
+b1
+a0
+l2
+l1
+l0
+root
+r1
+r0
+alt_root
+EOF
+
+test_output_expect_success "don't print things unreachable from one branch" "git-rev-list a3 ^b3 --topo-order" <<EOF
+a3
+a2
+a1
+EOF
+
+test_output_expect_success "--topo-order a4 l3" "git-rev-list --topo-order a4 l3" <<EOF
+l3
+a4
+c3
+c2
+c1
+b4
+a3
+a2
+a1
+b3
+b2
+b1
+a0
+l2
+l1
+l0
+root
+EOF
+
+#
+#
+
+test_done
------------

^ permalink raw reply

* [PATCH 2/2] Write sed script directly into temp file, rather than a variable
From: Jon Seymour @ 2005-07-07  0:50 UTC (permalink / raw)
  To: git; +Cc: torvalds, jon.seymour


When sed uses \n rather than ; as a separator (for BSD sed(1) compat),
it is cleaner to use a file directly, rather than an environment
variable containing \n characters.

This change changes t/t6000 write to sed.script directly and changes
the other tests to remove knowledge of sed.script.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---

 t/t6000-lib.sh                  |   12 +++++++-----
 t/t6001-rev-list-merge-order.sh |    9 ---------
 t/t6002-rev-list-bisect.sh      |   10 ----------
 t/t6003-rev-list-topo-order.sh  |    9 ---------
 4 files changed, 7 insertions(+), 33 deletions(-)

8e14d7142551c4eca6718894943e33a2a0a2a14f
diff --git a/t/t6000-lib.sh b/t/t6000-lib.sh
--- a/t/t6000-lib.sh
+++ b/t/t6000-lib.sh
@@ -1,6 +1,6 @@
 [ -d .git/refs/tags ] || mkdir -p .git/refs/tags
 
-sed_script="";
+:> sed.script
 
 # Answer the sha1 has associated with the tag. The tag must exist in .git or .git/refs/tags
 tag()
@@ -21,7 +21,7 @@ unique_commit()
 }
 
 # Save the output of a command into the tag specified. Prepend
-# a substitution script for the tag onto the front of $sed_script
+# a substitution script for the tag onto the front of sed.script
 save_tag()
 {
 	_tag=$1	
@@ -29,14 +29,16 @@ save_tag()
 	shift 1
     	"$@" >.git/refs/tags/$_tag
 
-       sed_script="s/$(tag $_tag)/$_tag/g
-$sed_script"
+        echo "s/$(tag $_tag)/$_tag/g" > sed.script.tmp
+	cat sed.script >> sed.script.tmp
+	rm sed.script
+	mv sed.script.tmp sed.script
 }
 
 # Replace unhelpful sha1 hashses with their symbolic equivalents 
 entag()
 {
-	sed "$sed_script"
+	sed -f sed.script
 }
 
 # Execute a command after first saving, then setting the GIT_AUTHOR_EMAIL
diff --git a/t/t6001-rev-list-merge-order.sh b/t/t6001-rev-list-merge-order.sh
--- a/t/t6001-rev-list-merge-order.sh
+++ b/t/t6001-rev-list-merge-order.sh
@@ -103,15 +103,6 @@ save_tag g4 unique_commit g6 tree -p g3 
 
 tag l5 > .git/HEAD
 
-#
-# cd to t/trash and use 
-#
-#    git-rev-list ... 2>&1 | sed "$(cat sed.script)" 
-#
-# if you ever want to manually debug the operation of git-rev-list
-#
-echo $sed_script > sed.script
-
 test_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -s " "' <<EOF
 19
 EOF
diff --git a/t/t6002-rev-list-bisect.sh b/t/t6002-rev-list-bisect.sh
--- a/t/t6002-rev-list-bisect.sh
+++ b/t/t6002-rev-list-bisect.sh
@@ -113,16 +113,6 @@ on_committer_date "1971-08-16 00:00:04" 
 on_committer_date "1971-08-16 00:00:05" save_tag u5 unique_commit u5 tree -p u0
 on_committer_date "1971-08-16 00:00:06" save_tag V unique_commit V tree -p u1 -p u2 -p u3 -p u4 -p u5
 
-
-#
-# cd to t/trash and use 
-#
-#    git-rev-list ... 2>&1 | sed "$(cat sed.script)" 
-#
-# if you ever want to manually debug the operation of git-rev-list
-#
-echo $sed_script > sed.script
-
 test_sequence()
 {
 	_bisect_option=$1	
diff --git a/t/t6003-rev-list-topo-order.sh b/t/t6003-rev-list-topo-order.sh
--- a/t/t6003-rev-list-topo-order.sh
+++ b/t/t6003-rev-list-topo-order.sh
@@ -79,15 +79,6 @@ save_tag g4 unique_commit g6 tree -p g3 
 
 tag l5 > .git/HEAD
 
-#
-# cd to t/trash and use 
-#
-#    git-rev-list ... 2>&1 | sed "$(cat sed.script)" 
-#
-# if you ever want to manually debug the operation of git-rev-list
-#
-echo "$sed_script" | tr ' ' \\012 > sed.script
-
 test_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -s " "' <<EOF
 19
 EOF
------------

^ permalink raw reply

* [PATCH] Ensure list insertion method does not depend on position of --merge-order argument
From: Jon Seymour @ 2005-07-07  0:59 UTC (permalink / raw)
  To: git; +Cc: torvalds, jon.seymour


This change ensures that git-rev-list --merge-order produces the same result
irrespective of what position the --merge-order argument appears in the argument
list.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---
Linus: if you'd prefer to fix this a different way, that's fine by me!
---

 rev-list.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

8723420366d839123ca4186c60469fd38fd4b798
diff --git a/rev-list.c b/rev-list.c
--- a/rev-list.c
+++ b/rev-list.c
@@ -411,10 +411,8 @@ static struct commit *get_commit_referen
 int main(int argc, char **argv)
 {
 	struct commit_list *list = NULL;
-	struct commit_list *(*insert)(struct commit *, struct commit_list **);
 	int i, limited = 0;
 
-	insert = insert_by_date;
 	for (i = 1 ; i < argc; i++) {
 		int flags;
 		char *arg = argv[i];
@@ -464,7 +462,6 @@ int main(int argc, char **argv)
 		}
 		if (!strcmp(arg, "--merge-order")) {
 		        merge_order = 1;
-		        insert = commit_list_insert;
 			continue;
 		}
 		if (!strcmp(arg, "--show-breaks")) {
@@ -491,10 +488,11 @@ int main(int argc, char **argv)
 		if (commit->object.flags & DUPCHECK)
 			continue;
 		commit->object.flags |= DUPCHECK;
-		insert(commit, &list);
+		commit_list_insert(commit, &list);
 	}
 
 	if (!merge_order) {		
+		sort_by_date(&list);
 	        if (limited)
 			list = limit_list(list);
 		if (topo_order)
------------

^ permalink raw reply

* Re: [PATCH 1/2] Add t/t6003 with some --topo-order tests
From: Linus Torvalds @ 2005-07-07  1:01 UTC (permalink / raw)
  To: Jon Seymour; +Cc: git
In-Reply-To: <20050707005004.9205.qmail@blackcubes.dyndns.org>



On Thu, 7 Jul 2005, Jon Seymour wrote:
>
> Linus: the last test fails with --topo-order at the moment. I haven't
> seen your most recent changes, so it may still fail for trivial 
> reasons even then. If so, I'll post an update.

It passes for me, so I think the SEEN flag thing fixed it.

		Linus

^ permalink raw reply

* [PATCH] Short-circuit git-clone-pack while cloning locally (take 2).
From: Junio C Hamano @ 2005-07-06 20:04 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: David S. Miller, Git Mailing List
In-Reply-To: <Pine.LNX.4.58.0507060911510.3570@g5.osdl.org>

When we are cloning a repository on a local filesystem, it is
faster to just create a hard linkfarm of .git/object hierarchy
and copy the .git/refs files.  By default, the script uses the
clone-pack method, but it can be told with the -l flag to do the
hard linkfarm (falling back on recursive file copy) to replicate
the .git/object hierarchy.

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

 git-clone-script |   68 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 67 insertions(+), 1 deletions(-)

2bff57b39b9fd13b1319d0192e2a887eb82fa189
diff --git a/git-clone-script b/git-clone-script
--- a/git-clone-script
+++ b/git-clone-script
@@ -1,4 +1,70 @@
 #!/bin/sh
+#
+# Copyright (c) 2005, Linus Torvalds
+# Copyright (c) 2005, Junio C Hamano
+# 
+# Clone a repository into a different directory that does not yet exist.
+
+usage() {
+	echo >&2 "* git clone [-l] <repo> <dir>"
+	exit 1
+}
+
+use_local=no
+while
+	case "$#,$1" in
+	0,*) break ;;
+        *,-l|*,--l|*,--lo|*,--loc|*,--loca|*,--local) use_local=yes ;;
+	*,-*) usage ;;
+	*) break ;;
+	esac
+do
+	shift
+done
+
 repo="$1"
 dir="$2"
-mkdir "$dir" && cd "$dir" && git-init-db && git-clone-pack "$repo"
+mkdir "$dir" &&
+D=$(
+	(cd "$dir" && git-init-db && pwd)
+) &&
+test -d "$D" || usage
+
+# We do local magic only when the user tells us to.
+case "$use_local" in
+yes)
+	( cd "$repo/objects" ) || {
+		repo="$repo/.git"
+		( cd "$repo/objects" ) || {
+		    echo >&2 "-l flag seen but $repo is not local."
+		    exit 1
+		}
+	}
+
+	# See if we can hardlink and drop "l" if not.
+	sample_file=$(cd "$repo" && \
+		      find objects -type f -print | sed -e 1q)
+
+	# objects directory should not be empty since we are cloning!
+	test -f "$repo/$sample_file" || exit
+
+	l=
+	if ln "$repo/$sample_file" "$D/.git/objects/sample" 2>/dev/null
+	then
+		l=l
+	fi &&
+	rm -f "$D/.git/objects/sample" &&
+	cp -r$l "$repo/objects" "$D/.git/" || exit 1
+
+	# Make a duplicate of refs and HEAD pointer
+	HEAD=
+	if test -f "$repo/HEAD"
+	then
+		HEAD=HEAD
+	fi
+	tar Ccf "$repo" - refs $HEAD | tar Cxf "$D/.git" - || exit 1
+	exit 0
+	;;
+esac
+
+cd "$D" && git clone-pack "$repo"

^ permalink raw reply

* [PATCH] Tidy up - remove use of (*f)() idiom from epoch.c
From: Jon Seymour @ 2005-07-07  1:26 UTC (permalink / raw)
  To: git; +Cc: torvalds, jon.seymour


Replace (*f)() with f() where the former idiom was used in epoch.c

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---

 epoch.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

ce760b162be7463a5648d086bfd7ac324ba66edd
diff --git a/epoch.c b/epoch.c
--- a/epoch.c
+++ b/epoch.c
@@ -499,7 +499,7 @@ static int emit_stack(struct commit_list
 		if (*stack || include_last) {
 			if (!*stack) 
 				next->object.flags |= BOUNDARY;
-			action = (*emitter) (next);
+			action = emitter(next);
 		}
 	}
 
@@ -545,7 +545,7 @@ static int sort_in_merge_order(struct co
 				if (next->object.flags & UNINTERESTING) {
 					action = STOP;
 				} else {
-					action = (*emitter) (next);
+					action = emitter(next);
 				}
 				if (action != STOP) {
 					next = next->parents->item;
@@ -562,7 +562,7 @@ static int sort_in_merge_order(struct co
 	}
 
 	if (next && (action != STOP) && !ret) {
-		(*emitter) (next);
+		emitter(next);
 	}
 
 	return ret;
------------

^ permalink raw reply

* [PATCH] Remove use of SHOWN flag
From: Jon Seymour @ 2005-07-07  2:00 UTC (permalink / raw)
  To: git; +Cc: torvalds, jon.seymour


Now that duplicates are elided early, there is no need for the
SHOWN flag.

This patch removes the SHOWN flag and its uses from rev-list.c

Signed-off-by: Jon Seymour <jon.seymour@gmail>
---

 rev-list.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

28294b1e139ea3f7c08814e022246e42f9ab9fa3
diff --git a/rev-list.c b/rev-list.c
--- a/rev-list.c
+++ b/rev-list.c
@@ -8,7 +8,6 @@
 #define SEEN		(1u << 0)
 #define INTERESTING	(1u << 1)
 #define COUNTED		(1u << 2)
-#define SHOWN		(1u << 3)
 
 static const char rev_list_usage[] =
 	"usage: git-rev-list [OPTION] commit-id <commit-id>\n"
@@ -42,7 +41,6 @@ static int topo_order = 0;
 
 static void show_commit(struct commit *commit)
 {
-	commit->object.flags |= SHOWN;
 	if (show_breaks) {
 		prefix = "| ";
 		if (commit->object.flags & DISCONTINUITY) {
@@ -72,7 +70,7 @@ static int filter_commit(struct commit *
 {
 	if (stop_traversal && (commit->object.flags & BOUNDARY))
 		return STOP;
-	if (commit->object.flags & (UNINTERESTING|SHOWN))
+	if (commit->object.flags & UNINTERESTING)
 		return CONTINUE;
 	if (min_age != -1 && (commit->date > min_age))
 		return CONTINUE;
------------

^ permalink raw reply

* [PATCH] Move SEEN flag into epoch.h, replace use of VISITED flag with SEEN flag
From: Jon Seymour @ 2005-07-07  2:11 UTC (permalink / raw)
  To: git; +Cc: torvalds, jon.seymour


SEEN and VISITED do the same thing.

This change moves the SEEN flag into epoch.h, then replaces
uses of VISITED with SEEN and removes the definition
of the VISITED flag.

The merge-order code needs to clear the SEEN flag
set by the argument parsing to ensure correct
operation. So it clears that one and, for completeness,
BOUNDARY and DISCONTINUITY too.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---

 epoch.c    |   14 ++++++++------
 epoch.h    |    4 +---
 rev-list.c |    5 ++---
 3 files changed, 11 insertions(+), 12 deletions(-)

54a391ba7e4f96ce08ecb7da82941519b8a14c30
diff --git a/epoch.c b/epoch.c
--- a/epoch.c
+++ b/epoch.c
@@ -387,7 +387,7 @@ static void push_onto_merge_order_stack(
 static void mark_ancestors_uninteresting(struct commit *commit)
 {
 	unsigned int flags = commit->object.flags;
-	int visited = flags & VISITED;
+	int visited = flags & SEEN;
 	int boundary = flags & BOUNDARY;
 	int uninteresting = flags & UNINTERESTING;
 	struct commit_list *next;
@@ -425,7 +425,7 @@ static void sort_first_epoch(struct comm
 {
 	struct commit_list *parents;
 
-	head->object.flags |= VISITED;
+	head->object.flags |= SEEN;
 
 	/*
 	 * TODO: By sorting the parents in a different order, we can alter the
@@ -450,14 +450,14 @@ static void sort_first_epoch(struct comm
 			mark_ancestors_uninteresting(parent);
 		}
 
-		if (!(parent->object.flags & VISITED)) {
+		if (!(parent->object.flags & SEEN)) {
 			if (parent->object.flags & BOUNDARY) {
 				if (*stack) {
 					die("something else is on the stack - %s",
 					    sha1_to_hex((*stack)->item->object.sha1));
 				}
 				push_onto_merge_order_stack(stack, parent);
-				parent->object.flags |= VISITED;
+				parent->object.flags |= SEEN;
 
 			} else {
 				sort_first_epoch(parent, stack);
@@ -582,8 +582,10 @@ int sort_list_in_merge_order(struct comm
 	int action = CONTINUE;
 	struct commit_list *reversed = NULL;
 
-	for (; list; list = list->next)
+	for (; list; list = list->next) {
+		list->item->object.flags &= ~(SEEN|BOUNDARY|DISCONTINUITY);
 		commit_list_insert(list->item, &reversed);
+	}
 
 	if (!reversed)
 		return ret;
@@ -606,7 +608,7 @@ int sort_list_in_merge_order(struct comm
 		while (reversed) {
 			struct commit * next = pop_commit(&reversed);
 
-			if (!(next->object.flags & VISITED) && next!=base) {
+			if (!(next->object.flags & SEEN) && next!=base) {
 				sort_first_epoch(next, &stack);
 				if (reversed) {
 					/*
diff --git a/epoch.h b/epoch.h
--- a/epoch.h
+++ b/epoch.h
@@ -13,9 +13,7 @@ int sort_list_in_merge_order(struct comm
 /* Low bits are used by rev-list */
 #define UNINTERESTING   (1u<<10)
 #define BOUNDARY        (1u<<11)
-#define VISITED         (1u<<12)
+#define SEEN            (1u<<12)
 #define DISCONTINUITY   (1u<<13)
-#define LAST_EPOCH_FLAG (1u<<14)
-
 
 #endif	/* EPOCH_H */
diff --git a/rev-list.c b/rev-list.c
--- a/rev-list.c
+++ b/rev-list.c
@@ -5,9 +5,8 @@
 #include "blob.h"
 #include "epoch.h"
 
-#define SEEN		(1u << 0)
-#define INTERESTING	(1u << 1)
-#define COUNTED		(1u << 2)
+#define INTERESTING	(1u << 0)
+#define COUNTED		(1u << 1)
 
 static const char rev_list_usage[] =
 	"usage: git-rev-list [OPTION] commit-id <commit-id>\n"
------------

^ permalink raw reply

* [PATCH] Simplification - remove unnecessary list reversal from epoch.c
From: Jon Seymour @ 2005-07-07  2:27 UTC (permalink / raw)
  To: git; +Cc: torvalds, jon.seymour


Since --merge-order is the only thing that cares about the rev-list
parse order, change the rev-list list to match the parse order
and remove the corresponding compensating reversal from epoch.c.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---
[PATCH] Move SEEN flag into epoch.h, replace use of VISITED flag with SEEN flag
---

 epoch.c    |   26 ++++++++++++--------------
 rev-list.c |    3 ++-
 2 files changed, 14 insertions(+), 15 deletions(-)

198b131890a2c6fc98ce4c151dc20bd4f548acf0
diff --git a/epoch.c b/epoch.c
--- a/epoch.c
+++ b/epoch.c
@@ -580,37 +580,35 @@ int sort_list_in_merge_order(struct comm
 	struct commit *base;
 	int ret = 0;
 	int action = CONTINUE;
-	struct commit_list *reversed = NULL;
+	struct commit_list *next = NULL;
 
-	for (; list; list = list->next) {
-		list->item->object.flags &= ~(SEEN|BOUNDARY|DISCONTINUITY);
-		commit_list_insert(list->item, &reversed);
-	}
+	for (next=list; next; next = next->next)
+		next->item->object.flags &= ~(SEEN|BOUNDARY|DISCONTINUITY);
 
-	if (!reversed)
+	if (!list)
 		return ret;
-	else if (!reversed->next) {
+	else if (!list->next) {
 		/*
 		 * If there is only one element in the list, we can sort it
 		 * using sort_in_merge_order.
 		 */
-		base = reversed->item;
+		base = list->item;
 	} else {
 		/*
 		 * Otherwise, we search for the base of the list.
 		 */
-		ret = find_base_for_list(reversed, &base);
+		ret = find_base_for_list(list, &base);
 		if (ret)
 			return ret;
 		if (base)
 			base->object.flags |= BOUNDARY;
 
-		while (reversed) {
-			struct commit * next = pop_commit(&reversed);
+		for (next=list; next; next=next->next) {
+			struct commit * next_item = next->item;
 
-			if (!(next->object.flags & SEEN) && next!=base) {
-				sort_first_epoch(next, &stack);
-				if (reversed) {
+			if (!(next_item->object.flags & SEEN) && next_item!=base) {
+				sort_first_epoch(next_item, &stack);
+				if (next) {
 					/*
 					 * If we have more commits 
 					 * to push, then the first
diff --git a/rev-list.c b/rev-list.c
--- a/rev-list.c
+++ b/rev-list.c
@@ -407,6 +407,7 @@ static struct commit *get_commit_referen
 int main(int argc, char **argv)
 {
 	struct commit_list *list = NULL;
+	struct commit_list **list_tail = &list;
 	int i, limited = 0;
 
 	for (i = 1 ; i < argc; i++) {
@@ -484,7 +485,7 @@ int main(int argc, char **argv)
 		if (commit->object.flags & SEEN)
 			continue;
 		commit->object.flags |= SEEN;
-		commit_list_insert(commit, &list);
+		list_tail = &commit_list_insert(commit, list_tail)->next;
 	}
 
 	if (!merge_order) {		
------------

^ permalink raw reply

* [PATCH 1/2] Add test case that shows --topo-order, --max-age break
From: Jon Seymour @ 2005-07-07  2:38 UTC (permalink / raw)
  To: git; +Cc: torvalds, jon.seymour


Uncommented a test case that shows a --topo-order, --max-age break.

A subsequent patch witll fix this defect

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---

 t/t6003-rev-list-topo-order.sh |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

9b43fa5416abe653fd900abe491a38c5ec919758
diff --git a/t/t6003-rev-list-topo-order.sh b/t/t6003-rev-list-topo-order.sh
--- a/t/t6003-rev-list-topo-order.sh
+++ b/t/t6003-rev-list-topo-order.sh
@@ -289,16 +289,16 @@ EOF
 #
 # this test fails on --topo-order - a fix is required
 #
-#test_output_expect_success '--max-age=c3, --topo-order' "git-rev-list --topo-order --max-age=$(commit_date c3) l5" <<EOF
-#l5
-#l4
-#l3
-#a4
-#c3
-#b4
-#a3
-#a2
-#EOF
+test_output_expect_success '--max-age=c3, --topo-order' "git-rev-list --topo-order --max-age=$(commit_date c3) l5" <<EOF
+l5
+l4
+l3
+a4
+c3
+b4
+a3
+a2
+EOF
 
 test_output_expect_success 'one specified head reachable from another a4, c3, --topo-order' "list_duplicates git-rev-list --topo-order a4 c3" <<EOF
 EOF
------------

^ permalink raw reply

* [PATCH 2/2] Fix --topo-order, --max-age interaction issue
From: Jon Seymour @ 2005-07-07  2:38 UTC (permalink / raw)
  To: git; +Cc: torvalds, jon.seymour


Applied the --merge-order, --max-age fix to fix
the --topo-order problem demonstrated by the test
case in the previous patch.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---

 rev-list.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

8238686fd422959dae50a908b3761aa545be1c4f
diff --git a/rev-list.c b/rev-list.c
--- a/rev-list.c
+++ b/rev-list.c
@@ -75,7 +75,7 @@ static int filter_commit(struct commit *
 		return CONTINUE;
 	if (max_age != -1 && (commit->date < max_age)) {
 		stop_traversal=1;
-		return merge_order?CONTINUE:STOP;
+		return (merge_order||topo_order)?CONTINUE:STOP;
 	}
 	if (max_count != -1 && !max_count--)
 		return STOP;
------------

^ permalink raw reply

* Re: Summary Of Jon's Recent Patches
From: Jon Seymour @ 2005-07-07  2:53 UTC (permalink / raw)
  To: Linus Torvalds, Git Mailing List
In-Reply-To: <2cfc40320507061951563bdd76@mail.gmail.com>

> This series contains a big fix, but assumes the tidy ups above have
> been applied:

That'd be a _bug_ fix

jon.

^ 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