* Don't use "sscanf()" for tree mode scanning
From: Linus Torvalds @ 2006-05-28 23:16 UTC (permalink / raw)
To: Junio C Hamano, Git Mailing List
Doing an oprofile run on the result of my git rev-list memory leak fixes
and tree parsing cleanups, I was surprised by the third-highest entry
being
samples % image name app name symbol name
179751 2.7163 libc-2.4.so libc-2.4.so _IO_vfscanf@@GLIBC_2.4
where that 2.7% is actually more than 5% of one CPU, because this was run
on a dual CPU setup with the other CPU just being idle.
That seems to all be from the use of 'sscanf(tree, "%o", &mode)' for the
tree buffer parsing.
So do the trivial octal parsing by hand, which also gives us where the
first space in the string is (and thus where the pathname starts) so we
can get rid of the "strchr(tree, ' ')" call too.
This brings the "git rev-list --all --objects" time down from 63 seconds
to 55 seconds on the historical kernel archive for me, so it's quite
noticeable - tree parsing is a lot of what we end up doing when following
all the objects.
[ I also see a 5% speedup on a full "git fsck-objects" on the current
kernel archive, so that sscanf() really does seem to have hurt our
performance by a surprising amount ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---
tree-walk.c | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/tree-walk.c b/tree-walk.c
index 9f7abb7..3922058 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -47,18 +47,33 @@ void update_tree_entry(struct tree_desc
desc->size = size - len;
}
+static const char *get_mode(const char *str, unsigned int *modep)
+{
+ unsigned char c;
+ unsigned int mode = 0;
+
+ while ((c = *str++) != ' ') {
+ if (c < '0' || c > '7')
+ return NULL;
+ mode = (mode << 3) + (c - '0');
+ }
+ *modep = mode;
+ return str;
+}
+
const unsigned char *tree_entry_extract(struct tree_desc *desc, const char **pathp, unsigned int *modep)
{
void *tree = desc->buf;
unsigned long size = desc->size;
int len = strlen(tree)+1;
const unsigned char *sha1 = tree + len;
- const char *path = strchr(tree, ' ');
+ const char *path;
unsigned int mode;
- if (!path || size < len + 20 || sscanf(tree, "%o", &mode) != 1)
+ path = get_mode(tree, &mode);
+ if (!path || size < len + 20)
die("corrupt tree file");
- *pathp = path+1;
+ *pathp = path;
*modep = canon_mode(mode);
return sha1;
}
^ permalink raw reply related
* [PATCH] ciabot: fix post-update hook description
From: Jonas Fonseca @ 2006-05-29 0:09 UTC (permalink / raw)
To: Petr Baudis, git
Also, improve on a few lost sentences
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
b2d8b2c5258b6585102c94f37c63dc2360092d87
contrib/ciabot.pl | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
b2d8b2c5258b6585102c94f37c63dc2360092d87
diff --git a/contrib/ciabot.pl b/contrib/ciabot.pl
index 83a0d80..e23f5f1 100755
--- a/contrib/ciabot.pl
+++ b/contrib/ciabot.pl
@@ -14,15 +14,15 @@ #
# The master location of this file is in the Cogito repository
# (see http://www.kernel.org/git/).
#
-# This program is designed to run as the .git/commit-post-hook script. It takes
-# the commit information, massaging it and mailing it to the address given below.
+# This program is designed to run as the .git/hooks/post-commit hook. It takes
+# the commit information, massages it and mails it to the address given below.
#
-# The calling convention of the commit-post-hook script is:
+# The calling convention of the post-commit hook is:
#
-# commit-post-hook $commit_sha1 $branch_name
+# .git/hooks/post-commit $commit_sha1 $branch_name
#
# If it does not work, try to disable $xml_rpc in the configuration section
-# below.
+# below. Also, remember to make the hook file executable.
#
#
# Note that you can (and it might be actually more desirable) also use this
@@ -36,9 +36,9 @@ # for merged in $(git-rev-list $newhead
# /path/to/ciabot.pl $merged $refname
# done
#
-# This is useful when you use a remote repository without working copy, where
-# you only push to - the update hook will be trigerred each time you push into
-# that repository, and the pushed commits will be reported through CIA.
+# This is useful when you use a remote repository that you only push to. The
+# update hook will be triggered each time you push into that repository, and
+# the pushed commits will be reported through CIA.
use strict;
use vars qw ($project $from_email $dest_email $noisy $rpc_uri $sendmail
@@ -78,19 +78,19 @@ # not deliver the event at all if CIA se
# unfortunately not an uncommon condition.
$xml_rpc = 0;
-# You can make this bot to totally ignore events concerning the objects
-# specified below. Each object is composed of <path>/<filename>,
+# This variable should contain a regexp, against which each file will be
+# checked, and if the regexp is matched, the file is ignored. This can be
+# useful if you do not want auto-updated files, such as e.g. ChangeLog, to
+# appear via CIA.
#
-# This variable should contain regexp, against which will each object be
-# checked, and if the regexp is matched, the file is ignored. Therefore ie. to
-# ignore all changes in the two files above and everything concerning module
-# 'admin', use:
+# The following example will make the script ignore all changes in two specific
+# files in two different modules, and everything concerning module 'admin':
#
# $ignore_regexp = "^(gentoo/Manifest|elinks/src/bfu/inphist.c|admin/)";
$ignore_regexp = "";
# It can be useful to also grab the generated XML message by some other
-# programs and ie. autogenerate some content based on it. Here you can specify
+# programs and e.g. autogenerate some content based on it. Here you can specify
# a file to which it will be appended.
$alt_local_message_target = "";
--
1.3.3.gd882-dirty
--
Jonas Fonseca
^ permalink raw reply related
* [PATCH] Portfile: bring it up to date; use description from cogito.spec.in
From: Jonas Fonseca @ 2006-05-29 0:11 UTC (permalink / raw)
To: Petr Baudis, git
---
9460c53c76fc00e3b7c45e58813cefde78cb99f5
Portfile.in | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
9460c53c76fc00e3b7c45e58813cefde78cb99f5
diff --git a/Portfile.in b/Portfile.in
index 9e380ad..297fd8a 100644
--- a/Portfile.in
+++ b/Portfile.in
@@ -4,13 +4,13 @@ name cogito
version @@VERSION@@
categories devel
maintainers bryan.larsen@gmail.com
-description Git core + cogito tools to provide a full distributed SCM.
-long_description The git core, developed by Linus Torvalds provides \
- an extremely fast and flexible filesystem-based \
- database designed to store directory trees with \
- regard to their history. The cogito tools, \
- developed by Petr Baudis, provide full distributed \
- SCM (software change management) functionality.
+description The Cogito Version Control System
+long_description Cogito is a version control system layered on top \
+ of the git tree history storage system. It aims at \
+ seamless user interface and ease of use, providing \
+ generally smoother user experience than the "raw" \
+ Core GIT itself and indeed many other version \
+ control systems.
homepage http://kernel.org/pub/software/scm/cogito/
master_sites http://kernel.org/pub/software/scm/cogito/
configure {}
--
1.3.3.gd882-dirty
--
Jonas Fonseca
^ permalink raw reply related
* [PATCH] Minor doc fixes
From: Jonas Fonseca @ 2006-05-29 0:12 UTC (permalink / raw)
To: Petr Baudis, git
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
1e376c11029a33deb811b77565fb558b6c192766
README | 2 +-
README.osx | 7 ++++---
cogito.spec.in | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
1e376c11029a33deb811b77565fb558b6c192766
diff --git a/README b/README
index a53b466..e6e1119 100644
--- a/README
+++ b/README
@@ -60,7 +60,7 @@ The following tools are optional but rec
Tool Description
-------------------------------------------------------------------------------
rsync For fetching files with the rsync backend.
-gnu coreutils The gnu versions of stat, date and cp \
+GNU coreutils The GNU versions of stat, date and cp \
are preferred over the BSD variants.
asciidoc (>= 7.0), xmlto For building documentation.
-------------------------------------------------------------------------------
diff --git a/README.osx b/README.osx
index d8df872..912d9fe 100644
--- a/README.osx
+++ b/README.osx
@@ -2,8 +2,9 @@ This version of Cogito should work on OS
To install on OS X:
-1) Install darwinports (http://darwinports.opendarwin.org/) 2) type
-"make Portfile" 3) type "sudo port install"
+ 1. Install darwinports (http://darwinports.opendarwin.org/)
+ 2. type "make Portfile"
+ 3. type "sudo port install"
You may have to deal with md5 mismatches. Either adjust the md5sum in
your new Portfile or place the new tarball in
@@ -11,7 +12,7 @@ your new Portfile or place the new tarba
Recommendations:
-The gnu versions of "stat" and "date" are preferred over their BSD
+The GNU versions of "stat" and "date" are preferred over their BSD
variants.
"patch", "diff", "merge", "curl" and "rsync" are required. OS X.4
diff --git a/cogito.spec.in b/cogito.spec.in
index 5509d77..70274c1 100644
--- a/cogito.spec.in
+++ b/cogito.spec.in
@@ -70,7 +70,7 @@ rm -rf $RPM_BUILD_ROOT
- Update summary and description
- Make architecture-independent
-* Wed Jul 6 2005 Chris Wright <chris@osdl.org> 0.12-1
+* Wed Jul 6 2005 Chris Wright <chrisw@osdl.org> 0.12-1
- update spec file
* Thu Jun 9 2005 Chris Wright <chrisw@osdl.org> 0.11.3-1
--
1.3.3.gd882-dirty
--
Jonas Fonseca
^ permalink raw reply related
* [PATCH] Fix section slicing so help options are not misplaced in cg-commit(1)
From: Jonas Fonseca @ 2006-05-29 0:13 UTC (permalink / raw)
To: Petr Baudis, git
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
95724a5a97ca466e6eaccc7f46833a015dde2f24
Documentation/make-cg-asciidoc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
95724a5a97ca466e6eaccc7f46833a015dde2f24
diff --git a/Documentation/make-cg-asciidoc b/Documentation/make-cg-asciidoc
index 45fc981..3873618 100755
--- a/Documentation/make-cg-asciidoc
+++ b/Documentation/make-cg-asciidoc
@@ -48,7 +48,7 @@ DESCRIPTION=
OPTIONS=
MISC=
-section=$(echo "$BODY" | sed -n '1,/^[-~][-~]*[-~]$/p')
+section=$(echo "$BODY" | sed -n '1,/^[-][-]*[-]$/p')
section_lines=$(echo "$section" | wc -l)
lines=$(echo "$BODY" | wc -l)
--
1.3.3.gd882-dirty
--
Jonas Fonseca
^ permalink raw reply related
* Re: git-format-patch question
From: Seth Falcon @ 2006-05-29 1:01 UTC (permalink / raw)
To: git
In-Reply-To: <7vpshxdh0s.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
> Seth Falcon <sethfalcon@gmail.com> writes:
>
>> 1. When is one supposed to use --signoff? I gather the answer is
>> project specific, but a statement of what's expected for git
>> itself would probably help clarify things for me.
>
> You shouldn't ;-). Rather, you should sign-off when you make a
> commit, or if you are forwarding somebody else's patch, before
> you send the e-mail off.
>
>> 2. How should I add extra notes to an email generated using
>> git-format-patch? Is this in the docs somewhere that I missed? Is
>> there a recommended way to do this?
>
> Read the format-patch output in your e-mail buffer and edit just
> like you edit any text you write in your e-mail.
Thanks for the quick answers. I guess I was imagining things to be
more complicated than they are :-)
^ permalink raw reply
* Re: [PATCH] Support for configurable git command aliases
From: Junio C Hamano @ 2006-05-29 2:01 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
In-Reply-To: <20060528215945.GD10488@pasky.or.cz>
Petr Baudis <pasky@ucw.cz> writes:
>> I don't like this syntax. What other stuff (beside "cmd") would be under
>> "[alias "co"]? Why not simply:
>>
>> [alias]
>> co = commit -a
>> publish = push public.site.com:/pub/scm/my-public-repo
>
> Nice, I like this.
Sorry, I don't. The left hand side of '=' does not allow
anything but alnum and squashes the case. Please stick to
[alias "co"] syntax.
^ permalink raw reply
* [PATCH] git-send-email.perl extract_valid_address issue
From: Nicolas Troncoso Carrere @ 2006-05-29 4:00 UTC (permalink / raw)
To: git
The third fallback was returning if the match was done or not instead of
returning the actual email address that was matched. This prevented sending
the mail to the people included in the CC. This bug only affect those that
dont have Email::Valid.
I initialized $valid_email as undef so it would mimic the behavior of
Email::Verify->address(), which returns undef if no valid address was found.
Signed-off-by: Nicolas <ntroncos@inf.utfsm.cl>
---
git-send-email.perl | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
84853ca89c15de7a24e9eb9fd422654b86c63be9
diff --git a/git-send-email.perl b/git-send-email.perl
index 312a4ea..dfff3e6 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -316,7 +316,9 @@ sub extract_valid_address {
} else {
# less robust/correct than the monster regexp in Email::Valid,
# but still does a 99% job, and one less dependency
- return ($address =~ /([^\"<>\s]+@[^<>\s]+)/);
+ my $valid_email=undef;
+ ($valid_email ) = ($address =~ /([^\"<>\s]+@[^<>\s]+)/);
+ return ($valid_email);
}
}
--
Nicolás Troncoso Carrère User #272312 counter.li.org
Estudiante Magíster en Ciencias de la Informática
Universidad Técnica Federico Santa María
http://www.alumnos.inf.utfsm.cl/~ntroncos
^ permalink raw reply related
* Re: [PATCH] Support for configurable git command aliases
From: Jeff King @ 2006-05-29 3:58 UTC (permalink / raw)
To: git
In-Reply-To: <e5d9sm$5d4$1@sea.gmane.org>
On Mon, May 29, 2006 at 12:57:26AM +0200, Jakub Narebski wrote:
> Well, if [alias] would be used also for giving default options for git
> commands, e.g.
>
> [alias]
> log = log --pretty
A funny side effect of that would be that "git log" and "git-log" would
now have completely different defaults (unless the alias mechanism
starts intercepting direct calls to git-*, which seems invasive). I
wonder if it might be simpler to just add
core.defaults.log = "--pretty"
or similar.
-Peff
^ permalink raw reply
* Re: [PATCH 1/1] Tried to fix git-svn's handling of filenames with embedded '@'.
From: Eric Wong @ 2006-05-29 5:25 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Seth Falcon
In-Reply-To: <7vlksldgp2.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
> Seth Falcon <sethfalcon@gmail.com> writes:
>
> > svn has trouble parsing files with embedded '@' characters. For
> > example,
> >
> > svn propget svn:keywords foo@bar.c
> > svn: Syntax error parsing revision 'bar.c'
> >
> > I asked about this on #svn and the workaround suggested was to append
> > an explicit revision specifier:
> >
> > svn propget svn:keywords foo@bar.c@BASE
> >
> > This patch appends '@BASE' to the filename in all calls to 'svn
> > propget'.
>
> Eric, this sounds sane to me. Ack?
Doesn't work with svn 1.1 (a requirement of mine, unfortunately). I'll
have a fix for that in a bit.
--
Eric Wong
^ permalink raw reply
* Re: [PATCH 3/4] t5500-fetch-pack: remove local (bashism) usage.
From: Eric Wong @ 2006-05-29 5:28 UTC (permalink / raw)
To: Herbert Xu; +Cc: Junio C Hamano, git
In-Reply-To: <20060526122317.GC5372@gondor.apana.org.au>
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Thu, May 25, 2006 at 07:06:17PM -0700, Eric Wong wrote:
> > None of the variables seem to conflict, so local was unnecessary.
>
> BTW, dash supports (and has always supported) local which is a quite
> useful feature.
Cool. Hmm... pdksh seems to support it here (Debian sid). I'm pretty
sure local is not part of the POSIX spec, though; and I have seen
/bin/sh that don't support it.
--
Eric Wong
^ permalink raw reply
* Commands Mismatch in tutorial and the actual binaries.
From: kandagatla.Srinivas @ 2006-05-29 5:30 UTC (permalink / raw)
To: git
Hi All
Im very new to GIT Stuff. But by installing the latest version<git-1.3.3
> of GIT and going thru the tutorial, I am unable to understand why
there is a mismatch in the commmands.
Tutorial says use commands like git init-db but actually these are
installed as git-init-db. Is this OK.. or NOT.
One more doubt is .. I was unable to locate a command like git-add ..
Can some one help me.
Regards
Srinivas.Kandagatla
Celuinte Soft Systems.
^ permalink raw reply
* Re: [PATCH 2/4] tests: Remove heredoc usage inside quotes
From: Eric Wong @ 2006-05-29 5:30 UTC (permalink / raw)
To: Herbert Xu; +Cc: Junio C Hamano, git
In-Reply-To: <20060526122231.GB5372@gondor.apana.org.au>
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Thu, May 25, 2006 at 07:06:16PM -0700, Eric Wong wrote:
> > The use of heredoc inside quoted strings doesn't seem to be
> > supported by dash. pdksh seems to handle it fine, however.
>
> This is a bug in dash and should be fixed there instead.
> Thanks for drawing my attention to it.
No problem. I think these dash bugs should be fixed in dash, but
continue to be worked around in git as old versions of dash will
probably continue to exist for a long time.
--
Eric Wong
^ permalink raw reply
* Re: [PATCH 3/4] t5500-fetch-pack: remove local (bashism) usage.
From: Junio C Hamano @ 2006-05-29 5:36 UTC (permalink / raw)
To: Eric Wong; +Cc: git
In-Reply-To: <20060529052828.GB24077@localdomain>
Eric Wong <normalperson@yhbt.net> writes:
> Herbert Xu <herbert@gondor.apana.org.au> wrote:
>> On Thu, May 25, 2006 at 07:06:17PM -0700, Eric Wong wrote:
>> > None of the variables seem to conflict, so local was unnecessary.
>>
>> BTW, dash supports (and has always supported) local which is a quite
>> useful feature.
>
> Cool. Hmm... pdksh seems to support it here (Debian sid). I'm pretty
> sure local is not part of the POSIX spec, though; and I have seen
> /bin/sh that don't support it.
Concurred. There are things Herbert said are clearly dash bugs,
but this one is outside POSIX, so lets leave your changes to the
test for it.
^ permalink raw reply
* Re: [PATCH 0/4] fix tests so they run without needing bash
From: Eric Wong @ 2006-05-29 5:39 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vu07dqyk8.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
> You are my hero.
:)
You and Linus have already been my heroes for a while.
I was very pleasantly surprised that all the git-*.sh files work fine
(for me, at least) and only the tests needed modification.
--
Eric Wong
^ permalink raw reply
* Re: Commands Mismatch in tutorial and the actual binaries.
From: Jakub Narebski @ 2006-05-29 6:07 UTC (permalink / raw)
To: git
In-Reply-To: <1148880611.7193.12.camel@localhost.localdomain>
kandagatla.Srinivas wrote:
> Hi All
> Im very new to GIT Stuff. But by installing the latest version (git-1.3.3)
> of GIT and going thru the tutorial, I am unable to understand why
> there is a mismatch in the commmands.
> Tutorial says use commands like git init-db but actually these are
> installed as git-init-db. Is this OK.. or NOT.
>
> One more doubt is .. I was unable to locate a command like git-add ..
>
> Can some one help me.
Actually, in properly installed git both versions should work,
and 'git command' is preferred version, at least for the ordinary
user level commands; "plumbing" commands are usually spelled 'git-command'.
Usually 'git command' is just a wrapper calling git-command.
--
Jakub Narebski
Warsaw, Poland
^ permalink raw reply
* Re: [PATCH 1/1] Tried to fix git-svn's handling of filenames with embedded '@'.
From: Eric Wong @ 2006-05-29 6:35 UTC (permalink / raw)
To: Seth Falcon; +Cc: git
In-Reply-To: <m2verqkobr.fsf@ziti.fhcrc.org>
Seth: how does this work?
Ick, I just found out keyword killing tests don't pass with
svn 1.1, though...
---
svn has trouble parsing files with embedded '@' characters. For
example,
svn propget svn:keywords foo@bar.c
svn: Syntax error parsing revision 'bar.c'
I asked about this on #svn and the workaround suggested was to append
an explicit revision specifier:
svn propget svn:keywords foo@bar.c@BASE
This patch appends '@BASE' to the filename in all calls to 'svn
propget'.
Patch originally by Seth Falcon <sethfalcon@gmail.com>
Seth: signoff?
[ew: Made to work with older svn that don't support peg revisions]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
contrib/git-svn/git-svn.perl | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/contrib/git-svn/git-svn.perl b/contrib/git-svn/git-svn.perl
index b3e0684..54b93f4 100755
--- a/contrib/git-svn/git-svn.perl
+++ b/contrib/git-svn/git-svn.perl
@@ -34,7 +34,7 @@ my $sha1_short = qr/[a-f\d]{4,40}/;
my ($_revision,$_stdin,$_no_ignore_ext,$_no_stop_copy,$_help,$_rmdir,$_edit,
$_find_copies_harder, $_l, $_version, $_upgrade, $_authors);
my (@_branch_from, %tree_map, %users);
-my $_svn_co_url_revs;
+my ($_svn_co_url_revs, $_svn_pg_peg_revs);
my %fc_opts = ( 'no-ignore-externals' => \$_no_ignore_ext,
'branch|b=s' => \@_branch_from,
@@ -336,7 +336,7 @@ sub show_ignore {
my %ign;
File::Find::find({wanted=>sub{if(lstat $_ && -d _ && -d "$_/.svn"){
s#^\./##;
- @{$ign{$_}} = safe_qx(qw(svn propget svn:ignore),$_);
+ @{$ign{$_}} = svn_propget_base('svn:ignore', $_);
}}, no_chdir=>1},'.');
print "\n# /\n";
@@ -860,7 +860,7 @@ sub sys { system(@_) == 0 or croak $? }
sub eol_cp {
my ($from, $to) = @_;
- my $es = safe_qx(qw/svn propget svn:eol-style/, $to);
+ my $es = svn_propget_base('svn:eol-style', $to);
open my $rfd, '<', $from or croak $!;
binmode $rfd or croak $!;
open my $wfd, '>', $to or croak $!;
@@ -898,7 +898,7 @@ sub do_update_index {
while (my $x = <$p>) {
chomp $x;
if (!$no_text_base && lstat $x && ! -l _ &&
- safe_qx(qw/svn propget svn:keywords/,$x)) {
+ svn_propget_base('svn:keywords', $x)) {
my $mode = -x _ ? 0755 : 0644;
my ($v,$d,$f) = File::Spec->splitpath($x);
my $tb = File::Spec->catfile($d, '.svn', 'tmp',
@@ -1136,6 +1136,9 @@ sub svn_compat_check {
if (grep /usage: checkout URL\[\@REV\]/,@co_help) {
$_svn_co_url_revs = 1;
}
+ if (grep /\[TARGET\[\@REV\]\.\.\.\]/, `svn propget -h`) {
+ $_svn_pg_peg_revs = 1;
+ }
# I really, really hope nobody hits this...
unless (grep /stop-on-copy/, (safe_qx(qw(svn log -h)))) {
@@ -1215,6 +1218,12 @@ sub load_authors {
close $authors or croak $!;
}
+sub svn_propget_base {
+ my ($p, $f) = @_;
+ $f .= '@BASE' if $_svn_pg_peg_revs;
+ return safe_qx(qw/svn propget/, $p, $f);
+}
+
__END__
Data structures:
--
1.3.3.gef0f
^ permalink raw reply related
* What's in git.git
From: Junio C Hamano @ 2006-05-29 6:44 UTC (permalink / raw)
To: git; +Cc: linux-kernel
* The 'master' branch has these since the last announcement.
This is a fairly big update.
- git-apply takes notice of beginning and end of file as
context (Catalin Marinas, Linus and me)
apply: treat EOF as proper context.
apply: force matching at the beginning.
- gitview updates (Aneesh Kumar K.V)
- git-mailinfo updates (Eric W. Biederman and me)
Make read_one_header_line return a flag not a length.
Move B and Q decoding into check header.
Refactor commit messge handling.
In handle_body only read a line if we don't already have one.
More accurately detect header lines in read_one_header_line
Allow in body headers beyond the in body header prefix.
mailinfo: skip bogus UNIX From line inside body
mailinfo: More carefully parse header lines in read_one_header_line()
- format-patch --start-number (Johannes Schindelin and me)
cache-tree: replace a sscanf() by two strtol() calls
Fix crash when reading the empty tree
git-format-patch --start-number <n>
built-in format-patch: various fixups.
format-patch: -n and -k are mutually exclusive.
- ls-remote rsync:// fix (me)
ls-remote: fix rsync:// to report HEAD
* This should fix clone over rsync:// (which is deprecated
but anyway).
- cache-tree optimization for apply & write-tree sequence (me,
Johannes, Dennis Stosberg)
read-cache/write-cache: optionally return cache checksum SHA1.
Add cache-tree.
Update write-tree to use cache-tree.
Invalidate cache-tree entries for touched paths in git-apply.
Use cache-tree in update-index.
Add test-dump-cache-tree
cache-tree: protect against "git prune".
index: make the index file format extensible.
Teach fsck-objects about cache-tree.
cache-tree: sort the subtree entries.
test-dump-cache-tree: report number of subtrees.
update-index: when --unresolve, smudge the relevant cache-tree entries.
read-tree: teach 1 and 2 way merges about cache-tree.
read-tree: teach 1-way merege and plain read to prime cache-tree.
cache_tree_update: give an option to update cache-tree only.
test-dump-cache-tree: validate the cached data as well.
cache-tree.c: typefix
fsck-objects: mark objects reachable from cache-tree
Fix test-dump-cache-tree in one-tree disappeared case.
read-tree: invalidate cache-tree entry when a new index entry is added.
cache-tree: a bit more debugging support.
fsck-objects: do not segfault on missing tree in cache-tree
fix git-write-tree with cache-tree on BE64
* I've held onto this too long but haven't seen breakage.
This should make cycles of "apply & write-tree" faster by
15-20%.
- documentation (Jeff King)
cat-file: document -p option
- cvsimport Perl backward compatibility (Jeff King)
cvsimport: avoid "use" with :tag
- build fixes (Jim Meyering, Martin Waitz)
Don't write directly to a make target ($@).
Documentation/Makefile: remove extra /
Add instructions to commit template.
- "git-clone --template" (me)
Let git-clone to pass --template=dir option to git-init-db.
- various fixes and cleanups (Linus, Martin Waitz, Petr Baudis,
Shawn Pearce, me)
builtin-rm: squelch compiler warnings.
fetch.c: remove an unused variable and dead code.
git-fetch: avoid using "case ... in (arm)"
bogus "fatal: Not a git repository"
t1002: use -U0 instead of --unified=0
Fix "--abbrev=xyz" for revision listing
Don't use "sscanf()" for tree mode scanning
Call builtin ls-tree in git-cat-file -p
Built git-upload-tar should be ignored.
- rev-list --objects memory leak fix (Linus)
Fix memory leak in "git rev-list --objects"
- cvsexportcommit fixups (Yann Dirson)
Do not call 'cmp' with non-existant -q flag.
Document current cvsexportcommit limitations.
Make cvsexportcommit create parent directories as needed.
* The 'next' branch, in addition, has these.
- portability of tests across different bourne flavors (Eric Wong)
t3300-funny-names: shell portability fixes
tests: Remove heredoc usage inside quotes
t5500-fetch-pack: remove local (bashism) usage.
t6000lib: workaround a possible dash bug
* I think these are OK to push out to "master".
- read-tree/write-tree --prefix from bind commit series (me)
read-tree: --prefix=<path>/ option.
write-tree: --prefix=<path>
read-tree: reorganize bind_merge code.
* I think these are OK to push out to "master".
- avoid wasted work in fetch-pack when receiving side has more
roots than the sender (me).
fetch-pack: give up after getting too many "ack continue"
* While this would not hurt, it is a client-side hack. To
fix the problem properly, the server side needs to become a
bit smarter.
- tree parser reorganization (Linus)
Add raw tree buffer info to "struct tree"
Make "tree_entry" have a SHA1 instead of a union of object pointers
Switch "read_tree_recursive()" over to tree-walk functionality
Remove "tree->entries" tree-entry list from tree parser
* This looks good; I would like to cook this for a while in
"next", and mark its graduation with 1.4.0 release.
- test fix for http-fetch segfault (Sean Estabrooks)
* Status?
- ref-log (Shawn Pearce)
Improve abstraction of ref lock/write.
Convert update-ref to use ref_lock API.
Log ref updates to logs/refs/<ref>
Support 'master@2 hours ago' syntax
Fix ref log parsing so it works properly.
General ref log reading improvements.
Added logs/ directory to repository layout.
Force writing ref if it doesn't exist.
Log ref updates made by fetch.
Change 'master@noon' syntax to 'master@{noon}'.
Correct force_write bug in refs.c
Change order of -m option to update-ref.
Include ref log detail in commit, reset, etc.
Create/delete branch ref logs.
Enable ref log creation in git checkout -b.
Verify git-commit provides a reflog message.
Test that git-branch -l works.
* I think these are OK to push out to "master" in that it
does not seem to cause regression, but I haven't used this
change for real work. Impressions?
* The 'pu' branch, in addition, has these.
- $HOME/.gitrc (Petr Baudis)
Read configuration also from ~/.gitrc
* I like this but it breaks the tests big time. Not "next"
material yet, unfortunately.
^ permalink raw reply
* Re: [PATCH] git-receive-pack needs to set umask(2)
From: Johannes Schindelin @ 2006-05-29 7:13 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <e5d6i0$rnf$1@sea.gmane.org>
Hi,
On Mon, 29 May 2006, Jakub Narebski wrote:
> Michael Richardson wrote:
>
> > This change adds $GIT_DIR/umask to contain a single line, an integer
> > which will be fed to umask(). This should also work for the git daemon,
> > which I personally do not use, so this may be inappropriate.
>
> Shouldn't it be done rather via $GIT_DIR/config file, and
> git-repo-config? I.e. instead of adding new file to repository layout,
> $GIT_DIR/umask, add core.umask to git configuration?
See also
http://thread.gmane.org/gmane.comp.version-control.git/13856/focus=13876
The essence of the thread: If you want to do anything useful in a non-bare
repository, you are likely using other tools than git, which do not
interpret core.umask or $GIT_DIR/umask.
If you use a bare repository, just make it shared. No need for an umask.
Hth,
Dscho
^ permalink raw reply
* [PATCH] Make update-ref a builtin.
From: Shawn Pearce @ 2006-05-29 7:15 UTC (permalink / raw)
To: Junio Hamano; +Cc: git
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
This is applied on top of `next` and my other reflog changes.
I put it together just to reduce the disk usage - as Linus noted
PowerPC ain't too slim on its executables...
Makefile | 6 +++---
update-ref.c => builtin-update-ref.c | 9 +++++----
builtin.h | 1 +
git.c | 1 +
4 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 5f8ea18..7dfeb97 100644
--- a/Makefile
+++ b/Makefile
@@ -161,7 +161,7 @@ PROGRAMS = \
git-ssh-upload$X git-unpack-file$X \
git-unpack-objects$X git-update-index$X git-update-server-info$X \
git-upload-pack$X git-verify-pack$X git-write-tree$X \
- git-update-ref$X git-symbolic-ref$X \
+ git-symbolic-ref$X \
git-name-rev$X git-pack-redundant$X git-repo-config$X git-var$X \
git-describe$X git-merge-tree$X git-blame$X git-imap-send$X
@@ -172,7 +172,7 @@ BUILT_INS = git-log$X git-whatchanged$X
git-init-db$X git-tar-tree$X git-upload-tar$X git-format-patch$X \
git-ls-files$X git-ls-tree$X \
git-read-tree$X git-commit-tree$X \
- git-apply$X git-show-branch$X git-diff-files$X \
+ git-update-ref$X git-apply$X git-show-branch$X git-diff-files$X \
git-diff-index$X git-diff-stages$X git-diff-tree$X git-cat-file$X
# what 'all' will build and 'install' will install, in gitexecdir
@@ -228,7 +228,7 @@ BUILTIN_OBJS = \
builtin-read-tree.o builtin-commit-tree.o \
builtin-apply.o builtin-show-branch.o builtin-diff-files.o \
builtin-diff-index.o builtin-diff-stages.o builtin-diff-tree.o \
- builtin-cat-file.o
+ builtin-update-ref.o builtin-cat-file.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
diff --git a/update-ref.c b/builtin-update-ref.c
similarity index 85%
rename from update-ref.c
rename to builtin-update-ref.c
index a1e6bb9..2c62286 100644
--- a/update-ref.c
+++ b/builtin-update-ref.c
@@ -1,10 +1,11 @@
#include "cache.h"
#include "refs.h"
+#include "builtin.h"
-static const char git_update_ref_usage[] =
+static const char builtin_update_ref_usage[] =
"git-update-ref <refname> <value> [<oldval>] [-m <reason>]";
-int main(int argc, char **argv)
+int cmd_update_ref(int argc, const char **argv, char **envp)
{
const char *refname=NULL, *value=NULL, *oldval=NULL, *msg=NULL;
struct ref_lock *lock;
@@ -17,7 +18,7 @@ int main(int argc, char **argv)
for (i = 1; i < argc; i++) {
if (!strcmp("-m", argv[i])) {
if (i+1 >= argc)
- usage(git_update_ref_usage);
+ usage(builtin_update_ref_usage);
msg = argv[++i];
if (!*msg)
die("Refusing to perform update with empty message.");
@@ -39,7 +40,7 @@ int main(int argc, char **argv)
}
}
if (!refname || !value)
- usage(git_update_ref_usage);
+ usage(builtin_update_ref_usage);
if (get_sha1(value, sha1))
die("%s: not a valid SHA1", value);
diff --git a/builtin.h b/builtin.h
index 738ec3d..397b770 100644
--- a/builtin.h
+++ b/builtin.h
@@ -28,6 +28,7 @@ extern int cmd_grep(int argc, const char
extern int cmd_rm(int argc, const char **argv, char **envp);
extern int cmd_add(int argc, const char **argv, char **envp);
extern int cmd_rev_list(int argc, const char **argv, char **envp);
+extern int cmd_update_ref(int argc, const char **argv, char **envp);
extern int cmd_check_ref_format(int argc, const char **argv, char **envp);
extern int cmd_init_db(int argc, const char **argv, char **envp);
extern int cmd_tar_tree(int argc, const char **argv, char **envp);
diff --git a/git.c b/git.c
index 10ea934..f37b020 100644
--- a/git.c
+++ b/git.c
@@ -57,6 +57,7 @@ static void handle_internal_command(int
{ "init-db", cmd_init_db },
{ "tar-tree", cmd_tar_tree },
{ "upload-tar", cmd_upload_tar },
+ { "update-ref", cmd_update_ref },
{ "check-ref-format", cmd_check_ref_format },
{ "ls-files", cmd_ls_files },
{ "ls-tree", cmd_ls_tree },
--
1.3.3.g45d8
^ permalink raw reply related
* [PATCH] Remove unnecessary ouput from t3600-rm.
From: Shawn Pearce @ 2006-05-29 7:16 UTC (permalink / raw)
To: Junio Hamano; +Cc: git
Moved the output of the setup commits and the test-file rm check to
file descriptors 3 and 4 hiding their messages unless -v is given.
This makes the test suite look a little cleaner when the rm test-file
setup step fails (and was probably expected to fail).
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
t/t3600-rm.sh | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index acaa4d6..5b6bf61 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -10,14 +10,14 @@ test_description='Test of the various op
# Setup some files to be removed, some with funny characters
touch -- foo bar baz 'space embedded' -q
git-add -- foo bar baz 'space embedded' -q
-git-commit -m "add normal files"
+git-commit -m "add normal files" >&3 2>&4
test_tabs=y
if touch -- 'tab embedded' 'newline
embedded'
then
git-add -- 'tab embedded' 'newline
embedded'
-git-commit -m "add files with tabs and newlines"
+git-commit -m "add files with tabs and newlines" >&3 2>&4
else
say 'Your filesystem does not allow tabs in filenames.'
test_tabs=n
@@ -28,7 +28,7 @@ # git-rm barfs, but if the test is run a
# arranged.
: >test-file
chmod a-w .
-rm -f test-file
+rm -f test-file >&3 2>&4
test -f test-file && test_failed_remove=y
chmod 775 .
rm -f test-file
--
1.3.3.g45d8
^ permalink raw reply related
* [PATCH] Improved pack format documentation.
From: Shawn Pearce @ 2006-05-29 7:17 UTC (permalink / raw)
To: Junio Hamano; +Cc: git
While trying to implement a pack reader in Java I was mislead by
some facts listed in this documentation as well as found a few
details to be missing about the pack header.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
Documentation/technical/pack-format.txt | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/Documentation/technical/pack-format.txt b/Documentation/technical/pack-format.txt
index ed2decc..0e1ffb2 100644
--- a/Documentation/technical/pack-format.txt
+++ b/Documentation/technical/pack-format.txt
@@ -5,8 +5,13 @@ GIT pack format
- The header appears at the beginning and consists of the following:
- 4-byte signature
- 4-byte version number (network byte order)
+ 4-byte signature:
+ The signature is: {'P', 'A', 'C', 'K'}
+
+ 4-byte version number (network byte order):
+ GIT currently accepts version number 2 or 3 but
+ generates version 2 only.
+
4-byte number of objects contained in the pack (network byte order)
Observation: we cannot have more than 4G versions ;-) and
@@ -41,7 +46,7 @@ GIT pack format
8-byte integers to go beyond 4G objects per pack, but it is
not strictly necessary.
- - The header is followed by sorted 28-byte entries, one entry
+ - The header is followed by sorted 24-byte entries, one entry
per object in the pack. Each entry is:
4-byte network byte order integer, recording where the
--
1.3.3.g45d8
^ permalink raw reply related
* Re: [PATCH] Read configuration also from ~/.gitrc
From: Johannes Schindelin @ 2006-05-29 7:20 UTC (permalink / raw)
To: Petr Baudis; +Cc: Anand Kumria, git
In-Reply-To: <20060528222641.GF10488@pasky.or.cz>
Hi,
On Mon, 29 May 2006, Petr Baudis wrote:
> diff --git a/config.c b/config.c
> index 0248c6d..8a98865 100644
> --- a/config.c
> +++ b/config.c
> @@ -312,7 +312,11 @@ int git_config_from_file(config_fn_t fn,
>
> int git_config(config_fn_t fn)
> {
> - return git_config_from_file(fn, git_path("config"));
> + int ret = 0;
> + if (getenv("HOME"))
> + ret += git_config_from_file(fn, mkpath("%s/.gitrc", getenv("HOME")));
> + ret += git_config_from_file(fn, git_path("config"));
> + return ret;
> }
>
> /*
But would this not break for the normal case? If you override one key in
the repository's config, with this patch, repo-config will barf. The
normal case is that you do not expect multiple values for the same key.
Your patch reads both ~/.gitrc and $GIT_DIR/config, and if a key has a
value in both (even if they are identical), repo-config will error out.
Further, storing a key will no longer work. This is an obscure side
effect of this patch not caring about storing anything in ~/.gitrc: If you
find the key section (or the key) in ~/.gitrc, the offset will be stored,
_and used on $GIT_DIR/config_!
I agree it is nice to have a global git configuration, but I have it: I
use templates.
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] Remove unnecessary ouput from t3600-rm.
From: Junio C Hamano @ 2006-05-29 7:27 UTC (permalink / raw)
To: Shawn Pearce; +Cc: git
In-Reply-To: <20060529071646.GC6061@spearce.org>
Shawn Pearce <spearce@spearce.org> writes:
> Moved the output of the setup commits and the test-file rm check to
> file descriptors 3 and 4 hiding their messages unless -v is given.
> This makes the test suite look a little cleaner when the rm test-file
> setup step fails (and was probably expected to fail).
I suspect those bare commands _should_ succeed so make them a
separate test step and verify their success return while you are
at it, and their output would not be shown normally, without
your futzing with file descriptors. Wouldn't that be a lot
cleaner approach?
^ permalink raw reply
* Re: [PATCH 3/4] t5500-fetch-pack: remove local (bashism) usage.
From: Herbert Xu @ 2006-05-29 7:31 UTC (permalink / raw)
To: Eric Wong; +Cc: Junio C Hamano, git
In-Reply-To: <20060529052828.GB24077@localdomain>
On Sun, May 28, 2006 at 10:28:28PM -0700, Eric Wong wrote:
>
> Cool. Hmm... pdksh seems to support it here (Debian sid). I'm pretty
> sure local is not part of the POSIX spec, though; and I have seen
> /bin/sh that don't support it.
It is true that the current POSIX spec does not specify it. However,
all useful POSIX-compliant shells on Linux (i.e., excluding those
shells that exist only to test POSIX compliance) support it and it
is used by a large corpus of existing Linux scripts.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox