* cg-commit does not run pre-commit hook?
From: Wolfgang Denk @ 2006-10-11 20:30 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
Hi,
I noticed that cg-commit does not run the pre-commit hook. Is this
intentional, or am I doing anyhting wrong? When I use git-coimmit
instead the hook is run just fine. This is with git-1.4.2.1 and
cogito-0.18 of FC4 / FC5 systems.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
There are bugs and then there are bugs. And then there are bugs.
- Karl Lehenbauer
^ permalink raw reply
* [PATCH] gitweb: Fix search form when PATH_INFO is enabled
From: Petr Baudis @ 2006-10-11 20:31 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Currently that was broken. Ideal fix would make the search form use
PATH_INFO too, but it's just one insignificant place so it's no big deal if
we don't for now... This at least makes it work.
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
gitweb/gitweb.perl | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index d165fdc..18c0d52 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -445,6 +445,9 @@ sub href(%) {
my %params = @_;
my $href = $my_uri;
+ # XXX: Warning: If you touch this, check the search form for updating,
+ # too.
+
my @mapping = (
project => "p",
action => "a",
@@ -1553,6 +1556,7 @@ #provides backwards capability for those
}
$cgi->param("a", "search");
$cgi->param("h", $search_hash);
+ $cgi->param("p", $project);
print $cgi->startform(-method => "get", -action => $my_uri) .
"<div class=\"search\">\n" .
$cgi->hidden(-name => "p") . "\n" .
^ permalink raw reply related
* Re: [PATCH] gitweb: Do not automatically append " git" to custom site name
From: Jakub Narebski @ 2006-10-11 20:31 UTC (permalink / raw)
To: git
In-Reply-To: <20061011202228.27279.97423.stgit@rover>
Petr Baudis wrote:
> +our $site_name = "++GITWEB_SITENAME++" || "$ENV{'SERVER_NAME'} Git" || "Untitled Git";
I'd use perhaps "[$ENV{'SERVER_NAME'}] Git".
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply
* Re: [PATCH] gitweb: Show project README if available
From: Jakub Narebski @ 2006-10-11 20:33 UTC (permalink / raw)
To: git
In-Reply-To: <7v3b9utzqi.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
>
>> Jeff King wrote:
>>
>>> On Wed, Oct 11, 2006 at 02:23:00PM +0200, Jakub Narebski wrote:
>>>
>>>> Can any Perl expert tell us how Perl truly solve this? What is the best
>>>> way to dump whole [remaining] contents of file (from filehandle) to STDOUT?
>>>
>>> The same you would in C: read fix-sized buffers and dump them.
>> [...]
>>> Or you can use the File::Copy module, which is part of the standard
>>> distribution (and I believe has been so for all perl5 versions, but I
>>> could be wrong):
>>
>> And
>>
>> {
>> local $/;
>> print <$fd>;
>> }
>>
>> doesn't do the right thing?
[...]
> You can strace your Perl to see what yours does yourself:
>
> strace perl -e 'print <STDIN>' >/dev/null <some-huge-file
>
> You will see a bunch of read(0, ..., 4096) and after all of that
> finishes, finally you will see a bunch of write(1, ..., 4096).
> Where do you think the data is in the meantime?
Pity that Perl does this that a way.
Should we use File::Copy thorough the gitweb, instead of using slurp mode?
Well, perhaps except small files, like $GIT_DIR/description...
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply
* [PATCH] gitweb: Make search type a popup menu
From: Petr Baudis @ 2006-10-11 20:58 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
This makes the multiple search types actually usable by the user;
if you don't read the gitweb source, you don't even have an idea
that you can write things like that there.
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
gitweb/gitweb.css | 2 ++
gitweb/gitweb.perl | 61 ++++++++++++++++++++++++++++++++++++++--------------
2 files changed, 47 insertions(+), 16 deletions(-)
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index 3f62b6d..0eda982 100644
--- a/gitweb/gitweb.css
+++ b/gitweb/gitweb.css
@@ -333,6 +333,8 @@ div.index_include {
}
div.search {
+ font-size: 12px;
+ font-weight: normal;
margin: 4px 8px;
position: absolute;
top: 56px;
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 18c0d52..28c7932 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -347,6 +347,13 @@ if (defined $searchtext) {
$searchtext = quotemeta $searchtext;
}
+our $searchtype = $cgi->param('st');
+if (defined $searchtype) {
+ if ($searchtype =~ m/[^a-z]/) {
+ die_error(undef, "Invalid searchtype parameter");
+ }
+}
+
# now read PATH_INFO and use it as alternative to parameters
sub evaluate_path_info {
return if defined $project;
@@ -411,6 +418,7 @@ my %actions = (
"log" => \&git_log,
"rss" => \&git_rss,
"search" => \&git_search,
+ "search_help" => \&git_search_help,
"shortlog" => \&git_shortlog,
"summary" => \&git_summary,
"tag" => \&git_tag,
@@ -460,6 +468,7 @@ sub href(%) {
page => "pg",
order => "o",
searchtext => "s",
+ searchtype => "st",
);
my %mapping = @mapping;
@@ -1562,6 +1571,10 @@ #provides backwards capability for those
$cgi->hidden(-name => "p") . "\n" .
$cgi->hidden(-name => "a") . "\n" .
$cgi->hidden(-name => "h") . "\n" .
+ $cgi->popup_menu(-name => 'st', -default => 'commit',
+ -values => ['commit', 'author', 'committer', 'pickaxe']) .
+ $cgi->sup($cgi->a({-href => href(action=>"search_help")}, "?")) .
+ " search:\n",
$cgi->textfield(-name => "s", -value => $searchtext) . "\n" .
"</div>" .
$cgi->end_form() . "\n";
@@ -3601,18 +3614,8 @@ sub git_search {
die_error(undef, "Unknown commit object");
}
- my $commit_search = 1;
- my $author_search = 0;
- my $committer_search = 0;
- my $pickaxe_search = 0;
- if ($searchtext =~ s/^author\\://i) {
- $author_search = 1;
- } elsif ($searchtext =~ s/^committer\\://i) {
- $committer_search = 1;
- } elsif ($searchtext =~ s/^pickaxe\\://i) {
- $commit_search = 0;
- $pickaxe_search = 1;
-
+ $searchtype ||= 'commit';
+ if ($searchtype eq 'pickaxe') {
# pickaxe may take all resources of your box and run for several minutes
# with every query - so decide by yourself how public you make this feature
my ($have_pickaxe) = gitweb_check_feature('pickaxe');
@@ -3620,23 +3623,24 @@ sub git_search {
die_error('403 Permission denied', "Permission denied");
}
}
+
git_header_html();
git_print_page_nav('','', $hash,$co{'tree'},$hash);
git_print_header_div('commit', esc_html($co{'title'}), $hash);
print "<table cellspacing=\"0\">\n";
my $alternate = 1;
- if ($commit_search) {
+ if ($searchtype eq 'commit' or $searchtype eq 'author' or $searchtype eq 'committer') {
$/ = "\0";
open my $fd, "-|", git_cmd(), "rev-list", "--header", "--parents", $hash or next;
while (my $commit_text = <$fd>) {
if (!grep m/$searchtext/i, $commit_text) {
next;
}
- if ($author_search && !grep m/\nauthor .*$searchtext/i, $commit_text) {
+ if ($searchtype eq 'author' && !grep m/\nauthor .*$searchtext/i, $commit_text) {
next;
}
- if ($committer_search && !grep m/\ncommitter .*$searchtext/i, $commit_text) {
+ if ($searchtype eq 'committer' && !grep m/\ncommitter .*$searchtext/i, $commit_text) {
next;
}
my @commit_lines = split "\n", $commit_text;
@@ -3678,7 +3682,7 @@ sub git_search {
close $fd;
}
- if ($pickaxe_search) {
+ if ($searchtype eq 'pickaxe') {
$/ = "\n";
my $git_command = git_cmd_str();
open my $fd, "-|", "$git_command rev-list $hash | " .
@@ -3738,6 +3742,31 @@ sub git_search {
git_footer_html();
}
+sub git_search_help {
+ git_header_html();
+ git_print_page_nav('','', $hash,$hash,$hash);
+ print <<EOT;
+<dl>
+<dt><b>commit</b></dt>
+<dd>The commit messages and authorship information will be scanned for the given string.</dd>
+<dt><b>author</b></dt>
+<dd>Name and e-mail of the change author and date of birth of the patch will be scanned for the given string.</dd>
+<dt><b>committer</b></dt>
+<dd>Name and e-mail of the committer and date of commit will be scanned for the given string.</dd>
+EOT
+ my ($have_pickaxe) = gitweb_check_feature('pickaxe');
+ if ($have_pickaxe) {
+ print <<EOT;
+<dt><b>pickaxe</b></dt>
+<dd>All commits that caused the string to appear or disappear from any file (changes that
+added, removed or "modified" the string) will be listed. This search can take a while and
+takes a lot of strain on the server, so please use it wisely.</dd>
+EOT
+ }
+ print "</dl>\n";
+ git_footer_html();
+}
+
sub git_shortlog {
my $head = git_get_head_hash($project);
if (!defined $hash) {
^ permalink raw reply related
* Re: Gitweb indentation wrong in Internet Explorer
From: Pazu @ 2006-10-11 20:53 UTC (permalink / raw)
To: git
In-Reply-To: <egjang$nmh$1@sea.gmane.org>
Jakub Narebski wrote:
> Which version of gitweb? We have removed s/ / /g; in esc_html
> subroutine in favor of using "white-space: pre;" in CSS some time ago,
> and we have added escaping FORM FEED and ESCAPE characters.
The problem here is that "white-space: pre" is only supported by IE6 in
standards compliance mode[1], but the DTD declaration for this page:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
surprisingly triggers IE6 quirks mode[2]. A quick fix to this problem
would be changing the doctype declaration to use XHTML 1.0 Transitional
instead of Strict, as that would trigger IE6 standards-compliance mode.
[1]
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/whitespace.asp
[2] http://hsivonen.iki.fi/doctype/
-- Marcus
^ permalink raw reply
* Re: [PATCH] gitweb: Make search type a popup menu
From: Jakub Narebski @ 2006-10-11 21:15 UTC (permalink / raw)
To: git
In-Reply-To: <20061011205817.1855.31725.stgit@rover>
Petr Baudis wrote:
> This makes the multiple search types actually usable by the user;
> if you don't read the gitweb source, you don't even have an idea
> that you can write things like that there.
It is on one hand a good idea, for users who doesn't read gitweb
sources. It is like "advanced search" in web search engines.
On the other hand it confirms the notion that search types are exclusive.
Currently pickaxe search is exclusive with log message search, but it is
not necessary. Search operators (now limited) and combining them gives
great search power... or rather would give.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply
* [PATCH] Removes the <?xml?> declaration from gitweb.pl
From: Pazu @ 2006-10-11 21:13 UTC (permalink / raw)
To: git
In-Reply-To: <egjllu$6k8$1@sea.gmane.org>
The XML declaration forces IE6 into quirks mode, breaking our
nice standards compliant stylesheet.
Signed-off-by: Marcus Brito <pazu@pazu.com.br>
---
gitweb/gitweb.perl | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0ec1eef..ecb3b66 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1357,7 +1357,6 @@ sub git_header_html {
print $cgi->header(-type=>$content_type, -charset => 'utf-8',
-status=> $status, -expires => $expires);
print <<EOF;
-<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<!-- git web interface version $version, (C) 2005-2006, Kay Sievers
<kay.sievers\@vrfy.org>, Christian Gierke -->
--
1.4.2.3
^ permalink raw reply related
* Re: [PATCH] Removes the <?xml?> declaration from gitweb.pl
From: Jakub Narebski @ 2006-10-11 21:27 UTC (permalink / raw)
To: git
In-Reply-To: <egjmri$atp$1@sea.gmane.org>
Pazu wrote:
> The XML declaration forces IE6 into quirks mode, breaking our
> nice standards compliant stylesheet.
But isn't it _required_ by XML/XHTML?
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply
* Re: [RFC] separate .git from working directory
From: Nguyen Thai Ngoc Duy @ 2006-10-11 21:46 UTC (permalink / raw)
To: Martin Waitz; +Cc: git
In-Reply-To: <20061011181425.GA10922@admingilde.org>
On 10/12/06, Martin Waitz <tali@admingilde.org> wrote:
> For subprojects you really need a shared object repository.
> In such a setup b/.git/objects would be a symlink to the parent
> object directory.
>
> On the other hand, you already have the same problem with
> a/.git/objects. If you really want to move .git outside of the
> working directory you can always do so by using a symlink for
> the entire .git directory.
I thought about symlinks. However find will follow symlinks and
traverse .git directories again. My goal is to prevent looking into
.git directories
>
> --
> Martin Waitz
--
Duy
^ permalink raw reply
* Re: [PATCH] gitweb: Restore object-named links in item lists
From: Junio C Hamano @ 2006-10-11 21:48 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
In-Reply-To: <20061011201812.26857.58295.stgit@rover>
I would love to take this but please defer it for now; the patch
does not apply to any of my topic branches (nor "next").
I'd like to stabilize "master" for v1.4.3 this week, and would
like to merge bunch of stuff that are already in "next" to
"master" after that. I'd prefer to come back to gitweb when the
dust settles.
^ permalink raw reply
* [PATCH 2/2] git-svn: -h(elp) message formatting fixes
From: Eric Wong @ 2006-10-11 21:53 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Eric Wong
In-Reply-To: <1160603616126-git-send-email-normalperson@yhbt.net>
'graft-branches' is slightly longer than the rest of the
commands, so the text was squished together in the formatted
output. This patch just adds some more whitespace to make
the text look more pleasant.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
git-svn.perl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 4f6e6a3..84d2c58 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -169,11 +169,11 @@ Usage: $0 <command> [options] [arguments
foreach (sort keys %cmd) {
next if $cmd && $cmd ne $_;
- print $fd ' ',pack('A13',$_),$cmd{$_}->[1],"\n";
+ print $fd ' ',pack('A17',$_),$cmd{$_}->[1],"\n";
foreach (keys %{$cmd{$_}->[2]}) {
# prints out arguments as they should be passed:
my $x = s#[:=]s$## ? '<arg>' : s#[:=]i$## ? '<num>' : '';
- print $fd ' ' x 17, join(', ', map { length $_ > 1 ?
+ print $fd ' ' x 21, join(', ', map { length $_ > 1 ?
"--$_" : "-$_" }
split /\|/,$_)," $x\n";
}
--
1.4.3.rc2.gbe730
^ permalink raw reply related
* [PATCH 1/2] Documentation/git-svn: document some of the newer features
From: Eric Wong @ 2006-10-11 21:53 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Eric Wong
I've forgotten to document many of the features added along the
way in the manpages. This fills in some holes in the
documentation and adds updates some outdated information.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
Documentation/git-svn.txt | 139 +++++++++++++++++++++++++++++++++++++++-----
1 files changed, 123 insertions(+), 16 deletions(-)
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 1cfa3e3..450ff1f 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -37,7 +37,9 @@ COMMANDS
'init'::
Creates an empty git repository with additional metadata
directories for git-svn. The Subversion URL must be specified
- as a command-line argument.
+ as a command-line argument. Optionally, the target directory
+ to operate on can be specified as a second argument. Normally
+ this command initializes the current directory.
'fetch'::
@@ -63,7 +65,30 @@ manually joining branches on commit.
This is advantageous over 'commit' (below) because it produces
cleaner, more linear history.
+'log'::
+ This should make it easy to look up svn log messages when svn
+ users refer to -r/--revision numbers.
+
+ The following features from `svn log' are supported:
+
+ --revision=<n>[:<n>] - is supported, non-numeric args are not:
+ HEAD, NEXT, BASE, PREV, etc ...
+ -v/--verbose - it's not completely compatible with
+ the --verbose output in svn log, but
+ reasonably close.
+ --limit=<n> - is NOT the same as --max-count,
+ doesn't count merged/excluded commits
+ --incremental - supported
+
+ New features:
+
+ --show-commit - shows the git commit sha1, as well
+ --oneline - our version of --pretty=oneline
+
+ Any other arguments are passed directly to `git log'
+
'commit'::
+ You should consider using 'dcommit' instead of this command.
Commit specified commit or tree objects to SVN. This relies on
your imported fetch data being up-to-date. This makes
absolutely no attempts to do patching when committing to SVN, it
@@ -86,12 +111,49 @@ manually joining branches on commit.
directories. The output is suitable for appending to
the $GIT_DIR/info/exclude file.
+'commit-diff'::
+ Commits the diff of two tree-ish arguments from the
+ command-line. This command is intended for interopability with
+ git-svnimport and does not rely on being inside an git-svn
+ init-ed repository. This command takes three arguments, (a) the
+ original tree to diff against, (b) the new tree result, (c) the
+ URL of the target Subversion repository. The final argument
+ (URL) may be omitted if you are working from a git-svn-aware
+ repository (that has been init-ed with git-svn).
+
+'graft-branches'::
+ This command attempts to detect merges/branches from already
+ imported history. Techniques used currently include regexes,
+ file copies, and tree-matches). This command generates (or
+ modifies) the $GIT_DIR/info/grafts file. This command is
+ considered experimental, and inherently flawed because
+ merge-tracking in SVN is inherently flawed and inconsistent
+ across different repositories.
+
+'multi-init'::
+ This command supports git-svnimport-like command-line syntax for
+ importing repositories that are layed out as recommended by the
+ SVN folks. This is a bit more tolerant than the git-svnimport
+ command-line syntax and doesn't require the user to figure out
+ where the repository URL ends and where the repository path
+ begins.
+
+'multi-fetch'::
+ This runs fetch on all known SVN branches we're tracking. This
+ will NOT discover new branches (unlike git-svnimport), so
+ multi-init will need to be re-run (it's idempotent).
+
--
OPTIONS
-------
--
+--shared::
+--template=<template_directory>::
+ Only used with the 'init' command.
+ These are passed directly to gitlink:git-init-db[1].
+
-r <ARG>::
--revision <ARG>::
@@ -115,7 +177,7 @@ git-rev-list --pretty=oneline output can
--rmdir::
-Only used with the 'commit' command.
+Only used with the 'dcommit', 'commit' and 'commit-diff' commands.
Remove directories from the SVN tree if there are no files left
behind. SVN can version empty directories, and they are not
@@ -128,7 +190,7 @@ repo-config key: svn.rmdir
-e::
--edit::
-Only used with the 'commit' command.
+Only used with the 'dcommit', 'commit' and 'commit-diff' commands.
Edit the commit message before committing to SVN. This is off by
default for objects that are commits, and forced on when committing
@@ -139,7 +201,7 @@ repo-config key: svn.edit
-l<num>::
--find-copies-harder::
-Both of these are only used with the 'commit' command.
+Only used with the 'dcommit', 'commit' and 'commit-diff' commands.
They are both passed directly to git-diff-tree see
gitlink:git-diff-tree[1] for more information.
@@ -164,7 +226,26 @@ will abort operation. The user will then
appropriate entry. Re-running the previous git-svn command
after the authors-file is modified should continue operation.
-repo-config key: svn.authors-file
+repo-config key: svn.authorsfile
+
+-q::
+--quiet::
+ Make git-svn less verbose. This only affects git-svn if you
+ have the SVN::* libraries installed and are using them.
+
+--repack[=<n>]::
+--repack-flags=<flags>
+ These should help keep disk usage sane for large fetches
+ with many revisions.
+
+ --repack takes an optional argument for the number of revisions
+ to fetch before repacking. This defaults to repacking every
+ 1000 commits fetched if no argument is specified.
+
+ --repack-flags are passed directly to gitlink:git-repack[1].
+
+repo-config key: svn.repack
+repo-config key: svn.repackflags
-m::
--merge::
@@ -215,6 +296,28 @@ section on
'<<tracking-multiple-repos,Tracking Multiple Repositories or Branches>>'
for more information on using GIT_SVN_ID.
+--follow-parent::
+ This is especially helpful when we're tracking a directory
+ that has been moved around within the repository, or if we
+ started tracking a branch and never tracked the trunk it was
+ descended from.
+
+ This relies on the SVN::* libraries to work.
+
+repo-config key: svn.followparent
+
+--no-metadata::
+ This gets rid of the git-svn-id: lines at the end of every commit.
+
+ With this, you lose the ability to use the rebuild command. If
+ you ever lose your .git/svn/git-svn/.rev_db file, you won't be
+ able to fetch again, either. This is fine for one-shot imports.
+
+ The 'git-svn log' command will not work on repositories using this,
+ either.
+
+repo-config key: svn.nometadata
+
--
COMPATIBILITY OPTIONS
@@ -231,6 +334,9 @@ for tracking the remote.
--no-ignore-externals::
Only used with the 'fetch' and 'rebuild' command.
+This command has no effect when you are using the SVN::*
+libraries with git, svn:externals are always avoided.
+
By default, git-svn passes --ignore-externals to svn to avoid
fetching svn:external trees into git. Pass this flag to enable
externals tracking directly via git.
@@ -264,7 +370,7 @@ Basic Examples
Tracking and contributing to an Subversion managed-project:
------------------------------------------------------------------------
-# Initialize a tree (like git init-db):
+# Initialize a repo (like git init-db):
git-svn init http://svn.foo.org/project/trunk
# Fetch remote revisions:
git-svn fetch
@@ -312,8 +418,8 @@ branches or directories in a Subversion
hack to allow it to track an arbitrary number of related _or_ unrelated
SVN repositories via one git repository. Simply set the GIT_SVN_ID
environment variable to a name other other than "git-svn" (the default)
-and git-svn will ignore the contents of the $GIT_DIR/git-svn directory
-and instead do all of its work in $GIT_DIR/$GIT_SVN_ID for that
+and git-svn will ignore the contents of the $GIT_DIR/svn/git-svn directory
+and instead do all of its work in $GIT_DIR/svn/$GIT_SVN_ID for that
invocation. The interface branch will be remotes/$GIT_SVN_ID, instead of
remotes/git-svn. Any remotes/$GIT_SVN_ID branch should never be modified
by the user outside of git-svn commands.
@@ -341,6 +447,9 @@ This allows you to tie unfetched SVN rev
Advanced Example: Tracking a Reorganized Repository
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Note: this example is now obsolete if you have SVN::* libraries
+installed. Simply use --follow-parent when fetching.
+
If you're tracking a directory that has moved, or otherwise been
branched or tagged off of another directory in the repository and you
care about the full history of the project, then you can read this
@@ -371,20 +480,18 @@ he needed to continue tracking /ufoai/tr
BUGS
----
-If somebody commits a conflicting changeset to SVN at a bad moment
-(right before you commit) causing a conflict and your commit to fail,
-your svn working tree ($GIT_DIR/git-svn/tree) may be dirtied. The
-easiest thing to do is probably just to rm -rf $GIT_DIR/git-svn/tree and
-run 'rebuild'.
+
+If you are not using the SVN::* Perl libraries and somebody commits a
+conflicting changeset to SVN at a bad moment (right before you commit)
+causing a conflict and your commit to fail, your svn working tree
+($GIT_DIR/git-svn/tree) may be dirtied. The easiest thing to do is
+probably just to rm -rf $GIT_DIR/git-svn/tree and run 'rebuild'.
We ignore all SVN properties except svn:executable. Too difficult to
map them since we rely heavily on git write-tree being _exactly_ the
same on both the SVN and git working trees and I prefer not to clutter
working trees with metadata files.
-svn:keywords can't be ignored in Subversion (at least I don't know of
-a way to ignore them).
-
Renamed and copied directories are not detected by git and hence not
tracked when committing to SVN. I do not plan on adding support for
this as it's quite difficult and time-consuming to get working for all
--
1.4.3.rc2.gbe730
^ permalink raw reply related
* Re: [RFC] separate .git from working directory
From: Nguyen Thai Ngoc Duy @ 2006-10-11 21:55 UTC (permalink / raw)
To: Sean; +Cc: git
In-Reply-To: <BAYC1-PASMTP10003954B66E10247020A7AE140@CEZ.ICE>
On 10/11/06, Sean <seanlkml@sympatico.ca> wrote:
> You can export a GIT_DIR manually pretty easily if you want to move
> the .git directory somewhere else. Also you could make a "git find"
> shell script named "gf" that does something like:
>
> #/bin/sh
> find "$@" ! -path '*/.git/*'
>
> Which would let you type "gf -name blah" and automatically ignore
> the .git directory.
It should work. However I would rather use "normal" find than
specialized ones. Imagine somedays I hate find and start to love grep,
I would have to find out --exclude option and create new "gg" script.
In worse cases where recursive commands don't support filtering, I
have no chance to filter out .git directories.
>
> Sean
--
Duy
^ permalink raw reply
* Re: [PATCH] gitweb: Do not automatically append " git" to custom site name
From: Jeff King @ 2006-10-11 22:06 UTC (permalink / raw)
To: Petr Baudis; +Cc: Junio C Hamano, git
In-Reply-To: <20061011202228.27279.97423.stgit@rover>
On Wed, Oct 11, 2006 at 10:22:28PM +0200, Petr Baudis wrote:
> +our $site_name = "++GITWEB_SITENAME++" || "$ENV{'SERVER_NAME'} Git" || "Untitled Git";
This will never show "Untitled" (instead it shows " Git") and will cause
a perl warning if $ENV{SERVER_NAME} is not defined and warnings are
enabled (which tye are in gitweb).
I think this is what you want:
our $site_name = "++GITWEB_SITENAME++" ||
($ENV{SERVER_NAME} || "Untitled") . " Git";
-Peff
^ permalink raw reply
* Re: [PATCH] gitweb: Restore object-named links in item lists
From: Luben Tuikov @ 2006-10-11 22:21 UTC (permalink / raw)
To: Petr Baudis, Junio C Hamano; +Cc: git
In-Reply-To: <20061011201812.26857.58295.stgit@rover>
--- Petr Baudis <pasky@suse.cz> wrote:
> This restores the redundant links removed earlier. It supersedes my patch
> to stick slashes to tree entries.
I NACK this, but it depends on Junio.
BTW, if you so much like to bring this back,
why don't you _revert_ the commit which removed them,
_resolve_, _commit_ and then submit that commit.
The reason is that we know that the original works
and here you're rewriting (untested as opposed
to the original) code.
NACK, I don't see the need for this.
But if this does go in, can you please remove the
"hidden" links so that _less_ identical code is left
to be maintained. (I don't know anyone who's getting
paid to maintain gitweb, do you?)
Luben
>
> Signed-off-by: Petr Baudis <pasky@suse.cz>
> ---
>
> gitweb/gitweb.perl | 42 ++++++++++++++++++++++++++++--------------
> 1 files changed, 28 insertions(+), 14 deletions(-)
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index a11fa38..d8298b9 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -1785,18 +1785,20 @@ sub git_print_tree_entry {
> file_name=>"$basedir$t->{'name'}", %base_key),
> -class => "list"}, esc_html($t->{'name'})) . "</td>\n";
> print "<td class=\"link\">";
> + print $cgi->a({-href => href(action=>"blob", hash=>$t->{'hash'},
> + file_name=>"$basedir$t->{'name'}", %base_key)},
> + "blob");
> if ($have_blame) {
> - print $cgi->a({-href => href(action=>"blame", hash=>$t->{'hash'},
> + print " | " .
> + $cgi->a({-href => href(action=>"blame", hash=>$t->{'hash'},
> file_name=>"$basedir$t->{'name'}", %base_key)},
> - "blame");
> + "blame");
> }
> if (defined $hash_base) {
> - if ($have_blame) {
> - print " | ";
> - }
> - print $cgi->a({-href => href(action=>"history", hash_base=>$hash_base,
> + print " | " .
> + $cgi->a({-href => href(action=>"history", hash_base=>$hash_base,
> hash=>$t->{'hash'}, file_name=>"$basedir$t->{'name'}")},
> - "history");
> + "history");
> }
> print " | " .
> $cgi->a({-href => href(action=>"blob_plain", hash_base=>$hash_base,
> @@ -1811,17 +1813,19 @@ sub git_print_tree_entry {
> esc_html($t->{'name'}));
> print "</td>\n";
> print "<td class=\"link\">";
> + print $cgi->a({-href => href(action=>"tree", hash=>$t->{'hash'},
> + file_name=>"$basedir$t->{'name'}", %base_key)},
> + "tree");
> if (defined $hash_base) {
> - print $cgi->a({-href => href(action=>"history", hash_base=>$hash_base,
> + print " | " .
> + $cgi->a({-href => href(action=>"history", hash_base=>$hash_base,
> file_name=>"$basedir$t->{'name'}")},
> - "history");
> - if ($have_snapshot) {
> - print " | ";
> - }
> + "history");
> }
> if ($have_snapshot) {
> - print $cgi->a({-href => href(action=>"snapshot", hash=>$t->{'hash'})},
> - "snapshot");
> + print " | " .
> + $cgi->a({-href => href(action=>"snapshot", hash=>$t->{'hash'})},
> + "snapshot");
> }
> print "</td>\n";
> }
> @@ -1902,6 +1906,9 @@ sub git_difftree_body {
> print $cgi->a({-href => "#patch$patchno"}, "patch");
> print " | ";
> }
> + print $cgi->a({-href => href(action=>"blob", hash=>$diff{'from_id'},
> + hash_base=>$parent, file_name=>$diff{'file'})},
> + "blob") . " | ";
> print $cgi->a({-href => href(action=>"blame", hash_base=>$parent,
> file_name=>$diff{'file'})},
> "blame") . " | ";
> @@ -1947,6 +1954,9 @@ sub git_difftree_body {
> }
> print " | ";
> }
> + print $cgi->a({-href => href(action=>"blob", hash=>$diff{'to_id'},
> + hash_base=>$hash, file_name=>$diff{'file'})},
> + "blob") . " | ";
> print $cgi->a({-href => href(action=>"blame", hash_base=>$hash,
> file_name=>$diff{'file'})},
> "blame") . " | ";
> @@ -1987,6 +1997,9 @@ sub git_difftree_body {
> }
> print " | ";
> }
> + print $cgi->a({-href => href(action=>"blob", hash=>$diff{'from_id'},
> + hash_base=>$parent, file_name=>$diff{'from_file'})},
> + "blob") . " | ";
> print $cgi->a({-href => href(action=>"blame", hash_base=>$parent,
> file_name=>$diff{'from_file'})},
> "blame") . " | ";
> @@ -2154,6 +2167,7 @@ sub git_shortlog_body {
> href(action=>"commit", hash=>$commit), $ref);
> print "</td>\n" .
> "<td class=\"link\">" .
> + $cgi->a({-href => href(action=>"commit", hash=>$commit)}, "commit") . " | " .
> $cgi->a({-href => href(action=>"commitdiff", hash=>$commit)}, "commitdiff") . " | " .
> $cgi->a({-href => href(action=>"tree", hash=>$commit, hash_base=>$commit)}, "tree");
> if (gitweb_have_snapshot()) {
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [RFC] separate .git from working directory
From: Junio C Hamano @ 2006-10-11 22:22 UTC (permalink / raw)
To: Nguyen Thai Ngoc Duy; +Cc: git
In-Reply-To: <fcaeb9bf0610111446i35251fc9i6517cc5b3b53fe84@mail.gmail.com>
"Nguyen Thai Ngoc Duy" <pclouds@gmail.com> writes:
> I thought about symlinks. However find will follow symlinks and
> traverse .git directories again. My goal is to prevent looking into
> .git directories
I do not think the user (i.e. the developer working in his git
tree or git forest that hosts subprojects) should have to bend
and move .git directories away from the directory structure he
works in just to please the tool (i.e. find). In this case the
tool has an easy way to bend itself to match what the user
wants, which is:
find ... \( -type d -name .git -prune \) -o ...
^ permalink raw reply
* Re: [PATCH] gitweb: Restore object-named links in item lists
From: Jakub Narebski @ 2006-10-11 22:46 UTC (permalink / raw)
To: git
In-Reply-To: <20061011222101.36525.qmail@web31808.mail.mud.yahoo.com>
Luben Tuikov wrote:
> But if this does go in, can you please remove the
> "hidden" links so that _less_ identical code is left
> to be maintained. (I don't know anyone who's getting
> paid to maintain gitweb, do you?)
We could instead save common part of links in the temporary
variable. I quite like those "hidden links", they make area where
we can click larger.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply
* Re: [RFC] separate .git from working directory
From: Sean @ 2006-10-11 22:48 UTC (permalink / raw)
To: Alex Riesen; +Cc: Nguyen Thai Ngoc Duy, git
In-Reply-To: <81b0412b0610110741q698e6512xc8a4188bac0294a4@mail.gmail.com>
On Wed, 11 Oct 2006 16:41:03 +0200
"Alex Riesen" <raa.lkml@gmail.com> wrote:
> You can even leave the name as is: it is impossible to misunderstand
> a file for directory (except on AIX). Or put the information in extended
> attributes.
Actually, if you just make .git a symlink to the real $GIT_DIR find won't
recurse into it.
Sean
^ permalink raw reply
* Re: [RFC] gitweb wishlist and TODO list
From: Jakub Narebski @ 2006-10-11 23:05 UTC (permalink / raw)
To: git
In-Reply-To: <egdge3$t12$1@sea.gmane.org>
4. New features
* Better support for symlinks in the "tree" view, perhaps in the
"_filename_ -> _target_" form instead of simply "_filename_"
if the symlink is relative, and the target is inside repository
(not checking if it exists), "_filename_ -> target" otherwise.
Needs some normalizing (removing of '/./' and '/../') of the symlink
target.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply
* [PATCH] commit: fix a segfault when displaying a commit with unreachable parents
From: Eric Wong @ 2006-10-11 23:16 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Eric Wong
I was running git show on various commits found by fsck-objects
when I found this bug. Since find_unique_abbrev() cannot find
an abbreviation for an object not in the database, it will
return NULL, which is bad to run strlen() on. So instead, we'll
just display the unabbreviated sha1 that we referenced in the
commit.
I'm not sure that this is the best 'fix' for it because the
commit I was trying to show was broken, but I don't think a
program should segfault even if the user tries to do something
stupid.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
commit.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/commit.c b/commit.c
index 5b6e082..a6d543e 100644
--- a/commit.c
+++ b/commit.c
@@ -548,10 +548,13 @@ static int add_merge_info(enum cmit_fmt
while (parent) {
struct commit *p = parent->item;
- const char *hex = abbrev
- ? find_unique_abbrev(p->object.sha1, abbrev)
- : sha1_to_hex(p->object.sha1);
- const char *dots = (abbrev && strlen(hex) != 40) ? "..." : "";
+ const char *hex = NULL;
+ const char *dots;
+ if (abbrev)
+ hex = find_unique_abbrev(p->object.sha1, abbrev);
+ if (!hex)
+ hex = sha1_to_hex(p->object.sha1);
+ dots = (abbrev && strlen(hex) != 40) ? "..." : "";
parent = parent->next;
offset += sprintf(buf + offset, " %s%s", hex, dots);
--
1.4.3.rc2.g823d6-dirty
^ permalink raw reply related
* Re: [PATCH] Removes the <?xml?> declaration from gitweb.pl
From: Pazu @ 2006-10-12 0:26 UTC (permalink / raw)
To: git
In-Reply-To: <egjnk5$bpn$2@sea.gmane.org>
Jakub Narebski wrote:
>> The XML declaration forces IE6 into quirks mode, breaking our
>> nice standards compliant stylesheet.
>
> But isn't it _required_ by XML/XHTML?
As far as I know, it isn't. But even if the specs required it, none of
the popular browsers do, and since we're talking about a web page
intended for presentation (as opposed to automated data processing),
that's what matters.
-- Marcus
^ permalink raw reply
* Re: [PATCH] Removes the <?xml?> declaration from gitweb.pl
From: Pazu @ 2006-10-12 1:08 UTC (permalink / raw)
To: git
In-Reply-To: <egjnk5$bpn$2@sea.gmane.org>
Jakub Narebski wrote:
> But isn't it _required_ by XML/XHTML?
According to the XML 1.0 specification, section 2.8:
[Definition: XML documents should begin with a XML declaration which
specifies the version of XML being used]
I believe that the use of 'should' instead of 'must' here makes it
highly recommended, but not strictly required. Anyway, the comments in
my previous message (the 'browser support is what really matters' part)
remain valid.
-- Marcus
^ permalink raw reply
* Re: cg-commit does not run pre-commit hook?
From: Petr Baudis @ 2006-10-12 1:15 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: git
In-Reply-To: <20061011203054.C5F80353A48@atlas.denx.de>
Hi,
Dear diary, on Wed, Oct 11, 2006 at 10:30:54PM CEST, I got a letter
where Wolfgang Denk <wd@denx.de> said that...
> I noticed that cg-commit does not run the pre-commit hook. Is this
> intentional, or am I doing anyhting wrong? When I use git-coimmit
> instead the hook is run just fine. This is with git-1.4.2.1 and
> cogito-0.18 of FC4 / FC5 systems.
historically, Git and Cogito use a different set of hooks (Cogito got
hooks first but Git picked own names and usage and now is prevalent).
I have plans for making Cogito support Git hooks and slowly deprecate
those own ones for which Git has counterparts, but didn't get to it yet.
I might do today during the more boring lectures... ;-)
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
^ permalink raw reply
* [PATCH] git-svn: add a message encouraging use of SVN::* libraries
From: Eric Wong @ 2006-10-12 1:19 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Eric Wong
I'm using svn 1.4.0-4 in Debian unstable and apparently there's
a regression on the SVN side that prevents a symlink from
becoming a regular file (which git supports, of course).
It's not a noticeable regression for most people, but this broke
the full-svn-tests target in t/Makefile for me.
The SVN::* Perl libraries seem to have matured and improved over
the past year, and git-svn has supported them for several months
now, so with that I encourage all users to start using the
SVN::* Perl libraries with git-svn.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
git-svn.perl | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 84d2c58..a128d90 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -40,8 +40,22 @@ memoize('cmt_metadata');
memoize('get_commit_time');
my ($SVN_PATH, $SVN, $SVN_LOG, $_use_lib);
+
+sub nag_lib {
+ print STDERR <<EOF;
+! Please consider installing the SVN Perl libraries (version 1.1.0 or
+! newer). You will generally get better performance and fewer bugs,
+! especially if you:
+! 1) have a case-insensitive filesystem
+! 2) replace symlinks with files (and vice-versa) in commits
+
+EOF
+}
+
$_use_lib = 1 unless $ENV{GIT_SVN_NO_LIB};
libsvn_load();
+nag_lib() unless $_use_lib;
+
my $_optimize_commits = 1 unless $ENV{GIT_SVN_NO_OPTIMIZE_COMMITS};
my $sha1 = qr/[a-f\d]{40}/;
my $sha1_short = qr/[a-f\d]{4,40}/;
--
1.4.3.rc2.g1cbb0
^ permalink raw reply related
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