Git development
 help / color / mirror / Atom feed
* Re: [PATCH 5/5] run-command: Error out if interpreter not found
From: Frans Klaver @ 2012-01-27 11:46 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Junio C Hamano, Johannes Sixt, git, Jeff King
In-Reply-To: <20120127094145.GA2611@burratino>

On Fri, Jan 27, 2012 at 10:41 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Frans Klaver wrote:
>
>> Just for my understanding: before a command is executed, a pager
>> (less/more or so) is started? We want to avoid starting the pager if
>> we won't be able to execute the command?
>
> See [1] for an example of a recent patch touching the relevant
> code path.

I'll have a look at that.


> For example: if I run "git --paginate foo", foo is an alias for bar,
> and the "[pager] bar" configuration is set to point to "otherpager",
> then without this safety git launches the default pager in preparation
> for running git-foo, receives ENOENT from execvp("git-foo"), and then
> the pager has already been launched and it is too late to launch
> otherpager instead.

Something to be looked into then.


> Well, as I said, I don't know. :)  And I don't want to give false
> hopes --- it's perfectly possible and not even unlikely that this is a
> dead end and any patch in this direction will turn out not to be a
> good idea and not applied.

Hm don't worry about false hopes. I don't insist on having some of my
work actually in if there's no point in including it. Contributing to
the research is good enough for me if we can come to a conclusion that
we can present to people running into similar issues.


> That's part of why I was really grateful to Hannes for the reminder to
> take a step back for a moment and consider whether it's worth it.
> Maybe there's another way or a more targetted way to take care of the
> motivational original confusing scenario that leads to execvp errors.

I wonder.

> (By the way, can you remind me which one that was?)

I'll even summarize my thinking and motivation about this.

I was executing the test suite on my PC. Some test for aliases failed
-- git said EACCES, while for aliases one would expect ENOENT. For
users expecting an alias to be executed, "cannot execute git-frotz:
Access Denied" will be rather confusing. "Huh? Access denied? The file
doesn't even exist?!". It took me quite some debugging in git to track
this down to an inaccessible PATH entry. As someone who didn't know
anything of the git internal code it took quite a bit of learning as
well just to find out where we'd end up in the first place. It
bothered me (and still does) that execve uses EACCES for at least four
different errors:

...
    EACCES Search  permission is denied on a component of the path
prefix of filename or the
              name of a script interpreter.  (See also path_resolution(7).)
    EACCES The file or a script interpreter is not a regular file.
    EACCES Execute permission is denied for the file or a script or
ELF interpreter.
    EACCES The file system is mounted noexec.
...

Anyway, reading through that man page later on I found that a lot of
errors are only mentioned once, but do contain 'or' in the problem
description, like the first one of the EACCES items. ENOENT does that
as well:

    ENOENT The file filename or a script or ELF interpreter does  not
exist,  or  a  shared
              library needed for file or interpreter cannot be found.

I then additionally figured that always silently passing ENOENT is a
bad thing to do, because it simply can mean more than just "The file
you asked for cannot be found". It means "something required cannot be
found". My resulting view on this is basically that the execvp error
handling git currently has, is lacking a nuance that is necessary for
effective debugging. As I said earlier, it's when things go wrong
people get annoyed. Even more so if you don't provide them with
pointers to what might be wrong.

It also bothers me that to effectively debug program execution errors,
you have to know that git uses execvp, and you have to know how it
behaves. I would label that "implementation details" and as a user I
really don't want to be bothered by that, especially not as a new
user. For that reason I would have liked to end up with something like
bash does. I would rather see "Hey dummy, can't access /some/path" or
"Hey dummy, you ask for an interpreter that I have no acces to" than
"Well we got EACCES, so check the following things: Do we have search
permission on.... Is it a regular file? mounted noexec?..." or "We got
EACCES, check man execve(2) for possible reasons", although I'd agree
that even that would be slightly better than "We got EACCES".

So take of your git-guru hat and put on your new-git-user one and let
it simmer for a while.

^ permalink raw reply

* Re: make install rewrites source files
From: Hallvard Breien Furuseth @ 2012-01-27 13:11 UTC (permalink / raw)
  To: Clemens Buchacher; +Cc: Junio C Hamano, git
In-Reply-To: <20120126225231.GA14753@ecki>

On Thu, 26 Jan 2012 23:52:31 +0100, Clemens Buchacher <drizzd@aon.at> wrote:
> How about removing the profile-all target and making it a build option
> instead? To enable it, do the usual:
> (...)
> ifdef PROFILE_BUILD
>  all:
> 	$(MAKE) CFLAGS=... -fprofile-generate ... all-one
> 	$(MAKE) CFLAGS=... -fprofile-use ... all-one
> else
>  all: all-one
> endif
> 
> and each previous instance of 'all' replaced with 'all-one'.

Not quite.  test: and install: should depend on 'all', otherwise making
them without doing 'make all' first will test/install an unprofiled Git.

So 'all' with profiling should be today's profile-all, which should not
throw away the build and start over.  It can create some files to mark
how far it has gotten instead.  And profile-generate currently uses
'test' which would recurse, it needs another internal test target.

Not sure if it is worth it.  Something like this, perhaps.  Except I
have not thought about how this interacts with the coverage targets.

# Final targets

ifdef PROFILE_BUILD
all::		profile-all
test:		profile-test
install:	profile-install
else
all::		all-one
test:		test-one
install:	install-one
endif

# Profiling
#
# Note: If profiling (the test phase) failed halfway through but you
# still want to use the partial profile results to build Git, you can
#	touch p-gen.stamp
# and then 'make all' again.

profile-all: p-use.stamp

profile-gen p-gen.stamp:
	$(MAKE) CFLAGS="$(PROFILE_GEN_CFLAGS)" all-one
	$(MAKE) CFLAGS="$(PROFILE_GEN_CFLAGS)" -j1 test-one
	touch p-gen.stamp

profile-use p-use.stamp: p-gen.stamp
	$(MAKE) CFLAGS="$(PROFILE_USE_CFLAGS)" all-one
	touch p-use.stamp

profile-test: p-use.stamp
	$(MAKE) CFLAGS="$(PROFILE_USE_CFLAGS)" test-one

profile-install: p-use.stamp
	$(MAKE) CFLAGS="$(PROFILE_USE_CFLAGS)" install-one

.PHONY: all-one test test-one install install-one
.PHONY: profile-all profile-gen profile-test profile-install profile-clean


Also let 'clean' depend on 'profile-clean' which does
	$(RM) p-gen.stamp p-use.stamp.

-- 
Hallvard

^ permalink raw reply

* commit/from command in git-fast-import
From: Mike Hommey @ 2012-01-27 12:48 UTC (permalink / raw)
  To: git

Hi,

I'm trying to make sense of the git fast-import manual page. This is
what it reads, as of git 1.7.8.3, from Debian unstable:

  Omitting the from command in the first commit of a new branch will
  cause fast-import to create that commit with no ancestor. This
  tends to be desired only for the initial commit of a project. If
  the frontend creates all files from scratch when making a new
  branch, a merge command may be used instead of from to start the
  commit with an empty tree. Omitting the from command on existing
  branches is usually desired, as the current commit on that branch
  is automatically assumed to be the first ancestor of the new
  commit.

When I do create a commit on a given branch with a stream like:
  commit refs/heads/branch
  author ...
  committer ...
  data <<EOF
  Commit message
  EOF
  deleteall

All I get is this warning:
  warning: Not updating refs/heads/branch (new tip new_sha1
does not contain old_sha1)

And the branch only has one commit, which is the one I just created.
On the other hand, if I add a "from" instruction in the above stream,
I have the expected branch history.

Arguably, this may be related to my use of deleteall, but nothing in the
deleteall description suggests this would happen.

Is it an expected behaviour and a lack of proper documentation, or is it
a bug in git fast-import ?

Mike

^ permalink raw reply

* Re: commit/from command in git-fast-import
From: David Barr @ 2012-01-27 14:00 UTC (permalink / raw)
  To: Mike Hommey; +Cc: git
In-Reply-To: <20120127124837.GA24084@glandium.org>

On Fri, Jan 27, 2012 at 11:48 PM, Mike Hommey <mh@glandium.org> wrote:
> When I do create a commit on a given branch with a stream like:
>  commit refs/heads/branch
>  author ...
>  committer ...
>  data <<EOF
>  Commit message
>  EOF
>  deleteall
>
> All I get is this warning:
>  warning: Not updating refs/heads/branch (new tip new_sha1
> does not contain old_sha1)
>
> And the branch only has one commit, which is the one I just created.
> On the other hand, if I add a "from" instruction in the above stream,
> I have the expected branch history.

This is precisely the expected behavior.
If 'from' is omitted, the resulting commit has no preceding history.
On the other hand, what you want is to specify the parent so that
there is a continuation of history.

I hope this helps.
--
David Barr

^ permalink raw reply

* git-gui Ctrl-U (unstage) broken
From: Victor Engmark @ 2012-01-27 14:03 UTC (permalink / raw)
  To: git

Using the git-gui available with the default Ubuntu 10.10 repos, I'm
not able to unstage files with the default keyboard shortcut. To
reproduce:
1. Change a file in the repository
2. Run `git gui`
3. Stage the changed file
4. Select the changed file in the "Staged Changes (Will Commit)" list
5. Click Ctrl-U

Expected outcome: The selected file should be unstaged.

Actual outcome: Nothing at all changes in the GUI.

Verified that other keyboard shortcuts work: Ctrl-T, Ctrl-I, Ctrl--,
Ctrl-+, F5. These (except Ctrl-T, obviously) were tested in* both the
"Unstaged Changes" and "Staged Changes (Will Commit)" listsp

* That is, after focusing a single element in that list.

Version info:

git-gui version 0.12.0.64.g89d6
git version 1.7.1

Tcl/Tk version 8.5.8
Aspell 0.60.6, en_US

Cheers,
V

^ permalink raw reply

* Re: commit/from command in git-fast-import
From: Mike Hommey @ 2012-01-27 14:08 UTC (permalink / raw)
  To: David Barr; +Cc: git
In-Reply-To: <CAFfmPPPYc=9BdwuE+ANiHKrFk+_7aXDgnMv3fHxVmF0ttZu8bA@mail.gmail.com>

On Sat, Jan 28, 2012 at 01:00:17AM +1100, David Barr wrote:
> On Fri, Jan 27, 2012 at 11:48 PM, Mike Hommey <mh@glandium.org> wrote:
> > When I do create a commit on a given branch with a stream like:
> >  commit refs/heads/branch
> >  author ...
> >  committer ...
> >  data <<EOF
> >  Commit message
> >  EOF
> >  deleteall
> >
> > All I get is this warning:
> >  warning: Not updating refs/heads/branch (new tip new_sha1
> > does not contain old_sha1)
> >
> > And the branch only has one commit, which is the one I just created.
> > On the other hand, if I add a "from" instruction in the above stream,
> > I have the expected branch history.
> 
> This is precisely the expected behavior.
> If 'from' is omitted, the resulting commit has no preceding history.
> On the other hand, what you want is to specify the parent so that
> there is a continuation of history.

This is however not what the manpage suggests in what I quoted in my
message:
  Omitting the from command on existing branches is usually desired, as
  the current commit on that branch is automatically assumed to be the
  first ancestor of the new commit.

Mike

^ permalink raw reply

* gitweb showing slash r at the end of line
From: Ondra Medek @ 2012-01-27 14:19 UTC (permalink / raw)
  To: git

Hi,
we have gitweb running on Linux box. Some files have Windows line ending
(CRLF) end we do not use core.autcrlf translation. gitweb show the last \r
in the end of each line, which is annoying. I have creates a simple patch to
avoid this. It adds just one line. I am not sure if the regexp should
contain 'g' switch in the end. Also, not sure if there shoul be some config
option to switch on/off this?

Cheers
Ondra
---
 gitweb/gitweb.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index abb5a79..92175bc 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1500,6 +1500,7 @@ sub esc_html {
        if ($opts{'-nbsp'}) {
                $str =~ s/ /&nbsp;/g;
        }
+       $str =~ s/\r$//;
        $str =~ s|([[:cntrl:]])|(($1 ne "\t") ? quot_cec($1) : $1)|eg;
        return $str;
 }
--
1.7.8.4


--
View this message in context: http://git.661346.n2.nabble.com/gitweb-showing-slash-r-at-the-end-of-line-tp7229895p7229895.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply related

* Re: [PATCH] git-completion: workaround zsh COMPREPLY bug
From: Felipe Contreras @ 2012-01-27 16:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Matthieu Moy
In-Reply-To: <7v4nvi2kgq.fsf@alter.siamese.dyndns.org>

On Fri, Jan 27, 2012 at 12:00 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> zsh adds a backslash (foo\ ) for each item in the COMPREPLY array if IFS
>> doesn't contain spaces. This issue has been reported[1], but there is no
>> solution yet.
>> ...
>> Once zsh is fixed, we should conditionally disable this workaround to
>> have the same benefits as bash users.
>>
>> [1] http://www.zsh.org/mla/workers/2012/msg00053.html
>> [2] http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=commitdiff;h=2e25dfb8fd38dbef0a306282ffab1d343ce3ad8d
>
> That 2e25dfb8 only says:
>
>    Rocky Bernstein: 29135 (plus tweaks): compgen -W in bash completion
>
> without any explanation, which is not very useful.

Yeah, they development practices leaves a lot to be desired.

> Do you have a bug tracker ID or something for [1] above, with which I can
> amend the patch as Matthieu suggests?

I don't think there's something like that, but here's the original discussion:

http://thread.gmane.org/gmane.comp.shells.zsh.devel/22541

-- 
Felipe Contreras

^ permalink raw reply

* Re: [PATCH 1/4] config: add include directive
From: Jens Lehmann @ 2012-01-27 17:03 UTC (permalink / raw)
  To: Jeff King; +Cc: Junio C Hamano, git
In-Reply-To: <20120126225140.GB12855@sigill.intra.peff.net>

Am 26.01.2012 23:51, schrieb Jeff King:
> However, I didn't think about the fact that git-submodule.sh would be
> calling git-config separately, and that is accidentally changed by my
> patch.  Even if we changed git-submodule to use "git config
> --no-includes" that would break any third-party scripts that use "git
> config" to read git-like files.
> 
> But it would be nice for callers doing "git config foo.bar" to get the
> includes by default. So maybe the right rule is:
> 
>   1. In C:
>      a. git_config() respects includes automatically.
>      b. other callers do not do so automatically (e.g., gitmodules via
>         submodule.c).
> 
>     (i.e., what is implemented by this patch)
> 
>   2. Callers of git-config:
>      a. respect includes for lookup that checks all of the "normal"
>         config spots in sequence: .git/config, ~/.gitconfig, and
>         /etc/gitconfig. These are the shell equivalent of calling
>         git_config().
> 
>      b. when we are looking in a specific file (via GIT_CONFIG or "git
>         config -f"), do not respect includes (but allow --includes if
>         the caller chooses). This specific file may be something like
>         .gitmodules. Or perhaps somebody is saying "no, I really just
>         want to know what is in _this_ file, not what the config
>         ecosystem tells me in general".
> 
> And then because of 1a and 2a, most programs should Just Work without
> any changes, but because of 1b and 2b, any special uses will have to
> decide manually whether they would want to allow includes.
> 
> Does that make sense?

To me it really does. It lets submodule.c:gitmodules_config and
"git config -f .gitmodules" behave in the same way, which is very
important for consistent behavior between the submodule script and
the submodule functionality that is already handled in c. And I don't
know of a use case for includes in .gitmodules (the main reason for
adding includes seems to be to enable users to have configuration
stored in the repo, which the .gitmodules file already is. And if it
is about having out of repo configuration blended in, .gitmodules
settings are always overridden by those in .git/config, and you can
use includes there).

The only thing I'm not so sure about is the GIT_CONFIG case. I don't
know if using this is rather a "I moved my config there, but please
respect includes there too" or a "I want git config to look at a
completely different file" use case. Probably both. But also the
question of where to look for relative paths seems not so easy to
answer for the GIT_CONFIG case, so it might be best to just disable
includes there too.

^ permalink raw reply

* Re: [RFC/PATCH 0/4] config include directives
From: Jeff King @ 2012-01-27 17:34 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git
In-Reply-To: <CACBZZX59sur4_61LkN_sMOvXQ4Jdnt1P8O-UOgm0SooBQpjFdQ@mail.gmail.com>

On Fri, Jan 27, 2012 at 10:51:34AM +0100, Ævar Arnfjörð Bjarmason wrote:

> If you write the function like that it means your patch series just
> works since values encountered later will override earlier ones, but
> have you checked git's code to make sure we don't have anything like:
> 
>     static int ignore_add_errors_is_set = 0;
>     static int add_config(const char *var, const char *value, void *cb)
>     {
>     	if (!ignore_add_errors_is_set &&
>             (!strcmp(var, "add.ignoreerrors") ||
>     	     !strcmp(var, "add.ignore-errors"))) {
>     		ignore_add_errors = git_config_bool(var, value);
>             ignore_add_errors_is_set = 1;
>     		return 0;
>     	}
>     	return git_default_config(var, value, cb);
>     }
> 
> Which would mean that the include config support would be silently
> ignored.

I'm not sure what the issue is. If you write code like this, it will
already ignore the second invocation when it is found later in the same
file, or when it is found in a later file (i.e., in both .git/config and
.gitconfig). So I don't think includes introduce a new problem with
respect to code like this (and no, I didn't check exhaustively, but I
don't recall seeing code like this in git).

A bigger potential problem is multi-key values that form lists. For
example, I cannot use a later "remote.foo.url" line to override an
earlier one; instead, it gets appended to the list of URLs for "foo".
In practice, it's not a problem because the list-like options don't tend
to be found in multiple places. And again, this is not a new problem of
includes, since we already handle multiple files.

Accidentally including the same file twice would cause duplicates for
multi-key values. But I'm going to take Junio's suggestion to avoid
including the same file twice (which also prevents infinite loops due to
cycles).

-Peff

^ permalink raw reply

* [PATCH] Revert "gitweb: Time::HiRes is in core for Perl 5.8"
From: Jakub Narebski @ 2012-01-27 17:45 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: Hallvard Breien Furuseth, git
In-Reply-To: <CACBZZX4cjcY5d3mPJAV+rbSTqCEUOrF=_dd3ny_jSM++G-Bg1Q@mail.gmail.com>

On Mon, 23 Jan 2012, Ævar Arnfjörð Bjarmason wrote:
> On Mon, Jan 23, 2012 at 05:50, Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no> wrote:
> >
> > t9500-gitweb-standalone-no-errors fails: Git 1.7.9.rc2/1.7.8.4, RHEL
> > 6.2, Perl 5.10.1.  Reverting 3962f1d756ab41c1d180e35483d1c8dffe51e0d1
> > fixes it.  The commit expects Time::HiRes to be present, but RedHat
> > has split it out to a separate RPM perl-Time-HiRes.  Better add a
> > comment about that, so it doesn't get re-reverted.
> >
> > Or pacify the test and expect gitweb@RHEL-users to install the RPM:
[...]
 
> This doesn't actually fix the issue, it only sweeps it under the rug
> by making the tests pass, gitweb will still fail to compile on Red
> Hat once installed.

I think you meant "fail to run" here.

> I think the right solution is to partially revert
> 3962f1d756ab41c1d180e35483d1c8dffe51e0d1, but add a comment in the
> code indicating that it's to deal with RedHat's broken fork of Perl.

I have added comment in commit message, but not in code.  I wonder if
it would be enough.

> However even if it's required in an eval it might still fail at
> runtime in the reset_timer() function, which'll need to deal with it
> too.

It shouldn't; everything else related to timer is protected with
'if defined $t0', which is false if Time::HiRes module is not available.

Here is the patch
-- >8 --
From: Jakub Narebski <jnareb@gmail.com>
Subject: [PATCH] Revert "gitweb: Time::HiRes is in core for Perl 5.8"

This reverts commit 3962f1d756ab41c1d180e35483d1c8dffe51e0d1.

Though Time::HiRes is a core Perl module, it doesn't necessarily mean
that it is included in 'perl' package, and that it is installed if
Perl is installed.

For example RedHat has split it out to a separate RPM perl-Time-HiRes.

Noticed-by: Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no>
Suggested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jakub Narębski <jnareb@gmail.com>
---
 gitweb/gitweb.perl |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index abb5a79..c86224a 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -17,10 +17,12 @@ use Encode;
 use Fcntl ':mode';
 use File::Find qw();
 use File::Basename qw(basename);
-use Time::HiRes qw(gettimeofday tv_interval);
 binmode STDOUT, ':utf8';
 
-our $t0 = [ gettimeofday() ];
+our $t0;
+if (eval { require Time::HiRes; 1; }) {
+	$t0 = [Time::HiRes::gettimeofday()];
+}
 our $number_of_git_cmds = 0;
 
 BEGIN {
@@ -1142,7 +1144,7 @@ sub dispatch {
 }
 
 sub reset_timer {
-	our $t0 = [ gettimeofday() ]
+	our $t0 = [Time::HiRes::gettimeofday()]
 		if defined $t0;
 	our $number_of_git_cmds = 0;
 }
@@ -3974,7 +3976,7 @@ sub git_footer_html {
 		print "<div id=\"generating_info\">\n";
 		print 'This page took '.
 		      '<span id="generating_time" class="time_span">'.
-		      tv_interval($t0, [ gettimeofday() ]).
+		      Time::HiRes::tv_interval($t0, [Time::HiRes::gettimeofday()]).
 		      ' seconds </span>'.
 		      ' and '.
 		      '<span id="generating_cmd">'.
@@ -6253,7 +6255,7 @@ sub git_blame_common {
 		print 'END';
 		if (defined $t0 && gitweb_check_feature('timed')) {
 			print ' '.
-			      tv_interval($t0, [ gettimeofday() ]).
+			      Time::HiRes::tv_interval($t0, [Time::HiRes::gettimeofday()]).
 			      ' '.$number_of_git_cmds;
 		}
 		print "\n";
-- 
1.7.6

^ permalink raw reply related

* Fwd: Git-web error
From: rajesh boyapati @ 2012-01-27 18:15 UTC (permalink / raw)
  To: git
In-Reply-To: <5fa08a8b-f0a2-4796-bf0d-06a8f13bf703@b23g2000yqn.googlegroups.com>




---------- Forwarded message ----------
From: rajesh boyapati <boyapatisraj...@gmail.com>
Date: Jan 25, 7:10 pm
Subject: Git-web error
To: Repo and Gerrit Discussion


Hi,

We integrated git-web to our gerrit Code-review.
I installed gitweb using the command:
$ sudo apt-get install gitweb
Then I configured gitweb to our gerrit using the command:
$ git config --file $SITE_PATH/etc/gerrit.config gitweb.cgi /usr/lib/
cgi-bin/gitweb.cgi
Now the gitweb is added to gerrit.config and in gerrit config file, it
looks like
[gitweb]
        cgi = /usr/lib/cgi-bin/gitweb.cgi
Then, restarted gerrit server.

When I go to one of the projects in gerrit through gitweb and when I
click "summary", I am getting the below error.
If I click other tabs(log, shortlog, commit, tree,etc) after clicking
"summary", I am getting following error in error-log.
If I click other tabs(log, shortlog, commit, tree,etc) before clicking
"summary", everything works fine.

Error:
=================================================================
[2012-01-25 18:50:32,334] ERROR
com.google.gerrit.httpd.gitweb.GitWebServlet : CGI: [Wed Jan 25
18:50:32 2012] gitweb.cgi: Use of uninitialized value $head in string
eq at /usr/lib/cgi-bin/gitweb.cgi line 4720.
[2012-01-25 18:50:35,658] ERROR
com.google.gerrit.httpd.gitweb.GitWebServlet : CGI: [Wed Jan 25
18:50:35 2012] gitweb.cgi: Use of uninitialized value $commit_id in
open at /usr/lib/cgi-bin/gitweb.cgi line 2817.
[2012-01-25 18:50:35,660] ERROR
com.google.gerrit.httpd.gitweb.GitWebServlet : CGI: fatal: bad
revision ''
[2012-01-25 18:50:39,209] ERROR
com.google.gerrit.httpd.gitweb.GitWebServlet : CGI: [Wed Jan 25
18:50:39 2012] gitweb.cgi: Use of uninitialized value $commit_id in
open at /usr/lib/cgi-bin/gitweb.cgi line 2817.
[2012-01-25 18:50:39,210] ERROR
com.google.gerrit.httpd.gitweb.GitWebServlet : CGI: fatal: bad
revision ''
[2012-01-25 18:50:40,656] ERROR
com.google.gerrit.httpd.gitweb.GitWebServlet : CGI: fatal: bad
revision 'HEAD'
[2012-01-25 18:53:17,097] ERROR
com.google.gerrit.httpd.gitweb.GitWebServlet : CGI: fatal: bad
revision 'HEAD'
[2012-01-25 18:53:17,113] ERROR
com.google.gerrit.httpd.gitweb.GitWebServlet : CGI: [Wed Jan 25
18:53:17 2012] gitweb.cgi: Use of uninitialized value $head in string
eq at /usr/lib/cgi-bin/gitweb.cgi line 4720.
=================================================================

Can any one help me on how to resolve this issue?.

Thanks,
Rajesh.

^ permalink raw reply

* Re: [PULL] svn-fe updates for master or next
From: Junio C Hamano @ 2012-01-27 18:39 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: David Barr, Scott Chacon, Brian Gernhardt, david,
	Ramkumar Ramachandra, git, Dmitry Ivankov
In-Reply-To: <20120127003258.GA6946@burratino>

Jonathan Nieder <jrnieder@gmail.com> writes:

> Junio, please pull
>
>   git://repo.or.cz/git/jrn.git svn-fe
>
> to get the following changes since commit ec014eac0e9e6f30cbbca616090fa2ecf74797e7:
>
>   Git 1.7.5 (2011-04-23 23:36:32 -0700)
>
> up to c5bcbcdcfa1e2a1977497cb3a342c0365c8d78d6:
>
>   vcs-svn: reset first_commit_done in fast_export_init (2011-06-23 10:04:36 -0500)
>
> I'd even be okay with pulling this for v1.7.9, but application for the
> next release would also be fine with me.  It simplifies svn-fe a great
> deal and fulfills a longstanding wish: support for dumps with deltas
> in them.  The cost is that commandline usage of the svn-fe tool
> becomes a little more complicated since it no longer keeps state
> itself but instead reads blobs back from fast-import in order to copy
> them between revisions and apply deltas to them.

Thanks, but will pull after 1.7.9 that was scheduled to happen today.

By the way, we should have done a GPG keysigning at the last GitTogether.
The above paragraph ("The series simplifies svn-fe a great deal...") could
have been recorded in the message body of a signed tag, and we could have
started eating our own dogfood, now even Linus and his lieutenants are
using the upcoming 1.7.9 feature.

^ permalink raw reply

* Re: [PULL] svn-fe updates for master or next
From: Junio C Hamano @ 2012-01-27 18:50 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: David Barr, Scott Chacon, Brian Gernhardt, david,
	Ramkumar Ramachandra, git, Dmitry Ivankov
In-Reply-To: <20120127003258.GA6946@burratino>

Jonathan Nieder <jrnieder@gmail.com> writes:

>  t/t0081-line-buffer.sh    |  106 +-------------

Curious; this series seem to be based on a codebase that is older than
6908e99 (Revert "t0081 (line-buffer): add buffering tests", 2011-03-30).

Not complaining, not asking any question. Just making an observation.

^ permalink raw reply

* Re: [PATCH] Revert "gitweb: Time::HiRes is in core for Perl 5.8"
From: Junio C Hamano @ 2012-01-27 20:44 UTC (permalink / raw)
  To: Jakub Narebski
  Cc: Ævar Arnfjörð Bjarmason, Hallvard Breien Furuseth,
	git
In-Reply-To: <201201271845.39576.jnareb@gmail.com>

Jakub Narebski <jnareb@gmail.com> writes:

> Though Time::HiRes is a core Perl module, it doesn't necessarily mean
> that it is included in 'perl' package, and that it is installed if
> Perl is installed.

I do not think we have seen the end of Redhat/Fedora Perl saga.  I am
hoping that either one of the two things to happen:

 (1) Redhat/Fedora distrubution reconsiders the situation and fix their
     packages so that by default when its users ask for "Perl" they get
     what the upstream distributes as "Perl" in full, while still allowing
     people who know what they are doing to install a minimum subset
     "perl-base"; or

 (2) Many applications that use and rely on Perl like we do are hit by
     this issue, and Redhat/Fedora users are trained to install the
     perl-full (or whatever it is called) package when applications want
     "Perl".

In other words, I am hoping that "it doesn't necessarily mean" will not
stay true for a long time.  So please hold onto this patch until the dust
settles, and resend it if (1) does not look to be happening in say 3
months.


> For example RedHat has split it out to a separate RPM perl-Time-HiRes.
>
> Noticed-by: Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no>
> Suggested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> Signed-off-by: Jakub Narębski <jnareb@gmail.com>
> ---
>  gitweb/gitweb.perl |   12 +++++++-----
>  1 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index abb5a79..c86224a 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -17,10 +17,12 @@ use Encode;
>  use Fcntl ':mode';
>  use File::Find qw();
>  use File::Basename qw(basename);
> -use Time::HiRes qw(gettimeofday tv_interval);
>  binmode STDOUT, ':utf8';
>  
> -our $t0 = [ gettimeofday() ];
> +our $t0;
> +if (eval { require Time::HiRes; 1; }) {
> +	$t0 = [Time::HiRes::gettimeofday()];
> +}
>  our $number_of_git_cmds = 0;

Why should these even be initialized here?  Doesn't reset_timer gets
called at the beginning of run_request()?
>  
>  BEGIN {
> @@ -1142,7 +1144,7 @@ sub dispatch {
>  }
>  
>  sub reset_timer {
> -	our $t0 = [ gettimeofday() ]
> +	our $t0 = [Time::HiRes::gettimeofday()]
>  		if defined $t0;
>  	our $number_of_git_cmds = 0;

The statement modifier look ugly.

More importantly, if you are not profiling, i.e. if we didn't initialize
$t0 at the beginning, do you need to reset $number_of_git_cmds at all?

I also think this should take gitweb_check_feature('timed') into
account, perhaps like this:

	sub reset_timer {
        	return unless gitweb_check_feature('timed');
                our $t0 = ...
                our $number_of_git_cmds = 0;
	}

Then all the other

	if (defined $t0 && gitweb_check_feature('timed'))

can become

	if (defined $t0)

If you go this route, even though tee-zero, the beginning of the time, is
a good name for the variable, you may want to rename it to avoid confusing
readers who might take it as a temporary variable #0.

^ permalink raw reply

* Re: commit/from command in git-fast-import
From: David Barr @ 2012-01-27 20:56 UTC (permalink / raw)
  To: Mike Hommey; +Cc: git, Dmitry Ivankov, Sverre Rabbelier, Jonathan Nieder
In-Reply-To: <20120127144702.GA6693@glandium.org>

On Sat, Jan 28, 2012 at 1:47 AM, Mike Hommey <mh@glandium.org> wrote:
> On Sat, Jan 28, 2012 at 01:15:34AM +1100, David Barr wrote:
>> On Sat, Jan 28, 2012 at 1:08 AM, Mike Hommey <mh@glandium.org> wrote:
>> > On Sat, Jan 28, 2012 at 01:00:17AM +1100, David Barr wrote:
>> >> On Fri, Jan 27, 2012 at 11:48 PM, Mike Hommey <mh@glandium.org> wrote:
>> >> > When I do create a commit on a given branch with a stream like:
>> >> >  commit refs/heads/branch
>> >> >  author ...
>> >> >  committer ...
>> >> >  data <<EOF
>> >> >  Commit message
>> >> >  EOF
>> >> >  deleteall
>> >> >
>> >> > All I get is this warning:
>> >> >  warning: Not updating refs/heads/branch (new tip new_sha1
>> >> > does not contain old_sha1)
>> >> >
>> >> > And the branch only has one commit, which is the one I just created.
>> >> > On the other hand, if I add a "from" instruction in the above stream,
>> >> > I have the expected branch history.
>> >>
>> >> This is precisely the expected behavior.
>> >> If 'from' is omitted, the resulting commit has no preceding history.
>> >> On the other hand, what you want is to specify the parent so that
>> >> there is a continuation of history.
>> >
>> > This is however not what the manpage suggests in what I quoted in my
>> > message:
>> >  Omitting the from command on existing branches is usually desired, as
>> >  the current commit on that branch is automatically assumed to be the
>> >  first ancestor of the new commit.
>> >
>> > Mike
>>
>> Oh, right. I guess I wasn't paying enough attention, sorry.
>> That does sound like a bug then. Is it reproducible in a new repo?
>> eg:
>>   git init foo && cd foo && touch bar && git add -A && git commit -m "baz"
>>   git fast-import < ../fast-import-regression.txt
>
> It is.

I accidentally took this thread off-list.
Looks like we have a real fast-import bug, in Debian Unstable at least.
--
David Barr

^ permalink raw reply

* Re: commit/from command in git-fast-import
From: Jonathan Nieder @ 2012-01-27 21:09 UTC (permalink / raw)
  To: David Barr; +Cc: Mike Hommey, git, Dmitry Ivankov, Sverre Rabbelier
In-Reply-To: <CAFfmPPM_xqZoMd391UdqRtK5bgW5V2z9Mg=8LYLA7ZVZQGR3Mg@mail.gmail.com>

David Barr wrote:
>>> On Sat, Jan 28, 2012 at 1:08 AM, Mike Hommey <mh@glandium.org> wrote:

>>>> This is however not what the manpage suggests in what I quoted in my
>>>> message:
>>>>  Omitting the from command on existing branches is usually desired, as
>>>>  the current commit on that branch is automatically assumed to be the
>>>>  first ancestor of the new commit.
[...]
> Looks like we have a real fast-import bug, in Debian Unstable at least.

Yep, this is a real fast-import documentation bug.  The manual says:

	Omitting the from command in the first commit of a new branch
	will cause fast-import to create that commit with no ancestor.
	This tends to be desired only for the initial commit of a
	project.
[...]
	The special case of restarting an incremental import from the
	current branch value should be written as:

		from refs/heads/branch^0

The unfortunate term here is "existing branches", which seems to have
been intended to refer to refs that have already been populated in
this fast-import stream by a "commit" or "reset" command, rather than
any old ref that already exists in the repository.

In other words, instead of "existing branch", the manual should say
something along the lines of "branch already in fast-import's internal
branch table".

Here's a sketch.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 Documentation/git-fast-import.txt |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index ec6ef311..28a317ff 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -306,9 +306,9 @@ and control the current import process.  More detailed discussion
 (with examples) of each command follows later.
 
 `commit`::
-	Creates a new branch or updates an existing branch by
-	creating a new commit and updating the branch to point at
-	the newly created commit.
+	Creates a new branch or updates a branch by creating a new
+	commit and updating the branch to point at the newly created
+	commit.
 
 `tag`::
 	Creates an annotated tag object from an existing commit or
@@ -317,7 +317,7 @@ and control the current import process.  More detailed discussion
 	in time.
 
 `reset`::
-	Reset an existing branch (or a new branch) to a specific
+	Reset an existing branch or a new branch to a specific
 	revision.  This command must be used to change a branch to
 	a specific revision without making a commit on it.
 
@@ -439,13 +439,15 @@ The `from` command is used to specify the commit to initialize
 this branch from.  This revision will be the first ancestor of the
 new commit.
 
-Omitting the `from` command in the first commit of a new branch
+Omitting the `from` command in the first commit of a branch that
+has not been created previously with a `commit` or `reset` command
 will cause fast-import to create that commit with no ancestor. This
 tends to be desired only for the initial commit of a project.
 If the frontend creates all files from scratch when making a new
 branch, a `merge` command may be used instead of `from` to start
 the commit with an empty tree.
-Omitting the `from` command on existing branches is usually desired,
+Omitting the `from` command on branches that have already been
+initialized in the same stream is usually desired,
 as the current commit on that branch is automatically assumed to
 be the first ancestor of the new commit.
 
-- 
1.7.9.rc2

^ permalink raw reply related

* [ANNOUNCE] Git 1.7.9
From: Junio C Hamano @ 2012-01-27 21:31 UTC (permalink / raw)
  To: git; +Cc: Linux Kernel

The latest feature release Git 1.7.9 is now available at the usual
places.

The release tarballs are found at:

    http://code.google.com/p/git-core/downloads/list

and their SHA-1 checksums are:

ed51ef5ef250daaa6e98515cf2641820cd268d4c  git-1.7.9.tar.gz
c7b1fa20dc501beb2cb5091dd24dbfd2a0013a0c  git-htmldocs-1.7.9.tar.gz
1ca1fc430b2814f9e9cf82ec3bf7f2eaf5209b7a  git-manpages-1.7.9.tar.gz

Also the following public repositories all have a copy of the v1.7.9
tag and the master branch that the tag points at:

  url = git://repo.or.cz/alt-git.git
  url = https://code.google.com/p/git-core/
  url = git://git.sourceforge.jp/gitroot/git-core/git.git
  url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
  url = https://github.com/gitster/git

Have fun.


Git v1.7.9 Release Notes
========================

Updates since v1.7.8
--------------------

 * gitk updates accumulated since early 2011.

 * git-gui updated to 0.16.0.

 * git-p4 (in contrib/) updates.

 * Git uses gettext to translate its most common interface messages
   into the user's language if translations are available and the
   locale is appropriately set. Distributors can drop new PO files
   in po/ to add new translations.

 * The code to handle username/password for HTTP transactions used in
   "git push" & "git fetch" learned to talk "credential API" to
   external programs to cache or store them, to allow integration with
   platform native keychain mechanisms.

 * The input prompts in the terminal use our own getpass() replacement
   when possible. HTTP transactions used to ask for the username without
   echoing back what was typed, but with this change you will see it as
   you type.

 * The internals of "revert/cherry-pick" have been tweaked to prepare
   building more generic "sequencer" on top of the implementation that
   drives them.

 * "git rev-parse FETCH_HEAD" after "git fetch" without specifying
   what to fetch from the command line will now show the commit that
   would be merged if the command were "git pull".

 * "git add" learned to stream large files directly into a packfile
   instead of writing them into individual loose object files.

 * "git checkout -B <current branch> <elsewhere>" is a more intuitive
   way to spell "git reset --keep <elsewhere>".

 * "git checkout" and "git merge" learned "--no-overwrite-ignore" option
   to tell Git that untracked and ignored files are not expendable.

 * "git commit --amend" learned "--no-edit" option to say that the
   user is amending the tree being recorded, without updating the
   commit log message.

 * "git commit" and "git reset" re-learned the optimization to prime
   the cache-tree information in the index, which makes it faster to
   write a tree object out after the index entries are updated.

 * "git commit" detects and rejects an attempt to stuff NUL byte in
   the commit log message.

 * "git commit" learned "-S" to GPG-sign the commit; this can be shown
   with the "--show-signature" option to "git log".

 * fsck and prune are relatively lengthy operations that still go
   silent while making the end-user wait. They learned to give progress
   output like other slow operations.

 * The set of built-in function-header patterns for various languages
   knows MATLAB.

 * "git log --format='<format>'" learned new %g[nNeE] specifiers to
   show information from the reflog entries when walking the reflog
   (i.e. with "-g").

 * "git pull" can be used to fetch and merge an annotated/signed tag,
   instead of the tip of a topic branch. The GPG signature from the
   signed tag is recorded in the resulting merge commit for later
   auditing.

 * "git log" learned "--show-signature" option to show the signed tag
   that was merged that is embedded in the merge commit. It also can
   show the signature made on the commit with "git commit -S".

 * "git branch --edit-description" can be used to add descriptive text
   to explain what a topic branch is about.

 * "git fmt-merge-msg" learned to take the branch description into
   account when preparing a merge summary that "git merge" records
   when merging a local branch.

 * "git request-pull" has been updated to convey more information
   useful for integrators to decide if a topic is worth merging and
   what is pulled is indeed what the requestor asked to pull,
   including:

   - the tip of the branch being requested to be merged;
   - the branch description describing what the topic is about;
   - the contents of the annotated tag, when requesting to pull a tag.

 * "git pull" learned to notice 'pull.rebase' configuration variable,
   which serves as a global fallback for setting 'branch.<name>.rebase'
   configuration variable per branch.

 * "git tag" learned "--cleanup" option to control how the whitespaces
   and empty lines in tag message are cleaned up.

 * "gitweb" learned to show side-by-side diff.

Also contains minor documentation updates and code clean-ups.


Fixes since v1.7.8
------------------

Unless otherwise noted, all the fixes since v1.7.8 in the maintenance
releases are contained in this release (see release notes to them for
details).

^ permalink raw reply

* Re: gitweb showing slash r at the end of line
From: Jakub Narebski @ 2012-01-27 21:35 UTC (permalink / raw)
  To: Ondra Medek; +Cc: git
In-Reply-To: <1327673954458-7229895.post@n2.nabble.com>

Ondra Medek <xmedeko@gmail.com> writes:

> we have gitweb running on Linux box. Some files have Windows line ending
> (CRLF) end we do not use core.autcrlf translation. gitweb show the last \r
> in the end of each line, which is annoying.

Well, this "\r" allows to recognize when file with Windows line ending
(CRLF) made it into repository... which usually is discouraged.  But
if you allow this, I can understand that those "\r" at the end of
every line can be annoying.

A simple _workaround_ would be to create one's own extra stylesheet,
with rule hiding control characters visualization (including "\r"), e.g.

  .cntrl { display: none; }

and stuff thys additional it in @stylesheets via gitweb config file.

> I have created a simple patch to avoid this.

Please read Documentation/SubmittingPatches if you want your work to
be considered for inclusion.  This is not a proper patch -- it lacks
commit message (comments should be outside of it, e.g. between "---"
and diffstat) and signoff.

> It adds just one line. I am not sure if the regexp should
> contain 'g' switch in the end. Also, not sure if there should be some config
> option to switch on/off this?

Note that your patch beside hiding "\r" in the case when file has
Windows line endings, it also hides "\r" in the case where file has
_mixed_ line endings (LF mixed with CRLF, which is incorrect).  Though
handling that well would be quite difficult, I think...

Though esc_html gets passed whole lines, I am not sure if it always
gets passed whole lines and would continue getting passed only whole
lines in the future, so there should be 'g' modifier (or better 'gm'
modifier to make sure that $ matches end of line not only end of
string).

I think it would be better if there was an option to switch hiding
"\r" on and off... though I am not sure if it can be done without
incuring large performance penalty.

> ---
>  gitweb/gitweb.perl |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index abb5a79..92175bc 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -1500,6 +1500,7 @@ sub esc_html {
>         if ($opts{'-nbsp'}) {
>                 $str =~ s/ /&nbsp;/g;
>         }
> +       $str =~ s/\r$//;
>         $str =~ s|([[:cntrl:]])|(($1 ne "\t") ? quot_cec($1) : $1)|eg;
>         return $str;
>  }
> --

Another solution would be to modify quot_cec...

-- 
Jakub Narebski

^ permalink raw reply

* Re: Fwd: Gitweb error
From: Jakub Narebski @ 2012-01-27 21:39 UTC (permalink / raw)
  To: rajesh boyapati; +Cc: git
In-Reply-To: <61c866a5-31a0-4994-ae29-2086f18e707b@o9g2000yqa.googlegroups.com>

rajesh boyapati <boyapatisrajesh@gmail.com> writes:

> We integrated git-web to our gerrit Code-review.
> I installed gitweb using the command:
> $ sudo apt-get install gitweb
> Then I configured gitweb to our gerrit using the command:
> $ git config --file $SITE_PATH/etc/gerrit.config gitweb.cgi /usr/lib/
> cgi-bin/gitweb.cgi
> Now the gitweb is added to gerrit.config and in gerrit config file, it
> looks like
> [gitweb]
>         cgi = /usr/lib/cgi-bin/gitweb.cgi
> Then, restarted gerrit server.

This combination of gitweb (which version?) and Gerrit can be hard to
debug, unfortunately.
 
> When I go to one of the projects in gerrit through gitweb and when I
> click "summary", I am getting the below error.
> If I click other tabs(log, shortlog, commit, tree,etc) after clicking
> "summary", I am getting following error in error-log.
> If I click other tabs(log, shortlog, commit, tree,etc) before clicking
> "summary", everything works fine.
> 
> Error:
> =================================================================
> [2012-01-25 18:50:32,334] ERROR
> com.google.gerrit.httpd.gitweb.GitWebServlet : CGI: [Wed Jan 25
> 18:50:32 2012] gitweb.cgi: Use of uninitialized value $head in string
> eq at /usr/lib/cgi-bin/gitweb.cgi line 4720.

Could you show this line and about 3 lines of context in your
gitweb.cgi?

> [2012-01-25 18:50:35,658] ERROR
> com.google.gerrit.httpd.gitweb.GitWebServlet : CGI: [Wed Jan 25
> 18:50:35 2012] gitweb.cgi: Use of uninitialized value $commit_id in
> open at /usr/lib/cgi-bin/gitweb.cgi line 2817.

Same here.

> [2012-01-25 18:50:35,660] ERROR
> com.google.gerrit.httpd.gitweb.GitWebServlet : CGI: fatal: bad
> revision ''

It looks like gitweb incorrectly gets empty revision
parameter... strange.


-- 
Jakub Narebski

^ permalink raw reply

* A note from the maintainer
From: Junio C Hamano @ 2012-01-27 21:41 UTC (permalink / raw)
  To: git
In-Reply-To: <7vipjwzvc2.fsf@alter.siamese.dyndns.org>

Welcome to git development community.

This message is written by the maintainer and talks about how Git
project is managed, and how you can work with it.

* Mailing list and the community

The development is primarily done on the Git mailing list. Help
requests, feature proposals, bug reports and patches should be sent to
the list address <git@vger.kernel.org>.  You don't have to be
subscribed to send messages.  The convention on the list is to keep
everybody involved on Cc:, so it is unnecessary to say "Please Cc: me,
I am not subscribed".

Before sending patches, please read Documentation/SubmittingPatches
and Documentation/CodingGuidelines to familiarize yourself with the
project convention.

If you sent a patch and you did not hear any response from anybody for
several days, it could be that your patch was totally uninteresting,
but it also is possible that it was simply lost in the noise.  Please
do not hesitate to send a reminder message in such a case.  Messages
getting lost in the noise is a sign that people involved don't have
enough mental/time bandwidth to process them right at the moment, and
it often helps to wait until the list traffic becomes calmer before
sending such a reminder.

The list archive is available at a few public sites:

        http://news.gmane.org/gmane.comp.version-control.git/
        http://marc.theaimsgroup.com/?l=git
        http://www.spinics.net/lists/git/

Some people seem to prefer to read it over NNTP:

        nntp://news.gmane.org/gmane.comp.version-control.git

When you point at a message in a mailing list archive, using
gmane is often the easiest to follow by readers, like this:

        http://thread.gmane.org/gmane.comp.version-control.git/27/focus=217

as it also allows people who subscribe to the mailing list as gmane
newsgroup to "jump to" the article.

Some members of the development community can sometimes also be found
on the #git IRC channel on Freenode.  Its log is available at:

        http://colabti.org/irclogger/irclogger_log/git

* Reporting bugs

When you think git does not behave as you expect, please do not stop
your bug report with just "git does not work".  "I used git in this
way, but it did not work" is not much better, neither is "I used git
in this way, and X happend, which is broken".  It often is that git is
correct to cause X happen in such a case, and it is your expectation
that is broken. People would not know what other result Y you expected
to see instead of X, if you left it unsaid.

Please remember to always state

 - what you wanted to achieve;

 - what you did (the version of git and the command sequence to reproduce
   the behavior);

 - what you saw happen (X above);

 - what you expected to see (Y above); and

 - how the last two are different.

See http://www.chiark.greenend.org.uk/~sgtatham/bugs.html for further
hints.

* Repositories, branches and documentation.

My public git.git repositories are at:

        git://git.kernel.org/pub/scm/git/git.git/
	git://repo.or.cz/alt-git.git/
	https://github.com/git/git/
	https://code.google.com/p/git-core/
	git://git.sourceforge.jp/gitroot/git-core/git.git/
	git://git-core.git.sourceforge.net/gitroot/git-core/git-core/

A few gitweb interfaces are found at:

        http://git.kernel.org/?p=git/git.git
        http://repo.or.cz/w/alt-git.git

Preformatted documentation from the tip of the "master" branch can be
found in:

        git://git.kernel.org/pub/scm/git/git-{htmldocs,manpages}.git/
        git://repo.or.cz/git-{htmldocs,manpages}.git/
        https://code.google.com/p/git-{htmldocs,manpages}.git/
        https://github.com/gitster/git-{htmldocs,manpages}.git/

There are four branches in git.git repository that track the source tree
of git: "master", "maint", "next", and "pu".

The "master" branch is meant to contain what are very well tested and
ready to be used in a production setting.  Every now and then, a "feature
release" is cut from the tip of this branch and they typically are named
with three dotted decimal digits.  The last such release was 1.7.9 done on
Jan 27, 2012. You can expect that the tip of the "master" branch is always
more stable than any of the released versions.

Whenever a feature release is made, "maint" branch is forked off from
"master" at that point.  Obvious, safe and urgent fixes after a feature
release are applied to this branch and maintenance releases are cut from
it.  The maintenance releases are named with four dotted decimal, named
after the feature release they are updates to; the last such release was
1.7.8.4.  New features never go to this branch.  This branch is also
merged into "master" to propagate the fixes forward.

A new development does not usually happen on "master". When you send a
series of patches, after review on the mailing list, a separate topic
branch is forked from the tip of "master" and your patches are queued
there, and kept out of "master" while people test it out. The quality of
topic branches are judged primarily by the mailing list discussions.

Topic branches that are in good shape are merged to the "next" branch. In
general, the "next" branch always contains the tip of "master".  It might
not be quite rock-solid, but is expected to work more or less without major
breakage. The "next" branch is where new and exciting things take place. A
topic that is in "next" is expected to be polished to perfection before it
is merged to "master".

The "pu" (proposed updates) branch bundles all the remaining topic
branches. The topics on the branch are not complete, well tested, nor well
documented and need further work. When a topic that was in "pu" proves to
be in testable shape, it is merged to "next".

You can run "git log --first-parent master..pu" to see what topics are
currently in flight.  Sometimes, an idea that looked promising turns out
to be not so good and the topic can be dropped from "pu" in such a case.

The two branches "master" and "maint" are never rewound, and "next"
usually will not be either.  After a feature release is made from
"master", however, "next" will be rebuilt from the tip of "master"
using the topics that didn't make the cut in the feature release.

Note that being in "next" is not a guarantee to appear in the next
release, nor even in any future release.  There were cases that topics
needed reverting a few commits in them before graduating to "master",
or a topic that already was in "next" was reverted from "next" because
fatal flaws were found in it after it was merged.


* Other people's trees, trusted lieutenants and credits.

Documentation/SubmittingPatches outlines to whom your proposed changes
should be sent.  As described in contrib/README, I would delegate fixes
and enhancements in contrib/ area to the primary contributors of them.

Although the following are included in git.git repository, they have their
own authoritative repository and maintainers:

 - git-gui/ comes from git-gui project, maintained by Pat Thoyts:

        git://repo.or.cz/git-gui.git

 - gitk-git/ comes from Paul Mackerras's gitk project:

        git://git.kernel.org/pub/scm/gitk/gitk.git

I would like to thank everybody who helped to raise git into the current
shape.  Especially I would like to thank the git list regulars whose help
I have relied on and expect to continue relying on heavily:

 - Linus Torvalds, Shawn Pearce, Johannes Schindelin, Nicolas Pitre,
   René Scharfe, Jeff King, Jonathan Nieder, Johan Herland, Johannes
   Sixt, Sverre Rabbelier, Michael J Gruber, Nguyễn Thái Ngọc Duy,
   Ævar Arnfjörð Bjarmason and Thomas Rast on general design and
   implementation issues and reviews on the mailing list.

 - Shawn and Nicolas Pitre on pack issues.

 - Martin Langhoff, Frank Lichtenheld and Ævar Arnfjörð Bjarmason on
   cvsserver and cvsimport.

 - Paul Mackerras on gitk.

 - Eric Wong, David D. Kilzer and Sam Vilain on git-svn.

 - Simon Hausmann and Pete Wyckoff on git-p4.

 - Jakub Narebski, John Hawley, Petr Baudis, Luben Tuikov, Giuseppe Bilotta on
   gitweb.

 - J. Bruce Fields, Jonathan Nieder, Michael J Gruber and Thomas Rast on
   documentation (and countless others for proofreading and fixing).

 - Alexandre Julliard on Emacs integration.

 - David Aguilar and Charles Bailey for taking good care of git-mergetool
   (and Theodore Ts'o for creating it in the first place) and git-difftool.

 - Johannes Schindelin, Johannes Sixt, Erik Faye-Lund, Pat Thoyts and others
   for their effort to move things forward on the Windows front.

 - People on non-Linux platforms for keeping their eyes on portability;
   especially, Randal Schwartz, Theodore Ts'o, Jason Riedy, Thomas Glanzmann,
   Brandon Casey, Jeff King, Alex Riesen and countless others.

^ permalink raw reply

* What's cooking in git.git (Jan 2012, #06; Fri, 27)
From: Junio C Hamano @ 2012-01-27 21:43 UTC (permalink / raw)
  To: git
In-Reply-To: <7vipjwzvc2.fsf@alter.siamese.dyndns.org>

Here are the topics that have been cooking.  Commits prefixed with '-' are
only in 'pu' (proposed updates) while commits prefixed with '+' are in
'next'.

Now 1.7.9 is out, the development cycle for 1.7.10 will start shortly.

Here are the repositories that have my integration branches:

With maint, master, next, pu, todo:

        git://git.kernel.org/pub/scm/git/git.git
        git://repo.or.cz/alt-git.git
        https://code.google.com/p/git-core/
        https://github.com/git/git

With only maint and master:

        git://git.sourceforge.jp/gitroot/git-core/git.git
        git://git-core.git.sourceforge.net/gitroot/git-core/git-core

With all the topics and integration branches:

        https://github.com/gitster/git

The preformatted documentation in HTML and man format are found in:

        git://git.kernel.org/pub/scm/git/git-{htmldocs,manpages}.git/
        git://repo.or.cz/git-{htmldocs,manpages}.git/
        https://code.google.com/p/git-{htmldocs,manpages}.git/
        https://github.com/gitster/git-{htmldocs,manpages}.git/

--------------------------------------------------
[New Topics]

* jl/submodule-re-add (2012-01-24) 1 commit
  (merged to 'next' on 2012-01-26 at 482553e)
 + submodule add: fix breakage when re-adding a deep submodule

Low-impact fix to an old issue. 
Will merge early in the next cycle.

* jn/svn-fe (2012-01-27) 44 commits
 - vcs-svn/svndiff.c: squelch false "unused" warning from gcc
 - Merge branch 'svn-fe' of git://repo.or.cz/git/jrn into jn/svn-fe
 - vcs-svn: reset first_commit_done in fast_export_init
 - Merge branch 'db/text-delta' into svn-fe
 - vcs-svn: do not initialize report_buffer twice
 - Merge branch 'db/text-delta' into svn-fe
 - vcs-svn: avoid hangs from corrupt deltas
 - vcs-svn: guard against overflow when computing preimage length
 - Merge branch 'db/delta-applier' into db/text-delta
 - vcs-svn: implement text-delta handling
 - Merge branch 'db/delta-applier' into db/text-delta
 - Merge branch 'db/delta-applier' into svn-fe
 - vcs-svn: cap number of bytes read from sliding view
 - test-svn-fe: split off "test-svn-fe -d" into a separate function
 - vcs-svn: let deltas use data from preimage
 - vcs-svn: let deltas use data from postimage
 - vcs-svn: verify that deltas consume all inline data
 - vcs-svn: implement copyfrom_data delta instruction
 - vcs-svn: read instructions from deltas
 - vcs-svn: read inline data from deltas
 - vcs-svn: read the preimage when applying deltas
 - vcs-svn: parse svndiff0 window header
 - vcs-svn: skeleton of an svn delta parser
 - vcs-svn: make buffer_read_binary API more convenient
 - vcs-svn: learn to maintain a sliding view of a file
 - Makefile: list one vcs-svn/xdiff object or header per line
 - Merge branch 'db/svn-fe-code-purge' into svn-fe
 - vcs-svn: drop obj_pool
 - vcs-svn: drop treap
 - vcs-svn: drop string_pool
 - vcs-svn: pass paths through to fast-import
 - Merge branch 'db/strbufs-for-metadata' into db/svn-fe-code-purge
 - Merge branch 'db/length-as-hash' (early part) into db/svn-fe-code-purge
 - Merge branch 'db/vcs-svn-incremental' into svn-fe
 - vcs-svn: avoid using ls command twice
 - vcs-svn: use mark from previous import for parent commit
 - vcs-svn: handle filenames with dq correctly
 - vcs-svn: quote paths correctly for ls command
 - vcs-svn: eliminate repo_tree structure
 - vcs-svn: add a comment before each commit
 - vcs-svn: save marks for imported commits
 - vcs-svn: use higher mark numbers for blobs
 - vcs-svn: set up channel to read fast-import cat-blob response
 - Merge commit 'v1.7.5' into svn-fe

Will merge early in the next cycle.

--------------------------------------------------
[Stalled]

* jc/advise-push-default (2011-12-18) 1 commit
 - push: hint to use push.default=upstream when appropriate

Peff had a good suggestion outlining an updated code structure so that
somebody new can try to dip his or her toes in the development. Any
takers?

Waiting for a reroll.

* mh/ref-api-rest (2011-12-12) 35 commits
 . repack_without_ref(): call clear_packed_ref_cache()
 . read_packed_refs(): keep track of the directory being worked in
 . is_refname_available(): query only possibly-conflicting references
 . refs: read loose references lazily
 . read_loose_refs(): take a (ref_entry *) as argument
 . struct ref_dir: store a reference to the enclosing ref_cache
 . sort_ref_dir(): take (ref_entry *) instead of (ref_dir *)
 . do_for_each_ref_in_dir*(): take (ref_entry *) instead of (ref_dir *)
 . add_entry(): take (ref_entry *) instead of (ref_dir *)
 . search_ref_dir(): take (ref_entry *) instead of (ref_dir *)
 . find_containing_direntry(): use (ref_entry *) instead of (ref_dir *)
 . add_ref(): take (ref_entry *) instead of (ref_dir *)
 . read_packed_refs(): take (ref_entry *) instead of (ref_dir *)
 . find_ref(): take (ref_entry *) instead of (ref_dir *)
 . is_refname_available(): take (ref_entry *) instead of (ref_dir *)
 . get_loose_refs(): return (ref_entry *) instead of (ref_dir *)
 . get_packed_refs(): return (ref_entry *) instead of (ref_dir *)
 . refs: wrap top-level ref_dirs in ref_entries
 . get_ref_dir(): keep track of the current ref_dir
 . do_for_each_ref(): only iterate over the subtree that was requested
 . refs: sort ref_dirs lazily
 . sort_ref_dir(): do not sort if already sorted
 . refs: store references hierarchically
 . refs.c: rename ref_array -> ref_dir
 . struct ref_entry: nest the value part in a union
 . check_refname_component(): return 0 for zero-length components
 . free_ref_entry(): new function
 . refs.c: reorder definitions more logically
 . is_refname_available(): reimplement using do_for_each_ref_in_array()
 . names_conflict(): simplify implementation
 . names_conflict(): new function, extracted from is_refname_available()
 . repack_without_ref(): reimplement using do_for_each_ref_in_array()
 . do_for_each_ref_in_arrays(): new function
 . do_for_each_ref_in_array(): new function
 . do_for_each_ref(): correctly terminate while processesing extra_refs

I had to remove this temporarily out of 'pu' as I didn't want to deal with
merge conflicts with the mh/ref-clone-without-extra-refs topic that
removes yet another caller of add_extra_ref() that this series touches.

Will defer till the next cycle.

* ss/git-svn-prompt-sans-terminal (2012-01-04) 3 commits
 - fixup! 15eaaf4
 - git-svn, perl/Git.pm: extend Git::prompt helper for querying users
  (merged to 'next' on 2012-01-05 at 954f125)
 + perl/Git.pm: "prompt" helper to honor GIT_ASKPASS and SSH_ASKPASS

The bottom one has been replaced with a rewrite based on comments from
Ævar. The second one needs more work, both in perl/Git.pm and prompt.c, to
give precedence to tty over SSH_ASKPASS when terminal is available.

Will defer till the next cycle.

* nd/commit-ignore-i-t-a (2012-01-16) 2 commits
 - commit, write-tree: allow to ignore CE_INTENT_TO_ADD while writing trees
 - cache-tree: update API to take abitrary flags

May want to consider this as fixing an earlier UI mistake, and not as a
feature that devides the userbase.

Will defer till the next cycle.

--------------------------------------------------
[Cooking]

* jc/split-blob (2012-01-24) 6 commits
 - chunked-object: streaming checkout
 - chunked-object: fallback checkout codepaths
 - bulk-checkin: support chunked-object encoding
 - bulk-checkin: allow the same data to be multiply hashed
 - new representation types in the packstream
 - varint-in-pack: refactor varint encoding/decoding

Not ready.

I finished the streaming checkout codepath, but as explained in 127b177
(bulk-checkin: support chunked-object encoding, 2011-11-30), these are
still early steps of a long and painful journey. At least pack-objects and
fsck need to learn the new encoding for the series to be usable locally,
and then index-pack/unpack-objects needs to learn it to be used remotely.

Given that I heard a lot of noise that people want large files, and that I
was asked by somebody at GitTogether'11 privately for an advice on how to
pay developers (not me) to help adding necessary support, I am somewhat
dissapointed that the original patch series that was sent almost two
months ago still remains here without much comments and updates from the
developer community. I even made the interface to the logic that decides
where to split chunks easily replaceable, and I deliberately made the
logic in the original patch extremely stupid to entice others, especially
the "bup" fanboys, to come up with a better logic, thinking that giving
people an easy target to shoot for, they may be encouraged to help
out. The plan is not working :-(.

* jl/test-pause (2012-01-17) 1 commit
  (merged to 'next' on 2012-01-20 at ee56335)
 + test-lib: add the test_pause convenience function

Looked reasonable.
Will merge early in the next cycle.

* mh/ref-clone-without-extra-refs (2012-01-17) 4 commits
  (merged to 'next' on 2012-01-20 at 2e9645e)
 + write_remote_refs(): create packed (rather than extra) refs
 + add_packed_ref(): new function in the refs API.
 + ref_array: keep track of whether references are sorted
 + pack_refs(): remove redundant check

Looked reasonable; will hopefully help making mh/ref-api-rest simpler and
cleaner.

Will merge early in the next cycle.

* mm/zsh-completion-regression-fix (2012-01-17) 1 commit
  (merged to 'next' on 2012-01-23 at 7bc2e0a)
 + bash-completion: don't add quoted space for ZSH (fix regression)

Will merge early in the next cycle and deal with any fallout in 'master'.

* ar/i18n-no-gettext (2012-01-27) 4 commits
  (merged to 'next' on 2012-01-27 at 0ecf258)
 + i18n: Do not force USE_GETTEXT_SCHEME=fallthrough on NO_GETTEXT
  (merged to 'next' on 2012-01-23 at 694a94e)
 + i18n: Make NO_GETTEXT imply fallthrough scheme in shell l10n
 + add a Makefile switch to avoid gettext translation in shell scripts
 + git-sh-i18n: restructure the logic to compute gettext.sh scheme

Will merge early in the next cycle and deal with any fallout in 'master'.

* da/maint-mergetool-twoway (2012-01-23) 1 commit
  (merged to 'next' on 2012-01-23 at f927323)
 + mergetool: Provide an empty file when needed

Caters to GUI merge backends that cannot merge two files without
a base by giving them an empty file as a "pretend" common ancestor.

Will merge early in the next cycle and deal with any fallout in 'master'.

* jc/maint-log-first-parent-pathspec (2012-01-19) 1 commit
  (merged to 'next' on 2012-01-20 at fb2b35f)
 + Making pathspec limited log play nicer with --first-parent

A bugfix.
Will merge early in the next cycle.

* ld/git-p4-branches-and-labels (2012-01-20) 5 commits
  (merged to 'next' on 2012-01-23 at 9020ec4)
 + git-p4: label import fails with multiple labels at the same changelist
 + git-p4: add test for p4 labels
 + git-p4: importing labels should cope with missing owner
 + git-p4: cope with labels with empty descriptions
 + git-p4: handle p4 branches and labels containing shell chars
 (this branch is used by va/git-p4-branch.)

Will merge early in the next cycle.

* va/git-p4-branch (2012-01-26) 4 commits
  (merged to 'next' on 2012-01-26 at e67c52a)
 + t9801: do not overuse test_must_fail
 + git-p4: Change p4 command invocation
 + git-p4: Add test case for complex branch import
 + git-p4: Search for parent commit on branch creation
 (this branch uses ld/git-p4-branches-and-labels.)

Rerolled and Acked.
Will merge early in the next cycle.

* sp/smart-http-failure-to-push (2012-01-20) 1 commit
  (merged to 'next' on 2012-01-20 at a892434)
 + remote-curl: Fix push status report when all branches fail

Looked reasonable.
Will merge early in the next cycle.

* ks/sort-wildcard-in-makefile (2012-01-22) 1 commit
  (merged to 'next' on 2012-01-23 at e2e0c1d)
 + t/Makefile: Use $(sort ...) explicitly where needed

Looked reasonable.
Will merge early in the next cycle.

* tr/grep-l-with-decoration (2012-01-23) 1 commit
  (merged to 'next' on 2012-01-23 at 42b8795)
 + grep: fix -l/-L interaction with decoration lines

Looked reasonable.
Will merge early in the next cycle.

* jc/pull-signed-tag (2012-01-23) 1 commit
  (merged to 'next' on 2012-01-23 at 4257553)
 + merge: use editor by default in interactive sessions

Per Linus's strong suggestion, sugarcoated (aka "taking blame for the
original UI screw-ups") so that it is easier for me to swallow and accept
a potentially huge backward incompatibility issue, "git merge" is made to
launch an editor to explain the merge in the merge commit by default in
interactive sessions.

I've updated the special-case environment variable to MERGE_AUTOEDIT that
scripts can set to "no" when they start. There is no plan to encourage
humans to keep using the historical behaviour, hence there is no support
for configuration variable (e.g. merge.autoedit) that can be set to 'no'.
Oh, also I updated the documentation a bit.

Will merge early in the next cycle and deal with any fallout in 'master'.

* nd/maint-refname-in-hierarchy-check (2012-01-11) 1 commit
  (merged to 'next' on 2012-01-20 at acb5611)
 + Fix incorrect ref namespace check

Avoid getting confused by "ref/headxxx" and mistaking it as if it is under
the "refs/heads/" hierarchy.
Will merge early in the next cycle.

* jc/advise-i18n (2011-12-22) 1 commit
  (merged to 'next' on 2012-01-23 at 6447013)
 + i18n of multi-line advice messages

Allow localization of advice messages that tend to be longer and
multi-line formatted. For now this is deliberately limited to advise()
interface and not vreportf() in general as touching the latter has
interactions with error() that has plumbing callers whose prefix "error: "
should never be translated.

Will merge early in the next cycle.

* rr/sequencer (2012-01-11) 2 commits
  (merged to 'next' on 2012-01-23 at f349b56)
 + sequencer: factor code out of revert builtin
 + revert: prepare to move replay_action to header

Moving large chunk of code out of cherry-pick/revert for later reuse,
primarily to prepare for the next cycle.

Will merge early in the next cycle.

* tr/maint-mailinfo (2012-01-16) 2 commits
  (merged to 'next' on 2012-01-20 at 278fae1)
 + mailinfo: with -b, keep space after [foo]
 + am: learn passing -b to mailinfo

Looked reasonable.
Will merge early in the next cycle.

* pw/p4-view-updates (2012-01-11) 5 commits
  (merged to 'next' on 2012-01-20 at 8ca2c7b)
 + git-p4: add tests demonstrating spec overlay ambiguities
 + git-p4: adjust test to adhere to stricter useClientSpec
 + git-p4: clarify comment
 + git-p4: fix verbose comment typo
 + git-p4: only a single ... wildcard is supported

Will merge early in the next cycle.

* rs/diff-postimage-in-context (2012-01-06) 1 commit
  (merged to 'next' on 2012-01-09 at 9635032)
 + xdiff: print post-image for common records instead of pre-image

Looked reasonable.
Will merge early in the next cycle and deal with any fallout in 'master'.

* cb/push-quiet (2012-01-08) 3 commits
  (merged to 'next' on 2012-01-20 at 4326dda)
 + t5541: avoid TAP test miscounting
 + fix push --quiet: add 'quiet' capability to receive-pack
 + server_supports(): parse feature list more carefully

Looked reasonable.
Will merge early in the next cycle.

* nd/clone-detached (2012-01-24) 12 commits
  (merged to 'next' on 2012-01-26 at 7b0cc8a)
 + clone: fix up delay cloning conditions
  (merged to 'next' on 2012-01-23 at bee31c6)
 + push: do not let configured foreign-vcs permanently clobbered
  (merged to 'next' on 2012-01-23 at 9cab64e)
 + clone: print advice on checking out detached HEAD
 + clone: allow --branch to take a tag
 + clone: refuse to clone if --branch points to bogus ref
 + clone: --branch=<branch> always means refs/heads/<branch>
 + clone: delay cloning until after remote HEAD checking
 + clone: factor out remote ref writing
 + clone: factor out HEAD update code
 + clone: factor out checkout code
 + clone: write detached HEAD in bare repositories
 + t5601: add missing && cascade
 (this branch uses nd/clone-single-branch.)

Applied two band-aids to a corner-case regression.
Will merge early in the next cycle and deal with any fallout in 'master'.

* nd/clone-single-branch (2012-01-08) 1 commit
  (merged to 'next' on 2012-01-09 at 6c3c759)
 + clone: add --single-branch to fetch only one branch
 (this branch is used by nd/clone-detached.)

Looked reasonable.
Will merge early in the next cycle.

* jn/gitweb-unspecified-action (2012-01-09) 1 commit
  (merged to 'next' on 2012-01-20 at 2b31714)
 + gitweb: Fix actionless dispatch for non-existent objects

Looked reasonable.
Will merge early in the next cycle.

* nd/index-pack-no-recurse (2012-01-16) 3 commits
  (merged to 'next' on 2012-01-20 at d1e964e)
 + index-pack: eliminate unlimited recursion in get_base_data()
 + index-pack: eliminate recursion in find_unresolved_deltas
 + Eliminate recursion in setting/clearing marks in commit list

Much better explained than the previous round.
Will merge early in the next cycle and deal with any fallout in 'master'.

* cb/git-daemon-tests (2012-01-08) 5 commits
  (merged to 'next' on 2012-01-08 at 1db8351)
 + git-daemon tests: wait until daemon is ready
 + git-daemon: produce output when ready
 + git-daemon: add tests
 + dashed externals: kill children on exit
 + run-command: optionally kill children on exit

Will merge early in the next cycle.

* jk/parse-object-cached (2012-01-06) 3 commits
  (merged to 'next' on 2012-01-08 at 8c6fa4a)
 + upload-pack: avoid parsing tag destinations
 + upload-pack: avoid parsing objects during ref advertisement
 + parse_object: try internal cache before reading object db

These are a bit scary changes, but I do think they are worth doing.
Will merge early in the next cycle and deal with any fallout in 'master'.

^ permalink raw reply

* Re: [PATCH] gitweb: add pf= to limit project list to a subdirectory
From: Jakub Narebski @ 2012-01-27 22:33 UTC (permalink / raw)
  To: Bernhard R. Link; +Cc: git
In-Reply-To: <20120126144517.GA4229@server.brlink.eu>

"Bernhard R. Link" <brl+list+git@mail.brlink.eu> writes:

> This commit changes the project listings (project_list, project_index
> and opml) to limit the output to only projects in a subdirectory if the
> new optional parameter ?pf=directory name is used.

Could you explain why you want this feature, and why for example
project search just does not cut it?
 
> It uses the infrastructure already there for 'forks' (which also filters
> projects but needs a project called like the filter directory to work).

It is not entirely clear for me that what you mean here is (I think)
that using

  git_get_projects_list($project_filter);

just works thanks to forks filtering infrastructure.

> This feature is disabled if strict_export is used and there is no
> projects_list to avoid showing more than intended.
> Without strict_export enabled this change should not show any projects
> one could not get details from anyway. So if the validate_pathname
> checks are not sufficient this would at most make it easier to get a
> list of viewable content.

I don't wuite understand this reasoning.  Why project filtering is
disabled with strict_export?  It should just filter, regardless if
project are from scanning $project_filter subdirectory, or filtering
out project names from $projects_list file that do not begin with
$project_filter prefix.
 
> Reusing $project instead of adding a new parameter would have been
> nicer from a UI point-of-view (including PATH_INFO support) but
> complicate the $project validating code that is currently being
> used to ensure nothing is exported that should not be viewable.

That is I think quite reasonable.
 
> Signed-off-by: Bernhard R. Link <brlink@debian.org>
> 
> ---
> As most parameters are not documented in documentation/gitweb.txt,
> I did not add documentation for this one either.

On the other hand IIRC getting list of projects is quite well
documented in gitweb manpage (or at least it should be).
 
[...]
> @@ -3962,6 +3973,13 @@ sub git_footer_html {
>  			              -class => $feed_class}, $format)."\n";
>  		}
>  
> +	} elsif (defined $project_filter) {
> +		print $cgi->a({-href => href(project=>undef, action=>"opml",
> +		                             project_filter => $project_filter),
> +		              -class => $feed_class}, "OPML") . " ";
> +		print $cgi->a({-href => href(project=>undef, action=>"project_index",
> +		                             project_filter => $project_filter),
> +		              -class => $feed_class}, "TXT") . "\n";
>  	} else {
>  		print $cgi->a({-href => href(project=>undef, action=>"opml"),
>  		              -class => $feed_class}, "OPML") . " ";

I wonder if perhaps a better solution wouldn't be to use -replay=>1 in
generating projects list in other formats (OPML and TXT).

> @@ -5979,7 +5997,7 @@ sub git_project_list {
>  		die_error(400, "Unknown order parameter");
>  	}
>  
> -	my @list = git_get_projects_list();
> +	my @list = git_get_projects_list($project_filter);
>  	if (!@list) {
>  		die_error(404, "No projects found");
>  	}
> @@ -6018,7 +6036,7 @@ sub git_forks {
>  }
>  
>  sub git_project_index {
> -	my @projects = git_get_projects_list();
> +	my @projects = git_get_projects_list($project_filter);
>  	if (!@projects) {
>  		die_error(404, "No projects found");
>  	}
> @@ -7855,7 +7873,7 @@ sub git_atom {
>  }
>  
>  sub git_opml {
> -	my @list = git_get_projects_list();
> +	my @list = git_get_projects_list($project_filter);
>  	if (!@list) {
>  		die_error(404, "No projects found");
>  	}

Nice!

-- 
Jakub Narebski

^ permalink raw reply

* BUG 1.7.9: git branch fails to create new branch when --edit-description is used
From: Mark Jason Dominus @ 2012-01-27 21:52 UTC (permalink / raw)
  To: git


This should work, but doesn't:

        % git branch
        * master
        % git branch  --edit-description  blarf
        [Edit description and exit editor normally]
        % cat .git/BRANCH_DESCRIPTION 
        I like blarf
        # Please edit the description for the branch
        #   blarf
        # Lines starting with '#' will be stripped.
        % git branch -a
        * master

Where is branch blarf?

Creating the branch and editing the description afterwards works correctly:

        % git branch blarf
        % git branch  --edit-description  blarf
        % git branch -a
          blarf
        * master
        % cat .git/config 
        [core]
                repositoryformatversion = 0
                filemode = true
                bare = false
                logallrefupdates = true
        [branch "master"]
                description = I like pie\n
        [branch "blarf"]
                description = I like blarf\n


Mark Jason Dominus 	  			                 mjd@plover.com

^ permalink raw reply

* Re: [PATCH 4/4] config: allow including config from repository blobs
From: Junio C Hamano @ 2012-01-27 23:10 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Jeff King, git
In-Reply-To: <4F2251D4.9060005@viscovery.net>

Johannes Sixt <j.sixt@viscovery.net> writes:

> Am 1/27/2012 6:42, schrieb Jeff King:
>> That being said, I think it would be nicer for projects to carry meta
>> information like this out-of-tree in a special ref. It's just simpler to
>> work with, and it means the project's source isn't polluted with extra
>> junk.
>
> Really? I doubt that carrying configuration in a special ref outside the
> normal contents will have any practical relevance:
>
> To manage such a config file would mean to switch to a branch with
> entirely different contents. But before you can test the new configuration
> in action, you have to commit, switch branches, which exchanges the
> worktree completely; and if the config change didn't work out, repeat the
> process (and if we are talking about source code repository, this usally
> includes a complete rebuild). Sure, you could keep the config branch in a
> separate repository, but, again, how do you test an updated configuration?
> It is not funny, and nobody will go this route.
>
> Which raises doubts about the usefulness of the include.ref feature.

Hmm, good point.

What I envisioned, when I said "meta:gitconfig" might make sense, was to
do something like:

 * have a separate worktree via git-new-worktree in meta/, so that you
   do not have to switch away from the "source" branch and trash the
   working tree for it; and

 * update meta/gitconfig, perhaps make commit there, and possibly push
   it back for public consuption.

In other words, I think "you *could* keep the config branch in a separate
repository" is more like "you would most likely want to have a separate
checkout of the config branch for this 'meta' branch to be useful".

And at that point, as you said, setting include.path = meta/gitconfig
(with possibly adding meta/ in .git/info/exclude) would be far more
pleasant, because you would have a chance to experiment your changes to
the file before committing it.

So having include.ref, while it is a fun thought experiment, would not
help very much in the real life.

^ permalink raw reply


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