1
0
mirror of https://github.com/git/git.git synced 2024-09-30 12:32:09 +02:00
Commit Graph

145 Commits

Author SHA1 Message Date
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
Chris Wright
b1de9de2b9 [PATCH] Bootstrap "make dist"
Use git-tar-tree directly from git source during make dist.  This
handles bootstrap issue with git not being installed.

Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-11 14:20:10 -07:00
Bryan Larsen
7672db20c2 [PATCH] Expose object ID computation functions.
This patch makes the first half of write_sha1_file() and
index_fd() externally visible, to allow callers to compute the
object ID without actually storing it in the object database.

[JC demangled the whitespaces himself because he liked the patch
 so much, and reworked the interface to index_fd() slightly,
 taking suggestion from Linus and of his own.]

Signed-off-by: Bryan Larsen <bryan.larsen@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-08 17:07:37 -07:00
Linus Torvalds
26c8a533af Add "mkpath()" helper function
I'm bored with doing it by hand all the time.
2005-07-08 16:20:59 -07:00
Linus Torvalds
51cb06c36d Add "git-push-script" to make a more regular interface
It only does local and ssh pushes, because it's really just a wrapper
for git-send-pack.  We might make it do an rsync mirror or something, of
course.
2005-07-08 14:24:25 -07:00
Junio C Hamano
6fb737be5e [PATCH] Make sq_expand() available as sq_quote().
A useful shell safety helper sq_expand() was hidden as a static
function in diff.c.  Extract it out and make it available as
sq_quote().

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-08 11:01:10 -07:00
Linus Torvalds
b33e966608 Add "git-sh-setup-script" for common git shell script setup
It sets up the normal git environment variables and a few helper
functions (currently just "die()"), and returns ok if it all looks like
a git archive.  So use it something like

	. git-sh-setup-script || die "Not a git archive"

to make the rest of the git scripts more careful and readable.
2005-07-08 10:57:21 -07:00
Junio C Hamano
0acfc97252 [PATCH] git-format-patch: Prepare patches for e-mail submission.
This is the script I use to prepare patches for e-mail submission.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07 18:07:12 -07:00
Chris Wright
a9db297485 Infrastructure for git rpm builds. Adds GIT_VERSION to Makefile and new make
targets: git.spec, dist, and rpm.  A simple 'make rpm' will build the rpm.
Also adds git.spec.in which is used to generate git.spec.

Signed-off-by: Chris Wright <chrisw@osdl.org>
2005-07-07 13:09:50 -07:00
Linus Torvalds
0271611e39 Add a "git-show-index" helper that shows the contents of a pack index
This was invaluable for debugging the zero-sized compression issue, and
might be useful for scripting too, if people want to see the contents of
a pack.
2005-07-05 17:08:02 -07:00
Linus Torvalds
1fcc8ea55d Add "git-clone-pack" program to help with "git clone" 2005-07-05 15:45:37 -07:00
Matthias Urlichs
f4b3a4c30b Merge with Linus' current tree 2005-07-05 15:32:29 +02:00
Linus Torvalds
def88e9afb Commit first cut at "git-fetch-pack"
It's meant to be used by "git fetch" for the local and ssh case.

It doesn't actually do the fetching now, but it does discover the common
commit point.
2005-07-04 13:26:53 -07:00
Linus Torvalds
f71925983d Factor out the ssh connection stuff from send-pack.c
I want to use it for git-fetch-pack too.
2005-07-04 11:57:58 -07:00
Linus Torvalds
2396ec85bd Add "git-prune-packed" that removes objects that exist in a pack.
This, together with "git repack" can be used to clean up unpacked
git archives.
2005-07-03 14:27:34 -07:00
Linus Torvalds
b2d46199d2 Add "git repack" command that does an incremental pack 2005-07-03 13:38:01 -07:00
Linus Torvalds
44c9e8594e Fix up header file dependencies and add sparse checking rules
We're pretty sparse-clean already, thanks to earlier efforts, but some
things inevitably creep in.
2005-07-03 10:02:35 -07:00
Junio C Hamano
f3bf922409 [PATCH] verify-pack updates.
Nico pointed out that having verify_pack.c and verify-pack.c was
confusing.  Rename verify_pack.c to pack-check.c as suggested,
and enhances the verification done quite a bit.

 - Built-in sha1_file unpacking knows that a base object of a
   deltified object _must_ be in the same pack, and takes
   advantage of that fact.

 - Earlier verify-pack command only checked the SHA1 sum for the
   entire pack file and did not look into its contents.  It now
   checks everything idx file claims to have unpacks correctly.

 - It now has a hook to give more detailed information for
   objects contained in the pack under -v flag.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-30 22:33:47 -07:00
Linus Torvalds
1a3e71767c Turn on optimization again
It got turned off by mistake just because I had been doing debugging,
and committed the Makefile that had other changes ...
2005-06-29 21:08:21 -07:00
Linus Torvalds
f3a3214e83 Make send/receive-pack be closer to doing something interesting 2005-06-29 20:50:15 -07:00
Linus Torvalds
61221472a5 Start of "git-send-pack", the local part of sending off a pack
Like git-receive-pack, this is only partway done.
2005-06-29 19:09:05 -07:00
Linus Torvalds
575f497456 Add first cut at "git-receive-pack"
It's not working yet, but it's at the point where I want to be able to
track my changes.  The theory of operation is that this is the "remote"
side of a "git push".  It can tell us what references the remote side
has, receives out reference update commands and a pack-file, and can
execute the unpacking command.
2005-06-29 17:52:11 -07:00
Junio C Hamano
f9253394a2 [PATCH] Add git-verify-pack command.
Given a list of <pack>.idx files, this command validates the
index file and the corresponding .pack file for consistency.

This patch also uses the same validation mechanism in fsck-cache
when the --full flag is used.

During normal operation, sha1_file.c verifies that a given .idx
file matches the .pack file by comparing the SHA1 checksum
stored in .idx file and .pack file as a minimum sanity check.
We may further want to check the pack signature and version when
we map the pack, but that would be a separate patch.

Earlier, errors to map a pack file was not flagged fatal but led
to a random fatal error later.  This version explicitly die()s
when such an error is detected.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-29 09:11:39 -07:00
Linus Torvalds
01247d8742 Make git pack files use little-endian size encoding
This makes it match the new delta encoding, and admittedly makes the
code easier to follow.

This also updates the PACK file version to 2, since this (and the delta
encoding change in the previous commit) are incompatible with the old
format.
2005-06-28 22:15:57 -07:00
Matthias Urlichs
a57a9493df Added Perl git-cvsimport-script 2005-06-28 16:48:40 +02:00
Junio C Hamano
c4584ae3fd [PATCH] Remove "delta" object representation.
Packed delta files created by git-pack-objects seems to be the
way to go, and existing "delta" object handling code has exposed
the object representation details to too many places.  Remove it
while we refactor code to come up with a proper interface in
sha1_file.c.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-27 15:27:51 -07:00
Linus Torvalds
c38138cd78 git-pack-objects: write the pack files with a SHA1 csum
We want to be able to check their integrity later, and putting the
sha1-sum of the contents at the end is a good thing.  The writing
routines are generic, so we could try to re-use them for the index file,
instead of having the same logic duplicated.

Update unpack-objects to know about the extra 20 bytes at the end
of the index.
2005-06-26 20:27:56 -07:00
Ryan Anderson
102fc37f3b [PATCH] Add git-relink-script to fix up missing hardlinks
This will scan 2 or more object repositories and look for common objects, check
if they are hardlinked, and replace one with a hardlink to the other if not.

This version warns when skipping files because of size differences, and
handle more than 2 repositories automatically.

Signed-off-by: Ryan Anderson <ryan@michonline.com>
Cheered-on-by: Jeff Garzik <jgarzik@pobox.com>
Acked-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-26 13:11:59 -07:00
Junio C Hamano
59e6b23ace [PATCH] git-rebase-script: rebase local commits to new upstream head.
Using git-cherry, forward port local commits missing from the
new upstream head.  This also depends on "-m" flag support in
git-commit-script.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-25 16:52:16 -07:00
Junio C Hamano
93c36dcd0a [PATCH] git-cherry: find commits not merged upstream.
The git-cherry command helps the git-rebase script by finding
commits that have not been merged upstream.  Commits already
included in upstream are prefixed with '-' (meaning "drop from
my local pull"), while commits missing from upstream are
prefixed with '+' (meaning "add to the updated upstream").

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-25 16:52:16 -07:00
Linus Torvalds
bad50dc80f First cut at git-unpack-objects
So far it just reads the header and generates the list of objects.

It also sorts them by the order they are written in the pack file,
since that ends up being the same order we got them originally, and
is thus "most recent first".
2005-06-25 15:27:14 -07:00
Linus Torvalds
c323ac7d9c git-pack-objects: create a packed object representation.
This is kind of like a tar-ball for a set of objects, ready to be
shipped off to another end.  Alternatively, you could use is as a packed
representation of the object database directly, if you changed
"read_sha1_file()" to read these kinds of packs.

The latter is partiularly useful to generate a "packed history", ie you
could pack up your old history efficiently, but still have it available
(at a performance hit, of course).

I haven't actually written an unpacker yet, so the end result has not
been verified in any way yet.  I obviously always write bug-free code,
so it just has to work, no?
2005-06-25 14:42:43 -07:00