[PATCH] clean up git script

2005-08-13 Thread Amos Waterland
Makes git work with a pure POSIX shell (tested with bash --posix and ash). Right now git causes ash to choke on the redundant shift on line two. Reduces the number of system calls git makes just to do a usage statement from 22610 to 1122, and the runtime for same from 349ms to 29ms on my x86 Linux

Re: sending changesets from the middle of a git tree

2005-08-13 Thread Linus Torvalds
On Sat, 13 Aug 2005, Linus Torvalds wrote: > That's correct. Same things apply: you can move a patch over, and create a > new one with a modified comment, but basically the _old_ commit will be > immutable. Let me clarify. You can entirely _drop_ old branches, so commits may be immutable, bu

Re: sending changesets from the middle of a git tree

2005-08-13 Thread Linus Torvalds
On Sat, 13 Aug 2005, Steve French wrote: > > 1) There is no way to send a particular changeset from the "middle" of a > set from one tree to another, without exporting it as a patch or > rebuilding a new git tree. Correct. > If I export those two changesets as patches, and send them on. > pr

Re: sending changesets from the middle of a git tree

2005-08-13 Thread Ryan Anderson
On Sat, Aug 13, 2005 at 10:35:50PM -0500, Steve French wrote: > Just to confirm a recent answer to questions on lkml ... > > 1) There is no way to send a particular changeset from the "middle" of a > set from one tree to another, without exporting it as a patch or > rebuilding a new git tree.

sending changesets from the middle of a git tree

2005-08-13 Thread Steve French
Just to confirm a recent answer to questions on lkml ... 1) There is no way to send a particular changeset from the "middle" of a set from one tree to another, without exporting it as a patch or rebuilding a new git tree. I have two changesets that, after testing last week, I now consider mo

Re: [RFC][PATCH] Rewriting revs in place in push target repository

2005-08-13 Thread Chris Wedgwood
On Sat, Aug 13, 2005 at 11:47:25PM +0200, Petr Baudis wrote: > I think it does not in real setups, since thanks to O_RDWR the > file should be overwritten only when the write() happens. > Can a 41-byte write() be non-atomic in any real conditions? yes if you journal metadata on

Re: [RFC][PATCH] Rewriting revs in place in push target repository

2005-08-13 Thread Linus Torvalds
On Sat, 13 Aug 2005, Junio C Hamano wrote: > > Petr Baudis <[EMAIL PROTECTED]> writes: > > Rewrite refs in place in receive-pack & friends > > > > When updating a ref, it would write a new file with the new ref and > > then rename it, overwriting the original file. The problem is that > > this d

Re: [RFC][PATCH] Rewriting revs in place in push target repository

2005-08-13 Thread Junio C Hamano
Petr Baudis <[EMAIL PROTECTED]> writes: > Rewrite refs in place in receive-pack & friends > > When updating a ref, it would write a new file with the new ref and > then rename it, overwriting the original file. The problem is that > this destroys permissions and ownership of the original file, whi

Re: [PATCH] Debian packaging for 0.99.4

2005-08-13 Thread Junio C Hamano
Oops, sorry that was not something ready to be sent out. Please discard. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Debian packaging for 0.99.4

2005-08-13 Thread Junio C Hamano
Debian folks on the list: We had to make this ugly hack in our Debianization because Debian heavyweights did not like to see "Conflicts:" and us lowly new maintainers needed to obey their wishes. Linus: The alleged name clash appears to be a Debian specific problem. No oth

Re: [PATCH] Debian packaging for 0.99.4

2005-08-13 Thread Matthias Urlichs
Hi, Ryan Anderson: > > #!/bin/sh > echo "Don't get a git - use gt! Ouch. > echo "Don't get a git - use gt!" >&2 if at all. -- Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [EMAIL PROTECTED] Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de

Re: [PATCH] Debian packaging for 0.99.4

2005-08-13 Thread Ryan Anderson
On Fri, Aug 12, 2005 at 12:35:55PM +0200, Matthias Urlichs wrote: > David Lang: > > after so many years of software development (and with the policy of never > > having conflicting command names) what three letter combinations are still > > avilable? > > > Lots. > > > I'm assuming that the much

Re: git/cogito workshop/bof at linuxconf au?

2005-08-13 Thread Linus Torvalds
On Sun, 14 Aug 2005, Martin Langhoff wrote: > > And how are things lining up for the upcoming one (January 2006, Dunedin, > NZ)? Dunno yet. I have a policy of trying to travel with the whole family, which means I'll have to decide whether I'm willing to put that much money into it, or whethe

Re: Cloning speed comparison

2005-08-13 Thread H. Peter Anvin
Linus Torvalds wrote: On Fri, 12 Aug 2005, H. Peter Anvin wrote: Running it over ssh would be a good way to do authentication... Well, if you have ssh as an option, you don't need git-daemon any more, since the protocol that git-daemon does runs quite well over ssh on its own... The onl

Re: git/cogito workshop/bof at linuxconf au?

2005-08-13 Thread Martin Langhoff
On 8/14/05, Linus Torvalds <[EMAIL PROTECTED]> wrote: > I was planning to be there. I like lca, but passed it over this year > because of it being in Canberra And how are things lining up for the upcoming one (January 2006, Dunedin, NZ)? > > I would gladly try and organize a workshop, but I am

Re: [PATCH] Use "-script" postfix for scripts

2005-08-13 Thread Petr Baudis
Dear diary, on Sun, Aug 14, 2005 at 12:25:12AM CEST, I got a letter where Ryan Anderson <[EMAIL PROTECTED]> told me that... > Honestly, I think the biggest argument against the "-script" suffix is > related to man-page usage: It requires significant knowledge of the Git > project to figure out wha

Re: [PATCH] Use "-script" postfix for scripts

2005-08-13 Thread Ryan Anderson
On Sat, Aug 13, 2005 at 01:57:22AM -0700, Junio C Hamano wrote: > Ryan Anderson <[EMAIL PROTECTED]> writes: > > > See, for example, the history on git-rename-script for why this is good. > > Why do you think it is a good example? What happens when next > time somebody rewrites it in C? Well, I

Re: [RFC][PATCH] Rewriting revs in place in push target repository

2005-08-13 Thread Linus Torvalds
On Sat, 13 Aug 2005, Petr Baudis wrote: > > * Does this break atomicity? > > I think it does not in real setups, since thanks to O_RDWR the > file should be overwritten only when the write() happens. > Can a 41-byte write() be non-atomic in any real conditions? That's not the

[RFC][PATCH] Rewriting revs in place in push target repository

2005-08-13 Thread Petr Baudis
Rewrite refs in place in receive-pack & friends When updating a ref, it would write a new file with the new ref and then rename it, overwriting the original file. The problem is that this destroys permissions and ownership of the original file, which is troublesome especially in multiuser environm

Re: [patch] possible memory leak in diff.c::diff_free_filepair()

2005-08-13 Thread Junio C Hamano
Yasushi SHOJI <[EMAIL PROTECTED]> writes: > oops. probably my english wasn't clear. my patch fixes > diff_free_filepair(). No, my reading of your patch when I wrote that message was wrong. The attached is what I ended up doing based on your patch. It does not seem to barf with the following te

Re: [patch] possible memory leak in diff.c::diff_free_filepair()

2005-08-13 Thread Yasushi SHOJI
At Sat, 13 Aug 2005 12:30:59 -0700, Junio C Hamano wrote: > > Yasushi SHOJI <[EMAIL PROTECTED]> writes: > > > When I run git-diff-tree on big change, it seems the command eats so > > much memory. so I just put git under valgrind to see what's going on. > > > > diff_free_filespec_data() doesn't f

Re: [PATCH] Added hook in git-receive-pack

2005-08-13 Thread Josef Weidendorfer
On Saturday 13 August 2005 21:27, Junio C Hamano wrote: > Josef Weidendorfer <[EMAIL PROTECTED]> writes: > > Or is there already an easy way to detect the fast-forward situation in > > the script? > > Since you are given old and new, presumably you can do > merge-base in the hook to see what it yie

Re: Add an empty directory?

2005-08-13 Thread Carl Baldwin
On Sat, Aug 13, 2005 at 12:41:45PM -0700, Linus Torvalds wrote: > > > On Sat, 13 Aug 2005, Carl Baldwin wrote: > > > > The bottom line is that I don't really see many situations where it is > > absolutely necessary but it is a convenience. Not supporting it may > > seem like an artificial limit

Re: My Itchlist

2005-08-13 Thread Petr Baudis
Dear diary, on Sat, Aug 06, 2005 at 04:39:01AM CEST, I got a letter where Linus Torvalds <[EMAIL PROTECTED]> told me that... > On Fri, 5 Aug 2005, Junio C Hamano wrote: > > - teach git-apply "reverse" and possibly "fuzz". > > > > I think this might help Porcelain; currently they have to > > in

Re: Add an empty directory?

2005-08-13 Thread Petr Baudis
Dear diary, on Sat, Aug 13, 2005 at 09:41:45PM CEST, I got a letter where Linus Torvalds <[EMAIL PROTECTED]> told me that... > On Sat, 13 Aug 2005, Carl Baldwin wrote: > > > > The bottom line is that I don't really see many situations where it is > > absolutely necessary but it is a convenience.

Re: Add an empty directory?

2005-08-13 Thread Linus Torvalds
On Sat, 13 Aug 2005, Carl Baldwin wrote: > > The bottom line is that I don't really see many situations where it is > absolutely necessary but it is a convenience. Not supporting it may > seem like an artificial limit that really didn't need to be there. Well, there is an argument for not supp

Re: Add an empty directory?

2005-08-13 Thread Junio C Hamano
Petr Baudis <[EMAIL PROTECTED]> writes: > the object databases supports it, but the index file does not. But yes, > it should be supported, I think. I think if this is done correctly "read-tree -m -u" two-tree switch could even remove directories that existed in the old tree but not in the new tr

Re: [patch] possible memory leak in diff.c::diff_free_filepair()

2005-08-13 Thread Junio C Hamano
Yasushi SHOJI <[EMAIL PROTECTED]> writes: > When I run git-diff-tree on big change, it seems the command eats so > much memory. so I just put git under valgrind to see what's going on. > > diff_free_filespec_data() doesn't free diff_filespec itself. is this > because in merge_broken() filespec i

Re: [PATCH] Added hook in git-receive-pack

2005-08-13 Thread Junio C Hamano
Josef Weidendorfer <[EMAIL PROTECTED]> writes: > Or is there already an easy way to detect the fast-forward situation in the > script? Since you are given old and new, presumably you can do merge-base in the hook to see what it yields? - To unsubscribe from this list: send the line "unsubscrib

Re: [PATCH] Alternate object pool mechanism updates.

2005-08-13 Thread Junio C Hamano
Petr Baudis <[EMAIL PROTECTED]> writes: > What about calling it rather info/alternates (or info/alternate)? It > looks better, sounds better, is more namespace-ecological tab-completes > fine and you don't type it that often anyway. :-) Thanks for the suggestion. Will fix and keep it in the pu b

Re: [PATCH] Added hook in git-receive-pack

2005-08-13 Thread Josef Weidendorfer
On Sunday 31 July 2005 21:17, Josef Weidendorfer wrote: > Added hook in git-receive-pack Regarding the update hook: In this script, it would be nice to be able to distinguish rebasing/forced setting of a head from a regular fast forwarding. In the first case, I do not want to potentially send a

Re: Add an empty directory?

2005-08-13 Thread Carl Baldwin
Hi, On Sat, Aug 13, 2005 at 08:00:08PM +0200, Petr Baudis wrote: > the object databases supports it, but the index file does not. But yes, > it should be supported, I think. > > Some argue that this is useless, so some practical example of its > usefulness might be a good motivation to get us goi

Re: git/cogito workshop/bof at linuxconf au?

2005-08-13 Thread Linus Torvalds
On Sat, 13 Aug 2005, Martin Langhoff wrote: > > Anyone coming to Linuxconf.au 2006? It'll will be in Dunedin NZ and > I'd be really keen on joining a git/cogito workshop or bof. I was planning to be there. I like lca, but passed it over this year because of it being in Canberra (I'm sure it's a

Re: Add an empty directory?

2005-08-13 Thread Petr Baudis
Dear diary, on Sat, Aug 13, 2005 at 07:30:43PM CEST, I got a letter where Carl Baldwin <[EMAIL PROTECTED]> told me that... > Greetings, Hi, > My appologies if this has already been discussed. I've been through the > archives but could easily have missed something. > > I have found it useful in

[HUP] Pulling broken by late Cogito commits

2005-08-13 Thread Petr Baudis
Hi, if you are following Cogito development closely, please note that pulling over HTTP and SSH was broken by a late Cogito commit (74b4f7). This also means that you won't be able to pull the fix (which I just committed and might take a short while to mirror out) if you pull Cogito over HTTP.

Re: [PATCH] Use "-script" postfix for scripts

2005-08-13 Thread Linus Torvalds
On Sat, 13 Aug 2005, Junio C Hamano wrote: > Ryan Anderson <[EMAIL PROTECTED]> writes: > > See, for example, the history on git-rename-script for why this is good. > > Why do you think it is a good example? What happens when next > time somebody rewrites it in C? We'll call the C version "rena

[PATCH 5/5] Ignore patch backup files when finding cg-* manpage scripts

2005-08-13 Thread Jonas Fonseca
Adds ../cg-*.{orig,rej} to CG_IGNORE. Signed-off-by: Jonas Fonseca <[EMAIL PROTECTED]> --- Documentation/Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile --- a/Documentation/Makefile +++ b/Documentation/Makefile @

[PATCH 4/5] Add more AsciiDoc markup to the README file

2005-08-13 Thread Jonas Fonseca
Signed-off-by: Jonas Fonseca <[EMAIL PROTECTED]> --- I've separated these because they make the README file less readable. Pick the ones you like, and I will make a new patch. README | 76 1 files changed, 43 insertions(+), 33 d

[PATCH 3/5] Generate Documentation/introduction.html from the README file

2005-08-13 Thread Jonas Fonseca
Convert section names to use AsciiDoc markup. Fix a typo and refer to the cg-* manpages. Signed-off-by: Jonas Fonseca <[EMAIL PROTECTED]> --- Documentation/Makefile |5 - README | 36 2 files changed, 28 insertions(+), 13 deletions(

[PATCH 2/5] Add SEE ALSO section to cogito(7) which mentions git(7)

2005-08-13 Thread Jonas Fonseca
Signed-off-by: Jonas Fonseca <[EMAIL PROTECTED]> --- Documentation/make-cogito-asciidoc |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/Documentation/make-cogito-asciidoc b/Documentation/make-cogito-asciidoc --- a/Documentation/make-cogito-asciidoc +++ b/Documentatio

[PATCH 1/5] Also install cg-*.txt files

2005-08-13 Thread Jonas Fonseca
Signed-off-by: Jonas Fonseca <[EMAIL PROTECTED]> --- debian/rules |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/debian/rules b/debian/rules --- a/debian/rules +++ b/debian/rules @@ -67,6 +67,7 @@ install: build $(MAKE) install DESTDIR=$(CURDIR)/debian/cogito pr

[RFC] [PATCH] Add "--compression-level=N" option to git-pack-objects

2005-08-13 Thread Sergey Vlasov
[PATCH] Add "--compression-level=N" option to git-pack-objects Setting the compression level for objects in the pack is useful in some cases; in particular, disabling compression of the individual objects and then compressing the whole pack can improve the overall compression ratio. Signed-off-by

[PATCHSET] Cogito documentation updates

2005-08-13 Thread Jonas Fonseca
The patchset contains the following 5 patches: [PATCH 1/5] Also install cg-*.txt files [PATCH 2/5] Add SEE ALSO section to cogito(7) which mentions git(7) [PATCH 3/5] Generate Documentation/introduction.html from the README file [PATCH 4/5] Add more AsciiDoc markup to the README file [PA

[RFC] Improving compression in git network protocols

2005-08-13 Thread Sergey Vlasov
Hello! The git pack format has two uses: 1) A space-optimized format for local repository storage. 2) A compact format for transferring repository data over network. However, these uses have some conflicting requirements, and currently the pack format is not as optimal for the task of network t

Re: Merge conflict.

2005-08-13 Thread Petr Baudis
Dear diary, on Sat, Aug 13, 2005 at 04:45:32PM CEST, I got a letter where Kenneth Johansson <[EMAIL PROTECTED]> told me that... > I used cogito to do a cg-update and got conflicts and the exact files are > printed to the screen. But say I somehow lost that output is there anyway > to list conflicti

Re: Fwd: Re: git checkout -f branch doesn't remove extra files

2005-08-13 Thread Petr Baudis
Dear diary, on Sat, Aug 13, 2005 at 02:10:53PM CEST, I got a letter where Sergey Vlasov <[EMAIL PROTECTED]> told me that... > However, cg-export is buggy - if you use the second argument > (cg-export DESTFILE TREE_ID), the resulting tar file is different > from what git-tar-tree produces for the sa

[ANNOUNCE] qgit-0.9

2005-08-13 Thread Marco Costalba
Hi all, qgit-0.9 has been released and can be downloaded from http://prdownloads.sourceforge.net/qgit/qgit-0.9.tar.bz2?download This version fixes a couple of nasty bugs, notably one in annotate, crept in after recent changes. Anyone interested in annotate function should upgrade. B

Re: Fwd: Re: git checkout -f branch doesn't remove extra files

2005-08-13 Thread Sergey Vlasov
On Sat, 13 Aug 2005 13:00:51 +0200 Petr Baudis wrote: > Dear diary, on Sat, Aug 13, 2005 at 07:05:11AM CEST, I got a letter > where Linus Torvalds <[EMAIL PROTECTED]> told me that... [...] > > snap=git-snapshot-$(date +"%Y%m%d") > > git-tar-tree HEAD $snap | gzip -9 > $snap.tar.gz > > > >

Re: [PATCH] Alternate object pool mechanism updates.

2005-08-13 Thread Petr Baudis
Dear diary, on Sat, Aug 13, 2005 at 11:09:13AM CEST, I got a letter where Junio C Hamano <[EMAIL PROTECTED]> told me that... > It was a mistake to use GIT_ALTERNATE_OBJECT_DIRECTORIES > environment variable to specify what alternate object pools to > look for missing objects when working with an ob

Re: Fwd: Re: git checkout -f branch doesn't remove extra files

2005-08-13 Thread Petr Baudis
Dear diary, on Sat, Aug 13, 2005 at 07:05:11AM CEST, I got a letter where Linus Torvalds <[EMAIL PROTECTED]> told me that... > If you really want a temporary tree, what you do is something like > > git-checkout-cache --prefix=tmp-dir/ -f -a > > and when you're done, you just do > > r

[patch] possible memory leak in diff.c::diff_free_filepair()

2005-08-13 Thread Yasushi SHOJI
Hi all, When I run git-diff-tree on big change, it seems the command eats so much memory. so I just put git under valgrind to see what's going on. here is the output: ==26475== 63816 bytes in 766 blocks are definitely lost in loss record 7 of 7 ==26475==at 0x1B8FF896: malloc (vg_replace_mal

Re: git reveals a bug in (some versions) BSD diff

2005-08-13 Thread Brad Roberts
I'm seeing this on a standard os/x 10.3.9 install which seems to have an old, but still GNU based, diff. $ which diff /usr/bin/diff $ diff --version diff - GNU diffutils version 2.7 $ sh ./t4101-apply-nonl.sh * ok 1: apply diff between 0 and 1 * ok 2: apply diff between 0 and 2 * ok 3: app

[PATCH] fix null TZ problems on os/x

2005-08-13 Thread Brad Roberts
[PATCH] Fix TZ handling in tests, "" isn't a valid timezone at least on os/x It seems that the localtime() libc routine doesn't care for finding a TZ that's empty. It's ok with TZ not being set. Setting the TZ to GMT allowed these tests to pass. $ uname -v Darwin Kernel Version 7.9.0: Wed Mar 3

Re: [PATCH] fetch-pack: start multi-head pulling.

2005-08-13 Thread Junio C Hamano
Matthias Urlichs <[EMAIL PROTECTED]> writes: >> I have been trying, admittably perhaps not very successfully, to >> stay away from bashism in the core GIT scripts. > > We should probably use #!/bin/bash for scripts with bashisms... As a fall-back position, yes, but I'd rather see trivial bashisms

[PATCH] Alternate object pool mechanism updates.

2005-08-13 Thread Junio C Hamano
It was a mistake to use GIT_ALTERNATE_OBJECT_DIRECTORIES environment variable to specify what alternate object pools to look for missing objects when working with an object database. It is not a property of the process running the git commands, but a property of the object database that is partial

[PATCH] Add SubmittingPatches

2005-08-13 Thread Junio C Hamano
Not that I have stricter patch submission standards than ordinary projects, I wanted to have it to make sure people understand what they are doing when they add their own Signed-off-by line. Signed-off-by: Junio C Hamano <[EMAIL PROTECTED]> --- Documentation/SubmittingPatches | 130

[PATCH] Add --signoff and --verify option to git commit.

2005-08-13 Thread Junio C Hamano
As brought up in the discussion which followed a patch to add a signed-off-by line with the --sign flag to format-patch from Johannes Schindelin, add --signoff to the git commit command. Also add --verify to make sure the lines you introduced are clean, which is more useful in commit but not very

Re: [PATCH] Use "-script" postfix for scripts

2005-08-13 Thread Junio C Hamano
Ryan Anderson <[EMAIL PROTECTED]> writes: > See, for example, the history on git-rename-script for why this is good. Why do you think it is a good example? What happens when next time somebody rewrites it in C? - To unsubscribe from this list: send the line "unsubscribe git" in the body of a m

Re: How is working on arbitrary remote heads supposed to work in Cogito (+ PATCH)?

2005-08-13 Thread Junio C Hamano
Carl Baldwin <[EMAIL PROTECTED]> writes: > On Fri, Jul 29, 2005 at 08:10:51AM +, Petr Baudis wrote: >> Exactly. I want much more freedom in pushing, the only requirement being >> that "the to-be-replaced remote head is ancestor of the to-be-pushed >> local head". I think (am I wrong?) git-send

git/cogito workshop/bof at linuxconf au?

2005-08-13 Thread Martin Langhoff
Anyone coming to Linuxconf.au 2006? It'll will be in Dunedin NZ and I'd be really keen on joining a git/cogito workshop or bof. I would gladly try and organize a workshop, but I am far from fluent with git, so I won't go at it alone. Any takers? Call for papers ends 5th September, not too far ahea