Commit graph

376 commits

Author SHA1 Message Date
Junio C Hamano 5fb41e8abf OpenBSD needs the strcasestr replacement.
Noticed by Randal L. Schwartz.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 11:51:11 -07:00
Matthias Urlichs eaf718f3ec New: git-svnimport.
As the name suggests, this script imports from SVN.

Only "normal" SVN repositories (with single trunk/, branches/, and tags/
subdrectories) are supported. Incremental imports require preserving
the file .git/svn2git.

Signed-Off-by: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 11:40:43 +02:00
Junio C Hamano 32e49d5d1c GIT 0.99.8c
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-09 19:19:36 -07:00
Junio C Hamano 2af60a0521 Merge branch 'fixes' 2005-10-09 19:17:43 -07:00
Junio C Hamano d5b0c9ea17 Merge branch 'fixes'
with minor hand resolving on git-tag.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-09 19:16:33 -07:00
Junio C Hamano f7c153431b Makefile: avoid error message from 'uname -o'
The platform specific tweaking part was using 'uname -o' which
is not always available.  Squelch error message from it.

It was suggested to chain the if..else, but I chose not to, because
maintaining the nested if..else if..else..endif endif to match is a
pain.  If we had "elif", things would have been different, though.
While we are at it, try not to invoke 'uname -s' for each platform
candidate.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-09 12:55:49 -07:00
Kai Ruemmler d2b8593fd3 make $prefix available for sub-makefiles
exports $prefix and makes Documentation/Makefile following it also.

Signed-off-by: Kai Ruemmler <kai.ruemmler@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-08 15:54:37 -07:00
Johannes Schindelin 730d48a2ef [PATCH] If NO_MMAP is defined, fake mmap() and munmap()
Since some platforms do not support mmap() at all, and others do only just
so, this patch introduces the option to fake mmap() and munmap() by
malloc()ing and read()ing explicitely.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
2005-10-08 15:54:36 -07:00
Junio C Hamano e1e9c25466 Give proper prototype to gitstrcasestr.
Borrow from NO_MMAP patch by Johannes, squelch compiler warnings by
declaring gitstrcasestr() when we use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-08 14:54:41 -07:00
Junio C Hamano d1c5f2a42d Add git-am, applymbox replacement.
It reorganizes the code and also has saner command line options
syntax.  Unlike git-applymbox, it can take more than one mailbox
file from the command line, as well as reading from the standard
input when '-' is specified.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-07 03:44:18 -07:00
Junio C Hamano 8b1f8d04c9 GIT 0.99.8b
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-05 15:41:49 -07:00
Junio C Hamano 3ff8cbeda6 Record which tree the patch applies to.
Also note which version of GIT produced the patch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-04 17:04:45 -07:00
Junio C Hamano 4514385edd On Cygwin, use symbolic ref, not a symbolic link, to express .git/HEAD
H. Peter Anvin says that Samba "promotes" symlinks to hardlinks while
Cygwin itself uses .lnk files to emulate symlinks.  Avoid using symbolic
link for .git/HEAD on Cygwin.

This does not help the symlinks recorded in trees as user data, but
at least we do not use them for our own bookkeeping.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-03 19:13:20 -07:00
Junio C Hamano c8c5b21a37 [PATCH] Merging the Cygwin changes
Fix mismerge typo.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-03 16:29:48 -07:00
Junio C Hamano e1d04f8aad GIT 0.99.8a
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-03 16:27:46 -07:00
Peter Anvin 79a9d8ea0d Merge with master.kernel.org:/pub/scm/git/git.git 2005-10-03 12:04:44 -07:00
Junio C Hamano baaac6a714 Post 0.99.8 master branch
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-02 16:37:27 -07:00
Junio C Hamano 91dd674e30 GIT 0.99.8
GIT already did everything I wanted it to do since mid 0.99.7,
and it has almost everything I want it to have now, except a
couple of minor tweaks and enhancements.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-02 16:07:29 -07:00
Junio C Hamano 0842acff57 Customize git command for installations that lack certain commands.
When the platform lacks certain git subcommands, omit them from the
list of subcommands that are available from "git" wrapper.

Noticed by Geert Bosch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-02 00:20:45 -07:00
Han Boetes 18c5a52537 [PATCH] git on OpenBSD
iconv is installed in /usr/local.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-02 00:00:53 -07:00
Junio C Hamano 455a7f3275 More portability.
- The location of openssl development files got customizable.
 - The location of iconv development files got customizable.
 - Pass $TAR down to t5000 test so that the user can override with
   'gmake TAR=gtar'.
 - Solaris 'bc' does not seem to grok "define abs()".  There is no
   reason to use bc there -- expr would do.

Signed-off-by: Junio C Hamano <junio@twinsun.com>
2005-10-01 23:19:48 -07:00
Junio C Hamano 8098a178b2 Add git-symbolic-ref
This adds the counterpart of git-update-ref that lets you read
and create "symbolic refs".  By default it uses a symbolic link
to represent ".git/HEAD -> refs/heads/master", but it can be compiled
to use the textfile symbolic ref.

The places that did 'readlink .git/HEAD' and 'ln -s refs/heads/blah
.git/HEAD' have been converted to use new git-symbolic-ref command, so
that they can deal with either implementation.

Signed-off-by: Junio C Hamano <junio@twinsun.com>
2005-10-01 23:19:33 -07:00
H. Peter Anvin 039c6f162a Better handling of exec extension in the git wrapper script 2005-09-30 11:02:26 -07:00
H. Peter Anvin 2f29dd5218 Change $(X) -> $X to be less annoying. 2005-09-30 10:46:25 -07:00
H. Peter Anvin 300b4801b7 Merge with master.kernel.org:/pub/scm/git/git.git 2005-09-30 10:44:21 -07:00
Junio C Hamano 894a8a8b1b Still installing the old command names.
After seeing Jeff's guide, I changed my mind about the
big-rename transition plan.  Even if Porcelains are kept up to
date, those web documents that describes older world order would
live longer and people will stumble across them via google
searches.  And who knows how many mirrored copies there are.

The backward compatible symbolic links *will* be removed before
1.0.  But that will not happen in 0.99.8.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-30 00:27:11 -07:00
hpa fef1ef8e1b git-http-fetch needs $(X) 2005-09-29 10:38:26 -07:00
H. Peter Anvin bb8c91d617 Just explicitly add $(X) to most programs. 2005-09-28 23:31:18 -07:00
Peter Anvin a23cd8ece7 Handle Cygwin .exe extensions 2005-09-28 19:08:37 -07:00
Peter Anvin dc4afa57ce Remove *.exe for Cygwin's benefit 2005-09-28 18:00:24 -07:00
Peter Anvin 6573faff34 NO_IPV6 support for git daemon 2005-09-28 17:26:44 -07:00
hpa 49744d63e9 Call it NO_IPV6 rather than hard-coding __CYGWIN__ 2005-09-28 16:52:21 -07:00
hpa 1775451793 Options to compile on Cygwin 2005-09-28 16:37:37 -07:00
Peter Eriksen edde7a8b53 [PATCH] Make the test more shell generic and fix missing Solaris find option
This is from Peter Eriksen, but further fixed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-27 00:16:39 -07:00
Linus Torvalds 66bf85a462 [PATCH] Add "git-update-ref" to update the HEAD (or other) ref
This is a careful version of the script stuff that currently just
blindly writes HEAD with a new value.

You can use

	git-update-ref HEAD <newhead>

or

	git-update-ref HEAD <newhead> <oldhead>

where the latter version verifies that the old value of HEAD matches
oldhead.

It basically allows a "ref" file to be a symbolic pointer to another ref
file by starting with the four-byte header sequence of "ref:".

More importantly, it allows the update of a ref file to follow these
symbolic pointers, whether they are symlinks or these "regular file
symbolic refs".

NOTE! It follows _real_ symlinks only if they start with "refs/":
otherwise it will just try to read them and update them as a regular file
(ie it will allow the filesystem to follow them, but will overwrite such a
symlink to somewhere else with a regular filename).

In general, using

	git-update-ref HEAD "$head"

should be a _lot_ safer than doing

	echo "$head" > "$GIT_DIR/HEAD"

both from a symlink following standpoint _and_ an error checking
standpoint.  The "refs/" rule for symlinks means that symlinks that point
to "outside" the tree are safe: they'll be followed for reading but not
for writing (so we'll never write through a ref symlink to some other
tree, if you have copied a whole archive by creating a symlink tree).

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-25 16:18:25 -07:00
Junio C Hamano d5bc7eecbb GIT v0.99.7d
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-25 00:41:15 -07:00
Junio C Hamano a55797672d Clean generated files a bit more.
Now we conditionally compile things in compat/, so we should remove
object files there.  Python execution can leave *.pyc and *.pyo, which
need to be cleaned as well.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-24 23:48:29 -07:00
Junio C Hamano cf408cb4a0 Stop installing the backward compatible symlinks.
Also cmd-renames.sh can now be used to remove the backward compatible
symlinks -- this is not used by default in any way.

As discussed on the list with Pasky, git-ssh-push and git-ssh-pull will
keep calling each other for a while longer.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-24 23:42:34 -07:00
Junio C Hamano d66189e2c9 Use 0.99.7.GIT as version between 0.99.7 and 0.99.8
Pasky taught me how he does his versioning for ELinks.  This will sort
after 0.99.7 and interim fixes 0.99.7a, and before 0.99.8.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-24 14:58:57 -07:00
Junio C Hamano 00d8bbd3c4 GIT 0.99.7c
Contains the following post-0.99.7b fixes:

 - rsh.c string termination fix by H. Peter Anvin
 - further fetch fixes by Sergey Vlasov
 - diff-tree documentation by Robert Watson.
 - 'git diff --cached' synonymous to 'git diff --cached HEAD'.
 - subprocess.py licensing status clarification.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-24 11:38:43 -07:00
Junio C Hamano 229a7ed7ab Solaris: give a bit more built-in defaults.
Taking the make command line Peter Eriksen uses, give defaults
to SHELL_PATH, TAR, CURLDIR, NO_STRCASESTR, and INSTALL.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-24 11:26:22 -07:00
Patrick Mauritz 6d9bbc50a3 [PATCH] CURLDIR in Makefile
Support systems that do not install curl headers and libraries
in /usr/{include,lib}.

Signed-off-by: Patrick Mauritz <oxygene@studentenbude.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-24 11:26:22 -07:00
Junio C Hamano 990f856a62 GIT 0.99.7b
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22 21:53:33 -07:00
Junio C Hamano c8b48ba476 Prettyprint octopus merge message.
Including the current branch in the list of heads being merged
was not a good idea, so drop it.  And shorten the message by
grouping branches and tags together to form a single line.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22 18:09:07 -07:00
Junio C Hamano 5cfcd07c93 Retire diff-helper.
The textual diff generation with built-in '-p' in diff-* brothers has
proven to be useful enough that git-diff-helper outlived its usefulness.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22 01:54:13 -07:00
Junio C Hamano 9dcc829fe1 Retire rev-tree.
Some old scripts might still use git-rev-tree, but it really is
clearly inferior in every way to git-rev-list that such scripts should
be fixed anyway. Fixing them should be pretty easy.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22 01:54:12 -07:00
Junio C Hamano 0fe51391a8 Retire git-export.
git-export was done as a concept example on how easy it is to export
the git data to something else. It's much less powerful than any
number of trivial one-liner scripts now, and real exporters would not
ever use git-export.

It's obviously much less powerful than "git-whatchanged", or just
about any combination of git-rev-list + git-diff-tree.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22 01:54:12 -07:00
Nicolas Pitre 7c6ef2f214 [PATCH] ARM optimized SHA1 implementation
This is my ARM assembly SHA1 implementation for GIT. It is approximately
50% faster than the generic C version. On an XScale processor running at
400MHz:

	generic C version:	9.8 MB/s
	my version:		14.5 MB/s

It's not that I expect a lot of big GIT users on ARM, but I stillknow
about one important ARM user that might benefit from it, and writing
that code was fun.

I also reworked the makefile a bit so any optimized SHA1 implementations
is used regardless of whether NO_OPENSSL is defined or not.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-20 18:10:00 -07:00
Junio C Hamano dc4393cba3 GIT 0.99.7a
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-19 19:50:09 -07:00
Junio C Hamano 343d35c916 Ship our own copy of subprocess.py
so people without the latest Python could run merge-recursive.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-19 19:47:54 -07:00
Linus Torvalds ef34af24dc [PATCH] strcasestr compatibility replacement
Some C libraries lack strcasestr(); add a stupid replacement
to help folks with such.

[jc: original Linus posting, updated with his "also need <ctype.h>",
 updated further with a fix from Joachim B Haga <cjhaga@fys.uio.no>"]

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-19 08:49:39 -07:00
Junio C Hamano 8ac93bc98f Merge branch 'master' of . 2005-09-18 01:18:15 -07:00
Junio C Hamano 5a90d4ac1a [PATCH] getdomainname should be usable on SunOS with -lnsl
Jason Riedy suggests that we should be able to use getdomainname
if we properly specify which libraries to link.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-17 11:57:50 -07:00
Junio C Hamano f71a69ab05 Be more backward compatible with git-ssh-{push,pull}.
HPA reminded me that these programs knows about the name of the
counterpart on the other end and simply symlinking the old name to
new name locally would not be enough.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-15 14:56:37 -07:00
Junio C Hamano 0f56479d73 Retire info/rev-cache
It was one of those things that were well intentioned but did not turn
out to be useful in practice.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-15 12:46:31 -07:00
Peter Eriksen 53764ee43d [PATCH] Use '-d' as the first flag to 'install'
... in order to please Solaris 'install'.  GNU install is not harmed
with this.

[jc: Documentation/Makefile also fixed.]

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-15 12:46:31 -07:00
Junio C Hamano 4803c2802c Merge branch 'master' of . 2005-09-13 22:30:13 -07:00
Fredrik Kuivinen e4cf17ce0d [PATCH] Rename the 'fredrik' merge strategy to 'recursive'.
Otherwise we would regret when Fredrik comes up with another merge
algorithm with different pros-and-cons with the current one.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-13 00:20:54 -07:00
Junio C Hamano 3db6b224cf Merge branch 'master' of . 2005-09-12 22:02:42 -07:00
Linus Torvalds f22cc3fcbf [PATCH] Add "git grep" helper
Very convenient shorthand for

	git-ls-files [file-patterns] | xargs grep <pattern>

which I tend to do all the time.

Yes, it's trivial, but it's really nice. I can do

	git grep '\<some_variable\>' arch/i386 include/asm-i386

and it does exactly what you'd think it does. And since it just uses the
normal git-ls-files file patterns, you can do things like

	git grep something 'include/*.h'

and it will search all header files under the include/ subdirectory.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-12 13:20:03 -07:00
Junio C Hamano 53e2cc9b9b Prepare 0.99.7 release candidate branch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-10 19:48:09 -07:00
Junio C Hamano 720d150c48 Add a new merge strategy by Fredrik Kuivinen.
I really wanted to try this out, instead of asking for an adjustment
to the 'git merge' driver and waiting.  For now the new strategy is
called 'fredrik' and not in the list of default strategies to be tried.

The script wants Python 2.4 so this commit also adjusts Debian and RPM
build procecure files.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-10 19:46:53 -07:00
Junio C Hamano 2276aa6c09 Use Daniel's read-tree in the merge strategy 'resolve'.
And rename the one Linus kept calling stupid, 'stupid'.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-10 18:30:41 -07:00
Junio C Hamano 91063bbc6c Multi-backend merge driver.
The new command 'git merge' takes the current head and one or more
remote heads, with the commit log message for the automated case.

If the heads being merged are simple fast-forwards, it acts the
same way as the current 'git resolve'.  Otherwise, it tries
different merge strategies and takes the result from the one that
succeeded auto-merging, if there is any.

If no merge strategy succeeds auto-merging, their results are
evaluated for number of paths needed for hand resolving, and the
one with the least number of such paths is left in the working
tree.  The user is asked to resolve them by hand and make a
commit manually.

The calling convention from the 'git merge' driver to merge
strategy programs is very simple:

 - A strategy program is to be called 'git-merge-<strategy>'.

 - They take input of this form:

	<common1> <common2> ... '--' <head> <remote1> <remote2>...

   That is, one or more the common ancestors, double dash, the
   current head, and one or more remote heads being merged into
   the current branch.

 - Before a strategy program is called, the working tree is
   matched to the current <head>.

 - The strategy program exits with status code 0 when it
   successfully auto-merges the given heads.  It should do
   update-cache for all the merged paths when it does so -- the
   index file will be used to record the merge result as a
   commit by the driver.

 - The strategy program exits with status code 1 when it leaves
   conflicts behind.  It should do update-cache for all the
   merged paths that it successfully auto-merged, and leave the
   cache entry in the index file as the same as <head> for paths
   it could not auto-merge, and leave its best-effort result
   with conflict markers in the working tree when it does so.

 - The strategy program exists with status code other than 0 or
   1 if it does not handle the given merge at all.

As examples, this commit comes with merge strategies based on
'git resolve' and 'git octopus'.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-10 18:30:41 -07:00
Junio C Hamano a9ab586a5d Retire support for old environment variables.
We have deprecated the old environment variable names for quite a
while and now it's time to remove them.  Gone are:

    SHA1_FILE_DIRECTORIES AUTHOR_DATE AUTHOR_EMAIL AUTHOR_NAME
    COMMIT_AUTHOR_EMAIL COMMIT_AUTHOR_NAME SHA1_FILE_DIRECTORY

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-09 14:48:54 -07:00
Marco Roeland 03d98d395a [PATCH] remove duplicate git-send-email-script.perl target in Makefile
Remove duplicate git-send-email-perl target in Makefile.

When WITH_SEND_EMAIL was defined, as in the Debian 'deb' target,
git-send-email-perl was added twice to SCRIPT_PERL, leading to a
duplicate definition in the Makefile. Creating a ".deb" then failed.

Signed-off-by: Marco Roeland <marco.roeland@xs4all.nl>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-09 11:20:54 -07:00
Junio C Hamano bc6146d2ab 'build' scripts before installing.
Earlier we renamed git-foo.sh to git-foo while installing, which
was mostly done by inertia than anything else.  This however
made writing tests to use scripts harder.

This patch builds the scripts the same way as we build binaries
from their sources.  As a side effect, you can now specify
non-standard paths you have your Perl binary is in when running
the make.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-08 18:50:33 -07:00
Junio C Hamano 6a2e50f9df git --version tells which version of git you have.
Originally from Martin Atukunda <matlads@dsmagic.com> but adjusted for
post-rename code.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-07 22:08:30 -07:00
Patrick Mauritz f0ebff0dfe [PATCH] Portability fix for Solaris 10/x86
* getdomainname unavailable there.
 * needs -lsocket for linkage.
 * needs __EXTENSIONS__ at the beginning of convert-objects.c

[JC: I've done this slightly differently from what Patrick originally
sent to the list and dropped the bit that deals with installations
that has curl header and library at non-default location.  I am
resisting the slipperly slope called autoconf.]

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-07 22:08:28 -07:00
Junio C Hamano 215a7ad1ef Big tool rename.
As promised, this is the "big tool rename" patch.  The primary differences
since 0.99.6 are:

  (1) git-*-script are no more.  The commands installed do not
      have any such suffix so users do not have to remember if
      something is implemented as a shell script or not.

  (2) Many command names with 'cache' in them are renamed with
      'index' if that is what they mean.

There are backward compatibility symblic links so that you and
Porcelains can keep using the old names, but the backward
compatibility support  is expected to be removed in the near
future.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-07 17:45:20 -07:00
Junio C Hamano 99977bd5fd GIT 0.99.6 2005-09-07 15:59:24 -07:00
Junio C Hamano 597c9cc540 Flatten tools/ directory to make build procedure simpler.
Also make platform specific part more isolated.  Currently we only
have Darwin defined, but I've taken a look at SunOS specific patch
(which I dropped on the floor for now) as well.  Doing things this way
would make adding it easier.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-07 12:22:56 -07:00
Junio C Hamano 712d865523 Merge branch 'master' of . 2005-09-05 01:42:11 -07:00
Junio C Hamano 0516de30e8 Retire git-clone-dumb-http.
... and fold it into git-clone-script.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-05 00:47:39 -07:00
Junio C Hamano 8de8a292eb Install archimport-script.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-04 23:32:56 -07:00
Junio C Hamano 7a03433742 Merge refs/heads/master from . 2005-08-29 19:09:48 -07:00
Junio C Hamano e47e35acdd Remove git-apply-patch-script.
Now the rebase is rewritten to use git cherry-pick, there is no user
for that ancient script.  I've checked Cogito and StGIT to make sure
they do not use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-29 12:52:03 -07:00
Junio C Hamano 48313592bf Redo "revert" using three-way merge machinery.
The reverse patch application using "git apply" sometimes is too
rigid.  Since the user would get used to resolving conflicting merges
by hand during the normal merge experience, using the same machinery
would be more helpful rather than just giving up.

Cherry-picking and reverting are essentially the same operation.
You pick one commit, and apply the difference that commit introduces
to its own commit ancestry chain to the current tree.  Revert applies
the diff in reverse while cherry-pick applies it forward.  They share
the same logic, just different messages and merge direction.

Rewrite "git rebase" using "git cherry-pick".

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-29 12:52:02 -07:00
Junio C Hamano 0f58317531 Merge master branch changes into release candidate branch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-26 22:47:27 -07:00
Junio C Hamano 90bc118fc5 Enable git-send-email-script on Debian.
You can define WITH_SEND_EMAIL to include the send-email command as
part of the installation.  Since Debian, unlike RPM/Fedora, has the
two necessary Perl modules available as part of the mainline
distribution, there is no reason for us to shy away from shipping
send-email.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-26 21:46:32 -07:00
Junio C Hamano 09661fdbfc Prepare 0.99.6 branch. 2005-08-24 23:10:41 -07:00
Junio C Hamano 434d6ba031 Merge refs/heads/master from . 2005-08-24 16:56:48 -07:00
Junio C Hamano d9f3be7e2e [PATCH] Infamous 'octopus merge'
This script uses the list of heads and their origin multi-head "git
fetch" left in the $GIT_DIR/FETCH_HEAD file, and makes an octopus
merge on top of the current HEAD using them.

The implementation tries to be strict for the sake of safety.  It
insists that your working tree is clean (no local changes) and matches
the HEAD, and when any of the merged heads does not automerge, the
whole process is aborted and tries to rewind your working tree is to
the original state.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-24 16:50:51 -07:00
Junio C Hamano e0bfc81e05 [PATCH] Retire git-parse-remote.
Update git-pull to match updated git-fetch and allow pull to
fetch from multiple remote references.  There is no support for
resolving more than two heads, which will be done with "git
octopus".

Update "git ls-remote" to use git-parse-remote-script.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-24 16:50:50 -07:00
Junio C Hamano ac4b0cff00 [PATCH] Start adding the $GIT_DIR/remotes/ support.
All the necessary parsing code is in git-parse-remote-script;
update git-push-script to use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-24 16:50:49 -07:00
Junio C Hamano 89305da8a2 Merge refs/heads/master from . 2005-08-23 00:07:17 -07:00
Junio C Hamano f5e375c9a9 Clean-up output from "git show-branch" and document it.
When showing only one branch a lot of default output becomes redundant,
so clean it up a bit, and document what is shown.  Retire the earlier
implementation "git-show-branches-script".

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-22 23:18:17 -07:00
Junio C Hamano f76412ed6d [PATCH] Add 'git show-branch'.
The 'git show-branches' command turns out to be reasonably useful,
but painfully slow.  So rewrite it in C, using ideas from merge-base
while enhancing it a bit more.

 - Unlike show-branches, it can take --heads (show me all my
   heads), --tags (show me all my tags), or --all (both).

 - It can take --more=<number> to show beyond the merge-base.

 - It shows the short name for each commit in the extended SHA1
   syntax.

 - It can find merge-base for more than two heads.

Examples:

    $ git show-branch --more=6 HEAD

    is almost the same as "git log --pretty=oneline --max-count=6".

    $ git show-branch --merge-base master mhf misc

    finds the merge base of the three given heads.

    $ git show-branch master mhf misc

    shows logs from the top of these three branch heads, up to their
    common ancestor commit is shown.

    $ git show-branch --all --more=10

    is poor-man's gitk, showing all the tags and heads, and
    going back 10 commits beyond the merge base of those refs.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-22 18:34:10 -07:00
Junio C Hamano 6680153441 Merge with master to get diff fixes. 2005-08-16 22:30:46 -07:00
Linus Torvalds d288a70030 [PATCH] Make "git diff" work inside relative subdirectories
We always show the diff as an absolute path, but pathnames to diff are
taken relative to the current working directory (and if no pathnames are
given, the default ends up being all of the current working directory).

Note that "../xyz" also works, so you can do

	cd linux/drivers/char
	git diff ../block

and it will generate a diff of the linux/drivers/block changes.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-16 18:47:22 -07:00
Junio C Hamano da27f4f3f4 Merge master changes into rc. 2005-08-15 15:53:37 -07:00
Junio C Hamano 7c27558c62 Add git-show-branches-script
Often I find myself wanting to do quick branches check when I am
not in the windowing environment and cannot run gitk.

This stupid script shows commits leading to the heads of
interesting branches with indication which ones belong to which
branches, so that fork point is somewhat discernible without
using gitk.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-15 03:00:22 -07:00
Junio C Hamano 755d62788f Merge master changes into release candidate branch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-13 00:12:51 -07:00
Junio C Hamano 704a66f52e Make tools/ directory first-class citizen.
Tools directory being separate is just a historical
coincidence.  Build and install together with the main
directory, just like the clean target does. 

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-12 10:38:24 -07:00
Petr Baudis 3e386508f8 [PATCH] Unify Makefile indentation
Use <tab> instead of two spaces uniformly in the Makefile, even in the
ifdefs. Gives it a nice consistent look.

[jc: At the same time I indented the nested ifdefs to make them
slightly easier to read.]

Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-12 10:38:23 -07:00
Petr Baudis a682ef9f06 [PATCH] Use $DESTDIR instead of $dest
$DESTDIR is more usual during the build than $dest and is what
is usually used in the makefiles, so let's use it too.

Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-12 10:38:23 -07:00
Pavel Roskin b05701c5b4 Make CFLAGS overridable from make command line.
This patch renames COPTS to CFLAGS, because it's COPTS that was user
overridable.  Also, -Wall is moved there because it's optional.  What
was CFLAGS is now ALL_CFLAGS, which users should not override.

Defines are added to DEFINES.  Since ALL_CFLAGS is recursively expanded,
it uses the final value of DEFINES.

Implicit rules are made explicit since the implicit rules use CFLAGS
rather than ALL_CFLAGS.  I believe that serious projects should not rely
on implicit rules anyway.  Percent rules are used because they are used
already and because they don't need the .SUFFIXES target.

[jc: in addition to updating the patch for 0.99.4, I fixed up a
glitch in Pavel's original patch which compiled sha1.o out of
mozilla-sha1/sha1.c, where it should have left the resulting
object file in mozilla-sha1 directory for later "ar".]

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-12 10:38:22 -07:00
Junio C Hamano 5a571cdd8a Clean generated files a bit more, to cope with Debian build droppings.
Also attempt to build a source package for debian.
2005-08-12 10:38:22 -07:00
Junio C Hamano 8eb14dc188 Merge changes in the master branch into 0.99.5 preparation branch. 2005-08-11 22:12:29 -07:00
Junio C Hamano a6bc31338e Clean generated deb files.
Do not forgot that we have a separate git-tk package these days.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-11 18:52:34 -07:00
Junio C Hamano 38b1afd812 Start preparing for 0.99.5
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-10 22:05:59 -07:00
Junio C Hamano f69714c38c Merge with master.
This merges commit
    c35a7b8d80
from master into our head commit
    edee414c3e

Sincerely,
    jit-merge command.
2005-08-10 00:10:18 -07:00
Junio C Hamano 045f82cbee git-revert: revert an existing commit.
Given one existing commit, revert the change the patch
introduces, and record a new commit that records it.  This
requires your working tree to be clean (no modifications from
the HEAD commit).

This is based on what Linus posted to the list, with
enhancements he suggested, including the use of -M to attempt
reverting renames.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-09 23:38:49 -07:00
Junio C Hamano edee414c3e Merge with master.
This merges commit
    f10e0e0b18
from master into our head commit
    c3958a7926

Sincerely,
    jit-merge command.
2005-08-09 10:22:23 -07:00
Junio C Hamano 93b5fcdd8d Downgrade git-send-email-script
RPM folks have problem installing the package otherwise.  Since
its usefulness does have much to do with GIT, downgrade it to
"contrib" status for now.  We may want to move it to contrib/
subdirectory after auditing other programs when we reorganize
the source tree.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-09 10:16:12 -07:00
Junio C Hamano e764a10b17 Merge with master.
This merges commit
    3c4e8a636f
from master into our head commit
    80f45687f4

Sincerely,
    jit-merge command.
2005-08-08 18:02:39 -07:00
Junio C Hamano 3c4e8a636f Makefile dependency fix.
Johannes Schindelin noticed that recent Makefile updates were
too eager to loosen dependencies.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-08 17:52:51 -07:00
Junio C Hamano f29eaed12f Fix build rules for debian package.
Run install-tools target to install the tools to accept e-mail
patches.  Also clean up the main Makefile a bit.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-06 22:29:21 -07:00
Junio C Hamano 7a59013290 GIT 0.99.4 (release candidate)
This is my first attempt to adjust Debian and RPM to pass
prefix, to prepare the 0.99.4 release.

It updates debian/rules and git-core.spec.in to properly pass
prefix when building binary packages.  It also updates
debian/changelog to make the resulting binary package name
0.99.4; this is not needed on the RPM side (it takes the version
number from the main Makefile).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-06 17:23:52 -07:00
Junio C Hamano d3af621b14 Redo the templates generation and installation.
Per discussion with people interested in binary packaging,
change the default template location from /etc/git-core to
/usr/share/git-core hierarchy.  If a user wants to run git
before installing for whatever reason, in addition to adding
$src to the PATH environment variable, git-init-db can be run
with --template=$src/templates/blt/ parameter.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-06 13:49:26 -07:00
Junio C Hamano 9938af6a85 Update get_sha1() to grok extended format.
Everybody envies rev-parse, who is the only one that can grok
the extended sha1 format.  Move the get_extended_sha1() out of
rev-parse, rename it to get_sha1() and make it available to
everybody else.

The one I posted earlier to the list had one bug where it did
not handle a name that ends with a digit correctly (it
incorrectly tried the "Nth parent" path).  This commit fixes it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-05 00:51:07 -07:00
Junio C Hamano 20f6633112 Retire check-files.
The king penguin said:

    It has no point any more, all the tools check the file
    status on their own, and yes, the thing should probably be
    removed.

and the faithful servant makes it so.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-03 21:41:55 -07:00
Junio C Hamano 8d5afef0f9 Install sample hooks
A template mechanism to populate newly initialized repository
with default set of files is introduced.  Use it to ship example
hooks that can be used for update and post update checks, as
Josef Weidendorfer suggests.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-03 16:27:38 -07:00
Ryan Anderson 83b24437c2 [PATCH] Add git-send-email-script - tool to send emails from git-format-patch-script
This is based off of GregKH's script, send-lots-of-email.pl, and strives to do
all the nice things a good subsystem maintainer does when forwarding a patch or
50 upstream:

	All the prior handlers of the patch, as determined by the
	Signed-off-by: lines, and/or the author of the commit, are cc:ed on the
	email.

	All emails are sent as a reply to the previous email, making it easy to
	skip a collection of emails that are uninteresting.

Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-02 22:53:12 -07:00
Junio C Hamano 4b7581f04c Clean t/trash upon "make clean" as well.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-02 22:51:05 -07:00
Junio C Hamano 541ad6e2a9 GIT 0.99.3
Things have slowly but surely started to settle down, and the
http transport finally can natively grok packed repositories.
To give Pasky a good anchor point, hoping that he can start
split off the core part from Cogito, here is the 0.99.3, which
will be accompanied with its own tag.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-01 15:20:14 -07:00
Junio C Hamano 0f2b4c4654 Retire git-fetch-dumb-http and missing-revs
Now git-http-pull knows how to do packed repo, retire scripted
hacks I placed as a stop-gap measure.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-01 00:41:49 -07:00
Josef Weidendorfer b1bf95bba2 [PATCH] Added hook in git-receive-pack
Just before updating a ref,

    $GIT_DIR/hooks/update refname old-sha1 new-sha1

is called if executable.  The hook can decline the ref to be
updated by exiting with a non-zero status, or allow it to be
updated by exiting with a zero status.  The mechanism also
allows e.g sending of a mail with pushed commits on the remote
repository.

Documentation update with an example hook is included.

jc: The credits of the basic idea and initial implementation go
to Josef, but I ended up rewriting major parts of his patch, so
bugs are all mine.  Also I changed the semantics for the hook
from his original version (which were post-update hook) so that
the hook can optionally decline to update the ref, and also can
be used to implement the overall cleanups.  The latter was
primarily to implement a suggestion from Linus that calling
update-server-info should be made optional.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-31 23:30:59 -07:00
Junio C Hamano 60036a41e1 Add a stupid "count objects" script.
This counts the number of unpacked object files and disk space
consumed by them, to help you decide when it is a good time to
repack.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-31 11:58:43 -07:00
Junio C Hamano 96155e55e1 Fetch from a packed repository on dumb servers.
Implement fetching from a packed repository over http/https
using the dumb server support files.

I consider some parts of the logic should be in a separate C
program, but it appears to work with my simple tests.  I have
backburnered it for a bit too long for my liking, so let's throw
it out in the open and see what happens.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-31 11:56:44 -07:00
Johannes Schindelin b2c0bd652a [PATCH] add NO_CURL option to the Makefile
This patch implements Linus' idea that if you are not interested in
pulling by HTTP, you can now say

	NO_CURL=1 make

to compile everything except git-http-pull (thus not needing curl at all).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-30 23:01:09 -07:00
Linus Torvalds 8cc6a08319 [PATCH] Making it easier to find which change introduced a bug
This adds a new "git bisect" command.

 - "git bisect start"
	start bisection search.

 - "git bisect bad <rev>"
	mark some version known-bad (if no arguments, then current HEAD)

 - "git bisect good <revs>..."
	mark some versions known-good (if no arguments, then current HEAD)

 - "git bisect reset <branch>"
	done with bisection search and go back to your work (if
	no arguments, then "master").

The way you use it is:

	git bisect start
	git bisect bad			# Current version is bad
	git bisect good v2.6.13-rc2	# v2.6.13-rc2 was the last version
					# tested that was good

When you give at least one bad and one good versions, it will
bisect the revision tree and say something like:

	Bisecting: 675 revisions left to test after this

and check out the state in the middle. Now, compile that kernel, and boot
it. Now, let's say that this booted kernel works fine, then just do

	git bisect good			# this one is good

which will now say

	Bisecting: 337 revisions left to test after this

and you continue along, compiling that one, testing it, and depending on
whether it is good or bad, you say "git bisect good" or "git bisect bad",
and ask for the next bisection.

Until you have no more left, and you'll have been left with the first bad
kernel rev in "refs/bisect/bad".

Oh, and then after you want to reset to the original head, do a

	git bisect reset

to get back to the master branch, instead of being in one of the bisection
branches ("git bisect start" will do that for you too, actually: it will
reset the bisection state, and before it does that it checks that you're
not using some old bisection branch).

Not really any harder than doing series of "quilt push" and "quilt pop",
now is it?

[jc: This patch is a rework based on what Linus posted to the
     list.  The changes are:

  - The original introduced four separate commands, which was
    three too many, so I merged them into one with subcommands.
    
  - Since the next thing you would want to do after telling it
    "bad" and "good" is always to bisect, this version does it
    automatically for you.

  - I think the termination condition was wrong.  The original
    version checked if the set of revisions reachable from next
    bisection but not rechable from any of the known good ones
    is empty, but if the current bisection was a bad one, this
    would not terminate, so I changed it to terminate it when
    the set becomes a singleton or empty.

  - Removed the use of shell array variable.

]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-30 14:03:14 -07:00
Junio C Hamano 9e95049b12 NO_OPENSSL should really mean no openssl.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-30 11:10:44 -07:00
Junio C Hamano 9e44f8980b Fix typo in recent Makefile cleanup.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-29 18:38:15 -07:00
Petr Baudis 623c8a1460 [PATCH] Build commands through object files
Separate the process of building the commands to compilation and
linkage. This makes it more consistent with the library objects, is the
traditional thing to do, and significantly speeds up the subsequent
rebuilds, especially for us the people who develop git on 300MHz
notebooks.

Ported from Cogito.

Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-29 17:21:53 -07:00
Petr Baudis dd53c7ab29 [PATCH] Support for NO_OPENSSL
Support for completely OpenSSL-less builds. FSF considers distributing GPL
binaries with OpenSSL linked in as a legal problem so this is trouble
e.g. for Debian, or some people might not want to install OpenSSL
anyway. If you

	make NO_OPENSSL=1

you get completely OpenSSL-less build, disabling --merge-order and using
Mozilla's SHA1 implementation.

Ported from Cogito.

Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-29 17:21:52 -07:00
Petr Baudis 28818ffada [PATCH] Reorder Makefile rules
The Makefile rules were massively reordered so that they are actually
logically grouped now. Captions were added to separate the sections. No
rule contents was touched during the process.

Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-29 17:21:52 -07:00
Petr Baudis e468305a95 [PATCH] Remove the explicit Makefile dependencies description
Remove about one gazillion of explicit dependency rules with few lines
describing the general dependency pattern and then the exceptions. This
noticably shortens the Makefile and makes it easier to touch it.

This is part of the Cogito Makefile changes port.

Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-29 17:21:51 -07:00
Petr Baudis 5bdac8b326 [PATCH] Improve the compilation-time settings interface
Describe variables which make itself takes and adjusts compilation
accordingly (MOZILLA_SHA1, NO_OPENSSL, PPC_SHA1), and make adding
defines more convenient through the $DEFINES variable. $COPTS includes
-g as well now and is not overriden if it was already declared in the
environment. Also, $CFLAGS is appended to rather than reset, so that if
there was already a $CFLAGS environment variable, it's appended to. Some
more variables are also made overridable through the environment. Renamed
$bin to $bindir which is the name commonly used for this.

This is part of the Cogito Makefile changes port.

Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-29 17:21:51 -07:00
Johannes Schindelin bfb15365b0 [PATCH] socklen_t needs to be defined and libssl to be linked on old Mac OS X
On older Mac OS X (10.2.8), no socklen_t is defined, and therefore
daemon.c does not compile. However, Mac OS X 10.4 seems to define
socklen_t differently.

Also, linking fails due to some symbols defined in libssl (not just
libcrypto).

[jc: I am tentatively dropping the socklen_t part of the patch
because I am waiting for confirmation on the server side IPV6
patch from Yoshifuji-san]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-29 00:12:03 -07:00
Ryan Anderson ab421d2c78 [PATCH] Add git-request-pull-script, a short script that generates a summary of pending changes
A short message requesting a pull from the repository is also included.

Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-27 11:53:47 -07:00
Junio C Hamano 2779fad613 Name it 0.99.2
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-26 17:21:16 -07:00
Linus Torvalds 399144f21c Add a "git rename" to help with - surprise surprise - renames
It's stupid.  We'd want to rename directories too, but this doesn't do
that yet - easy enough to do per se, we just need to carefully list all
the pathnames that got moved (and remember to ignore the files that
weren't tracked but are in the subdirectory that got moved).

Doing the directory case will require a bit more scripting.. Something like

	oldfiles=($(git-ls-files | grep '^$src'))
	newfiles=($(git-ls-files | sed ':^$src: s:^$src:$dst:'))
	mv $src $dst && git-update-cache --add --remove -- "${oldfiles[@]}" "${newfiles[@]}"

might do it, except it needs to be done right, and carefully.  Methinks
perl is probably better at this. Hint hint..
2005-07-23 18:52:22 -07:00
Junio C Hamano c0a58fbb51 [PATCH] Support cloning packed repo from dumb http servers.
Using the information prepared with update-server-info, a truly
dumb http server can allow cloning with this client side
support.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-23 18:28:19 -07:00
Junio C Hamano 8f3f9b09dc [PATCH] Add update-server-info.
The git-update-server-info command prepares informational files
to help clients discover the contents of a repository, and pull
from it via a dumb transport protocols.  Currently, the
following files are produced.

 - The $repo/info/refs file lists the name of heads and tags
   available in the $repo/refs/ directory, along with their
   SHA1.  This can be used by git-ls-remote command running on
   the client side.

 - The $repo/info/rev-cache file describes the commit ancestry
   reachable from references in the $repo/refs/ directory.  This
   file is in an append-only binary format to make the server
   side friendly to rsync mirroring scheme, and can be read by
   git-show-rev-cache command.

 - The $repo/objects/info/pack file lists the name of the packs
   available, the interdependencies among them, and the head
   commits and tags contained in them.  Along with the other two
   files, this is designed to help clients to make smart pull
   decisions.

The git-receive-pack command is changed to invoke it at the end,
so just after a push to a public repository finishes via "git
push", the server info is automatically updated.

In addition, building of the rev-cache file can be done by a
standalone git-build-rev-cache command separately.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-23 18:28:19 -07:00
Junio C Hamano 0fec082272 [PATCH] git-ls-remote: show and optionally store remote refs.
Retrieve and list the remote refs from git, http, and rsync
repositories, and optionally stores the retrieved refs in the
local repository under the same name.

To access a git URL, git-peek-remote command is used.  An http
URL needs to have an up-to-date info/refs file for discovery,
which will be introduced by a later update-server-info patch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-23 18:28:19 -07:00
Junio C Hamano 18705953af [PATCH] git-peek-remote: show tags and heads from a remote repository.
Add a git-peek-remote command that talks with upload-pack the
same way git-fetch-pack and git-clone-pack do, to show the
references the remote side has on the standard output.

A later patch introduces git-ls-remote that implements a UI to
store tag values retrieved using this command.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-23 18:28:18 -07:00
Junio C Hamano 8cc393068a [PATCH] Install tools with "make install-tools".
Match the main Makefile by separating COPTS from CFLAGS,
defining INSTALL, prefix, and bin.  Add a new target 'install-tools'
to the main Makefile to install them.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-22 20:34:16 -07:00
Eric W. Biederman 421cbeb2f7 [PATCH] Install git-verify-tag-script
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-22 17:48:45 -07:00
Junio C Hamano f170e4b39d [PATCH] fetch/pull: short-hand notation for remote repositories.
Since pull and fetch are done often against the same remote
repository repeatedly, keeping the URL to pull from along with
the name of the head to use in $GIT_DIR/branches/$name makes a
lot of sense.  Adopt that convention from Cogito, and try to be
compatible when possible; storing a partial URL and completing
it with a trailing path may not be understood by Cogito.

While we are at it, fix pulling a tag.  Earlier, we updated only
refs/tags/$tag without updating FETCH_HEAD, and called
resolve-script using a stale (or absent) FETCH_HEAD.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-16 09:23:06 -07:00
Linus Torvalds 78d9d41412 Ahh, the heady days of 0.99 patchfiles
Now, not all projects can be as refined as Linux.  Before the final 1.0
release, we went through fifteen 0.99 patchfiles, and pl14 alone went
through subreleases 'a' through 'z'. Now _that_ is a release process.

Not to mention the odd-ball releases, like 0.96c+

Sadly, in this day and age of RPM's etc, we have silly limitations, and
I cannot call this release '0.99pl5a or some such awe-inspiring name
just because "rpmbuild" is such a party pooper.  So it's just 0.99.1.

Oh well.  Aspiring to such greatness as the Linux release numbering is
hubris anyway.  You can attain such perfection only once in your life.
2005-07-15 16:08:01 -07:00
Eric W. Biederman 87a81c834b [PATCH] Add doc and install-doc targets to the Makefile
This makes it straightforward for people wanting to build and install
the git man pages and the rest of the documentation to do so.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-15 11:38:24 -07:00
Eric W. Biederman 9dce3c0617 [PATCH] Use gzip -f when building the git-core tarball
This allows rebuilding the tarball when it is already present
without having to answer annoying questions from gzip

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-15 11:38:24 -07:00
Eric W. Biederman d7b8a164e4 [PATCH] Add a RPMBUILD make variable
This allows RPMBUILD to be overridden for people with
old versions of rpm or people who want to pass rpmbuild extra options.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-15 11:38:24 -07:00
Eric W. Biederman aed022ab4c [PATCH] Add git-var a tool for reading interesting git variables.
Sharing code between shell scripts and C is a challenge.  The program
git-var allows us to have a set of named values that a shell script can
interrogate and a normal C program can simply call the functions that
compute them.  Allowing sharing when computing plain test values.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-15 10:00:35 -07:00
Linus Torvalds a87e8be2ae Add a "git-daemon" that listens on a TCP port
.. and does a "git-upload-pack" on demand.
2005-07-13 19:45:26 -07:00
Linus Torvalds 6aa33f4035 Abstract out the "name <email> date" handling of commit-tree.c
We'll want to use it for the tagging too.
2005-07-12 11:49:27 -07:00
Linus Torvalds ced7c84821 "make clean" should clean up after a rpm build
There's a few generated files that we left behind.
2005-07-12 10:12:52 -07:00
Linus Torvalds f85639c303 Rename the RPM from "git" to "git-core"
That way we avoid any confusion with "GNU Interactive Tools", and it's
more descriptive anyway (the rpm documentation talks about how git is
split into a "core" part and an "SCM" part, this makes it clear that
this is the core one).
2005-07-12 10:07:18 -07:00
Linus Torvalds 37f1a519f2 Add "git branch" script
You can use it as

	git branch <branchname> [start-point]

and it creates a new branch of name <branchname>.  If a starting point
is specified, that will be where the branch is created, otherwise it
will be created at the current HEAD.

The sequence

	git branch xyz abc
	git checkout xyz

can also be written as

	git checkout -b xyz abc

as per the previous commit.
2005-07-11 21:30:23 -07:00