Eric Wong [Mon, 12 Jun 2006 12:57:02 +0000 (05:57 -0700)]
git-svn: add UTF-8 message test
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong [Mon, 12 Jun 2006 22:53:13 +0000 (15:53 -0700)]
git-svn: add some functionality to better support branches in svn
New commands:
graft-branches - The most interesting command of the bunch. It
detects branches in SVN via various techniques (currently
regexes and file copies). It can be later extended to handle
svk and other properties people may use to track merges in svk.
Basically, merge tracking is not standardized at all in the SVN
world, and git grafts are perfect for dealing with this
situation.
Existing branch support (via tree matches) is only handled at
fetch time.
The following tow were originally implemented as shell scripts
several months ago, but I just decided to streamline things a
bit and added them to the main script.
multi-init - 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 - 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).
Consider these three to be auxilliary commands (like
show-ignore, and rebuild) so their behavior won't receive as
much testing or scrutiny as the core commands (fetch and
commit).
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong [Wed, 31 May 2006 22:49:56 +0000 (15:49 -0700)]
git-svn: add --shared and --template= options to pass to init-db
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong [Wed, 24 May 2006 09:07:32 +0000 (02:07 -0700)]
git-svn: add --repack and --repack-flags= options
This should help keep disk usage sane for large imports.
--repack takes an optional argument for the interval, it
defaults to 1000 if no argument is specified.
Arguments to --repack-flags are passed directly to git-repack.
No arguments are passed by default.
Idea stolen from git-cvsimport :)
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong [Wed, 24 May 2006 08:40:37 +0000 (01:40 -0700)]
git-svn: minor cleanups, extra error-checking
While we're at it, read_repo_config has been added and
expanded to handle case where command-line arguments are
optional to Getopt::Long
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong [Wed, 24 May 2006 08:22:07 +0000 (01:22 -0700)]
git-svn: Move all git-svn-related paths into $GIT_DIR/svn
Since GIT_SVN_ID usage is probably going to become more
widespread <evil grin>, we won't run the chance of somebody
having a GIT_SVN_ID name that conflicts with one of the default
directories that already exist in $GIT_DIR (branches/tags).
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong [Thu, 4 May 2006 05:54:00 +0000 (22:54 -0700)]
git-svn: support manually placed initial trees from fetch
Sometimes I don't feel like downloading an entire tree again when
I actually decide a branch is worth tracking, so some users can
get around it more easily with this.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong [Fri, 28 Apr 2006 10:51:16 +0000 (03:51 -0700)]
git-svn: optimize --branch and --branch-all-ref
By breaking the pipe read once we've seen a commit twice.
This should make -B/--branch-all-ref faster and usable on a
frequent basis.
We use topological order now for calling git-rev-list, and any
commit we've seen before should imply that all parents have been
seen (at least I hope that's the case for --topo-order).
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong [Fri, 28 Apr 2006 10:42:38 +0000 (03:42 -0700)]
git-svn: --branch-all-refs / -B support
This should make life easier for all those who type:
`git-rev-parse --symbolic --all | xargs -n1 echo -b`
every time they run git-svn fetch.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong [Mon, 15 May 2006 03:00:00 +0000 (20:00 -0700)]
git-svn: support -C<num> passing to git-diff-tree
The repo-config key is 'svn.copysimilarity'
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong [Sat, 3 Jun 2006 09:56:33 +0000 (02:56 -0700)]
git-svn: don't allow commit if svn tree is not current
If new revisions are fetched, that implies we haven't merged,
acked, or nacked them yet, and attempting to write the tree
we're committing means we'd silently clobber the newly fetched
changes.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong [Fri, 2 Jun 2006 22:16:41 +0000 (15:16 -0700)]
git-svn: restore original LC_ALL setting (or unset) for commit
svn forces UTF-8 for commit messages, and with LC_ALL set to 'C'
it is unable to determine encoding of the git commit message.
Now we'll just assume the user has set LC_* correctly for
the commit message they're using.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong [Sat, 10 Jun 2006 06:27:01 +0000 (23:27 -0700)]
git-svn: eol_cp corner-case fixes
If we read the maximum size of our buffer into $buf, and the
last character is '\015', there's a chance that the character is
'\012', which means our regex won't work correctly. At the
worst case, this could introduce an extra newline into the code.
We'll now read an extra character if we see '\015' is the last
character in $buf.
We also forgot to recalculate the length of $buf after doing the
newline substitution, causing some files to appeare truncated.
We'll do that now and force byte semantics in length() for good
measure.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong [Sun, 28 May 2006 22:23:56 +0000 (15:23 -0700)]
git-svn: fix handling of filenames with embedded '@'
svn has trouble parsing files with embedded '@' characters. For
example,
svn propget svn:keywords foo@bar.c
svn: Syntax error parsing revision 'bar.c'
I asked about this on #svn and the workaround suggested was to append
an explicit revision specifier:
svn propget svn:keywords foo@bar.c@BASE
This patch appends '@BASE' to the filename in all calls to 'svn
propget'.
Patch originally by Seth Falcon <sethfalcon@gmail.com>
Seth: signoff?
[ew: Made to work with older svn that don't support peg revisions]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong [Wed, 24 May 2006 01:34:24 +0000 (18:34 -0700)]
git-svn: t0000: add -f flag to checkout
Some changes to the latest git.git made this test croak. So
we'll always just force everything when using a new branch.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Junio C Hamano [Sat, 10 Jun 2006 19:41:54 +0000 (12:41 -0700)]
GIT 1.4.0
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Sat, 10 Jun 2006 18:20:59 +0000 (11:20 -0700)]
Merge git://git.kernel.org/pub/scm/git/gitweb
Rene Scharfe [Sat, 10 Jun 2006 14:13:41 +0000 (16:13 +0200)]
Built-in git-get-tar-commit-id
By being an internal command git-get-commit-id can make use of
struct ustar_header and other stuff and stops wasting precious
disk space.
Note: I recycled one of the two "tar-tree" entries instead of
splitting that cleanup into a separate patch.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Sat, 10 Jun 2006 08:12:50 +0000 (01:12 -0700)]
git-clone: fix --bare over dumb-http
It left an extra .git/ directory under the target directory by
mistake.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Sat, 10 Jun 2006 05:07:23 +0000 (22:07 -0700)]
shared repository - add a few missing calls to adjust_shared_perm().
There were a few calls to adjust_shared_perm() that were
missing:
- init-db creates refs, refs/heads, and refs/tags before
reading from templates that could specify sharedrepository in
the config file;
- updating config file created it under user's umask without
adjusting;
- updating refs created it under user's umask without
adjusting;
- switching branches created .git/HEAD under user's umask
without adjusting.
This moves adjust_shared_perm() from sha1_file.c to path.c,
since a few SIMPLE_PROGRAM need to call repository configuration
functions which in turn need to call adjust_shared_perm().
sha1_file.c needs to link with SHA1 computation library which
is usually not linked to SIMPLE_PROGRAM.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Horst H. von Brand [Sat, 10 Jun 2006 02:15:09 +0000 (22:15 -0400)]
Fix formatting of Documentation/git-clone.txt
Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Fri, 9 Jun 2006 22:26:08 +0000 (15:26 -0700)]
builtin-init-db: spell the in-program configuration variable in lowercase.
Just for consistency -- setup.c spells it in lowercase.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Fri, 9 Jun 2006 04:11:25 +0000 (21:11 -0700)]
git-rm: honor -n flag.
Even when invoked with -n flag, git-rm removed the matching
paths anyway. Also includes the missing check spotted by
SungHyun Nam, which caused it to segfault. Now we refuse to run
without any paths.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Thu, 8 Jun 2006 08:17:01 +0000 (01:17 -0700)]
git-clone: fix duplicated "master" in $GIT_DIR/remotes/origin
Under --use-separate-remote we ended up duplicating the branch
remote HEAD pointed at in $GIT_DIR/remotes/origin file.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Paul T Darga [Thu, 8 Jun 2006 18:14:47 +0000 (14:14 -0400)]
check for error return from fork()
Trivial fixup for fork() callsites which do not check for errors.
Signed-off-by: Paul T Darga <pdarga@umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Uwe Zeisberger [Thu, 8 Jun 2006 06:50:09 +0000 (08:50 +0200)]
Document git-clone --use-separate-remote
Signed-off-by: Uwe Zeisberger <uzeisberger@io.fsforth.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Thu, 8 Jun 2006 03:16:30 +0000 (20:16 -0700)]
Documentation: add another example to git-ls-files
Signed-off-by: Junio C Hamano <junkio@cox.net>
Petr Baudis [Thu, 8 Jun 2006 00:25:21 +0000 (17:25 -0700)]
Documentation: git aliases
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Francis Daly [Wed, 7 Jun 2006 22:28:34 +0000 (23:28 +0100)]
git-cvsserver asciidoc formatting tweaks
No content change here.
html output improved. man output changed.
Signed-off-by: Francis Daly <francis@daoine.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Francis Daly [Wed, 7 Jun 2006 23:15:05 +0000 (00:15 +0100)]
config.txt grammar, typo, and asciidoc fixes
Nothing major.
Signed-off-by: Francis Daly <francis@daoine.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Wed, 7 Jun 2006 23:29:36 +0000 (16:29 -0700)]
Documentation: git-ls-tree (typofix)
spotted by jdl.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Jonas Fonseca [Wed, 7 Jun 2006 19:46:55 +0000 (21:46 +0200)]
Document git-ls-tree --fullname
Additionally, reformat synopsis and remove stub notice.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Petr Baudis [Wed, 7 Jun 2006 18:43:50 +0000 (20:43 +0200)]
Document git aliases support
This patch ports and modifies appropriately the git aliases documentation
from my patch, shall it rest in peace.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Wed, 7 Jun 2006 19:27:53 +0000 (12:27 -0700)]
make clean: remove dist-doc targets.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Jonas Fonseca [Wed, 7 Jun 2006 18:32:33 +0000 (20:32 +0200)]
Misc doc improvements
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Wed, 7 Jun 2006 18:15:10 +0000 (11:15 -0700)]
Documentation: add missing docs make check-docs found.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Francis Daly [Wed, 7 Jun 2006 12:56:45 +0000 (13:56 +0100)]
Some doc typo fixes
All should be clear enough, except perhaps committish / commitish.
I just kept the more-used one within the current docs.
[jc: with rephrasing of check-ref-format description later discussed
on the list]
Signed-off-by: Francis Daly <francis@daoine.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Rene Scharfe [Wed, 7 Jun 2006 18:05:43 +0000 (20:05 +0200)]
Off-by-one error in get_path_prefix(), found by Valgrind
[jc: original fix was done by Pavel and this contains improvements
by Rene.]
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Wed, 7 Jun 2006 06:24:27 +0000 (23:24 -0700)]
Merge git://git.kernel.org/pub/scm/gitk/gitk
* git://git.kernel.org/pub/scm/gitk/gitk:
gitk: Re-read the descendent/ancestor tag & head info on update
gitk: Show branch name(s) as well, if "show nearby tags" is enabled
gitk: Show nearby tags
gitk: Add a goto next/previous highlighted commit function
gitk: Provide ability to highlight based on relationship to selected commit
gitk: Fix bug in highlight stuff when no line is selected
gitk: Move "pickaxe" find function to highlight facility
gitk: Improve the text window search function
gitk: First cut at a search function in the patch/file display window
gitk: Highlight paths of interest in tree view as well
gitk: Highlight entries in the file list as well
gitk: Make a row of controls for controlling highlighting
Nick Hengeveld [Wed, 7 Jun 2006 05:22:35 +0000 (22:22 -0700)]
http-fetch: fix possible segfault
Initialize an object request's slot to a safe value. A non-NULL value
can cause a segfault if the request is aborted before it starts.
Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Jon Loeliger [Wed, 7 Jun 2006 03:58:41 +0000 (22:58 -0500)]
Refactor git_tcp_connect() functions a little.
Add client side sending of "\0host=%s\0" extended
arg for git native protocol, backwards compatibly.
Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Tue, 6 Jun 2006 23:42:52 +0000 (16:42 -0700)]
Merge branch 'jc/lockfile'
* jc/lockfile:
ref-log: style fixes.
refs.c: convert it to use lockfile interface.
Make index file locking code reusable to others.
Junio C Hamano [Tue, 6 Jun 2006 23:42:46 +0000 (16:42 -0700)]
Merge branch 'js/alias'
* js/alias:
git alias: try alias last.
If you have a config containing something like this:
Junio C Hamano [Tue, 6 Jun 2006 23:42:33 +0000 (16:42 -0700)]
Merge branch 'vb/sendemail'
* vb/sendemail:
send-email: a bit more careful domain regexp.
send-email: be more lenient and just catch obvious mistakes.
Cleanup git-send-email.perl:extract_valid_email
Robert Fitzsimons [Tue, 6 Jun 2006 23:15:16 +0000 (23:15 +0000)]
builtin-grep: pass ignore case option to external grep
Don't just read the --ignore-case/-i option, pass the flag on to the
external grep program.
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Paul Mackerras [Tue, 6 Jun 2006 23:19:45 +0000 (09:19 +1000)]
gitk: Re-read the descendent/ancestor tag & head info on update
Signed-off-by: Paul Mackerras <paulus@samba.org>
Junio C Hamano [Tue, 6 Jun 2006 21:04:17 +0000 (14:04 -0700)]
ref-log: style fixes.
A few style fixes to get the code in line with the rest.
- asterisk to make a type a pointer to something goes in front
of the variable, not at the end of the base type.
E.g. a pointer to an integer is "int *ip", not "int* ip".
- open parenthesis for function parameter list, unlike
syntactic constructs, comes immediately after the function
name. E.g. "if (foo) bar();" not "if(foo) bar ();".
- "else" does not come on the same line as the closing brace of
corresponding "if".
The style is mostly a matter of personal taste, and people may
disagree, but consistency is important.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Tue, 6 Jun 2006 20:54:14 +0000 (13:54 -0700)]
refs.c: convert it to use lockfile interface.
This updates the ref locking code to use creat-rename locking
code we use for the index file, so that it can borrow the code
to clean things up upon signals and program termination.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Tue, 6 Jun 2006 19:51:49 +0000 (12:51 -0700)]
Make index file locking code reusable to others.
The framework to create lockfiles that are removed at exit is
first used to reliably write the index file, but it is
applicable to other things, so stop calling it "cache_file".
This also rewords a few remaining error message that called the
index file "cache file".
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Tue, 6 Jun 2006 21:26:57 +0000 (14:26 -0700)]
HTTP cleanup
This ifdef's out more functions that are not used while !USE_MULTI
in http code. Also the dependency of http related objects on http.h
header file was missing in the Makefile.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Nick Hengeveld [Tue, 6 Jun 2006 16:41:32 +0000 (09:41 -0700)]
HTTP cleanup
Fix broken build when USE_CURL_MULTI is not defined, as noted by Becky Bruce.
During cleanup, free header slist that was created during init, as noted
by Junio.
Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Tue, 6 Jun 2006 15:46:23 +0000 (08:46 -0700)]
git-format-patch: add --output-directory long option again
Additionally notices and complains to an -o option without
directory or a duplicated -o option, -o and --stdout given
together. Also delays the creation of directory until all
arguments are parsed, so that the command does not leave an
empty directory behind when it exits after seeing an unrelated
invalid option.
[jc: originally from Dennis Stosberg but with minor fixes, and
documentation updates from Dennis.]
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Tue, 6 Jun 2006 21:12:46 +0000 (14:12 -0700)]
send-email: a bit more careful domain regexp.
This tightens the regexp a bit to make sure there is no double dots.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Tue, 6 Jun 2006 07:05:56 +0000 (00:05 -0700)]
send-email: be more lenient and just catch obvious mistakes.
This cleans up the pattern matching subroutine by introducing
two variables to hold regexp to approximately match local-part
and domain in the e-mail address. It is meant to catch obvious
mistakes with a cheap check.
The patch also moves "scalar" to force Email::Valid->address()
to work in !wantarray environment to extract_valid_address;
earlier it was in the caller of the subroutine, which was way
too error prone.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Tue, 6 Jun 2006 05:36:21 +0000 (22:36 -0700)]
rev-parse: tighten constness properly.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Sean [Wed, 24 May 2006 22:04:38 +0000 (18:04 -0400)]
A Perforce importer for git.
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Tue, 6 Jun 2006 01:09:40 +0000 (18:09 -0700)]
git alias: try alias last.
This disables alias "foo" from being used for git-foo, and when
we do use alias we check the built-in and then existing command
names first and then alias as the fallback. This avoids the
problem of common commands used in scripts getting clobbered by
user specific aliases.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Johannes Schindelin [Mon, 5 Jun 2006 17:43:52 +0000 (19:43 +0200)]
If you have a config containing something like this:
[alias]
l = "log --stat -M ORIG_HEAD.."
you can call
git l
and it will do the same as
git log --stat -M ORIG_HEAD..
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Nick Hengeveld [Mon, 5 Jun 2006 20:02:29 +0000 (13:02 -0700)]
builtin-push: don't pass --thin to HTTP transport
git-http-push does not currently use packs to transfer objects.
Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Linus Torvalds [Mon, 5 Jun 2006 19:03:31 +0000 (12:03 -0700)]
pack-objects: improve path grouping heuristics.
This trivial patch not only simplifies the name hashing, it actually
improves packing for both git and the kernel.
The git archive pack shrinks from
6824090->
6622627 bytes (a 3%
improvement), and the kernel pack shrinks from
108756213 to
108219021 (a
mere 0.5% improvement, but still, it's an improvement from making the
hashing much simpler!)
We just create a 32-bit hash, where we "age" previous characters by two
bits, so the last characters in a filename count most. So when we then
compare the hashes in the sort routine, filenames that end the same way
sort the same way.
It takes the subdirectory into account (unless the filename is > 16
characters), but files with the same name within the same subdirectory
will obviously sort closer than files in different subdirectories.
And, incidentally (which is why I tried the hash change in the first
place, of course) builtin-rev-list.c will sort fairly close to rev-list.c.
And no, it's not a "good hash" in the sense of being secure or unique, but
that's not what we're looking for. The whole "hash" thing is misnamed
here. It's not so much a hash as a "sorting number".
[jc: rolled in simplification for computing the sorting number
computation for thin pack base objects]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Linus Torvalds [Mon, 5 Jun 2006 18:44:36 +0000 (11:44 -0700)]
rev-list: fix process_tree() conversion.
The tree-walking conversion of the "process_tree()" function
broke packing by using an unrelated variable from outer scope.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Linus Torvalds [Mon, 5 Jun 2006 19:47:49 +0000 (12:47 -0700)]
Fix typo in tutorial-2.txt
This should be obvious enough.
I didn't actually _test_ the tutorial, but if the old command worked,
something is really wrong!
Signed-off-by: Linus "Duh!" Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Horst H. von Brand [Mon, 5 Jun 2006 02:10:33 +0000 (22:10 -0400)]
Fix Documentation/everyday.txt: Junio's workflow
The workflow for Junio was badly formatted.
Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Horst H. von Brand [Sun, 4 Jun 2006 23:53:45 +0000 (19:53 -0400)]
Add example xinetd(8) configuration to Documentation/everyday.txt
Many Linux distributions use xinetd(8), not inetd(8).
Give a sample configuration file.
Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Linus Torvalds [Sun, 4 Jun 2006 17:48:31 +0000 (10:48 -0700)]
read-tree: fix eye-candy.
Anton Blanchard spotted that watching checkout stage of a clone
on a slow terminal takes ages because it forgot to clear the
"once a second happened" flag, so instead of updates the
percentage output for every file it checks out after the first
second has passed.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Aneesh Kumar K.V [Sun, 4 Jun 2006 18:07:48 +0000 (23:37 +0530)]
gitview: Add some useful keybindings.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Horst H. von Brand [Sat, 3 Jun 2006 17:11:48 +0000 (13:11 -0400)]
Cleanup git-send-email.perl:extract_valid_email
- Fix the regular expressions for local addresses
- Fix the fallback regexp for non-local addresses, simplify the logic
Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Sun, 4 Jun 2006 06:59:27 +0000 (23:59 -0700)]
Merge branch 'lt/tree-2'
* lt/tree-2:
fetch.c: do not call process_tree() from process_tree().
tree_entry(): new tree-walking helper function
adjust to the rebased series by Linus.
Remove "tree->entries" tree-entry list from tree parser
Switch "read_tree_recursive()" over to tree-walk functionality
Make "tree_entry" have a SHA1 instead of a union of object pointers
Add raw tree buffer info to "struct tree"
Remove last vestiges of generic tree_entry_list
Convert fetch.c: process_tree() to raw tree walker
Convert "mark_tree_uninteresting()" to raw tree walker
Remove unused "zeropad" entry from tree_list_entry
fsck-objects: avoid unnecessary tree_entry_list usage
Remove "tree->entries" tree-entry list from tree parser
builtin-read-tree.c: avoid tree_entry_list in prime_cache_tree_rec()
Switch "read_tree_recursive()" over to tree-walk functionality
Make "tree_entry" have a SHA1 instead of a union of object pointers
Make "struct tree" contain the pointer to the tree buffer
Junio C Hamano [Sun, 4 Jun 2006 06:59:03 +0000 (23:59 -0700)]
Merge branch 'sp/reflog'
* sp/reflog:
fetch.c: do not pass uninitialized lock to unlock_ref().
Test that git-branch -l works.
Verify git-commit provides a reflog message.
Enable ref log creation in git checkout -b.
Create/delete branch ref logs.
Include ref log detail in commit, reset, etc.
Change order of -m option to update-ref.
Correct force_write bug in refs.c
Change 'master@noon' syntax to 'master@{noon}'.
Log ref updates made by fetch.
Force writing ref if it doesn't exist.
Added logs/ directory to repository layout.
General ref log reading improvements.
Fix ref log parsing so it works properly.
Support 'master@2 hours ago' syntax
Log ref updates to logs/refs/<ref>
Convert update-ref to use ref_lock API.
Improve abstraction of ref lock/write.
Junio C Hamano [Sun, 4 Jun 2006 06:58:26 +0000 (23:58 -0700)]
Merge branch 'ff/svnimport'
* ff/svnimport:
git-svnimport: Improved detection of merges.
Junio C Hamano [Sat, 3 Jun 2006 08:49:31 +0000 (01:49 -0700)]
read-tree --reset: update working tree file for conflicted paths.
The earlier "git reset --hard" simplification stopped removing
leftover working tree files from a failed automerge, when
switching back to the HEAD version that does not have the
paths.
This patch, instead of removing the unmerged paths from the
index, drops them down to stage#0 but marks them with mode=0
(the same "to be deleted" marker we internally use for paths
deleted by the merge). one_way_merge() function and the
functions it calls already know what to do with them -- if the
tree we are reading has the path the working tree file is
overwritten, and if it doesn't the working tree file is
removed.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Sun, 4 Jun 2006 06:57:15 +0000 (23:57 -0700)]
Merge branch 'jc/fmt-patch'
* jc/fmt-patch:
Update documentation for git-format-patch
format-patch: resurrect extra headers from config
format-patch --signoff
Horst H. von Brand [Sat, 3 Jun 2006 20:27:26 +0000 (16:27 -0400)]
Documentation: Spelling fixes
Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Christian Couder [Sat, 3 Jun 2006 16:45:43 +0000 (18:45 +0200)]
Builtin git-rev-parse.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Sun, 4 Jun 2006 06:44:40 +0000 (23:44 -0700)]
fetch: do not report "same" unless -verbose.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Paul Mackerras [Sun, 4 Jun 2006 01:50:38 +0000 (11:50 +1000)]
gitk: Show branch name(s) as well, if "show nearby tags" is enabled
This is a small extension to the code that reads the complete commit
graph, to make it compute descendent heads as well as descendent tags.
We don't exclude descendent heads that are descendents of other
descendent heads as we do for tags, since it is useful to know all the
branches that a commit is on.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Sat, 3 Jun 2006 09:11:13 +0000 (19:11 +1000)]
gitk: Show nearby tags
This adds a feature to the diff display window where it will show
the tags that this commit follows (is a descendent of) and precedes
(is an ancestor of). Specifically, it will show the tags for all
tagged descendents that are not a descendent of another tagged
descendent of this commit, and the tags for all tagged ancestors
that are not ancestors of another tagged ancestor of this commit.
To do this, gitk reads the complete commit graph using git rev-list
and performs a couple of traversals of the tree. This is done in
the background, but since it can be time-consuming, there is an option
to turn it off in the `edit preferences' window.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Junio C Hamano [Sat, 3 Jun 2006 01:17:35 +0000 (18:17 -0700)]
Merge branch 'ds/doc' into jc/fmt-patch
* ds/doc:
Update documentation for git-format-patch
sha1_file: avoid re-preparing duplicate packs
handle concurrent pruning of packed objects
http: prevent segfault during curl handle reuse
Remove possible segfault in http-fetch.
gitk: show_error fix
[PATCH] gitk: start-up bugfix
[PATCH] gitk: Replace "git-" commands with "git "
[PATCH] gitk: Display commit messages with word wrap
gitk: Fix bug where page-up/down wouldn't always work properly
gitk: Fix display of "(...)" for parents/children we haven't drawn
send-email: only 'require' instead of 'use' Net::SMTP
Allow multiple -m options to git-commit.
Dennis Stosberg [Wed, 31 May 2006 14:14:08 +0000 (16:14 +0200)]
Update documentation for git-format-patch
[jc: adjusted for recently resurrected features]
Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Fri, 2 Jun 2006 22:23:47 +0000 (15:23 -0700)]
fetch.c: do not call process_tree() from process_tree().
This function reads a freshly fetched tree object, and schedules
the objects pointed by it for further fetching, so doing
lookup_tree() and process_tree() recursively from there does not
make much sense. We need to use process() on it to make sure we
fetch it first, and leave the recursive processing to later
stages.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Jeff King [Fri, 2 Jun 2006 16:49:32 +0000 (12:49 -0400)]
sha1_file: avoid re-preparing duplicate packs
When adding packs, skip the pack if we already have it in the packed_git
list. This might happen if we are re-preparing our packs because of a
missing object.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Jeff King [Fri, 2 Jun 2006 15:32:23 +0000 (11:32 -0400)]
handle concurrent pruning of packed objects
This patch causes read_sha1_file and sha1_object_info to re-examine the
list of packs if an object cannot be found. It works by re-running
prepare_packed_git() after an object fails to be found.
It does not attempt to clean up the old pack list. Old packs which are in
use can continue to be used (until unused by lru selection). New packs
are placed at the front of the list and will thus be examined before old
packs.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Fri, 2 Jun 2006 17:31:15 +0000 (10:31 -0700)]
Merge branch 'nh/http'
* nh/http:
http: prevent segfault during curl handle reuse
Remove possible segfault in http-fetch.
Johannes Schindelin [Fri, 2 Jun 2006 13:21:17 +0000 (15:21 +0200)]
format-patch: resurrect extra headers from config
Once again, if you have
[format]
headers = "Origamization: EvilEmpire\n"
format-patch will add these headers just after the "Subject:" line.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Thu, 1 Jun 2006 05:27:26 +0000 (22:27 -0700)]
Merge git://git.kernel.org/pub/scm/gitk/gitk
* git://git.kernel.org/pub/scm/gitk/gitk:
gitk: show_error fix
[PATCH] gitk: start-up bugfix
[PATCH] gitk: Replace "git-" commands with "git "
[PATCH] gitk: Display commit messages with word wrap
gitk: Fix bug where page-up/down wouldn't always work properly
gitk: Fix display of "(...)" for parents/children we haven't drawn
Nick Hengeveld [Wed, 31 May 2006 23:25:03 +0000 (16:25 -0700)]
http: prevent segfault during curl handle reuse
If a curl handle is configured with special options, they may reference
information that is freed after the request is complete which can cause
a segfault if the curl handle is reused for a different type of request.
This patch resets these options to a safe state when a transfer slot is
assigned to a new request.
Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Johannes Schindelin [Wed, 31 May 2006 22:55:47 +0000 (00:55 +0200)]
send-email: only 'require' instead of 'use' Net::SMTP
This was proposed by Eric Wong and fixes the test. (Of course, git-send-email
does not work, if there is no Net::SMTP here, but it will say what is wrong
when you actually try to use send-email.)
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Shawn Pearce [Mon, 29 May 2006 08:45:49 +0000 (04:45 -0400)]
Allow multiple -m options to git-commit.
I find it very convenient to be able to supply multiple paragraphs
of text on the command line with a single git-commit call. This
change permits multiple -m/--message type options to be supplied
to git-commit with each message being added as its own paragraph
of text in the commit message.
The -m option is still not permitted with -c/-C/-F nor are multiple
occurrences of these options permitted.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Wed, 31 May 2006 22:23:44 +0000 (15:23 -0700)]
fetch.c: do not pass uninitialized lock to unlock_ref().
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Wed, 31 May 2006 22:11:49 +0000 (15:11 -0700)]
format-patch --signoff
This resurrects --signoff option to format-patch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Florian Forster [Wed, 31 May 2006 10:32:08 +0000 (12:32 +0200)]
git-svnimport: Improved detection of merges.
The regexes detecting merges (while still relying on the commit messages,
though) have been improved to catch saner (and hopefully more) messages. The
old regex was so generic that it often matched something else and missed the
actual merge-message.
Also, the regex given with the `-M' commandline-option is checked first:
Explicitely given regexes should be considered better than the builtin ones,
and should therefore be given a chance to match a message first.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Shawn Pearce [Mon, 29 May 2006 07:17:18 +0000 (03:17 -0400)]
Improved pack format documentation.
While trying to implement a pack reader in Java I was mislead by
some facts listed in this documentation as well as found a few
details to be missing about the pack header.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Linus Torvalds [Tue, 30 May 2006 16:45:45 +0000 (09:45 -0700)]
tree_entry(): new tree-walking helper function
This adds a "tree_entry()" function that combines the common operation of
doing a "tree_entry_extract()" + "update_tree_entry()".
It also has a simplified calling convention, designed for simple loops
that traverse over a whole tree: the arguments are pointers to the tree
descriptor and a name_entry structure to fill in, and it returns a boolean
"true" if there was an entry left to be gotten in the tree.
This allows tree traversal with
struct tree_desc desc;
struct name_entry entry;
desc.buf = tree->buffer;
desc.size = tree->size;
while (tree_entry(&desc, &entry) {
... use "entry.{path, sha1, mode, pathlen}" ...
}
which is not only shorter than writing it out in full, it's hopefully less
error prone too.
[ It's actually a tad faster too - we don't need to recalculate the entry
pathlength in both extract and update, but need to do it only once.
Also, some callers can avoid doing a "strlen()" on the result, since
it's returned as part of the name_entry structure.
However, by now we're talking just 1% speedup on "git-rev-list --objects
--all", and we're definitely at the point where tree walking is no
longer the issue any more. ]
NOTE! Not everybody wants to use this new helper function, since some of
the tree walkers very much on purpose do the descriptor update separately
from the entry extraction. So the "extract + update" sequence still
remains as the core sequence, this is just a simplified interface.
We should probably add a silly two-line inline helper function for
initializing the descriptor from the "struct tree" too, just to cut down
on the noise from that common "desc" initializer.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Dmitry V. Levin [Mon, 29 May 2006 00:34:34 +0000 (04:34 +0400)]
git_exec_path, execv_git_cmd: ignore empty environment variables
Ignoring empty environment variables is good common practice.
Ignoring --exec-path with empty argument won't harm, too:
if user means current directory, there is a "--exec-path=."
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Dmitry V. Levin [Tue, 30 May 2006 14:58:52 +0000 (18:58 +0400)]
execv_git_cmd: Fix stack buffer overflow.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Salikh Zakirov [Sat, 27 May 2006 17:57:29 +0000 (21:57 +0400)]
Fixed Cygwin CR-munging problem in mailsplit
Do not open mailbox file as fopen(..., "rt")
as this strips CR characters from the diff,
thus breaking the patch context for changes
in CRLF files.
Signed-off-by: Salikh Zakirov <Salikh.Zakirov@Intel.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Kay Sievers [Tue, 30 May 2006 12:41:04 +0000 (14:41 +0200)]
v267
Rocco Rutte [Tue, 30 May 2006 12:40:10 +0000 (14:40 +0200)]
prepend '--' to filelist when calling git-diff-tree
Paul Mackerras [Tue, 30 May 2006 11:35:07 +0000 (21:35 +1000)]
Merge branch 'master' into new
Conflicts:
gitk
Paul Mackerras [Tue, 30 May 2006 11:33:07 +0000 (21:33 +1000)]
gitk: Add a goto next/previous highlighted commit function
This is invoked by shift-down/shift-up. It relies on a patch to
git-diff-tree that has recently gone into the git repository, commit
ID
e0c97ca6 (without this it may just sit there doing waiting for
git-diff-tree when looking for the next/previous highlight).
Signed-off-by: Paul Mackerras <paulus@samba.org>