* Re: [PATCH 1/4] config: add include directive
From: Ævar Arnfjörð Bjarmason @ 2012-01-27 9:33 UTC (permalink / raw)
To: Jeff King; +Cc: git
In-Reply-To: <20120127003241.GA15165@sigill.intra.peff.net>
On Fri, Jan 27, 2012 at 01:32, Jeff King <peff@peff.net> wrote:
> On Fri, Jan 27, 2012 at 01:02:52AM +0100, Ævar Arnfjörð Bjarmason wrote:
>
>> On Thu, Jan 26, 2012 at 08:37, Jeff King <peff@peff.net> wrote:
>> > This patch introduces an include directive for config files.
>> > It looks like:
>> >
>> > [include]
>> > path = /path/to/file
>>
>> Very nice, I'd been meaning to resurrect my gitconfig.d series, and
>> this series implements a lot of the structural changes needed for that
>> sort of thing.
>
> Yeah, that seems like a reasonable thing to do. It could make life
> easier for package managers (I think the only reason it has not come up
> much is that there simply isn't a lot of third-party git config).
>
>> What do you think of an option (e.g. include.gitconfig_d = true) that
>> would cause git to look in:
>>
>> /etc/gitconfig.d/*
>> ~/.gitconfig.d/*
>> .git/config.d/*
>
> Hmm. Is that really worth having an option? I.e., why not just always
> check those directories?
You're right, always just including those directories is a much better
option, an extra stat() doesn't cost us much.
Thanks again for working on this.
^ permalink raw reply
* Re: [PATCH 5/5] run-command: Error out if interpreter not found
From: Jonathan Nieder @ 2012-01-27 9:41 UTC (permalink / raw)
To: Frans Klaver; +Cc: Junio C Hamano, Johannes Sixt, git, Jeff King
In-Reply-To: <CAH6sp9O7P8bmYA66fY754mn=ogp8OP1i3KQuE_hnrTY46nNAxw@mail.gmail.com>
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.
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.
> On Fri, Jan 27, 2012 at 9:48 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
>> I want to like (b), but the downside seems unacceptable.
>
> The downside being: having to figure out what execvp is going to do?
> That would be tantamount to writing your own execvp.
Exactly.
>> I honestly
>> don't know if something like (a) would be a good idea if well
>> executed, so I was happy to have the opportunity to try to help
>> massage these patches into a form that would make the answer more
>> obvious.
>
> Given the above information, I'm happy to work on this
I see.
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.
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.
(By the way, can you remind me which one that was?)
Jonathan
[1] http://thread.gmane.org/gmane.comp.version-control.git/179635
^ permalink raw reply
* Re: [RFC/PATCH 0/4] config include directives
From: Ævar Arnfjörð Bjarmason @ 2012-01-27 9:51 UTC (permalink / raw)
To: Jeff King; +Cc: git
In-Reply-To: <20120126073547.GA28689@sigill.intra.peff.net>
On Thu, Jan 26, 2012 at 08:35, Jeff King <peff@peff.net> wrote:
> This series provides a way for config files to include other config
> files in two ways:
>
> 1. From other files in the filesystem. This is implemented by patch 1
> below, and is hopefully straightforward and uncontroversial. See
> that patch for more rationale.
>
> 2. From blobs in the repo. This is implemented by patch 4, with
> patches 2 and 3 providing the necessary refactoring. This
> is one way of implementing the often asked-for "respect shared
> config inside the repo" feature, but attempts to mitigate some of
> the security concerns. The interface for using it safely is a bit
> raw, but I think it's a sane building block, and somebody could
> write a fancier shared-config updater on top of it if they wanted
> to.
>
> [1/4]: config: add include directive
> [2/4]: config: factor out config file stack management
> [3/4]: config: support parsing config data from buffers
> [4/4]: config: allow including config from repository blobs
I expect you've thought about this, but our current API is (from
add.c):
git_config(add_config, NULL);
Followed by:
static int add_config(const char *var, const char *value, void *cb)
{
if (!strcmp(var, "add.ignoreerrors") ||
!strcmp(var, "add.ignore-errors")) {
ignore_add_errors = git_config_bool(var, value);
return 0;
}
return git_default_config(var, value, cb);
}
I.e. that function gets called with one key at a time, and stashes it
to a local value.
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.
^ permalink raw reply
* Re: make install rewrites source files
From: Hallvard B Furuseth @ 2012-01-27 9:46 UTC (permalink / raw)
To: Phillip Susi; +Cc: git
In-Reply-To: <4F1DC2F7.2070502@ubuntu.com>
On Mon, 23 Jan 2012 15:28:39 -0500, Phillip Susi <psusi@ubuntu.com>
wrote:
> On 1/23/2012 9:18 AM, Hallvard Breien Furuseth wrote:
>> However, make install should not write to the source directory in
>> any case. That fails as root if root lacks write access there, due
>> to NFS mounts that map root to nobody etc. At least git-instaweb
>> and GIT-BUILD-OPTIONS are rewritten. You can simulate this with su
>> nobody -s /bin/bash -c 'make -k install' after configuring with
>> prefix=<directory owned by nobody>.
>
> If you want to build locally from a read only nfs mount, then you
> should run the configure script in a local directory:
>
> mkdir /tmp/build
> (...)
Not a read-only nfs mount. Just an ordinary remote mount where root
on the local host is mapped to nobody on the remote host. (Having
local root access does not mean you should get root on the remote.)
In any case, it's normal practice to do as little as possible as root,
and also to at least try not write to the source dir during install.
BTW, building in /tmp can be nasty to other users when you don't know
how much space the build (and maybe test) will use, so you may need
access to some other local dir.
--
Hallvard
^ permalink raw reply
* Re: Test t9500 fails if Time::HiRes is missing
From: Hallvard B Furuseth @ 2012-01-27 10:15 UTC (permalink / raw)
To: Ævar Arnfjörð Bjarmason; +Cc: git, Jakub Narebski
In-Reply-To: <CACBZZX4cjcY5d3mPJAV+rbSTqCEUOrF=_dd3ny_jSM++G-Bg1Q@mail.gmail.com>
On Mon, 23 Jan 2012 10:42:02 +0100, Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> On Mon, Jan 23, 2012 at 05:50, Hallvard Breien Furuseth
> <h.b.furuseth@usit.uio.no> wrote:
>> Or pacify the test and expect gitweb@RHEL-users to install the RPM:
>>
>> --- git-1.7.9.rc2/t/gitweb-lib.sh~
>> +++ git-1.7.9.rc2/t/gitweb-lib.sh
>> @@ -113,4 +113,9 @@
>> test_done
>> }
>>
>> +perl -MTime::HiRes -e 0 >/dev/null 2>&1 || {
>> + skip_all='skipping gitweb tests, Time::HiRes module not
>> available'
>> + test_done
>> +}
>> +
>> gitweb_init
>
> [Adding Jakub to CC]
>
> 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.
Is that relevant? gitweb-lib.sh already has code to pass the tests if
Encode, CGI, CGI::Util or CGI::Carp are missing. I just added another.
--
Hallvard
^ permalink raw reply
* Re: Test t9500 fails if Time::HiRes is missing
From: Jakub Narębski @ 2012-01-27 10:59 UTC (permalink / raw)
To: Hallvard B Furuseth; +Cc: Ævar Arnfjörð Bjarmason, git
In-Reply-To: <69c90e626682e60d33bebcc6d3ff3fdb@ulrik.uio.no>
On Fri, Jan 27, 2012 at 11:15 AM, Hallvard B Furuseth
<h.b.furuseth@usit.uio.no> wrote:
> On Mon, 23 Jan 2012 10:42:02 +0100, Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
>>
>> On Mon, Jan 23, 2012 at 05:50, Hallvard Breien Furuseth
>> <h.b.furuseth@usit.uio.no> wrote:
>>>
>>> Or pacify the test and expect gitweb@RHEL-users to install the RPM:
>>>
>>> --- git-1.7.9.rc2/t/gitweb-lib.sh~
>>> +++ git-1.7.9.rc2/t/gitweb-lib.sh
>>> @@ -113,4 +113,9 @@
>>> test_done
>>> }
>>>
>>> +perl -MTime::HiRes -e 0 >/dev/null 2>&1 || {
>>> + skip_all='skipping gitweb tests, Time::HiRes module not available'
>>> + test_done
>>> +}
>>> +
>>> gitweb_init
>>
>>
>> [Adding Jakub to CC]
>>
>> 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.
>
>
> Is that relevant? gitweb-lib.sh already has code to pass the tests if
> Encode, CGI, CGI::Util or CGI::Carp are missing. I just added another.
The difference is that:
1.) Time::HiRes is a core Perl module, so theoretically it should be always
installed.
2.) Time::HiRes is not really required for gitweb to work, only for optional
feature (timing information).
--
Jakub Narebski
^ permalink raw reply
* 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/ / /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/ / /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
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