We have supported https:// protocol for some time and in 1.4.3
added ftp:// protocol. The transfer were still reported to be
over http.
[jc: Tuncer used substring parameter substitution ${remote%%:*}
but I am deferring it to a later day. We should replace
colon-expr with substring substitution after everybody's shell
can grok it someday, but we are not in a hurry. ]
Signed-off-by: Junio C Hamano <junkio@cox.net>
Grabbing anything that had *arch* in its name into git-arch
package was a wrong idea and we lost git-archive from git-core
by mistake.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Print the rest of commit message (title, i.e. first line of commit
message, is printed separately) only if there is any.
In repository which uses signoffs this shouldn't happen, because
commit message should consist of at least title and signoff.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Filter out commit ID output that git-diff-tree adds when called with
only one <tree-ish> (not only for --stdin) in git_commit and
git_commitdiff.
This also works with older git versions, which doesn't have
--no-commit-id option to git-diff-tree.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Replace calls to git_print_simplified_log with its expansion,
i.e. with calling git_print_log with appropriate options.
Remove no longer used git_print_simplified_log subroutine.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
I incorrectly thought this was hopelessly broken in svn 1.4.0,
but now it's just broken in that the old method didn't work. It
looks like svn propdel and svn propset must be used now and the
(imho) more obvious svn rm --force && svn add no longer works.
"make -C t full-svn-test" should now work.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Acked-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
The test expected "git branch --help" to exit successfully, but
built-ins spawn "man" when given --help, and when the test is
run, manpages may not be installed yet and "man" can legally
exit non-zero in such a case.
Also the new implementation logs "Created from master", instead
of "Created from HEAD" in the reflog, which makes a lot more
sense, so adjust the test to match that.
Signed-off-by: Junio C Hamano <junkio@cox.net>
If the repository includes a README.html file, show it in the summary page.
The usual "this should be in the config file" argument does not apply here
since this can be larger and having such a big string in the config file
would be impractical.
I don't know if this is suitable upstream, but it's one of the repo.or.cz
custom modifications that I've thought could be interesting for others
as well.
Compared to the previous patch, this adds the '.html' extension to the
filename, so that it's clear it is, well, HTML.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
If you customized the site name, you probably do not want the " git"
appended so that the page title is not bastardized; I want repo.or.cz pages
titled "Public Git Hosting", not "Public Git Hosting git" (what's hosting
what?).
This slightly changes the $site_name semantics but only very
insignificantly.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
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>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This restores the redundant links removed earlier. It supersedes my patch
to stick slashes to tree entries.
Sorry about the previous version of the patch, an unrelated snapshot link
addition to tree entries slipped through (and it it didn't even compile);
I've dropped the idea of snapshot links in tree entries in the meantime
anyway.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
* master: (114 commits)
gitweb: Fix setting $/ in parse_commit()
daemon: do not die on older clients.
xdiff/xemit.c (xdl_find_func): Elide trailing white space in a context header.
git-clone: honor --quiet
Documentation for the [remote] config
prune-packed: Fix uninitialized variable.
ignore-errors requires cl
git-send-email: do not pass custom Date: header
Use column indexes in git-cvsserver where necessary.
gitweb: Add '..' (up directory) to tree view if applicable
gitweb: Improve git_print_page_path
pager: default to LESS=FRSX not LESS=FRS
Make prune also run prune-packed
git-vc: better installation instructions
gitweb: Do not esc_html $basedir argument to git_print_tree_entry
gitweb: Whitespace cleanup - tabs are for indent, spaces are for align (2)
Fix usagestring for git-branch
git-merge: show usage if run without arguments
add the capability for index-pack to read from a stream
git-clone: define die() and use it.
...
This replaces git-branch.sh with builtin-branch.c
The changes is basically a patch from Kristian Hgsberg, updated
to apply onto current 'next'
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This replaces the shell script git-cherry with a version written in C.
The behaviour of the new version differs from the original in two
points: it has no long help any more, and it is handling the (optional)
third parameter a bit differently. Basically, it does the equivalent
of
ours=`git-rev-list $ours ^$limit ^$upstream`
instead of
ours=`git-rev-list $ours ^$limit`
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
* maint:
gitweb: Fix setting $/ in parse_commit()
daemon: do not die on older clients.
xdiff/xemit.c (xdl_find_func): Elide trailing white space in a context header.
git-clone: honor --quiet
Documentation for the [remote] config
prune-packed: Fix uninitialized variable.
If the commit couldn't have been read, $/ wasn't restored to \n properly,
causing random havoc like git_get_ref_list() returning the ref names with
trailing \n.
Aside of potential confusion in the body of git_search(), no other $/
surprises are hopefully hidden in the code.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
In the older times, the clients did not say which host they were trying
to connect, and the code we recently added did not quite handle the
older clients correctly.
Noticed by Simon Arlott.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This removes trailing blanks from git-generated diff headers
the same way a similar patch did that for GNU diff:
http://article.gmane.org/gmane.comp.gnu.utils.bugs/13839
That is, it removes trailing blanks on the hunk header line that
shows the function name.
Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
I noticed that a cron-launched "git-clone --quiet" was generating
progress output to standard error -- and thus always spamming me.
The offending output was due to git-clone invoking git-read-tree with
its undocumented -v option.
This change turns off "-v" for --quiet.
Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
The dryrun variable was made local instead of static by the previous
commit, and local variables aren't initialized to zero.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
vc-git complains that it can't find the definition of ignore-errors
unless I (require 'cl). So I guess the correct place to do that is in
the file itself.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
We already generate a Date: header based on when the patch was
emailed. git-format-patch includes the Date: header of the
patch. Having two Date: headers is just confusing, so we
just use the current Date:
Often the mailed patches in a patch series are created over a
series of several hours or days, so the Date: header from the
original commit is incorrect for email, and often far off enough
for spam filters to complain.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Tonight I found a git-cvsserver instance spending a lot of time in
disk IO while trying to process operations against a Git repository
with >30,000 objects contained in it.
Blowing away my SQLLite database and rebuilding all tables with
indexes on the attributes that git-cvsserver frequently runs queries
against seems to have resolved the issue quite nicely.
Since the indexes shouldn't hurt performance on small repositories
and always helps on larger repositories we should just always create
them when creating the revision storage tables.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Adds '..' (up directory) link at the top of "tree" view listing,
if both $hash_base and $file_name are provided, and $file_name
is not empty string.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Add link to "tree root" (root directory) also for not defined name,
for example for "tree" action without defined "file_name" which means
"tree root".
Add " / " at the end of path when $type eq "tree".
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
* np/pack:
add the capability for index-pack to read from a stream
index-pack: compare only the first 20-bytes of the key.
git-repack: repo.usedeltabaseoffset
pack-objects: document --delta-base-offset option
allow delta data reuse even if base object is a preferred base
zap a debug remnant
let the GIT native protocol use offsets to delta base when possible
make pack data reuse compatible with both delta types
make git-pack-objects able to create deltas with offset to base
teach git-index-pack about deltas with offset to base
teach git-unpack-objects about deltas with offset to base
introduce delta objects with offset to base
* maint:
pager: default to LESS=FRSX not LESS=FRS
Make prune also run prune-packed
git-vc: better installation instructions
gitweb: Do not esc_html $basedir argument to git_print_tree_entry
gitweb: Whitespace cleanup - tabs are for indent, spaces are for align (2)
Fix usagestring for git-branch
git-merge: show usage if run without arguments
Both the git-prune manpage and everday.txt say that git-prune should also prune
unpacked objects that are also found in packs, by running git prune-packed.
Junio thought this was "a regression when prune was rewritten as a built-in."
So modify prune to call prune-packed again.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Provide some more detailed installation instructions, for the
elisp-challenged among us.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
In git_tree, rename $base variable (which is passed as $basedir
argument to git_print_tree_entry) to $basedir. Do not esc_html
$basedir, as it is part of file_name ('f') argument in link and not
printed. Add '/' at the end only if $basedir is not empty (it is empty
for top directory) and doesn't end in '/' already.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Code should be aligned the same way, regardless of tab size.
Use tabs for indent, but spaces for align.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
When assigning blames for code movements across file boundaries,
we used to iterate over blame entries (i.e. groups of lines to
be blamed) in the outer loop and compared each entry with paths
in the parent commit in an inner loop. This meant that we
opened the blob data from each path number of times.
Reorganize the loop so that we read the same path only once, and
compare it against all relevant blame entries.
This should perform better, but seems to give mixed results,
though.
Signed-off-by: Junio C Hamano <junkio@cox.net>
After finding out which path in the parent to scan to pass
blames, using get_tree_entry() to extract the blob information
again was quite wasteful, since diff-tree already gave us that
information. Separate the function to create an origin out as
get_origin().
You'll never know what is more efficient unless you try and/or
think hard. I somehow thought that extracting one known path
out of commit's tree is cheaper than running a diff-tree for the
current path between the commit and its parent, but it is not
the case. In real, non-toy projects, most commits do not touch
the path you are interested in, and if the path is a few levels
away from the toplevel, whole-subdirectory comparison logic
diff-tree allows us to skip opening lower subdirectories.
This commit rewrites find_origin() function to use a single-path
diff-tree to see if the parent has the same blob as the current
suspect, which is cheaper than extracting the blob information
using get_tree_entry() and comparing it with what the current
suspect has. This shaves about 6% overhead when annotating
kernel/sched.c in the Linux kernel repository on my machine.
The saving rises to 25% for arch/i386/kernel/Makefile.
Signed-off-by: Junio C Hamano <junkio@cox.net>
It used to be that we can compare the address of the origin
structure to determine if they are the same because they are
always registered with scoreboard. After introduction of the
loop to try finding the best split, that is not true anymore.
The current code has rather serious leaks with origin structure,
but more importantly it gets confused when two origins that
points at the same commit and same path.
We might eventually have to refcount and gc origin, but let's
fix the correctness issue first.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This adds scoring logic to blame_entry to prevent blames on very
trivial chunks (e.g. lots of empty lines, indent followed by a
closing brace) from being passed down to unrelated lines in the
parent.
The current heuristics are quite simple and may need to be
tweaked later, but we need to start somewhere.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Instead of comparing number of lines matched, look at the
matched characters and count alnums, so that we do not pass
blame on not-so-interesting lines, such as an empty line and
a line that is indentation followed by a closing brace.
Add an option --score-debug to show the score of each
blame_entry while we cook this further on the "next" branch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
We would want to be able to refer to the end of the file as
"the beginning of Nth line" for a file that is N lines long.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This patch only adds the streaming capability to index-pack. Although
the code is different it has the exact same functionality as before to
make sure nothing broke.
This is in preparation for receiving packs over the net, parse them on
the fly, fix them up if they are "thin" packs, and keep the resulting
pack instead of exploding it into loose objects. But such functionality
should come separately.
One immediate advantage of this patch is that index-pack can now deal
with packs up to 4GB in size even on 32-bit architectures since the pack
is not entirely mmap()'d all at once anymore.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>