git
18 years agogitweb: safely output binary files for 'blob_plain' action
Jakub Narebski [Sat, 17 Jun 2006 11:32:15 +0000 (13:32 +0200)] 
gitweb: safely output binary files for 'blob_plain' action

gitweb tries now to output correct Content-Type header for
'blob_plain' action; for now text/plain for text files,
appropriate image MIME type for *.png, *.gif and *.jpg/*.jpeg files,
and application/octet-stream for other binary files.

Introduced new configuration variables: $default_blob_plain_mimetype
and $default_text_plain_charset (only 'utf-8' is guaranteed to work
for the latter).

binmode changed to ':raw' in git_blob_plain for output of non-text files.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMove gitweb style to gitweb.css
Jakub Narebski [Sat, 17 Jun 2006 09:23:56 +0000 (11:23 +0200)] 
Move gitweb style to gitweb.css

Move gitweb style from embedded <style> element in gitweb/gitweb.cgi
to external CSS file gitweb/gitweb.css.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'yl/build'
Junio C Hamano [Mon, 19 Jun 2006 04:18:49 +0000 (21:18 -0700)] 
Merge branch 'yl/build'

* yl/build:
  auto-detect changed prefix and/or changed build flags

18 years agoMerge branch 'jc/shared'
Junio C Hamano [Mon, 19 Jun 2006 03:19:09 +0000 (20:19 -0700)] 
Merge branch 'jc/shared'

* jc/shared:
  shared repository: optionally allow reading to "others".

18 years agoMerge branch 'eb/mail'
Junio C Hamano [Mon, 19 Jun 2006 03:18:21 +0000 (20:18 -0700)] 
Merge branch 'eb/mail'

* eb/mail:
  Fix git-format-patch -s

18 years agoFix PPC SHA1 routine for large input buffers
Paul Mackerras [Sun, 18 Jun 2006 23:25:16 +0000 (09:25 +1000)] 
Fix PPC SHA1 routine for large input buffers

The PPC SHA1 routine had an overflow which meant that it gave
incorrect results for input buffers >= 512MB.  This fixes it by
ensuring that the update of the total length in bits is done using
64-bit arithmetic.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMake t8001-annotate and t8002-blame more portable
Dennis Stosberg [Sun, 18 Jun 2006 20:33:21 +0000 (22:33 +0200)] 
Make t8001-annotate and t8002-blame more portable

These two tests assume that "sed" will not modify the final line of a
stream if it does not end with a newline character.  The assumption is
not true at least for FreeBSD and Solaris 9.  FreeBSD's "sed" appends
a newline character; "sed" in Solaris 9 even removes the incomplete
final line.  This patch makes the test use perl instead.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoRemove "refs" field from "struct object"
Linus Torvalds [Sun, 18 Jun 2006 18:45:02 +0000 (11:45 -0700)] 
Remove "refs" field from "struct object"

This shrinks "struct object" to the absolutely minimal size possible.
It now contains /only/ the object flags and the SHA1 hash name of the
object.

The "refs" field, which is really needed only for fsck, is maintained in
a separate hashed lookup-table, allowing all normal users to totally
ignore it.

This helps memory usage, although not as much as I hoped: it looks like
the allocation overhead of malloc (and the alignment constraints in
particular) means that while the structure size shrinks, the actual
allocation overhead mostly does not.

[ That said: memory usage is actually down, but not as much as it should
  be: I suspect just one of the object types actually ended up shrinking
  its effective allocation size.

  To get to the next level, we probably need specialized allocators that
  don't pad the allocation more than necessary. ]

The separation makes for some code cleanup, though, and makes the ref
tracking that fsck wants a clearly separate thing.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMake release tarballs friendlier to older tar versions
Rene Scharfe [Sun, 18 Jun 2006 13:25:33 +0000 (15:25 +0200)] 
Make release tarballs friendlier to older tar versions

git-tar-tree adds an extended pax header to archives if its first
parameter points to a commit.  It confuses older tars and isn't
very useful in the case of git anyway, so stop doing it.

Idea: Junio, implementation: Junio.  I just wrote it up. :-)

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-tar-tree: no more void pointer arithmetic
Rene Scharfe [Sun, 18 Jun 2006 10:58:01 +0000 (12:58 +0200)] 
git-tar-tree: no more void pointer arithmetic

Noticed by Florian Forster: Use a char pointer when adding offsets,
because void pointer arithmetic is a GNU extension.   Const'ify the
function arguments while we're at it.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-tar-tree: documentation update
Rene Scharfe [Sun, 18 Jun 2006 10:57:59 +0000 (12:57 +0200)] 
git-tar-tree: documentation update

 * add example on how to avoid adding a global extended pax header
 * don't mention linux anymore, use git itself as an example instead
 * update to v1.4.0 ;-)
 * append missing :: to the examples

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-tar-tree: Simplify write_trailer()
Rene Scharfe [Sun, 18 Jun 2006 10:57:56 +0000 (12:57 +0200)] 
git-tar-tree: Simplify write_trailer()

We can write the trailer in one or at most two steps; it will always
fit within two blocks.  With the last caller of get_record() gone we
can get rid of it.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoauto-detect changed prefix and/or changed build flags
Yakov Lerner [Wed, 14 Jun 2006 22:36:00 +0000 (01:36 +0300)] 
auto-detect changed prefix and/or changed build flags

Detect changed prefix and/or changed build flags in the middle
of the build (or between 'make' and 'make install'), and if change
is detected, make sure all objects are compiled with same build
flags and same prefix, thus avoiding inconsistent/broken build.

[jc: removed otherwise unnecessary Makefile target to test the
 change this patch introduces. ]

Signed-off-by: Yakov Lerner <iler.ml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoFix git-format-patch -s
Eric W. Biederman [Mon, 12 Jun 2006 19:31:38 +0000 (13:31 -0600)] 
Fix git-format-patch -s

When git-format-patch was converted to a builtin an appropriate call
to setup_ident was missed and thus git-format-patch -s fails because
it doesn't look up anything in the password file.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoSome more memory leak avoidance
Linus Torvalds [Sun, 18 Jun 2006 01:47:58 +0000 (18:47 -0700)] 
Some more memory leak avoidance

This is really the dregs of my effort to not waste memory in git-rev-list,
and makes barely one percent of a difference in the memory footprint, but
hey, it's also a pretty small patch.

It discards the parent lists and the commit buffer after the commit has
been shown by git-rev-list (and "git log" - which already did the commit
buffer part), and frees the commit list entry that was used by the
revision walker.

The big win would be to get rid of the "refs" pointer in the object
structure (another 5%), because it's only used by fsck. That would require
some pretty major surgery to fsck, though, so I'm timid and did the less
interesting but much easier part instead.

This (percentually) makes a bigger difference to "git log" and friends,
since those are walking _just_ commits, and thus the list entries tend to
be a bigger percentage of the memory use. But the "list all objects" case
does improve too.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMove "void *util" from "struct object" into "struct commit"
Linus Torvalds [Sun, 18 Jun 2006 01:26:18 +0000 (18:26 -0700)] 
Move "void *util" from "struct object" into "struct commit"

Every single user actually wanted this only for commit objects, and we
have no reason to waste space on it for other object types. So just move
the structure member from the low-level "struct object" into the "struct
commit".

This leaves the commit object the same size, and removes one unnecessary
pointer from all other object allocations.

This shrinks memory usage (still at a fairly hefty half-gig, admittedly)
of "git-rev-list --all --objects" on the mozilla repo by another 5% in my
tests.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoShrink "struct object" a bit
Linus Torvalds [Wed, 14 Jun 2006 23:45:13 +0000 (16:45 -0700)] 
Shrink "struct object" a bit

This shrinks "struct object" by a small amount, by getting rid of the
"struct type *" pointer and replacing it with a 3-bit bitfield instead.

In addition, we merge the bitfields and the "flags" field, which
incidentally should also remove a useless 4-byte padding from the object
when in 64-bit mode.

Now, our "struct object" is still too damn large, but it's now less
obviously bloated, and of the remaining fields, only the "util" (which is
not used by most things) is clearly something that should be eventually
discarded.

This shrinks the "git-rev-list --all" memory use by about 2.5% on the
kernel archive (and, perhaps more importantly, on the larger mozilla
archive). That may not sound like much, but I suspect it's more on a
64-bit platform.

There are other remaining inefficiencies (the parent lists, for example,
probably have horrible malloc overhead), but this was pretty obvious.

Most of the patch is just changing the comparison of the "type" pointer
from one of the constant string pointers to the appropriate new TYPE_xxx
small integer constant.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge early part of branch 'jc/fetchupload'
Junio C Hamano [Sun, 18 Jun 2006 00:57:33 +0000 (17:57 -0700)] 
Merge early part of branch 'jc/fetchupload'

18 years agoMerge branch 'jc/rw-prefix'
Junio C Hamano [Sun, 18 Jun 2006 00:56:52 +0000 (17:56 -0700)] 
Merge branch 'jc/rw-prefix'

* jc/rw-prefix:
  read-tree: reorganize bind_merge code.
  write-tree: --prefix=<path>
  read-tree: --prefix=<path>/ option.

18 years agoMerge branch 'pe/date'
Junio C Hamano [Sun, 18 Jun 2006 00:49:28 +0000 (17:49 -0700)] 
Merge branch 'pe/date'

* pe/date:
  date.c: improve guess between timezone offset and year.

18 years agomailinfo: ignore blanks after in-body headers.
Junio C Hamano [Sat, 17 Jun 2006 23:58:51 +0000 (16:58 -0700)] 
mailinfo: ignore blanks after in-body headers.

[jc: this is based on Eric's patch but also fixes up the parsed
 subject headers].

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoDon't parse any headers in the real body of an email message.
Eric W. Biederman [Mon, 12 Jun 2006 19:48:35 +0000 (13:48 -0600)] 
Don't parse any headers in the real body of an email message.

It was pointed out that the current behaviour might mispart a patch comment
so remove this behaviour for now.

[jc: this fixes "From: line in the middle" check in t5100 test.]

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agot5100: mailinfo and mailsplit tests.
Junio C Hamano [Sat, 17 Jun 2006 22:20:36 +0000 (15:20 -0700)] 
t5100: mailinfo and mailsplit tests.

Currently the test passes with 1.3.3 but not with the tip of
"master".  This is to verify the fixes from Eric W Biedermann.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMake t4101-apply-nonl bring along its patches
Dennis Stosberg [Sat, 17 Jun 2006 15:02:45 +0000 (17:02 +0200)] 
Make t4101-apply-nonl bring along its patches

Some versions of "diff" (e.g. on FreeBSD and older Linux systems) do
not support the "\ No newline at end of file" remark and are not
able to generate the patches needed for this test.  This lets the
test fail, although git-apply is working perfectly.  This patch adds
the pre-generated patches to t/t4100/ and makes the test use them.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoUpdate gitweb README: gitweb is now included with git
Jakub Narebski [Sat, 17 Jun 2006 06:53:45 +0000 (08:53 +0200)] 
Update gitweb README: gitweb is now included with git

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-cvsexportcommit.perl: fix typo
Sven Verdoolaege [Sat, 17 Jun 2006 17:46:40 +0000 (19:46 +0200)] 
git-cvsexportcommit.perl: fix typo

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogitweb.cgi history not shown
Linus Torvalds [Sun, 11 Jun 2006 17:57:35 +0000 (10:57 -0700)] 
gitweb.cgi history not shown

This does:

 - add a "rev.simplify_history" flag which defaults to on
 - it turns it off for "git whatchanged" (which thus now has real
   semantics outside of "git log")
 - it adds a command line flag ("--full-history") to turn it off for
   others (ie you can make "git log" and "gitk" etc get the semantics if
   you want to.

Now, just as an example of _why_ you really really really want to simplify
history by default, apply this patch, install it, and try these two
command lines:

gitk --full-history -- git.c
gitk -- git.c

and compare the output.

So with this, you can also now do

git whatchanged -p -- gitweb.cgi
git log -p --full-history -- gitweb.cgi

and it will show the old history of gitweb.cgi, even though it's not
relevant to the _current_ state of the name "gitweb.cgi"

NOTE NOTE NOTE! It will still actually simplify away merges that didn't
change anything at all into either child. That creates these bogus strange
discontinuities if you look at it with "gitk" (look at the --full-history
gitk output for git.c, and you'll see a few strange cases).

So the whole "--parent" thing ends up somewhat bogus with --full-history
because of this, but I'm not sure it's worth even worrying about. I don't
think you'd ever want to really use "--full-history" with the graphical
representation, I just give it as an example exactly to show _why_ doing
so would be insane.

I think this is trivial enough and useful enough to be worth merging into
the stable branch.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoImplement safe_strncpy() as strlcpy() and use it more.
Peter Eriksen [Sun, 11 Jun 2006 12:03:28 +0000 (14:03 +0200)] 
Implement safe_strncpy() as strlcpy() and use it more.

Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogitweb: Make the `blame' interface in gitweb optional.
Florian Forster [Mon, 12 Jun 2006 08:31:57 +0000 (10:31 +0200)] 
gitweb: Make the `blame' interface in gitweb optional.

Since `git-annotate' is an expensive operation to run it may be
desirable to deactivate this functionality. This patch introduces
the `gitweb.blame' option to git-repo-config and disables the blame
support by default.

Signed-off-by: Florian Forster <octo@verplant.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogitweb: Adding a `blame' interface.
Florian Forster [Sun, 11 Jun 2006 15:45:19 +0000 (17:45 +0200)] 
gitweb: Adding a `blame' interface.

This patch adds an interface for `git-blame' to `gitweb.cgi'.
Links to it are placed in `git_blob'.

Internally the code uses `git-annotate' because `git-blame's output
differs for files that have been renamed in the past. However, I like
the term `blame' better.

[jc: blame can be told to produce the compatible format btw...]

Signed-off-by: Florian Forster <octo@verplant.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agocvsimport: keep one index per branch during import
Martin Langhoff [Mon, 12 Jun 2006 11:50:49 +0000 (23:50 +1200)] 
cvsimport: keep one index per branch during import

With this patch we have a speedup and much lower IO when
importing trees with many branches. Instead of forcing
index re-population for each branch switch, we keep
many index files around, one per branch.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agocvsimport: complete the cvsps run before starting the import
Martin Langhoff [Sun, 11 Jun 2006 08:12:20 +0000 (20:12 +1200)] 
cvsimport: complete the cvsps run before starting the import

We now capture the output of cvsps to a tempfile, and then read it in.
cvsps 2.1 works quite a bit "in memory", and only prints its patchset
info once it has finished talking with cvs, but apparently retaining
all that memory allocation. With this patch, cvsps is finished and
reaped before cvsimport start working (and growing). So the footprint
of the whole process is much lower.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agocvsimport: ignore CVSPS_NO_BRANCH and impossible branches
Martin Langhoff [Sun, 11 Jun 2006 08:12:09 +0000 (20:12 +1200)] 
cvsimport: ignore CVSPS_NO_BRANCH and impossible branches

cvsps output often contains references to CVSPS_NO_BRANCH, commits
that it could not trace to a branch. Ignore that branch.

Additionally, cvsps will sometimes draw circular relationships
between branches -- where two branches are recorded as opening
from the other.  In those cases, and where the ancestor branch
hasn't been seen, ignore it.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoblame: Add --time to produce raw timestamps
Fredrik Kuivinen [Tue, 13 Jun 2006 06:08:31 +0000 (08:08 +0200)] 
blame: Add --time to produce raw timestamps

fix the usage string and clean up the docs while we are at it

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agofix git alias
Junio C Hamano [Wed, 14 Jun 2006 13:01:05 +0000 (06:01 -0700)] 
fix git alias

When extra command line arguments are given to a command that
was alias-expanded, the code generated a wrong argument list,
leaving the original alias in the result, and forgetting to
terminate the new argv list.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoAdd a "--notags" option for git-p4import.
Sean [Thu, 15 Jun 2006 21:26:21 +0000 (17:26 -0400)] 
Add a "--notags" option for git-p4import.

P4import currently creates a git tag for every commit it imports.
When importing from a large repository too many tags can be created
for git to manage, so this provides an option to shut that feature
off if necessary.

Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
18 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Sat, 17 Jun 2006 05:33:28 +0000 (22:33 -0700)] 
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn: (25 commits)
  git-svn: rebuild convenience and bugfixes
  git-svn: svn (command-line) 1.0.x compatibility
  git-svn: tests no longer fail if LC_ALL is not a UTF-8 locale
  git-svn: bugfix and optimize the 'log' command
  git-svn: Eliminate temp file usage in libsvn_get_file()
  git-svn: fix several small bugs, enable branch optimization
  git-svn: avoid creating some small files
  git-svn: make the $GIT_DIR/svn/*/revs directory obsolete
  git-svn: add support for Perl SVN::* libraries
  git-svn: add 'log' command, a facsimile of basic `svn log'
  git-svn: add UTF-8 message test
  git-svn: add some functionality to better support branches in svn
  git-svn: add --shared and --template= options to pass to init-db
  git-svn: add --repack and --repack-flags= options
  git-svn: minor cleanups, extra error-checking
  git-svn: Move all git-svn-related paths into $GIT_DIR/svn
  git-svn: support manually placed initial trees from fetch
  git-svn: optimize --branch and --branch-all-ref
  git-svn: --branch-all-refs / -B support
  git-svn: support -C<num> passing to git-diff-tree
  ...

18 years agogit-svn: rebuild convenience and bugfixes
Eric Wong [Fri, 16 Jun 2006 09:55:13 +0000 (02:55 -0700)] 
git-svn: rebuild convenience and bugfixes

We will now automatically fetch the refs/remotes/git-svn ref
from origin and store a Pull: line for it.

--remote=<origin> may be passed if your remote is named something
other than 'origin'

Also, remember to make GIT_SVN_DIR whenever we need to create
.rev_db

Signed-off-by: Eric Wong <normalperson@yhbt.net>
18 years agogit-svn: svn (command-line) 1.0.x compatibility
Eric Wong [Fri, 16 Jun 2006 02:51:05 +0000 (19:51 -0700)] 
git-svn: svn (command-line) 1.0.x compatibility

Tested on a plain Ubuntu Warty installation
using subversion 1.0.6-1.2ubuntu3

svn add --force was never needed, as it only affected
directories, which git (thankfully) doesn't track

The 1.0.x also didn't support symlinks(!), so allow NO_SYMLINK
to be defined for running tests

Signed-off-by: Eric Wong <normalperson@yhbt.net>
18 years agogit-svn: tests no longer fail if LC_ALL is not a UTF-8 locale
Eric Wong [Fri, 16 Jun 2006 02:13:56 +0000 (19:13 -0700)] 
git-svn: tests no longer fail if LC_ALL is not a UTF-8 locale

Signed-off-by: Eric Wong <normalperson@yhbt.net>
18 years agogit-svn: bugfix and optimize the 'log' command
Eric Wong [Fri, 16 Jun 2006 01:48:22 +0000 (18:48 -0700)] 
git-svn: bugfix and optimize the 'log' command

Revisions with long commit messages were being skipped, since
the 'git-svn-id' metadata line was at the end and git-log uses a
32k buffer to print the commits.

Also the last 'git-svn-id' metadata line in a commit is always
the valid one, so make sure we use that, as well.

Made the verbose flag work by passing the correct option switch
('--summary') to git-log.

Finally, optimize -r/--revision argument handling by passing
the appropriate limits to revision

Signed-off-by: Eric Wong <normalperson@yhbt.net>
18 years agogit-svn: Eliminate temp file usage in libsvn_get_file()
Eric Wong [Thu, 15 Jun 2006 20:36:12 +0000 (13:36 -0700)] 
git-svn: Eliminate temp file usage in libsvn_get_file()

This means we'll have a loose object when we encounter a symlink
but that's not the common case.

We also don't have to worry about svn:eol-style when using the
SVN libraries, either.  So remove the code to deal with that.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
18 years agogit-svn: fix several small bugs, enable branch optimization
Eric Wong [Thu, 15 Jun 2006 19:50:12 +0000 (12:50 -0700)] 
git-svn: fix several small bugs, enable branch optimization

Share the repack counter between branches when doing
multi-fetch.

Pass the -d flag to git repack by default.  That's the
main reason we will want automatic pack generation, to
save space and improve disk cache performance.  I won't
add -a by default since it can generate extremely large
packs that make RAM-starved systems unhappy.

We no longer generate the .git/svn/$GIT_SVN_ID/info/uuid
file, either.  It was never read in the first place.

Check for and create .rev_db if we need to during fetch (in case
somebody manually blew away their .rev_db and wanted to start
over.  Mainly makes debugging easier).

Croak with $? instead of $! if there's an error closing pipes

Quiet down some of the chatter, too.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
18 years agogit-svn: avoid creating some small files
Eric Wong [Thu, 15 Jun 2006 04:24:03 +0000 (21:24 -0700)] 
git-svn: avoid creating some small files

repo_path_split() is already pretty fast, and is already
optimized via caching.

We also don't need to create an exclude file if we're
relying on the SVN libraries.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
18 years agogit-svn: make the $GIT_DIR/svn/*/revs directory obsolete
Eric Wong [Tue, 13 Jun 2006 11:02:23 +0000 (04:02 -0700)] 
git-svn: make the $GIT_DIR/svn/*/revs directory obsolete

This is a very intrusive change, so I've beefed up the tests
significantly.  Added 'full-test' a target to the Makefile,
to test different possible configurations.  This is intended
for maintainers only.  Users should only be concerned with
'test' succeeding.

We now have a very simple custom database format for handling
mapping of svn revisions => git commits.  Of course, we're
not really using it yet, either.

Also disabled automatic branch-finding on new trees for now.
It's too easily broken.  revisions_eq() function should be
helpful for branch detection.

Also removed an extra assertion in fetch_cmd() that wasn't
correctly done.  This bug was found by full-test.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
18 years agogit-svn: add support for Perl SVN::* libraries
Eric Wong [Mon, 12 Jun 2006 22:23:48 +0000 (15:23 -0700)] 
git-svn: add support for Perl SVN::* libraries

This means we no longer have to deal with having bloated SVN
working copies around and we get a nice performance increase as
well because we don't have to exec the SVN binary and start a
new server connection each time.

Of course we have to manually manage memory with SVN::Pool
whenever we can, and hack around cases where SVN just eats
memory despite pools (I blame Perl, too).  I would like to
keep memory usage as stable as possible during long fetch/commit
processes since I still use computers with only 256-512M RAM.

commit should always be faster with the SVN library code.  The
SVN::Delta interface is leaky (or I'm not using it with pools
correctly), so I'm forking on every commit, but that doesn't
seem to hurt performance too much (at least on normal Unix/Linux
systems where fork() is pretty cheap).

fetch should be faster in most common cases, but probably not all.
fetches will be faster where client/server delta generation is
the bottleneck and not bandwidth.  Of course, full-files are
generated server-side via deltas, too.  Full files are always
transferred when they're updated, just like git-svnimport and
unlike command-line svn.  I'm also hacking around memory leaks
(see comments) here by using some more forks.

I've tested fetch with http://, https://, file://, and svn://
repositories, so we should be reasonably covered in terms of
error handling for fetching.

Of course, we'll keep plain command-line svn compatibility as a
fallback for people running SVN 1.1 (I'm looking into library
support for 1.1.x SVN, too).  If you want to force command-line
SVN usage, set GIT_SVN_NO_LIB=1 in your environment.

We also require two simultaneous connections (just like
git-svnimport), but this shouldn't be a problem for most
servers.

Less important commands:

show-ignore is slower because it requires repository
access, but -r/--revision <num> can be specified.

graft-branches may use more memory, but it's a
short-term process and is funky-filename-safe.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
18 years agogit-svn: add 'log' command, a facsimile of basic `svn log'
Eric Wong [Thu, 1 Jun 2006 09:35:44 +0000 (02:35 -0700)] 
git-svn: add 'log' command, a facsimile of basic `svn log'

This quick feature 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         - just maps to --raw (in git log), so
 it's completely incompatible with
 the --verbose output in svn log
  --limit=<n>          - is NOT the same as --max-count,
 doesn't count merged/excluded commits
  --incremental        - supported (trivial :P)

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'

Signed-off-by: Eric Wong <normalperson@yhbt.net>
18 years agogit-svn: add UTF-8 message test
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>
18 years agogit-svn: add some functionality to better support branches in svn
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>
18 years agogit-svn: add --shared and --template= options to pass to init-db
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>
18 years agogit-svn: add --repack and --repack-flags= options
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>
18 years agogit-svn: minor cleanups, extra error-checking
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>
18 years agogit-svn: Move all git-svn-related paths into $GIT_DIR/svn
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>
18 years agogit-svn: support manually placed initial trees from fetch
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>
18 years agogit-svn: optimize --branch and --branch-all-ref
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>
18 years agogit-svn: --branch-all-refs / -B support
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>
18 years agogit-svn: support -C<num> passing to git-diff-tree
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>
18 years agogit-svn: don't allow commit if svn tree is not current
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>
18 years agogit-svn: restore original LC_ALL setting (or unset) for commit
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>
18 years agogit-svn: eol_cp corner-case fixes
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>
18 years agogit-svn: fix handling of filenames with embedded '@'
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>
18 years agogit-svn: t0000: add -f flag to checkout
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>
18 years agoMerge git://git.kernel.org/pub/scm/gitk/gitk
Junio C Hamano [Tue, 13 Jun 2006 17:53:41 +0000 (10:53 -0700)] 
Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
  [PATCH] gitk: rereadrefs needs listrefs

18 years ago[PATCH] gitk: rereadrefs needs listrefs
Junio C Hamano [Sun, 11 Jun 2006 16:50:47 +0000 (09:50 -0700)] 
[PATCH] gitk: rereadrefs needs listrefs

The listrefs procedure was inadvertently removed during the course of
development, but there is still a user of it, so resurrect it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agoGIT 1.4.0 v1.4.0
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>
18 years agoMerge git://git.kernel.org/pub/scm/git/gitweb
Junio C Hamano [Sat, 10 Jun 2006 18:20:59 +0000 (11:20 -0700)] 
Merge git://git.kernel.org/pub/scm/git/gitweb

18 years agoBuilt-in git-get-tar-commit-id
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>
18 years agoshared repository: optionally allow reading to "others".
Junio C Hamano [Sat, 10 Jun 2006 06:09:49 +0000 (23:09 -0700)] 
shared repository: optionally allow reading to "others".

This enhances core.sharedrepository to have additionally
specify that read and exec permissions to be given to others as
well.  It is useful when serving a repository via gitweb and
git-daemon that runs as a user outside the project group.

The configuration item can take the following values:

    [core]
sharedrepository   ; the same as "group"
sharedrepository = true  ; ditto
sharedrepository = 1  ; ditto
sharedrepository = group ; allow rwx to group
sharedrepository = all   ; allow rwx to group, allow rx to other
sharedrepository = umask ; not shared - use umask

It also extends "git init-db" to take "--shared=all" and friends
from the command line.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-clone: fix --bare over dumb-http
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>
18 years agoshared repository - add a few missing calls to adjust_shared_perm().
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>
18 years agoFix formatting of Documentation/git-clone.txt
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>
18 years agobuiltin-init-db: spell the in-program configuration variable in lowercase.
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>
18 years agodate.c: improve guess between timezone offset and year.
Paul Eggert [Thu, 8 Jun 2006 21:54:13 +0000 (14:54 -0700)] 
date.c: improve guess between timezone offset and year.

When match_digit() guesses a four-digit string to tell if it is
a year or a timezone, it did not consider that some real-world
places have UTC offsets equal to +1400.

   $ date; TZ=UTC0 date; TZ=Pacific/Kiritimati date
   Wed Jun  7 23:25:42 PDT 2006
   Thu Jun  8 06:25:42 UTC 2006
   Thu Jun  8 20:25:42 LINT 2006

Signed-off-by: Paul Eggert <eggert@CS.UCLA.EDU>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-rm: honor -n flag.
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>
18 years agogit-clone: fix duplicated "master" in $GIT_DIR/remotes/origin
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>
18 years agocheck for error return from fork()
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>
18 years agoDocument git-clone --use-separate-remote
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>
18 years agoDocumentation: add another example to git-ls-files v1.4.0-rc2
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>
18 years agoDocumentation: git aliases
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>
18 years agogit-cvsserver asciidoc formatting tweaks
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>
18 years agoconfig.txt grammar, typo, and asciidoc fixes
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>
18 years agoDocumentation: git-ls-tree (typofix)
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>
18 years agoDocument git-ls-tree --fullname
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>
18 years agoDocument git aliases support
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>
18 years agomake clean: remove dist-doc targets.
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>
18 years agoMisc doc improvements
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>
18 years agoDocumentation: add missing docs make check-docs found.
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>
18 years agoSome doc typo fixes
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>
18 years agoOff-by-one error in get_path_prefix(), found by Valgrind
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>
18 years agoMerge git://git.kernel.org/pub/scm/gitk/gitk
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

18 years agohttp-fetch: fix possible segfault
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>
18 years agoRefactor git_tcp_connect() functions a little.
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>
18 years agoMerge branch 'jc/lockfile'
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.

18 years agoMerge branch 'js/alias'
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:

18 years agoMerge branch 'vb/sendemail'
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

18 years agobuiltin-grep: pass ignore case option to external grep
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>
18 years agogitk: Re-read the descendent/ancestor tag & head info on update
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>
18 years agoref-log: style fixes.
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>
18 years agorefs.c: convert it to use lockfile interface.
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>
18 years agoMake index file locking code reusable to others.
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>