* Re: Need help for migration from CVS to git in one go (ie, FORGETTING CVS history)
From: Petr Baudis @ 2008-11-05 23:50 UTC (permalink / raw)
To: Francis Galiegue; +Cc: git
In-Reply-To: <200811060014.57046.fg@one2team.net>
Hi,
On Thu, Nov 06, 2008 at 12:14:56AM +0100, Francis Galiegue wrote:
> * second: even though this may be a "non problem", we use Bonsai, which has
> the ability to see what was commited by whom, given a time interval (from d1
> to d2): the base gitweb allows to search by commiter, which is good, but it
> has no date boundaries: do tools exist for git that can do this? If not, that
> wouldn't be a big deal, however...
git log --since='2 months ago' --until='1 month ago'
There is no gitweb functionality for this right now, but I think an
implementation of that would be welcome in principle.
> * third: also Bonsai-related; Bonsai can link to Bugzilla by matching (wild
> guess) /\b(?:#?)(\d+)\b/ and transforming this into
> http://your.bugzilla.fqdn.here/show_bug.cgi?id=$1. Does gitweb have this
> built-in? (haven't looked yet) Is this planned, or has it been discussed and
> been considered not worth the hassle?
This is planned and I think there are third-party patches for this
(cannot find them quickly, though), but upstream gitweb does not have
the support for this included yet.
--
Petr "Pasky" Baudis
People who take cold baths never have rheumatism, but they have
cold baths.
^ permalink raw reply
* Re: Need help for migration from CVS to git in one go (ie, FORGETTING CVS history)
From: Shawn O. Pearce @ 2008-11-05 23:44 UTC (permalink / raw)
To: Francis Galiegue; +Cc: git
In-Reply-To: <200811060034.48053.fg@one2team.net>
Francis Galiegue <fg@one2team.net> wrote:
> Le Thursday 06 November 2008 00:23:48 Shawn O. Pearce, vous avez écrit :
> > Francis Galiegue <fg@one2team.net> wrote:
> > > Finally, about the Eclipse plugin:
>
> > > * if the plugin can push, can you configure from within the plugin what
> > > branches can be pushed where, or should you edit .git/config by hand?
> >
> > I don't think you can edit saved configurations in the plugin UI.
>
> Not a big deal, I guess. This can be handled... (BTW, what about "git clone"?
> Still not there, although _this_ can be dealt with also)
File->Import... from Git. That can clone a repository. After it
finishes you'll have to use the import wizard again to actually
import existing .project files, or create new projects, etc.
> > > * "git stash": is it supported?
> >
> > Not in Eclipse, no.
>
> What do you mean by this?
I mean there's no implementation of git stash. Eclipse doesn't
support git stash, the notion of the stash, the branch the stash
is on. Its not in the Eclipse plugin.
> > > * can you "copy" a commit, or even a set of commits, and "cherry-pick"
> > > them into another branch? Or even rebase a branch onto antoher?
> >
> > Not in Eclipse, no.
>
> Same question... What exactly is the problem with Eclipse wrt this kind of
> operation?
Its also not implemented in the eclipse UI.
--
Shawn.
^ permalink raw reply
* Re: Need help for migration from CVS to git in one go (ie, FORGETTING CVS history)
From: Francis Galiegue @ 2008-11-05 23:34 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git
In-Reply-To: <20081105232348.GP15463@spearce.org>
Le Thursday 06 November 2008 00:23:48 Shawn O. Pearce, vous avez écrit :
> Francis Galiegue <fg@one2team.net> wrote:
> > Finally, about the Eclipse plugin:
> > * the README says that it has no push capacity, the popup menu says
> > otherwise (last checked last Saturday)... What should I believe?
>
> The README is out of date. Push is implemented, works, and folks
> actually use it. That was a nice success from our GSoC program
> this year.
>
Good to hear :p Any chance that the README gets updated? ;)
> > * if the plugin can push, can you configure from within the plugin what
> > branches can be pushed where, or should you edit .git/config by hand?
>
> I don't think you can edit saved configurations in the plugin UI.
> The APIs are there underneath to do the reading/writing and most
> of the UI to show a configuration is present, I just don't think
> anyone has wired the two together for saved configurations inside
> of .git/config. So yea, edit by hand.
>
Not a big deal, I guess. This can be handled... (BTW, what about "git clone"?
Still not there, although _this_ can be dealt with also)
> > * "git stash": is it supported?
>
> Not in Eclipse, no.
>
What do you mean by this?
> > * can you "copy" a commit, or even a set of commits, and "cherry-pick"
> > them into another branch? Or even rebase a branch onto antoher?
>
> Not in Eclipse, no.
Same question... What exactly is the problem with Eclipse wrt this kind of
operation?
--
fge
^ permalink raw reply
* Re: [RFC PATCH] gitweb: Support filtering projects by .htaccess files.
From: Jakub Narebski @ 2008-11-05 23:26 UTC (permalink / raw)
To: Alexander Gavrilov; +Cc: git, Petr Baudis, Giuseppe Bilotta
In-Reply-To: <200811060136.23806.angavrilov@gmail.com>
Alexander Gavrilov wrote:
> How about the following patch, that simply adds a hook, and provides
> an example using mod_perl in the documentation?
Very nice, simple yet powerfull solution.
> --- >8 ---
> Subject: [PATCH] gitweb: Add a per-repository authorization hook.
>
> Add a configuration variable that can be used to specify an
> arbitrary subroutine that will be called in the same situations
> where $export_ok is checked, and its return value used
> to decide whether the repository is to be shown.
>
> This allows the user to implement custom authentication
> schemes, for example by issuing a subrequest through mod_perl
> and checking if Apache will authorize it.
>
> Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
If somebody could check out example given for this feature, I'd add
Acked-by: Jakub Narebski <jnareb@gmail.com>
> ---
> gitweb/INSTALL | 21 +++++++++++++++++++++
> gitweb/gitweb.perl | 8 +++++++-
> 2 files changed, 28 insertions(+), 1 deletions(-)
>
> diff --git a/gitweb/INSTALL b/gitweb/INSTALL
> index 26967e2..fa5917a 100644
> --- a/gitweb/INSTALL
> +++ b/gitweb/INSTALL
> @@ -166,6 +166,27 @@ Gitweb repositories
> shows repositories only if this file exists in its object database
> (if directory has the magic file named $export_ok).
>
> +- Finally, it is possible to specify an arbitrary perl subroutine that
> + will be called for each project to determine if it can be exported.
> + The subroutine receives an absolute path to the project as its only
> + parameter.
> +
> + For example, if you use mod_perl to run the script, and have dumb
> + http protocol authentication configured for your repositories, you
> + can use the following hook to allow access only if the user is
> + authorized to read the files:
> +
> + $export_auth_hook = sub {
> + use Apache2::SubRequest ();
> + use Apache2::Const -compile => qw(HTTP_OK);
> + my $path = "$_[0]/HEAD";
> + my $r = Apache2::RequestUtil->request;
> + my $sub = $r->lookup_file($path);
> + return $sub->filename eq $path
> + && $sub->status == Apache2::Const::HTTP_OK;
> + };
Can anybody check this? Or was it checked by author?
> +
> +
> Generating projects list using gitweb
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 172ea6b..9329880 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -95,6 +95,11 @@ our $default_projects_order = "project";
> # (only effective if this variable evaluates to true)
> our $export_ok = "++GITWEB_EXPORT_OK++";
>
> +# show repository only if this subroutine returns true
> +# when given the path to the project, for example:
> +# sub { return -e "$_[0]/git-daemon-export-ok"; }
> +our $export_auth_hook = undef;
> +
Simple, yet powerfull. Nice short example.
> # only allow viewing of repositories also shown on the overview page
> our $strict_export = "++GITWEB_STRICT_EXPORT++";
>
> @@ -400,7 +405,8 @@ sub check_head_link {
> sub check_export_ok {
> my ($dir) = @_;
> return (check_head_link($dir) &&
> - (!$export_ok || -e "$dir/$export_ok"));
> + (!$export_ok || -e "$dir/$export_ok") &&
> + (!$export_auth_hook || $export_auth_hook->($dir)));
Nice.
> }
>
> # process alternate names for backward compatibility
> --
> tg: (0d4f9de..) t/authenticate/hook (depends on: t/authenticate/unify-exportok)
>
P.S. Why doesn't TopGit add git and TopGit version to signature?
--
Jakub Narebski
Poland
^ permalink raw reply
* Re: Need help for migration from CVS to git in one go (ie, FORGETTING CVS history)
From: Shawn O. Pearce @ 2008-11-05 23:23 UTC (permalink / raw)
To: Francis Galiegue; +Cc: git
In-Reply-To: <200811060014.57046.fg@one2team.net>
Francis Galiegue <fg@one2team.net> wrote:
> Finally, about the Eclipse plugin:
> * the README says that it has no push capacity, the popup menu says otherwise
> (last checked last Saturday)... What should I believe?
The README is out of date. Push is implemented, works, and folks
actually use it. That was a nice success from our GSoC program
this year.
> * if the plugin can push, can you configure from within the plugin what
> branches can be pushed where, or should you edit .git/config by hand?
I don't think you can edit saved configurations in the plugin UI.
The APIs are there underneath to do the reading/writing and most
of the UI to show a configuration is present, I just don't think
anyone has wired the two together for saved configurations inside
of .git/config. So yea, edit by hand.
> * "git stash": is it supported?
Not in Eclipse, no.
> * can you "copy" a commit, or even a set of commits, and "cherry-pick" them
> into another branch? Or even rebase a branch onto antoher?
Not in Eclipse, no.
--
Shawn.
^ permalink raw reply
* Need help for migration from CVS to git in one go (ie, FORGETTING CVS history)
From: Francis Galiegue @ 2008-11-05 23:14 UTC (permalink / raw)
To: git
Hello list,
Since my first email where I said that we wanted to migrate from CVS to a
distributed SCM, we have had a lot of discussions with developers and my
chief (which happens to be a developer too). We have come to the following
conclusions:
* git has credentials (heck, it "runs" the Linux kernel, Wine, Samba, and
other);
* the "distributed" part of it is indeed an advantage (planned developments
with huge technical/functional impacts);
* 52 CVS modules, fine; but then this can become one and 52 subdirectories in
them and still act as separate modules from the build system point of view
(which I have implemented, so I can change it);
* we have enough resources that the old CVS tree can be kept, even on tape,
the day we decide to "scrap it all" and start anew;
* CVS "good practices" have barely been observed, so "we" might as well start
again from a sane base.
So, git looks like a great solution. The Eclipse plugin evolves nicely, you
still can decide on a "central" repository... Looks good.
There are, however, a few problems:
* first: I am not an Eclipse user, and the two main developers use Eclipse
extensively (but even they are lost because of CVS, which is to "my"
advantage), so some questions below will focus on the Eclipse plugin;
* second: even though this may be a "non problem", we use Bonsai, which has
the ability to see what was commited by whom, given a time interval (from d1
to d2): the base gitweb allows to search by commiter, which is good, but it
has no date boundaries: do tools exist for git that can do this? If not, that
wouldn't be a big deal, however...
* third: also Bonsai-related; Bonsai can link to Bugzilla by matching (wild
guess) /\b(?:#?)(\d+)\b/ and transforming this into
http://your.bugzilla.fqdn.here/show_bug.cgi?id=$1. Does gitweb have this
built-in? (haven't looked yet) Is this planned, or has it been discussed and
been considered not worth the hassle?
Finally, about the Eclipse plugin:
* the README says that it has no push capacity, the popup menu says otherwise
(last checked last Saturday)... What should I believe?
* if the plugin can push, can you configure from within the plugin what
branches can be pushed where, or should you edit .git/config by hand?
* "git stash": is it supported?
* can you "copy" a commit, or even a set of commits, and "cherry-pick" them
into another branch? Or even rebase a branch onto antoher?
Thanks,
--
fge
^ permalink raw reply
* Re: [PATCH] Documentation: add a planning document for the next CLI revamp
From: Dmitry Potapov @ 2008-11-05 22:53 UTC (permalink / raw)
To: Sam Vilain
Cc: Junio C Hamano, Jeff King, Sam Vilain, git, Johannes Schindelin,
Scott Chacon, Tom Preston-Werner, J.H., Christian Couder,
Kai Blin
In-Reply-To: <1225822231.6722.3.camel@maia.lan>
On Wed, Nov 05, 2008 at 07:10:31AM +1300, Sam Vilain wrote:
> On Tue, 2008-11-04 at 12:18 +0300, Dmitry Potapov wrote:
> > > I can see that some people want this behaviour by default; but to me
> > > "push the current branch back to where it came from" seems like far more
> > > a rational default for at least 90% of users.
> >
> > I think it depends on one's workflow. If you use a centralized workflow
> > as with CVS then yes, 90% cases you want to push the current branch. On
> > the other hand, if people push their changes to the server only for
> > review, it means that accidentally pushing more than one intended is not
> > a big deal.
>
> Perhaps not, but it was still unintended.
Even if it were unintended, it will be noticed and corrected immediately,
while forgetting to push some changes is not so obvious... Anyway, your
workflow assumes that one wants to push changes immediately before
switching to another branch, while there are many people who do that
later (after some additional testing or just at the end of their workday).
> I really can't understand the
> opposition to making this command make many people less angry at it.
Because it breaks how this command works now. So I don't think it is a
good idea to make some people less angry while enraging many others over
breaking their workflow. Compatibility should not be taken lightly.
Dmitry
^ permalink raw reply
* Re: [PATCH] push: fix local refs update if already up-to-date
From: Jeff King @ 2008-11-05 22:44 UTC (permalink / raw)
To: Clemens Buchacher; +Cc: git, Junio C Hamano
In-Reply-To: <20081105202849.GA9484@localhost>
On Wed, Nov 05, 2008 at 09:28:49PM +0100, Clemens Buchacher wrote:
> The reason it doesn't work is a bug in lock_ref_sha1_basic(). Dating back to
> pre-"pack-refs" times, this code forces a write if the ref file does not
> exist. I will resubmit the patch including your above testcase and a bugfix
> for lock_ref_sha1_basic().
OK, thanks for looking into it further. Both patches look sane to me.
-Peff
^ permalink raw reply
* Re: [PATCH] gitweb: Use single implementation of export_ok check.
From: Jakub Narebski @ 2008-11-05 22:41 UTC (permalink / raw)
To: Alexander Gavrilov; +Cc: git, Giuseppe Bilotta, Petr Baudis
In-Reply-To: <200811060115.57168.angavrilov@gmail.com>
Alexander Gavrilov wrote:
> GitWeb source contains a special function that implements the
s/GitWeb/gitweb/
> export_ok check, but validate_project still uses a separate copy
> of essentially the same code.
>
> This patch makes it use the dedicated function, thus ensuring
> that all checks are done through a single code path.
>
> Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
--
Jakub Narebski
Poland
^ permalink raw reply
* Re: [PATCH] gitweb: Fix mod_perl support.
From: Jakub Narebski @ 2008-11-05 22:40 UTC (permalink / raw)
To: Alexander Gavrilov; +Cc: git, Giuseppe Bilotta, Petr Baudis
In-Reply-To: <200811060110.07965.angavrilov@gmail.com>
Alexander Gavrilov wrote:
> [...] it is necessary to declare all global
> variables as 'our' [...]
>
> Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
I have forgot about that when reviewing path_info patches. I'm sorry
about that. Good catch, and good explanation.
Acked-by: Jakub Narebski <jnareb@gmail.com>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index c5254af..2174d4a 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
[...]
> -my $path_info = $ENV{"PATH_INFO"};
> +our $path_info = $ENV{"PATH_INFO"};
[...]
--
Jakub Narebski
Poland
^ permalink raw reply
* Re: [RFC PATCH] gitweb: Support filtering projects by .htaccess files.
From: Alexander Gavrilov @ 2008-11-05 22:36 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git, Petr Baudis, Giuseppe Bilotta
In-Reply-To: <200811032357.38893.jnareb@gmail.com>
> > authenticated user name. Using group authentication requires specifying
> > a path to the Apache group file in the configuration.
> >
> > Using .htaccess has an additional bonus that the same authentication
> > data can be used both for gitweb and the dumb http transport.
>
> I'm not sure if it wouldn't be a better solution to try to ask web
> server to do authentication, for example in MOD_PERL case via $r
> object (if I remember correctly)...
You are right. I never used mod_perl before, so I didn't know that it's possible.
How about the following patch, that simply adds a hook, and provides
an example using mod_perl in the documentation?
--- >8 ---
Subject: [PATCH] gitweb: Add a per-repository authorization hook.
Add a configuration variable that can be used to specify an
arbitrary subroutine that will be called in the same situations
where $export_ok is checked, and its return value used
to decide whether the repository is to be shown.
This allows the user to implement custom authentication
schemes, for example by issuing a subrequest through mod_perl
and checking if Apache will authorize it.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
---
gitweb/INSTALL | 21 +++++++++++++++++++++
gitweb/gitweb.perl | 8 +++++++-
2 files changed, 28 insertions(+), 1 deletions(-)
diff --git a/gitweb/INSTALL b/gitweb/INSTALL
index 26967e2..fa5917a 100644
--- a/gitweb/INSTALL
+++ b/gitweb/INSTALL
@@ -166,6 +166,27 @@ Gitweb repositories
shows repositories only if this file exists in its object database
(if directory has the magic file named $export_ok).
+- Finally, it is possible to specify an arbitrary perl subroutine that
+ will be called for each project to determine if it can be exported.
+ The subroutine receives an absolute path to the project as its only
+ parameter.
+
+ For example, if you use mod_perl to run the script, and have dumb
+ http protocol authentication configured for your repositories, you
+ can use the following hook to allow access only if the user is
+ authorized to read the files:
+
+ $export_auth_hook = sub {
+ use Apache2::SubRequest ();
+ use Apache2::Const -compile => qw(HTTP_OK);
+ my $path = "$_[0]/HEAD";
+ my $r = Apache2::RequestUtil->request;
+ my $sub = $r->lookup_file($path);
+ return $sub->filename eq $path
+ && $sub->status == Apache2::Const::HTTP_OK;
+ };
+
+
Generating projects list using gitweb
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 172ea6b..9329880 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -95,6 +95,11 @@ our $default_projects_order = "project";
# (only effective if this variable evaluates to true)
our $export_ok = "++GITWEB_EXPORT_OK++";
+# show repository only if this subroutine returns true
+# when given the path to the project, for example:
+# sub { return -e "$_[0]/git-daemon-export-ok"; }
+our $export_auth_hook = undef;
+
# only allow viewing of repositories also shown on the overview page
our $strict_export = "++GITWEB_STRICT_EXPORT++";
@@ -400,7 +405,8 @@ sub check_head_link {
sub check_export_ok {
my ($dir) = @_;
return (check_head_link($dir) &&
- (!$export_ok || -e "$dir/$export_ok"));
+ (!$export_ok || -e "$dir/$export_ok") &&
+ (!$export_auth_hook || $export_auth_hook->($dir)));
}
# process alternate names for backward compatibility
--
tg: (0d4f9de..) t/authenticate/hook (depends on: t/authenticate/unify-exportok)
^ permalink raw reply related
* Re: [PATCH v2 3/3] pack-objects: honor '.keep' files
From: Brandon Casey @ 2008-11-05 22:37 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List, Shawn O. Pearce, Nicolas Pitre
In-Reply-To: <LSyxMgVV7zAWRvSezvxyUc6-kz2gK6MRVKonKSf1pAmdqO-jeuMFIw@cipher.nrlssc.navy.mil>
Junio,
Please leave this in pu for now, I have some concerns that I haven't
had time to write down yet.
-brandon
Brandon Casey wrote:
> From: Brandon Casey <drafnel@gmail.com>
>
> By default, pack-objects creates a pack file with every object specified by
> the user. There are two options which can be used to exclude objects which
> are accessible by the repository.
>
> 1) --incremental
> This excludes any object which already exists in an accessible pack.
>
> 2) --local
> This excludes any object which exists in a non-local pack.
>
> With this patch, both arguments also cause objects which exist in packs
> marked with a .keep file to be excluded. Only the --local option requires
> an explicit check for the .keep file. If the user doesn't want the objects
> in a pack marked with .keep to be exclude, then the .keep file should be
> removed.
>
> Additionally, this fixes the repack bug which allowed porcelain repack to
> create packs which contained objects already contained in existing packs
> marked with a .keep file.
>
> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
> ---
> builtin-pack-objects.c | 2 +-
> t/t7700-repack.sh | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
> index 15b80db..8be9113 100644
> --- a/builtin-pack-objects.c
> +++ b/builtin-pack-objects.c
> @@ -701,7 +701,7 @@ static int add_object_entry(const unsigned char *sha1, enum object_type type,
> break;
> if (incremental)
> return 0;
> - if (local && !p->pack_local)
> + if (local && (!p->pack_local || p->pack_keep))
> return 0;
> }
> }
> diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
> index 27af5ab..5b1cd05 100755
> --- a/t/t7700-repack.sh
> +++ b/t/t7700-repack.sh
> @@ -4,7 +4,7 @@ test_description='git repack works correctly'
>
> . ./test-lib.sh
>
> -test_expect_failure 'objects in packs marked .keep are not repacked' '
> +test_expect_success 'objects in packs marked .keep are not repacked' '
> echo content1 > file1 &&
> echo content2 > file2 &&
> git add . &&
^ permalink raw reply
* Re: [PATCH] push: fix local refs update if already up-to-date
From: Junio C Hamano @ 2008-11-05 22:23 UTC (permalink / raw)
To: Clemens Buchacher; +Cc: Jeff King, git
In-Reply-To: <20081105215706.GA32063@localhost>
Clemens Buchacher <drizzd@aon.at> writes:
> On Wed, Nov 05, 2008 at 09:28:49PM +0100, Clemens Buchacher wrote:
>> On Tue, Nov 04, 2008 at 09:49:32PM -0500, Jeff King wrote:
>> [...]
>> > However, I would like to make one additional request. Since you are
>> > killing off all usage of new_sha1 initial assignment, I think it makes
>> > sense to just get rid of the variable entirely, so it cannot create
>> > confusion later.
>
> Considering that the ref is initialized to the null_sha1, do you think it
> would be Ok to do the following instead?
Yeah, that's pretty much what I munged and committed.
^ permalink raw reply
* [PATCH] gitweb: Use single implementation of export_ok check.
From: Alexander Gavrilov @ 2008-11-05 22:15 UTC (permalink / raw)
To: git; +Cc: Jakub Narebski, Giuseppe Bilotta, Petr Baudis
GitWeb source contains a special function that implements the
export_ok check, but validate_project still uses a separate copy
of essentially the same code.
This patch makes it use the dedicated function, thus ensuring
that all checks are done through a single code path.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
---
For reference, here is the function:
sub check_export_ok {
my ($dir) = @_;
return (check_head_link($dir) &&
(!$export_ok || -e "$dir/$export_ok"));
}
gitweb/gitweb.perl | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c5254af..172ea6b 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -742,8 +742,7 @@ sub validate_project {
my $input = shift || return undef;
if (!validate_pathname($input) ||
!(-d "$projectroot/$input") ||
- !check_head_link("$projectroot/$input") ||
- ($export_ok && !(-e "$projectroot/$input/$export_ok")) ||
+ !check_export_ok("$projectroot/$input") ||
($strict_export && !project_in_list($input))) {
return undef;
} else {
--
tg: (933bb3a..) t/authenticate/unify-exportok (depends on: vanilla/master)
^ permalink raw reply related
* [PATCH] gitweb: Fix mod_perl support.
From: Alexander Gavrilov @ 2008-11-05 22:10 UTC (permalink / raw)
To: git; +Cc: Jakub Narebski, Giuseppe Bilotta, Petr Baudis
ModPerl::Registry precompiles scripts by wrapping them
in a subroutine. This causes ordinary subroutines of the
script to become nested, and warnings appear:
gitweb.cgi: Variable "$path_info" will not stay shared
This warning means that $path_info was declared as 'my',
and thus according to the perl evaluation rules all nested
subroutines will retain a reference to the instance of the
variable used in the first invocation of the master script.
When the script (i.e. the master meta-subroutine) is executed
the second time, it will use a new instance, so the logic
breaks. To avoid this it is necessary to declare all global
variables as 'our', which places them at the package level.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
---
gitweb/gitweb.perl | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c5254af..2174d4a 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -30,7 +30,7 @@ our $my_uri = $cgi->url(-absolute => 1);
# if we're called with PATH_INFO, we have to strip that
# from the URL to find our real URL
# we make $path_info global because it's also used later on
-my $path_info = $ENV{"PATH_INFO"};
+our $path_info = $ENV{"PATH_INFO"};
if ($path_info) {
$my_url =~ s,\Q$path_info\E$,,;
$my_uri =~ s,\Q$path_info\E$,,;
@@ -436,7 +436,7 @@ $projects_list ||= $projectroot;
# together during validation: this allows subsequent uses (e.g. href()) to be
# agnostic of the parameter origin
-my %input_params = ();
+our %input_params = ();
# input parameters are stored with the long parameter name as key. This will
# also be used in the href subroutine to convert parameters to their CGI
@@ -446,7 +446,7 @@ my %input_params = ();
# XXX: Warning: If you touch this, check the search form for updating,
# too.
-my @cgi_param_mapping = (
+our @cgi_param_mapping = (
project => "p",
action => "a",
file_name => "f",
@@ -463,10 +463,10 @@ my @cgi_param_mapping = (
extra_options => "opt",
search_use_regexp => "sr",
);
-my %cgi_param_mapping = @cgi_param_mapping;
+our %cgi_param_mapping = @cgi_param_mapping;
# we will also need to know the possible actions, for validation
-my %actions = (
+our %actions = (
"blame" => \&git_blame,
"blobdiff" => \&git_blobdiff,
"blobdiff_plain" => \&git_blobdiff_plain,
@@ -498,7 +498,7 @@ my %actions = (
# finally, we have the hash of allowed extra_options for the commands that
# allow them
-my %allowed_options = (
+our %allowed_options = (
"--no-merges" => [ qw(rss atom log shortlog history) ],
);
--
tg: (933bb3a..) t/misc/mod-perl-fix (depends on: vanilla/master)
^ permalink raw reply related
* Re: Slow "git rev-list origin/master --not --all" or "git fetch" slow when downloading nothing
From: Linus Torvalds @ 2008-11-05 22:08 UTC (permalink / raw)
To: Santi Béjar; +Cc: Junio C Hamano, Git Mailing List
In-Reply-To: <adf1fd3d0811051337i5fd501e1hdd3a6452930581a@mail.gmail.com>
On Wed, 5 Nov 2008, Santi Béjar wrote:
> >
> > Hmm. It sounds like you possibly don't have packed refs.
>
> They are packed up to v2.6.27.
Yeah, your strace isn't at all horrible. You don't open very many files at
all, and you don't have any big directories.
The biggest cost when things are cold-cache is probably the seeking from
just opening all those index files.
> It is an old computer (Pentium 4 2.5 GHz) and the repo is on an external
> USB drive.
There should be basically no CPU spent on that load, so your computer is
fine. But I think the issue is the dog-slow IO on the USB drive,
especially since there are multiple pack-files and thus index files.
Your strace would be more interesting with "-Ttt", but much of the cost is
likely in the page faulting of the mmap'ed data, and none of that would
show up in the trace, except indirectly (ie just looking at the times
between the system calls).
> Yes, in the general case it is, but in this case we can bypass the
> checking of the --all refs after checking if all the given refs are
> equal to some of the --all refs.
I don't think we'll actually walk anything, because all commits will end
up being negative.
But we'll look up the objects for even the negative commits, yes. So we're
doing several "unnecessary" object lookups, and in that sense we could
make this much faster by not even bothering to look them up.
But we do that to validate that the refs are _valid_, so in that sense the
object lookup is not "unnecessary" at all. Oh, and we need to peel them to
see if they are tag objects, in order to mark the _commit_ uninteresting
if the object itself was uninteresting.
So in practice we do end up having to pretty much parse them all.
We could do some crazy special case for the empty set, but it would be
better to see if you can improve performance with a slow disk some other,
less hacky, way. If you use a USB stick to move between machines, maybe
you can make sure that it's fully packed (ie a single index file) before
moving it to the USB stick? That would likely help quite a bit.
Linus
^ permalink raw reply
* Re: [PATCH] Add git-gui--askpass to git.spec.in
From: Junio C Hamano @ 2008-11-05 22:07 UTC (permalink / raw)
To: Yutaka Kanemoto; +Cc: git
In-Reply-To: <56069dac0811040915p52a18cc2uc6a3706733a4d9a8@mail.gmail.com>
Thanks.
^ permalink raw reply
* Re: [PATCH] push: fix local refs update if already up-to-date
From: Clemens Buchacher @ 2008-11-05 21:57 UTC (permalink / raw)
To: Jeff King; +Cc: git, Junio C Hamano
In-Reply-To: <20081105202849.GA9484@localhost>
On Wed, Nov 05, 2008 at 09:28:49PM +0100, Clemens Buchacher wrote:
> On Tue, Nov 04, 2008 at 09:49:32PM -0500, Jeff King wrote:
> [...]
> > However, I would like to make one additional request. Since you are
> > killing off all usage of new_sha1 initial assignment, I think it makes
> > sense to just get rid of the variable entirely, so it cannot create
> > confusion later.
Considering that the ref is initialized to the null_sha1, do you think it
would be Ok to do the following instead? The call to hashcpy would not be
needed twice and we get rid of the temporary new_sha1.
--- a/builtin-send-pack.c
+++ b/builtin-send-pack.c
@@ -435,24 +435,18 @@ static int do_send_pack(int in, int out, struct remote *re
*/
new_refs = 0;
for (ref = remote_refs; ref; ref = ref->next) {
- const unsigned char *new_sha1;
-
- if (!ref->peer_ref) {
- if (!args.send_mirror)
- continue;
- new_sha1 = null_sha1;
- }
- else
- new_sha1 = ref->peer_ref->new_sha1;
-
+ if (ref->peer_ref)
+ hashcpy(ref->new_sha1, ref->peer_ref->new_sha1);
+ else if (!args.send_mirror)
+ continue;
^ permalink raw reply
* Question: 'git pull' hangs on local machine
From: Steve Walker @ 2008-11-05 21:49 UTC (permalink / raw)
To: git
Hi there,
We have git on our server - I can pull between repo's no problem on
the server. I've also cloned a repo on my local box to dev on. The
clone has worked perfectly.
The problem occurs when I try to do a 'git pull' to update my local
repo with updates we've made on the server, i see this:
StevePoota:public_html steve$ git pull
remote: Counting objects: 89, done.
remote: Compressing objects: 100% (63/63), done.
Unpacking objects: 35% (24/67)
It hangs on the unpacking objects stage. I tried pulling from
different repo, but got the same issue.
I've done some test updates on the server repo's in case they were
corrupt but they seem to be ok...
Has anyone got any ideas how to fix this?
Kind regards, Steve
^ permalink raw reply
* Re: Slow "git rev-list origin/master --not --all" or "git fetch" slow when downloading nothing
From: Santi Béjar @ 2008-11-05 21:37 UTC (permalink / raw)
To: Linus Torvalds, Junio C Hamano; +Cc: Git Mailing List
In-Reply-To: <alpine.LFD.2.00.0811050935270.3419@nehalem.linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 3044 bytes --]
On Wed, Nov 5, 2008 at 6:37 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
>
> On Wed, 5 Nov 2008, Santi Béjar wrote:
>>
>> In cold cache "git rev-list origin/master --not --all" is slow
>> reading many files:
Sorry, s/files/data/
>
> Hmm. It sounds like you possibly don't have packed refs.
They are packed up to v2.6.27.
>
> Have you done "git gc" on that thing lately? What does "strace" say?
>
> Linus
>
It is a recently cloned linux-2.6 repo, with 10 or so packs and 70
loose objects. It spends a good fraction in:
brk(0x8318000) = 0x8318000
and
mmap2(NULL, 33554432, PROT_READ, MAP_PRIVATE, 4, 0x2000) = 0xb2227000
(strace attatched).
I should have given more info:
It is an old computer (Pentium 4 2.5 GHz)
and the repo is on an external USB drive.
On Wed, Nov 5, 2008 at 6:32 PM, Junio C Hamano <gitster@pobox.com> wrote:
> "Santi Béjar" <santi@agolina.net> writes:
>
>> In cold cache "git rev-list origin/master --not --all" is slow
>> reading many files:
>>
>> cold cache:
>> $ /usr/bin/time git rev-list origin/master --not --all
>> 0.03user 0.02system 0:04.57elapsed 1%CPU (0avgtext+0avgdata 0maxresident)k
>> 77848inputs+0outputs (410major+1798minor)pagefaults 0swaps
>>
>> hot cache:
>> $ /usr/bin/time git rev-list origin/master --not --all
>> 0.01user 0.00system 0:00.06elapsed 31%CPU (0avgtext+0avgdata 0maxresident)k
>> 0inputs+0outputs (0major+2207minor)pagefaults 0swaps
>>
>> I think that, in this particular case (when the arguments are the tips
>> of some of the branches), this should not read that many files.
>
> What kind of "many files" are you making git read? Do you have too many
> unpacked refs? Too many loose objects?
>
See above.
>> ... When nothing has changed in the remote repository (so
>> refs/<remote>/* has all the remote refs) the "git fetch" could be almost
>> instantaneous (even in coldcache),...
>
> You at least need to read:
>
> - what "--all" refs point at; to find this out, you need to read all
> unpacked refs files, and one packed-refs file;
>
> - commit objects that these refs point at; to cull refs that do not point
> at committish and dereference tag objects that point at commit, you
> need to read these objects (either loose objects or in packs);
>
> - commit objects on the ancestry graph starting from the commit pointed
> at by origin/master and the commits from "--all" refs, until your
> traversal from origin/master hit one of the ancestors of "--all" refs.
Yes, in the general case it is, but in this case we can bypass the
checking of the --all refs after checking if all the given refs are
equal to some of the --all refs.
For me the main thing is the slow "git fetch" when downloading
nothing. I think it was/is faster without the quickfetch path (at
least in the coldcache case).
Maybe we can just check if the new fetched refs are already the tips
of the corresponding remote branch.
Santi
[-- Attachment #2: git-rev-list.strace --]
[-- Type: application/octet-stream, Size: 36810 bytes --]
execve("/home/santi/usr/bin/git", ["git", "rev-list", "origin/master", "--not", "--all"], [/* 58 vars */]) = 0
brk(0) = 0x8432000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ee5000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/tls/i686/sse2/cmov/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/tls/i686/sse2/cmov", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/tls/i686/sse2/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/tls/i686/sse2", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/tls/i686/cmov/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/tls/i686/cmov", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/tls/i686/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/tls/i686", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/tls/sse2/cmov/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/tls/sse2/cmov", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/tls/sse2/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/tls/sse2", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/tls/cmov/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/tls/cmov", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/tls/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/tls", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/i686/sse2/cmov/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/i686/sse2/cmov", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/i686/sse2/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/i686/sse2", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/i686/cmov/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/i686/cmov", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/i686/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/i686", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/sse2/cmov/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/sse2/cmov", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/sse2/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/sse2", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/cmov/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib/cmov", 0xbf9022f4) = -1 ENOENT (No such file or directory)
open("/home/santi/usr/lib/libcurl-gnutls.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/santi/usr/lib", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=77540, ...}) = 0
mmap2(NULL, 77540, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ed2000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libcurl-gnutls.so.4", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340@\0\0004\0\0\0\310"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=229672, ...}) = 0
mmap2(NULL, 228860, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e9a000
mmap2(0xb7ed1000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x37) = 0xb7ed1000
close(3) = 0
open("/home/santi/usr/lib/libz.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libz.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\30\0\0004\0\0\0\24"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=81012, ...}) = 0
mmap2(NULL, 83740, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e85000
mmap2(0xb7e99000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0xb7e99000
close(3) = 0
open("/home/santi/usr/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260e\1\0004\0\0\0\4"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1413540, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e84000
mmap2(NULL, 1418864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d29000
mmap2(0xb7e7e000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x155) = 0xb7e7e000
mmap2(0xb7e81000, 9840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7e81000
close(3) = 0
open("/home/santi/usr/lib/libidn.so.11", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libidn.so.11", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\37\0\0004\0\0\0p"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=200280, ...}) = 0
mmap2(NULL, 199100, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7cf8000
mmap2(0xb7d28000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x30) = 0xb7d28000
close(3) = 0
open("/home/santi/usr/lib/libldap_r-2.4.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libldap_r-2.4.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\266\0\0004\0\0\0l"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=265124, ...}) = 0
mmap2(NULL, 272584, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7cb5000
mmap2(0xb7cf5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3f) = 0xb7cf5000
mmap2(0xb7cf7000, 2248, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7cf7000
close(3) = 0
open("/home/santi/usr/lib/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i686/cmov/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\31\0\0004\0\0\0\240"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=30624, ...}) = 0
mmap2(NULL, 33360, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7cac000
mmap2(0xb7cb3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb7cb3000
close(3) = 0
open("/home/santi/usr/lib/libgssapi_krb5.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libgssapi_krb5.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`C\0\0004\0\0\0t"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=168916, ...}) = 0
mmap2(NULL, 171740, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7c82000
mmap2(0xb7cab000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x28) = 0xb7cab000
close(3) = 0
open("/home/santi/usr/lib/libgnutls.so.26", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libgnutls.so.26", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0pz\1\0004\0\0\0("..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=642912, ...}) = 0
mmap2(NULL, 641704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7be5000
mmap2(0xb7c7c000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x97) = 0xb7c7c000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7be4000
open("/home/santi/usr/lib/liblber-2.4.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/liblber-2.4.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340(\0\0004\0\0\0\f"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=51228, ...}) = 0
mmap2(NULL, 50016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7bd7000
mmap2(0xb7be3000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc) = 0xb7be3000
close(3) = 0
open("/home/santi/usr/lib/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i686/cmov/libresolv.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@!\0\0004\0\0\0\310"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=67408, ...}) = 0
mmap2(NULL, 80068, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7bc3000
mmap2(0xb7bd3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf) = 0xb7bd3000
mmap2(0xb7bd5000, 6340, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7bd5000
close(3) = 0
open("/home/santi/usr/lib/libsasl2.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libsasl2.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0207\0\0004\0\0\0p"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=91048, ...}) = 0
mmap2(NULL, 93932, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7bac000
mmap2(0xb7bc2000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15) = 0xb7bc2000
close(3) = 0
open("/home/santi/usr/lib/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i686/cmov/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000H\0\0004\0\0\0\330"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=116414, ...}) = 0
mmap2(NULL, 98784, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7b93000
mmap2(0xb7ba8000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xb7ba8000
mmap2(0xb7baa000, 4576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7baa000
close(3) = 0
open("/home/santi/usr/lib/libkrb5.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libkrb5.so.3", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\27\1\0004\0\0\0\374"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=607284, ...}) = 0
mmap2(NULL, 606056, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7aff000
mmap2(0xb7b91000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x92) = 0xb7b91000
close(3) = 0
open("/home/santi/usr/lib/libk5crypto.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libk5crypto.so.3", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0;\0\0004\0\0\0\210"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=147392, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7afe000
mmap2(NULL, 146848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ada000
mmap2(0xb7afd000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x23) = 0xb7afd000
close(3) = 0
open("/home/santi/usr/lib/libcom_err.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libcom_err.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\16\0\0004\0\0\0\324"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=8676, ...}) = 0
mmap2(NULL, 11564, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ad7000
mmap2(0xb7ad9000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7ad9000
close(3) = 0
open("/home/santi/usr/lib/libkrb5support.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libkrb5support.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\26\0\0004\0\0\0\254"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=27876, ...}) = 0
mmap2(NULL, 30700, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7acf000
mmap2(0xb7ad6000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb7ad6000
close(3) = 0
open("/home/santi/usr/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i686/cmov/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\n\0\0004\0\0\0H"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9680, ...}) = 0
mmap2(NULL, 12412, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7acb000
mmap2(0xb7acd000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7acd000
close(3) = 0
open("/home/santi/usr/lib/libkeyutils.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libkeyutils.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\t\0\0004\0\0\0\210"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=5744, ...}) = 0
mmap2(NULL, 8628, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ac8000
mmap2(0xb7aca000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7aca000
close(3) = 0
open("/home/santi/usr/lib/libtasn1.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libtasn1.so.3", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\21\0\0004\0\0\0\4"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=59708, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ac7000
mmap2(NULL, 63012, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ab7000
mmap2(0xb7ac6000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe) = 0xb7ac6000
close(3) = 0
open("/home/santi/usr/lib/libgpg-error.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libgpg-error.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\6\0\0004\0\0\0\214"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=11556, ...}) = 0
mmap2(NULL, 14568, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ab3000
mmap2(0xb7ab6000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7ab6000
close(3) = 0
open("/home/santi/usr/lib/libgcrypt.so.11", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libgcrypt.so.11", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240D\0\0004\0\0\0\314"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=425220, ...}) = 0
mmap2(NULL, 424676, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7a4b000
mmap2(0xb7ab1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x66) = 0xb7ab1000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7a4a000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7a49000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7a496d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7e7e000, 4096, PROT_READ) = 0
munmap(0xb7ed2000, 77540) = 0
set_tid_address(0xb7a49718) = 3707
set_robust_list(0xb7a49720, 0xc) = 0
futex(0xbf902b90, FUTEX_WAKE_PRIVATE, 1) = 0
rt_sigaction(SIGRTMIN, {0xb7b972e0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb7b97720, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sys="Linux", node="bela", ...}) = 0
brk(0) = 0x8432000
brk(0x8453000) = 0x8453000
getcwd("/media/disk-67cd8aa5/santi/linux-2.6/linux-2.6"..., 4096) = 47
stat64(".git", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
access(".git/objects", X_OK) = 0
access(".git/refs", X_OK) = 0
lstat64(".git/HEAD", {st_mode=S_IFREG|0644, st_size=23, ...}) = 0
open(".git/HEAD", O_RDONLY|O_LARGEFILE) = 3
read(3, "ref: refs/heads/master\n"..., 255) = 23
read(3, ""..., 232) = 0
close(3) = 0
access("/home/santi/usr/stow/git/etc/gitconfig", R_OK) = -1 ENOENT (No such file or directory)
access("/home/santi/.gitconfig", R_OK) = 0
open("/home/santi/.gitconfig", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=767, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ee4000
read(3, "[alias]\n\tco = checkout\n\twdiff = d"..., 4096) = 767
read(3, ""..., 4096) = 0
close(3) = 0
munmap(0xb7ee4000, 4096) = 0
stat64(".git", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open(".git/config", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=308, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ee4000
read(3, "[core]\n\trepositoryformatversion ="..., 4096) = 308
read(3, ""..., 4096) = 0
close(3) = 0
munmap(0xb7ee4000, 4096) = 0
access("/home/santi/usr/stow/git/etc/gitconfig", R_OK) = -1 ENOENT (No such file or directory)
access("/home/santi/.gitconfig", R_OK) = 0
open("/home/santi/.gitconfig", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=767, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ee4000
read(3, "[alias]\n\tco = checkout\n\twdiff = d"..., 4096) = 767
read(3, ""..., 4096) = 0
close(3) = 0
munmap(0xb7ee4000, 4096) = 0
open(".git/config", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=308, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ee4000
read(3, "[core]\n\trepositoryformatversion ="..., 4096) = 308
read(3, ""..., 4096) = 0
close(3) = 0
munmap(0xb7ee4000, 4096) = 0
write(2, "trace: built-in: git 'rev-list' '"..., 64trace: built-in: git 'rev-list' 'origin/master' '--not' '--all'
) = 64
access("/home/santi/usr/stow/git/etc/gitconfig", R_OK) = -1 ENOENT (No such file or directory)
access("/home/santi/.gitconfig", R_OK) = 0
open("/home/santi/.gitconfig", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=767, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ee4000
read(3, "[alias]\n\tco = checkout\n\twdiff = d"..., 4096) = 767
read(3, ""..., 4096) = 0
close(3) = 0
munmap(0xb7ee4000, 4096) = 0
open(".git/config", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=308, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ee4000
read(3, "[core]\n\trepositoryformatversion ="..., 4096) = 308
read(3, ""..., 4096) = 0
close(3) = 0
munmap(0xb7ee4000, 4096) = 0
lstat64(".git/origin/master", 0xbf90274c) = -1 ENOENT (No such file or directory)
open(".git/packed-refs", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=13887, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ee4000
read(3, "# pack-refs with: peeled \n5a97794"..., 4096) = 4096
read(3, "abc98fa8\nda0a81e98c06aa0d1e05b901"..., 4096) = 4096
read(3, "79c90b1a4ea2d2cebf4996743463b001 "..., 4096) = 4096
read(3, "e1a682d refs/tags/v2.6.13-rc6\n^6f"..., 4096) = 1599
read(3, ""..., 4096) = 0
close(3) = 0
munmap(0xb7ee4000, 4096) = 0
lstat64(".git/refs/origin/master", 0xbf90274c) = -1 ENOENT (No such file or directory)
lstat64(".git/refs/tags/origin/master", 0xbf90274c) = -1 ENOENT (No such file or directory)
lstat64(".git/refs/heads/origin/master", 0xbf90274c) = -1 ENOENT (No such file or directory)
lstat64(".git/refs/remotes/origin/master", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
open(".git/refs/remotes/origin/master", O_RDONLY|O_LARGEFILE) = 3
read(3, "75fa67706cce5272bcfc51ed646f2da21"..., 255) = 41
read(3, ""..., 214) = 0
close(3) = 0
lstat64(".git/refs/remotes/origin/master/HEAD", 0xbf90274c) = -1 ENOTDIR (Not a directory)
lstat64("origin/master", 0xbf9028b8) = -1 ENOENT (No such file or directory)
open(".git/objects/pack", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl64(3, F_GETFD) = 0x1 (flags FD_CLOEXEC)
getdents64(3, /* 22 entries */, 4096) = 1488
stat64(".git/objects/pack/pack-bf36358ff0885aead758e2cd657b1c1e751f6c7a.pack", {st_mode=S_IFREG|0444, st_size=1470047, ...}) = 0
stat64(".git/objects/pack/pack-8d0a99e2ff57fc40c4406baffa5396308857bac3.pack", {st_mode=S_IFREG|0644, st_size=235974410, ...}) = 0
stat64(".git/objects/pack/pack-fd6d49a2dcebff5ebc9d3cabb2af192f1a888629.pack", {st_mode=S_IFREG|0444, st_size=571172, ...}) = 0
stat64(".git/objects/pack/pack-679f80d06e2b143f46768b40c60f1a0e932d2391.pack", {st_mode=S_IFREG|0444, st_size=1052242, ...}) = 0
stat64(".git/objects/pack/pack-100a0cb059c82c62a233ca546cad599d288a5f50.pack", {st_mode=S_IFREG|0444, st_size=512497, ...}) = 0
stat64(".git/objects/pack/pack-6d01562b9062e40424b91cfd7d6d0e4709d61afd.pack", {st_mode=S_IFREG|0444, st_size=21214128, ...}) = 0
stat64(".git/objects/pack/pack-fa231f47526c28d45f4b9dfcc748f3bf8bf7c903.pack", {st_mode=S_IFREG|0444, st_size=12296229, ...}) = 0
stat64(".git/objects/pack/pack-928e64c2130fbb419e6b8a5a4ec3f8bdb430a2bf.pack", {st_mode=S_IFREG|0444, st_size=1855723, ...}) = 0
stat64(".git/objects/pack/pack-bd9d6871fbd50455b874ea557e38bd4b07f55fa6.pack", {st_mode=S_IFREG|0444, st_size=1312509, ...}) = 0
stat64(".git/objects/pack/pack-a7f63979c25640c85c5e6e86a57d4e34eb792a4b.pack", {st_mode=S_IFREG|0444, st_size=2580134, ...}) = 0
getdents64(3, /* 0 entries */, 4096) = 0
close(3) = 0
open(".git/objects/info/alternates", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open(".git/objects/pack/pack-fd6d49a2dcebff5ebc9d3cabb2af192f1a888629.idx", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=6056, ...}) = 0
mmap2(NULL, 6056, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ee3000
close(3) = 0
open(".git/objects/pack/pack-fd6d49a2dcebff5ebc9d3cabb2af192f1a888629.pack", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=571172, ...}) = 0
fcntl64(3, F_GETFD) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
read(3, "PACK\0\0\0\2\0\0\0\262"..., 12) = 12
_llseek(3, 571152, [571152], SEEK_SET) = 0
read(3, ":\223#\330jF\305\217D\342\16\325fz\357\4H\261\n?"..., 20) = 20
mmap2(NULL, 571172, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb79bd000
open(".git/info/grafts", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open(".git/shallow", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open(".git/refs", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
fstat64(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(4, /* 6 entries */, 4096) = 168
stat64(".git/refs/remotes", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open(".git/refs/remotes", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 5
fstat64(5, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(5, /* 3 entries */, 4096) = 80
stat64(".git/refs/remotes/origin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open(".git/refs/remotes/origin", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 6
fstat64(6, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(6, /* 4 entries */, 4096) = 104
stat64(".git/refs/remotes/origin/HEAD", {st_mode=S_IFREG|0644, st_size=32, ...}) = 0
lstat64(".git/refs/remotes/origin/HEAD", {st_mode=S_IFREG|0644, st_size=32, ...}) = 0
open(".git/refs/remotes/origin/HEAD", O_RDONLY|O_LARGEFILE) = 7
read(7, "ref: refs/remotes/origin/master\n"..., 255) = 32
read(7, ""..., 223) = 0
close(7) = 0
lstat64(".git/refs/remotes/origin/master", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
open(".git/refs/remotes/origin/master", O_RDONLY|O_LARGEFILE) = 7
read(7, "75fa67706cce5272bcfc51ed646f2da21"..., 255) = 41
read(7, ""..., 214) = 0
close(7) = 0
stat64(".git/refs/remotes/origin/master", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
lstat64(".git/refs/remotes/origin/master", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
open(".git/refs/remotes/origin/master", O_RDONLY|O_LARGEFILE) = 7
read(7, "75fa67706cce5272bcfc51ed646f2da21"..., 255) = 41
read(7, ""..., 214) = 0
close(7) = 0
getdents64(6, /* 0 entries */, 4096) = 0
close(6) = 0
getdents64(5, /* 0 entries */, 4096) = 0
close(5) = 0
stat64(".git/refs/tags", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open(".git/refs/tags", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 5
fstat64(5, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(5, /* 5 entries */, 4096) = 144
stat64(".git/refs/tags/v2.6.28-rc2", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
lstat64(".git/refs/tags/v2.6.28-rc2", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
open(".git/refs/tags/v2.6.28-rc2", O_RDONLY|O_LARGEFILE) = 6
read(6, "5eb14db1f80df4eb0ecb0976e47e8e287"..., 255) = 41
read(6, ""..., 214) = 0
close(6) = 0
stat64(".git/refs/tags/v2.6.28-rc1", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
lstat64(".git/refs/tags/v2.6.28-rc1", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
open(".git/refs/tags/v2.6.28-rc1", O_RDONLY|O_LARGEFILE) = 6
read(6, "cb50773491b0066d0e55f31f8875d5678"..., 255) = 41
read(6, ""..., 214) = 0
close(6) = 0
stat64(".git/refs/tags/v2.6.28-rc3", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
lstat64(".git/refs/tags/v2.6.28-rc3", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
open(".git/refs/tags/v2.6.28-rc3", O_RDONLY|O_LARGEFILE) = 6
read(6, "31cb515c75388d457c2f318a0ee9606b3"..., 255) = 41
read(6, ""..., 214) = 0
close(6) = 0
getdents64(5, /* 0 entries */, 4096) = 0
close(5) = 0
stat64(".git/refs/stash", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
lstat64(".git/refs/stash", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
open(".git/refs/stash", O_RDONLY|O_LARGEFILE) = 5
read(5, "a3ef7d8e3f6ad58a9385fa485619818da"..., 255) = 41
read(5, ""..., 214) = 0
close(5) = 0
stat64(".git/refs/heads", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open(".git/refs/heads", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 5
fstat64(5, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(5, /* 3 entries */, 4096) = 80
stat64(".git/refs/heads/master", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
lstat64(".git/refs/heads/master", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
open(".git/refs/heads/master", O_RDONLY|O_LARGEFILE) = 6
read(6, "2bbb5fcfa66befc5193aa92a60318da0c"..., 255) = 41
read(6, ""..., 214) = 0
close(6) = 0
getdents64(5, /* 0 entries */, 4096) = 0
close(5) = 0
getdents64(4, /* 0 entries */, 4096) = 0
close(4) = 0
open(".git/objects/pack/pack-100a0cb059c82c62a233ca546cad599d288a5f50.idx", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=9052, ...}) = 0
mmap2(NULL, 9052, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7ee0000
close(4) = 0
open(".git/objects/pack/pack-679f80d06e2b143f46768b40c60f1a0e932d2391.idx", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=14512, ...}) = 0
mmap2(NULL, 14512, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7edc000
close(4) = 0
open(".git/objects/pack/pack-928e64c2130fbb419e6b8a5a4ec3f8bdb430a2bf.idx", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=32012, ...}) = 0
mmap2(NULL, 32012, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7ed4000
close(4) = 0
open(".git/objects/pack/pack-a7f63979c25640c85c5e6e86a57d4e34eb792a4b.idx", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=48700, ...}) = 0
mmap2(NULL, 48700, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb79b1000
close(4) = 0
open(".git/objects/pack/pack-bf36358ff0885aead758e2cd657b1c1e751f6c7a.idx", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=27252, ...}) = 0
mmap2(NULL, 27252, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb79aa000
close(4) = 0
open(".git/objects/pack/pack-bd9d6871fbd50455b874ea557e38bd4b07f55fa6.idx", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=29492, ...}) = 0
mmap2(NULL, 29492, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb79a2000
close(4) = 0
open(".git/objects/pack/pack-fa231f47526c28d45f4b9dfcc748f3bf8bf7c903.idx", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=288184, ...}) = 0
mmap2(NULL, 288184, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb795b000
close(4) = 0
open(".git/objects/pack/pack-6d01562b9062e40424b91cfd7d6d0e4709d61afd.idx", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=592992, ...}) = 0
mmap2(NULL, 592992, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb78ca000
close(4) = 0
open(".git/objects/pack/pack-8d0a99e2ff57fc40c4406baffa5396308857bac3.idx", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=26344676, ...}) = 0
mmap2(NULL, 26344676, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb5faa000
close(4) = 0
access(".git/objects/2b/bb5fcfa66befc5193aa92a60318da0c0ff34e8", F_OK) = 0
open(".git/objects/2b/bb5fcfa66befc5193aa92a60318da0c0ff34e8", O_RDONLY|O_LARGEFILE|O_NOATIME) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=541, ...}) = 0
mmap2(NULL, 541, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7ed3000
close(4) = 0
munmap(0xb7ed3000, 541) = 0
access(".git/objects/a3/ef7d8e3f6ad58a9385fa485619818dae3922a0", F_OK) = 0
open(".git/objects/a3/ef7d8e3f6ad58a9385fa485619818dae3922a0", O_RDONLY|O_LARGEFILE|O_NOATIME) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=205, ...}) = 0
mmap2(NULL, 205, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7ed3000
close(4) = 0
munmap(0xb7ed3000, 205) = 0
open(".git/objects/pack/pack-8d0a99e2ff57fc40c4406baffa5396308857bac3.pack", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=235974410, ...}) = 0
fcntl64(4, F_GETFD) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
read(4, "PACK\0\0\0\2\0\16[+"..., 12) = 12
_llseek(4, 235974390, [235974390], SEEK_SET) = 0
read(4, "\27CZ\275V\355lpOuS\305\22\275\243\227\304\205cp"..., 20) = 20
mmap2(NULL, 17870602, PROT_READ, MAP_PRIVATE, 4, 0xd000) = 0xb4e9f000
brk(0x8476000) = 0x8476000
open(".git/objects/pack/pack-fa231f47526c28d45f4b9dfcc748f3bf8bf7c903.pack", O_RDONLY|O_LARGEFILE) = 5
fstat64(5, {st_mode=S_IFREG|0444, st_size=12296229, ...}) = 0
fcntl64(5, F_GETFD) = 0
fcntl64(5, F_SETFD, FD_CLOEXEC) = 0
read(5, "PACK\0\0\0\2\0\0(\16"..., 12) = 12
_llseek(5, 12296209, [12296209], SEEK_SET) = 0
read(5, "\271\262\313\312j\36F\250\0\354\320\203\2T\236\3060\376x\202"..., 20) = 20
mmap2(NULL, 12296229, PROT_READ, MAP_PRIVATE, 5, 0) = 0xb42e4000
open(".git/objects/pack/pack-bd9d6871fbd50455b874ea557e38bd4b07f55fa6.pack", O_RDONLY|O_LARGEFILE) = 6
fstat64(6, {st_mode=S_IFREG|0444, st_size=1312509, ...}) = 0
fcntl64(6, F_GETFD) = 0
fcntl64(6, F_SETFD, FD_CLOEXEC) = 0
read(6, "PACK\0\0\0\2\0\0\3\367"..., 12) = 12
_llseek(6, 1312489, [1312489], SEEK_SET) = 0
read(6, "\215\203\346:\223Y\10\222~DD\354\371\207mB>\364\34w"..., 20) = 20
mmap2(NULL, 1312509, PROT_READ, MAP_PRIVATE, 6, 0) = 0xb41a3000
open(".git/objects/pack/pack-679f80d06e2b143f46768b40c60f1a0e932d2391.pack", O_RDONLY|O_LARGEFILE) = 7
fstat64(7, {st_mode=S_IFREG|0444, st_size=1052242, ...}) = 0
fcntl64(7, F_GETFD) = 0
fcntl64(7, F_SETFD, FD_CLOEXEC) = 0
read(7, "PACK\0\0\0\2\0\0\1\340"..., 12) = 12
_llseek(7, 1052222, [1052222], SEEK_SET) = 0
read(7, "\332\ff~1U\203o\215x\370\220\311\311e\341\23\335\264\205"..., 20) = 20
mmap2(NULL, 1052242, PROT_READ, MAP_PRIVATE, 7, 0) = 0xb40a2000
access(".git/objects/c7/eadd8f7ec554d321443455b42b08b795cb620e", F_OK) = 0
mmap2(NULL, 33554432, PROT_READ, MAP_PRIVATE, 4, 0x2000) = 0xb20a2000
mmap2(NULL, 33554432, PROT_READ, MAP_PRIVATE, 4, 0x1000) = 0xb00a2000
mmap2(NULL, 33554432, PROT_READ, MAP_PRIVATE, 4, 0) = 0xae0a2000
access(".git/objects/a7/5952b72a0fff3031124003e62118111aed42c1", F_OK) = 0
open(".git/objects/a7/5952b72a0fff3031124003e62118111aed42c1", O_RDONLY|O_LARGEFILE|O_NOATIME) = 8
fstat64(8, {st_mode=S_IFREG|0444, st_size=340, ...}) = 0
mmap2(NULL, 340, PROT_READ, MAP_PRIVATE, 8, 0) = 0xae0a1000
close(8) = 0
munmap(0xae0a1000, 340) = 0
open(".git/objects/pack/pack-100a0cb059c82c62a233ca546cad599d288a5f50.pack", O_RDONLY|O_LARGEFILE) = 8
fstat64(8, {st_mode=S_IFREG|0444, st_size=512497, ...}) = 0
fcntl64(8, F_GETFD) = 0
fcntl64(8, F_SETFD, FD_CLOEXEC) = 0
read(8, "PACK\0\0\0\2\0\0\1\35"..., 12) = 12
_llseek(8, 512477, [512477], SEEK_SET) = 0
read(8, "w\241\203%~\306\337\223)\325\217\352\240`\206C\3679+\27"..., 20) = 20
access(".git/objects/ae/6884a9da56f8921e432e663b4ccb4a1851b2ea", F_OK) = 0
access(".git/objects/a7/5952b72a0fff3031124003e62118111aed42c1", F_OK) = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
close(1) = 0
exit_group(0) = ?
^ permalink raw reply
* Re: let git-diff allow patch to delete empty files?
From: Nanako Shiraishi @ 2008-11-05 21:09 UTC (permalink / raw)
To: Sam Liddicott; +Cc: git
In-Reply-To: <49118FEE.30408@liddicott.com>
Quoting "Sam Liddicott" <sam@liddicott.com>:
> In some cases "patch" cannot apply diff's generated using git-diff, I've
> had a "git diff" output look like this when an empty file was removed as
> the only change:
Even if you do not use git to manage your changes, you can use "git apply" from outside of a git repository as a replacement for "patch".
--
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
^ permalink raw reply
* [PATCH 1/2] do not force write of packed refs
From: Clemens Buchacher @ 2008-11-05 20:55 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, git, Clemens Buchacher
In-Reply-To: <20081105202849.GA9484@localhost>
We force writing a ref if it does not exist. Originally, we only had to look
for the ref file to check if it existed. Now we have to look for a packed ref
as well. Luckily, resolve_ref already does all the work for us.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
refs.c | 7 ++++---
t/t3210-pack-refs.sh | 7 +++++++
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/refs.c b/refs.c
index 0a126fa..fc8105d 100644
--- a/refs.c
+++ b/refs.c
@@ -794,10 +794,10 @@ static struct ref_lock *lock_ref_sha1_basic(const char *ref, const unsigned char
char *ref_file;
const char *orig_ref = ref;
struct ref_lock *lock;
- struct stat st;
int last_errno = 0;
int type, lflags;
int mustexist = (old_sha1 && !is_null_sha1(old_sha1));
+ int inexistent = 0;
lock = xcalloc(1, sizeof(struct ref_lock));
lock->lock_fd = -1;
@@ -825,12 +825,13 @@ static struct ref_lock *lock_ref_sha1_basic(const char *ref, const unsigned char
orig_ref, strerror(errno));
goto error_return;
}
+ inexistent = is_null_sha1(lock->old_sha1);
/* When the ref did not exist and we are creating it,
* make sure there is no existing ref that is packed
* whose name begins with our refname, nor a ref whose
* name is a proper prefix of our refname.
*/
- if (is_null_sha1(lock->old_sha1) &&
+ if (inexistent &&
!is_refname_available(ref, NULL, get_packed_refs(), 0))
goto error_return;
@@ -844,7 +845,7 @@ static struct ref_lock *lock_ref_sha1_basic(const char *ref, const unsigned char
lock->ref_name = xstrdup(ref);
lock->orig_ref_name = xstrdup(orig_ref);
ref_file = git_path("%s", ref);
- if (lstat(ref_file, &st) && errno == ENOENT)
+ if (inexistent)
lock->force_write = 1;
if ((flags & REF_NODEREF) && (type & REF_ISSYMREF))
lock->force_write = 1;
diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh
index 087ef75..413019a 100755
--- a/t/t3210-pack-refs.sh
+++ b/t/t3210-pack-refs.sh
@@ -96,6 +96,13 @@ test_expect_success \
git branch -d n/o/p &&
git branch n'
+test_expect_success \
+ 'see if up-to-date packed refs are preserved' \
+ 'git branch q &&
+ git pack-refs --all --prune &&
+ git update-ref refs/heads/q refs/heads/q &&
+ ! test -f .git/refs/heads/q'
+
test_expect_success 'pack, prune and repack' '
git tag foo &&
git pack-refs --all --prune &&
--
1.6.0.3.617.ge4eb0
^ permalink raw reply related
* [PATCH 2/2] push: fix local refs update if already up-to-date
From: Clemens Buchacher @ 2008-11-05 20:55 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, git, Clemens Buchacher
In-Reply-To: <1225918554-29722-1-git-send-email-drizzd@aon.at>
git push normally updates local refs only after a successful push. If the
remote already has the updates -- pushed indirectly through another repository,
for example -- we forget to update local tracking refs.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
builtin-send-pack.c | 11 +++++------
t/t5516-fetch-push.sh | 31 +++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/builtin-send-pack.c b/builtin-send-pack.c
index d68ce2d..c91c12f 100644
--- a/builtin-send-pack.c
+++ b/builtin-send-pack.c
@@ -230,7 +230,7 @@ static void update_tracking_ref(struct remote *remote, struct ref *ref)
{
struct refspec rs;
- if (ref->status != REF_STATUS_OK)
+ if (ref->status != REF_STATUS_OK && ref->status != REF_STATUS_UPTODATE)
return;
rs.src = ref->name;
@@ -444,15 +444,15 @@ static int do_send_pack(int in, int out, struct remote *remote, const char *dest
}
else
new_sha1 = ref->peer_ref->new_sha1;
+ hashcpy(ref->new_sha1, new_sha1);
-
- ref->deletion = is_null_sha1(new_sha1);
+ ref->deletion = is_null_sha1(ref->new_sha1);
if (ref->deletion && !allow_deleting_refs) {
ref->status = REF_STATUS_REJECT_NODELETE;
continue;
}
if (!ref->deletion &&
- !hashcmp(ref->old_sha1, new_sha1)) {
+ !hashcmp(ref->old_sha1, ref->new_sha1)) {
ref->status = REF_STATUS_UPTODATE;
continue;
}
@@ -480,14 +480,13 @@ static int do_send_pack(int in, int out, struct remote *remote, const char *dest
!ref->deletion &&
!is_null_sha1(ref->old_sha1) &&
(!has_sha1_file(ref->old_sha1)
- || !ref_newer(new_sha1, ref->old_sha1));
+ || !ref_newer(ref->new_sha1, ref->old_sha1));
if (ref->nonfastforward && !ref->force && !args.force_update) {
ref->status = REF_STATUS_REJECT_NONFASTFORWARD;
continue;
}
- hashcpy(ref->new_sha1, new_sha1);
if (!ref->deletion)
new_refs++;
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index f0030ad..598664c 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -437,6 +437,37 @@ test_expect_success 'push updates local refs' '
'
+test_expect_success 'push updates up-to-date local refs' '
+
+ rm -rf parent child &&
+ mkdir parent &&
+ (cd parent && git init &&
+ echo one >foo && git add foo && git commit -m one) &&
+ git clone parent child1 &&
+ git clone parent child2 &&
+ (cd child1 &&
+ echo two >foo && git commit -a -m two &&
+ git push) &&
+ (cd child2 &&
+ git pull ../child1 master &&
+ git push &&
+ test $(git rev-parse master) = $(git rev-parse remotes/origin/master))
+
+'
+
+test_expect_success 'push preserves up-to-date packed refs' '
+
+ rm -rf parent child &&
+ mkdir parent &&
+ (cd parent && git init &&
+ echo one >foo && git add foo && git commit -m one) &&
+ git clone parent child &&
+ (cd child &&
+ git push &&
+ ! test -f .git/refs/remotes/origin/master)
+
+'
+
test_expect_success 'push does not update local refs on failure' '
rm -rf parent child &&
--
1.6.0.3.617.ge4eb0
^ permalink raw reply related
* Re: [RFC] Referring to a submodule state recorded in a supermodule from within the submodule
From: Daniel Barkalow @ 2008-11-05 20:45 UTC (permalink / raw)
To: Johan Herland; +Cc: git
In-Reply-To: <200811051824.28374.johan@herland.net>
On Wed, 5 Nov 2008, Johan Herland wrote:
> Hi,
>
> I have a stand-alone project, "foo", that I work on myself. The "foo"
> project is included as a submodule in two other projects, "bar"
> and "baz", that I don't have any direct affiliation with.
>
> Semi-regularly, I like to keep tabs on bar and baz, to see what versions
> of foo they are using, what changes they have made to foo, and if there
> are things I could pick up from them, or maybe even things they could
> learn from eachother.
>
> Doing this currently is quite tedious:
> 1. Clone/Fetch bar and initialize/update its foo submodule
> 2. Clone/Fetch baz and initialize/update its foo submodule
> 3. Set up remotes bar_foo and baz_foo in my main foo repo,
> pointing to bar/foo and baz/foo, respectively. Fetch.
> 4. Create tags bar_foo_current and baz_foo_current pointing
> to the foo SHA1 sum recorded in baz and baz, respectively.
> 5. Start comparing bar_foo_current and baz_foo_current to
> eachother, and to my own master branch.
Set up remotes in your foo:
[remote "bar"]
url = ...
fetch = refs/heads/*:refs/remotes/bar/*
[remote "bar-foo"]
url = ...
fetch = refs/heads/*:refs/remotes/in-bar/*
You should be able to do "git fetch bar" (you really don't want to merge
this, but git is fine with unrelated histories in the same repo...);
"git fetch bar-foo".
Then I'd expect "git log master..bar/master:foo" to work [*1*].
bar/master is the commit in the superproject, "foo" is the path in its
tree that reaches the submodule, so "bar/master:foo" is whatever's there,
which turns out to be a commit, which is the commit you're interested in.
I think the only annoying things are that you need to find out from
bar/master:.gitmodules what to fetch as the branch that's related to your
local project, and you need to do two fetches each time, and you have to
download the whole superproject state in order to find out one reference
from it. (But this also lets you look at the history of which versions
they incorporated over time, so you can see "they adopted something at one
point, rolled back for a while, cherry-picked a change, and then updated
to a version with the feature fixed.")
[*1*] This may not actually work; I don't know if we give up on
interpreting a object name when we're looking for a commit and start to
see a path. I'm pretty sure that git will not understand
"refs/remotes/bar/master:path/to/foo:Makefile" (which could name the
Makefile in the root directory of the commit in the path/to/foo location
in the current value of bar/master, but will actually look for a
"foo:Makefile" filename; it probably ought to work with a '/' before the
second ':', though, since that is unambiguous)
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply
* Re: [PATCH] push: fix local refs update if already up-to-date
From: Clemens Buchacher @ 2008-11-05 20:28 UTC (permalink / raw)
To: Jeff King; +Cc: git, Junio C Hamano
In-Reply-To: <20081105024932.GA20907@coredump.intra.peff.net>
On Tue, Nov 04, 2008 at 09:49:32PM -0500, Jeff King wrote:
[...]
> However, I would like to make one additional request. Since you are
> killing off all usage of new_sha1 initial assignment, I think it makes
> sense to just get rid of the variable entirely, so it cannot create
> confusion later.
Ok, I can live with that.
> > > Hmm. I was hoping to see more in update_tracking_ref. With your patch,
> > > we end up calling update_ref for _every_ uptodate ref, which results in
> > > writing a new unpacked ref file for each one. And that _is_ a
> > > performance problem for people with large numbers of refs.
> > [...]
> > I think update_ref already takes care of that. See this check in
> > write_ref_sha1:
> >
> > if (!lock->force_write && !hashcmp(lock->old_sha1, sha1)) {
> > unlock_ref(lock);
> > return 0;
> > }
>
> Nope. That check is a concurrency safeguard. It checks that when we are
> moving the ref from "A" to "B", that the ref still _is_ "A" when we lock
> it.
I think you are confusing this with verify_lock(). The code in
write_ref_sha1() really does compare with the new sha1.
> But more importantly, it is easy to demonstrate the problem with your
> patch:
>
> mkdir parent &&
> (cd parent &&
> git init && touch file && git add file && git commit -m one) &&
> git clone parent child &&
> (cd child &&
> echo BEFORE: && ls -l .git/refs/remotes/origin &&
> git push &&
> echo AFTER: && ls -l .git/refs/remotes/origin)
>
> I get:
>
> BEFORE:
> -rw-r--r-- 1 peff peff 32 2008-11-04 21:43 HEAD
> Everything up-to-date
> AFTER:
> -rw-r--r-- 1 peff peff 32 2008-11-04 21:43 HEAD
> -rw-r--r-- 1 peff peff 41 2008-11-04 21:43 master
>
> Oops. With the patch snippet I posted in my previous message, the
> 'master' ref is not created by the uptodate push.
The reason it doesn't work is a bug in lock_ref_sha1_basic(). Dating back to
pre-"pack-refs" times, this code forces a write if the ref file does not
exist. I will resubmit the patch including your above testcase and a bugfix
for lock_ref_sha1_basic().
Clemens
^ 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