Compare commits

...

28 Commits

Author SHA1 Message Date
ca182053c7 GIT 1.0.13
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-27 14:46:10 -08:00
1ecc18e4fc checkout: do not make a temporary copy of symlink target.
If the index records an insanely long symbolic link, copying
into the temporary would overflow the buffer (noticed by Mark
Wooding).

Because read_sha1_file() terminates the returned buffer with NUL
since late May 2005, there is no reason to copy it anymore.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-27 14:44:07 -08:00
3a75f67401 GIT 1.0.12 2006-01-19 18:32:54 -08:00
e921fb82cf git-fetch-pack: really do not ask for funny refs
If git-fetch-pack was called with out any refspec, it would ask the server
for funny refs. That cannot work, since the funny refs are not marked
as OUR_REF by upload-pack, which just exits with an error.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-19 18:29:43 -08:00
e93ec6f9d8 Revert "check_packed_git_idx(): check integrity of the idx file itself."
This reverts c5ced64578 commit.
It turns out that doing this check every time we map the idx file
is quite expensive.  A corrupt idx file is caught by git-fsck-objects,
so this check is not strictly necessary.

In one unscientific test, 0.99.9m spent 10 seconds usertime for
the same task 1.1.3 takes 37 seconds usertime.  Reverting this gives
us the performance of 0.99.9 back.
2006-01-19 18:29:11 -08:00
ae4a35261d GIT 1.0.11 2006-01-15 21:11:30 -08:00
ee3d299e93 diffcore-break/diffcore-rename: integer overflow.
While reviewing the end user tutorial rewrite by J. Bruce
Fields, I noticed that "git-diff-tree -B -C" did not correctly
break the total rewrite of Documentation/tutorial.txt.  It turns
out that we had integer overflow during the break score
computations.

Cop out by using floating point.  This is not a kernel.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-15 21:08:42 -08:00
e99c2fbdda GIT 1.0.10 2006-01-13 16:39:17 -08:00
a0dfb48af7 Documentation: git-reset - interrupted workflow.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-13 13:17:55 -08:00
cb95bf488b Documentation: git-commit -a
A bit more elaboration on what "update all paths" means.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-13 12:59:21 -08:00
c2bc6e404d Documentation: clarify fetch parameter descriptions.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-12 22:03:11 -08:00
87758f975b show-branch: handle [] globs as well.
Earlier only '?' and '*' signalled the command that what the
user has given is a glob pattern.  This prevented us to say:

	$ git show-branch 'v0.99.[0-3]'

Now we notice '[' as well, so the above would work.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-11 15:36:07 -08:00
2c817df25d name-rev: do not omit leading components of ref name.
In a repository with mainto/1.0 (to keep maintaining the 1.0.X
series) and fixo/1.0 (to keep fixes that apply to both 1.0.X
series and upwards) branches, "git-name-rev mainto/1.0" answered
just "1.0" making things ambiguous.  Show refnames unambiguously
like show-branch does.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-11 14:47:20 -08:00
a94d9948da update-index: work with c-quoted name
update-index --stdin did not work with c-style quoted names even though
update-index --index-info did.  This fixes the inconsistency.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-11 13:36:45 -08:00
0de62e5985 GIT 1.0.9 2006-01-10 16:20:22 -08:00
d5a6aafc90 glossary: explain "master" and "origin"
If you are a long time git user/developer, you forget that to a new git
user, these words have not the same meaning as to you.

[jc: with updates from J. Bruce Fields.]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-10 16:02:54 -08:00
8fc11b5aa9 GIT 1.0.8 2006-01-07 21:32:48 -08:00
6f2eacfeb2 mailsplit: allow empty input from stdin
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-07 21:26:30 -08:00
013049c985 revert/cherry-pick: handle single quote in author name.
The same fix as aa66c7ec77 is
needed here.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-07 20:45:11 -08:00
5f815e5922 Fix git-format-patch usage string wrt output modes.
--stdout was not mentionned, and the description for the case where -o
was not given was thus incomplete.

Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-07 18:17:38 -08:00
36071af305 Fix typo in debug stanza of t2001
Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-07 18:13:44 -08:00
3ac0ebbba4 tar-tree: finish honoring extractor's umask in git-tar-tree.
Earlier commit 38ec15a973 forgot
to apply the same principle of not forcing go-w to the base
directory when specified.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-07 15:11:11 -08:00
8f1d2e6f49 [PATCH] Compilation: zero-length array declaration.
ISO C99 (and GCC 3.x or later) lets you write a flexible array
at the end of a structure, like this:

	struct frotz {
		int xyzzy;
		char nitfol[]; /* more */
	};

GCC 2.95 and 2.96 let you to do this with "char nitfol[0]";
unfortunately this is not allowed by ISO C90.

This declares such construct like this:

	struct frotz {
		int xyzzy;
		char nitfol[FLEX_ARRAY]; /* more */
	};

and git-compat-util.h defines FLEX_ARRAY to 0 for gcc 2.95 and
empty for others.

If you are using a C90 C compiler, you should be able
to override this with CFLAGS=-DFLEX_ARRAY=1 from the
command line of "make".

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-07 10:51:06 -08:00
3be7098ce4 prune: do not show error from pack-redundant when no packs are found.
When there is no pack yet, git-prune leaked an error message
from "git-pack-redundant --all" which complained that there is
no pack.  Squelch the annoying message.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-07 00:29:48 -08:00
7d0e65b892 Retire debian/ directory.
The official maintainer is keeping up-to-date quite well, and now
the older Debian is supported with backports.org, there is no reason
for me to keep debian/ directory around here.

I have not been building and publishing debs since 1.0.4 anyway.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-06 19:18:12 -08:00
476e801111 unpack-objects: default to quiet if stderr is not a tty.
This would help cron/at jobs that run send-pack to mirror
repositories.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-06 18:53:16 -08:00
34c99da2a4 Substitute "/" with $opt_s in tag names as well as branch names
In 'git cvsimport' changes "/" to "-" (or $opt_s) in branch names,
but not in tag names, which is inconsistent.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-06 14:27:47 -08:00
576cfc86fc Teach cvsexportcommit to add new files
"cvs add" support was already there, but the "unknown" status
returned when querying a file not yet known to cvs caused the
script to abort prematurely.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-06 14:27:47 -08:00
47 changed files with 111 additions and 530 deletions

View File

@ -25,7 +25,9 @@ information.
OPTIONS
-------
-a|--all::
Update all paths in the index file.
Update all paths in the index file. This flag notices
files that have been modified and deleted, but new files
you have not told about git are not affected.
-c or -C <commit>::
Take existing commit object, and reuse the log message

View File

@ -145,6 +145,32 @@ brings your index file and the working tree back to that state,
and resets the tip of the branch to that commit.
------------
Interrupted workflow::
+
You can get interrupted by an ungent fix request while you are
still in the middle of a large change. The files in your
working tree are not in any shape to be committed yet, but you
need to get to the other branch for a quick bugfix.
+
------------
$ git checkout feature ;# you were working in "feature" branch and
$ work work work ;# got interrupted
$ git commit -a -m 'snapshot WIP' <1>
$ git checkout master
$ fix fix fix
$ git commit ;# commit with real log
$ git checkout feature
$ git reset --soft HEAD^ ;# go back to WIP state <2>
$ git reset <3>
<1> This commit will get blown away so a throw-away log message is OK.
<2> This removes the 'WIP' commit from the commit history, and makes
your working tree in the state just before you made that snapshot.
<3> After <2>, the index file still has all the WIP changes you
committed in <1>. This sets it to the last commit you were
basing the WIP changes on.
------------
Author
------
Written by Junio C Hamano <junkio@cox.net> and Linus Torvalds <torvalds@osdl.org>
@ -156,4 +182,3 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
Part of the gitlink:git[7] suite

View File

@ -111,6 +111,17 @@ branch::
a particular revision, which is called the branch head. The
branch heads are stored in `$GIT_DIR/refs/heads/`.
master::
The default branch. Whenever you create a git repository, a branch
named "master" is created, and becomes the active branch. In most
cases, this contains the local development.
origin::
The default upstream branch. Most projects have one upstream
project which they track, and by default 'origin' is used for
that purpose. New updates from upstream will be fetched into
this branch; you should never commit to it yourself.
ref::
A 40-byte hex representation of a SHA1 pointing to a particular
object. These may be stored in `$GIT_DIR/refs/`.

View File

@ -134,9 +134,9 @@ is often useful.
+
Some short-cut notations are also supported.
+
* For backward compatibility, `tag` is almost ignored;
it just makes the following parameter <tag> to mean a
refspec `refs/tags/<tag>:refs/tags/<tag>`.
* `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`;
used with pull or fetch, it requests fetching everything up to
the given tag.
* A parameter <ref> without a colon is equivalent to
<ref>: when pulling/fetching, and <ref>`:`<ref> when
pushing. That is, do not store it locally if

View File

@ -55,7 +55,7 @@ all:
# Define USE_STDEV below if you want git to care about the underlying device
# change being considered an inode change from the update-cache perspective.
GIT_VERSION = 1.0.7
GIT_VERSION = 1.0.13
# CFLAGS and LDFLAGS are for the users to override from the command line.
@ -489,12 +489,6 @@ dist: git.spec git-tar-tree
rpm: dist
$(RPMBUILD) -ta $(GIT_TARNAME).tar.gz
deb: dist
rm -rf $(GIT_TARNAME)
$(TAR) zxf $(GIT_TARNAME).tar.gz
dpkg-source -b $(GIT_TARNAME)
cd $(GIT_TARNAME) && fakeroot debian/rules binary
### Cleaning rules
clean:
@ -504,8 +498,6 @@ clean:
rm -f *.spec *.pyc *.pyo */*.pyc */*.pyo
rm -rf $(GIT_TARNAME)
rm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
rm -f git-core_$(GIT_VERSION)-*.dsc
rm -f git-*_$(GIT_VERSION)-*.deb
$(MAKE) -C Documentation/ clean
$(MAKE) -C templates clean
$(MAKE) -C t/ clean

2
blob.c
View File

@ -1,5 +1,5 @@
#include "blob.h"
#include "cache.h"
#include "blob.h"
#include <stdlib.h>
const char *blob_type = "blob";

View File

@ -81,7 +81,7 @@ struct cache_entry {
unsigned int ce_size;
unsigned char sha1[20];
unsigned short ce_flags;
char name[0];
char name[FLEX_ARRAY]; /* more */
};
#define CE_NAMEMASK (0x0fff)
@ -257,7 +257,7 @@ extern int checkout_entry(struct cache_entry *ce, struct checkout *state);
extern struct alternate_object_database {
struct alternate_object_database *next;
char *name;
char base[0]; /* more */
char base[FLEX_ARRAY]; /* more */
} *alt_odb_list;
extern void prepare_alt_odb(void);
@ -271,7 +271,8 @@ extern struct packed_git {
unsigned int pack_use_cnt;
int pack_local;
unsigned char sha1[20];
char pack_name[0]; /* something like ".git/objects/pack/xxxxx.pack" */
/* something like ".git/objects/pack/xxxxx.pack" */
char pack_name[FLEX_ARRAY]; /* more */
} *packed_git;
struct pack_entry {
@ -286,7 +287,7 @@ struct ref {
unsigned char new_sha1[20];
unsigned char force;
struct ref *peer_ref; /* when renaming */
char name[0];
char name[FLEX_ARRAY]; /* more */
};
extern int git_connect(int fd[2], char *url, const char *prog);

View File

@ -1,6 +1,6 @@
#include "cache.h"
#include "tag.h"
#include "commit.h"
#include "cache.h"
int save_commit_buffer = 1;

6
debian/.gitignore vendored
View File

@ -1,6 +0,0 @@
git-core
git-tk
*.debhelper
*.substvars
build-stamp
files

230
debian/changelog vendored
View File

@ -1,230 +0,0 @@
git-core (1.0.4-0) unstable; urgency=low
* GIT 1.0.4.
-- Junio C Hamano <junkio@cox.net> Sat, 24 Dec 2005 00:01:20 -0800
git-core (1.0.3-0) unstable; urgency=low
* GIT 1.0.3 maintenance release.
-- Junio C Hamano <junkio@cox.net> Thu, 22 Dec 2005 18:13:33 -0800
git-core (1.0.0b-0) unstable; urgency=low
* GIT 1.0.0b to include two more fixes.
-- Junio C Hamano <junkio@cox.net> Wed, 21 Dec 2005 13:50:21 -0800
git-core (1.0.0a-0) unstable; urgency=low
* GIT 1.0.0a to include the following fixes:
- Avoid misleading success message on error (Johannes)
- objects/info/packs: work around bug in http-fetch.c::fetch_indices()
- http-fetch.c: fix objects/info/pack parsing.
- An off-by-one bug found by valgrind (Pavel)
-- Junio C Hamano <junkio@cox.net> Wed, 21 Dec 2005 13:17:17 -0800
git-core (1.0.0-0) unstable; urgency=low
* GIT 1.0.0
-- Junio C Hamano <junkio@cox.net> Wed, 21 Dec 2005 00:01:00 -0800
git-core (0.99.9n-0) unstable; urgency=low
* GIT 0.99.9n aka 1.0rc6
-- Junio C Hamano <junkio@cox.net> Wed, 14 Dec 2005 17:27:08 -0800
git-core (0.99.9m-0) unstable; urgency=low
* GIT 0.99.9m aka 1.0rc5
-- Junio C Hamano <junkio@cox.net> Sun, 11 Dec 2005 16:48:06 -0800
git-core (0.99.9l-0) unstable; urgency=low
* GIT 0.99.9l aka 1.0rc4
-- Junio C Hamano <junkio@cox.net> Sat, 3 Dec 2005 23:45:23 -0800
git-core (0.99.9k-0) unstable; urgency=low
* GIT 0.99.9k but not 1.0rc yet.
-- Junio C Hamano <junkio@cox.net> Fri, 25 Nov 2005 16:33:11 -0800
git-core (0.99.9j-0) unstable; urgency=low
* GIT 0.99.9j aka 1.0rc3
-- Junio C Hamano <junkio@cox.net> Wed, 16 Nov 2005 20:39:55 -0800
git-core (0.99.9i-0) unstable; urgency=low
* GIT 0.99.9i aka 1.0rc2
-- Junio C Hamano <junkio@cox.net> Mon, 14 Nov 2005 18:38:27 -0800
git-core (0.99.9h-0) unstable; urgency=low
* GIT 0.99.9h
-- Junio C Hamano <junkio@cox.net> Fri, 11 Nov 2005 22:33:18 -0800
git-core (0.99.9g-0) unstable; urgency=low
* GIT 0.99.9g
-- Junio C Hamano <junkio@cox.net> Wed, 9 Nov 2005 21:01:55 -0800
git-core (0.99.9f-0) unstable; urgency=low
* GIT 0.99.9f
-- Junio C Hamano <junkio@cox.net> Tue, 8 Nov 2005 01:21:52 -0800
git-core (0.99.9e-0) unstable; urgency=low
* GIT 0.99.9e
-- Junio C Hamano <junkio@cox.net> Sun, 6 Nov 2005 18:37:18 -0800
git-core (0.99.9d-0) unstable; urgency=low
* GIT 0.99.9d
-- Junio C Hamano <junkio@cox.net> Sat, 5 Nov 2005 11:46:37 -0800
git-core (0.99.9c-0) unstable; urgency=low
* GIT 0.99.9c
-- Junio C Hamano <junkio@cox.net> Thu, 3 Nov 2005 15:44:54 -0800
git-core (0.99.9b-0) unstable; urgency=low
* GIT 0.99.9b
-- Junio C Hamano <junkio@cox.net> Tue, 1 Nov 2005 21:39:39 -0800
git-core (0.99.9a-0) unstable; urgency=low
* GIT 0.99.9a
-- Junio C Hamano <junkio@cox.net> Sun, 30 Oct 2005 15:03:32 -0800
git-core (0.99.9.GIT-2) unstable; urgency=low
* Build Dependency did not include libexpat-dev.
-- Junio C Hamano <junkio@cox.net> Sun, 13 Nov 2005 01:55:34 -0800
git-core (0.99.9.GIT-1) unstable; urgency=low
* Do not scatter txt and html documentation into feature
subpackages. Do place man pages into them.
* Capture more cvs stuff into git-cvs package.
-- Junio C Hamano <junkio@cox.net> Tue, 8 Nov 2005 01:19:06 -0800
git-core (0.99.9.GIT-0) unstable; urgency=low
* Test Build.
-- Junio C Hamano <junkio@cox.net> Sat, 5 Nov 2005 11:18:13 -0800
git-core (0.99.9-1) unstable; urgency=low
* Split the git-core binary package into core, doc, and foreign SCM
interoperability modules.
-- Junio C Hamano <junkio@cox.net> Sat, 5 Nov 2005 11:18:13 -0800
git-core (0.99.9-0) unstable; urgency=low
* GIT 0.99.9
-- Junio C Hamano <junkio@cox.net> Sat, 29 Oct 2005 14:34:30 -0700
git-core (0.99.8-0) unstable; urgency=low
* GIT 0.99.8
-- Junio C Hamano <junkio@cox.net> Sun, 2 Oct 2005 12:54:26 -0700
git-core (0.99.7-0) unstable; urgency=low
* GIT 0.99.7
-- Junio C Hamano <junkio@cox.net> Sat, 10 Sep 2005 18:36:39 -0700
git-core (0.99.6-0) unstable; urgency=low
* GIT 0.99.6
-- Junio C Hamano <junkio@cox.net> Wed, 24 Aug 2005 23:09:35 -0700
git-core (0.99.5-1) unstable; urgency=low
* Enable git-send-email on Debian. There is no reason to shy
away from it, since we have the necessary Perl modules available.
-- Junio C Hamano <junkio@cox.net> Thu, 25 Aug 2005 14:16:59 -0700
git-core (0.99.5-0) unstable; urgency=low
* GIT 0.99.5
-- Junio C Hamano <junkio@cox.net> Wed, 10 Aug 2005 22:05:00 -0700
git-core (0.99.4-4) unstable; urgency=low
* Mark git-tk as architecture neutral.
-- Junio C Hamano <junkio@cox.net> Fri, 12 Aug 2005 13:25:00 -0700
git-core (0.99.4-3) unstable; urgency=low
* Split off gitk.
* Do not depend on diff which is an essential package.
* Use dh_movefiles, not dh_install, to stage two subpackages.
-- Matthias Urlichs <smurf@debian.org> Thu, 11 Aug 2005 01:43:24 +0200
git-core (0.99.4-2) unstable; urgency=low
* Git 0.99.4 official release.
-- Junio C Hamano <junkio@cox.net> Wed, 10 Aug 2005 15:00:00 -0700
git-core (0.99.4-1) unstable; urgency=low
* Pass prefix down to the submake when building.
-- Junio C Hamano <junkio@cox.net> Sat, 6 Aug 2005 13:00:00 -0700
git-core (0.99-2) unstable; urgency=low
* Conflict with the GNU Interactive Tools package, which also installs
/usr/bin/git.
* Use the Mozilla SHA1 code and/or the PPC assembly in preference to
OpenSSL. This is only a partial fix for the license issues with OpenSSL.
* Minor tweaks to the Depends.
-- Ryan Anderson <ryan@michonline.com> Sat, 23 Jul 2005 14:15:00 -0400
git-core (0.99-1) unstable; urgency=low
* Update deb package support to build correctly.
-- Ryan Anderson <ryan@michonline.com> Thu, 21 Jul 2005 02:03:32 -0400
git-core (0.99-0) unstable; urgency=low
* Initial deb package support
-- Eric Biederman <ebiederm@xmission.com> Tue, 12 Jul 2005 10:57:51 -0600

1
debian/compat vendored
View File

@ -1 +0,0 @@
4

63
debian/control vendored
View File

@ -1,63 +0,0 @@
Source: git-core
Section: devel
Priority: optional
Maintainer: Junio C Hamano <junkio@cox.net>
Build-Depends-Indep: libz-dev, libssl-dev, libcurl3-dev|libcurl3-gnutls-dev|libcurl3-openssl-dev, asciidoc (>= 7), xmlto, debhelper (>= 4.0.0), bc, libexpat-dev
Standards-Version: 3.6.1
Package: git-core
Architecture: any
Depends: ${shlibs:Depends}, ${perl:Depends}, ${misc:Depends}, rcs
Recommends: rsync, curl, ssh, python (>= 2.4.0), less
Suggests: cogito, patch
Conflicts: git, cogito (<< 0.13)
Description: The git content addressable filesystem
GIT comes in two layers. The bottom layer is merely an extremely fast
and flexible filesystem-based database designed to store directory trees
with regard to their history. The top layer is a SCM-like tool which
enables human beings to work with the database in a manner to a degree
similar to other SCM tools.
Package: git-doc
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, git-core
Description: The git content addressable filesystem, Documentation
This package contains documentation for GIT.
Package: git-tk
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, git-core, tk8.4
Description: The git content addressable filesystem, GUI add-on
This package contains 'gitk', the git revision tree visualizer.
Package: git-svn
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, git-core, libsvn-core-perl (>= 1.2.1)
Suggests: subversion
Description: The git content addressable filesystem, SVN interoperability
This package contains 'git-svnimport', to import development history from
SVN repositories.
Package: git-arch
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, git-core
Suggests: tla, bazaar
Description: The git content addressable filesystem, GNUArch interoperability
This package contains 'git-archimport', to import development history from
GNUArch repositories.
Package: git-cvs
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, git-core, cvsps (>= 2.1)
Suggests: cvs
Description: The git content addressable filesystem, CVS interoperability
This package contains 'git-cvsimport', to import development history from
CVS repositories.
Package: git-email
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, git-core, libmail-sendmail-perl, libemail-valid-perl
Description: The git content addressable filesystem, e-mail add-on
This package contains 'git-send-email', to send a series of patch e-mails.

24
debian/copyright vendored
View File

@ -1,24 +0,0 @@
This package was downloaded from ftp.kernel.org:/pub/software/scm/git/.
Upstream Author: Linus Torvalds and many others
Copyright:
Copyright 2005, Linus Torvalds and others.
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 dated June, 1991.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
On Debian GNU/Linux systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.

1
debian/docs vendored
View File

@ -1 +0,0 @@
README

View File

@ -1,2 +0,0 @@
/usr/bin/git-arch*
/usr/share/man/*/git-arch*

View File

@ -1,13 +0,0 @@
Document: git-core
Title: git reference
Abstract: This manual describes git
Section: Devel
Format: HTML
Index: /usr/share/doc/git-core/git.html
Files: /usr/share/doc/git-core/*.html
/usr/share/doc/git-core/*/*.html
Format: text
Files: /usr/share/doc/git-core/*.txt
/usr/share/doc/git-core/*/*.txt

View File

@ -1 +0,0 @@
/usr

View File

@ -1,2 +0,0 @@
/usr/bin/git-cvs*
/usr/share/man/*/git-cvs*

View File

@ -1,4 +0,0 @@
/usr/share/doc/git-core/*.txt
/usr/share/doc/git-core/*.html
/usr/share/doc/git-core/*/*.html
/usr/share/doc/git-core/*/*.txt

View File

@ -1,2 +0,0 @@
/usr/bin/git-send-email
/usr/share/man/*/git-send-email.*

View File

@ -1,2 +0,0 @@
/usr/bin/git-svn*
/usr/share/man/*/git-svn*

2
debian/git-tk.files vendored
View File

@ -1,2 +0,0 @@
/usr/bin/gitk
/usr/share/man/man1/gitk.*

109
debian/rules vendored
View File

@ -1,109 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
CFLAGS = -g -Wall
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
export CFLAGS
#
# On PowerPC we compile against the hand-crafted assembly, on all
# other architectures we compile against GPL'ed sha1 code lifted
# from Mozilla. OpenSSL is strangely licensed and best avoided
# in Debian.
#
HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
ifeq (${HOST_ARCH},powerpc)
export PPC_SHA1=YesPlease
else
export MOZILLA_SHA1=YesPlease
endif
# We do have the requisite perl modules in the mainline, and
# have no reason to shy away from this script.
export WITH_SEND_EMAIL=YesPlease
PREFIX := /usr
MANDIR := /usr/share/man/
SRC := ./
DOC := Documentation/
DESTDIR := $(CURDIR)/debian/tmp
DOC_DESTDIR := $(DESTDIR)/usr/share/doc/git-core/
MAN_DESTDIR := $(DESTDIR)/$(MANDIR)
build: debian/build-stamp
debian/build-stamp:
dh_testdir
$(MAKE) prefix=$(PREFIX) PYTHON_PATH=/usr/bin/python2.4 all test doc
touch debian/build-stamp
debian-clean:
dh_testdir
dh_testroot
rm -f debian/build-stamp
dh_clean
clean: debian-clean
$(MAKE) clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
make DESTDIR=$(DESTDIR) prefix=$(PREFIX) mandir=$(MANDIR) \
install install-doc
make -C Documentation DESTDIR=$(DESTDIR) prefix=$(PREFIX) \
WEBDOC_DEST=$(DOC_DESTDIR) install-webdoc
dh_movefiles -p git-arch
dh_movefiles -p git-cvs
dh_movefiles -p git-svn
dh_movefiles -p git-tk
dh_movefiles -p git-email
dh_movefiles -p git-doc
dh_movefiles -p git-core
find debian/tmp -type d -o -print | sed -e 's/^/? /'
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs -a
dh_installdocs -a
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_perl -a
dh_makeshlibs -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs -i
dh_installdocs -i
dh_compress -i
dh_fixperms -i
dh_makeshlibs -i
dh_installdeb -i
dh_shlibdeps -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
binary: binary-arch binary-indep
.PHONY: build clean binary install clean debian-clean

View File

@ -15,7 +15,7 @@
* passed around in one int (high 16-bit for merge and low 16-bit
* for break).
*/
#define MAX_SCORE 60000
#define MAX_SCORE 60000.0
#define DEFAULT_RENAME_SCORE 30000 /* rename/copy similarity minimum (50%) */
#define DEFAULT_BREAK_SCORE 30000 /* minimum for break to happen (50%)*/
#define DEFAULT_MERGE_SCORE 48000 /* maximum for break-merge to happen (80%)*/

View File

@ -70,7 +70,6 @@ static int write_entry(struct cache_entry *ce, const char *path, struct checkout
unsigned long size;
long wrote;
char type[20];
char target[1024];
new = read_sha1_file(ce->sha1, type, &size);
if (!new || strcmp(type, "blob")) {
@ -94,12 +93,10 @@ static int write_entry(struct cache_entry *ce, const char *path, struct checkout
return error("git-checkout-index: unable to write file %s", path);
break;
case S_IFLNK:
memcpy(target, new, size);
target[size] = '\0';
if (symlink(target, path)) {
if (symlink(new, path)) {
free(new);
return error("git-checkout-index: unable to create symlink %s (%s)",
path, strerror(errno));
return error("git-checkout-index: unable to create "
"symlink %s (%s)", path, strerror(errno));
}
free(new);
break;

View File

@ -262,9 +262,6 @@ static void filter_refs(struct ref **refs, int nr_match, char **match)
{
struct ref *prev, *current, *next;
if (!nr_match)
return;
for (prev = NULL, current = *refs; current; current = next) {
next = current->next;
if ((!memcmp(current->name, "refs/", 5) &&

View File

@ -1,6 +1,14 @@
#ifndef GIT_COMPAT_UTIL_H
#define GIT_COMPAT_UTIL_H
#ifndef FLEX_ARRAY
#if defined(__GNUC__) && (__GNUC__ < 3)
#define FLEX_ARRAY 0
#else
#define FLEX_ARRAY /* empty */
#endif
#endif
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>

View File

@ -103,8 +103,16 @@ undef @files; # don't need it anymore
# check that the files are clean and up to date according to cvs
my $dirty;
foreach my $f (@afiles, @mfiles, @dfiles) {
# TODO:we need to handle removed in cvs and/or new (from git)
foreach my $f (@afiles) {
my $status = `cvs -q status "$f" | grep '^File: '`;
unless ($status =~ m/Status: Unknown$/) {
$dirty = 1;
warn "File $f is already known in your CVS checkout!\n";
}
}
foreach my $f (@mfiles, @dfiles) {
# TODO:we need to handle removed in cvs
my $status = `cvs -q status "$f" | grep '^File: '`;
unless ($status =~ m/Status: Up-to-date$/) {

View File

@ -649,6 +649,7 @@ my $commit = sub {
my($xtag) = $tag;
$xtag =~ s/\s+\*\*.*$//; # Remove stuff like ** INVALID ** and ** FUNKY **
$xtag =~ tr/_/\./ if ( $opt_u );
$xtag =~ s/[\/]/$opt_s/g;
my $pid = open2($in, $out, 'git-mktag');
print $out "object $cid\n".

View File

@ -9,8 +9,10 @@ one file per patch, for e-mail submission. Each output file is
numbered sequentially from 1, and uses the first line of the commit
message (massaged for pathname safety) as the filename.
When -o is specified, output files are created in that directory; otherwise in
the current working directory.
There are three output modes. By default, output files are created in
the current working directory; when -o is specified, they are created
in that directory instead; when --stdout is specified, they are spit
on standard output, and can be piped to git-am.
When -n is specified, instead of "[PATCH] Subject", the first line is formatted
as "[PATCH N/M] Subject", unless you have only one patch.

View File

@ -33,8 +33,7 @@ sed -ne '/unreachable /{
git-prune-packed $dryrun
redundant=$(git-pack-redundant --all)
if test "" != "$redundant"
if redundant=$(git-pack-redundant --all 2>/dev/null) && test "" != "$redundant"
then
if test "" = "$dryrun"
then

View File

@ -93,6 +93,7 @@ revert)
cherry-pick)
pick_author_script='
/^author /{
s/'\''/'\''\\'\'\''/g
h
s/^author \([^<]*\) <[^>]*> .*$/\1/
s/'\''/'\''\'\'\''/g

View File

@ -208,7 +208,7 @@ static int excluded(const char *pathname)
struct nond_on_fs {
int len;
char name[0];
char name[FLEX_ARRAY]; /* more */
};
static struct nond_on_fs **dir;

View File

@ -169,8 +169,11 @@ int main(int argc, const char **argv)
if ( !f )
die ("cannot open mbox %s", file);
if (fgets(buf, sizeof(buf), f) == NULL)
if (fgets(buf, sizeof(buf), f) == NULL) {
if (f == stdin)
break; /* empty stdin is OK */
die("cannot read mbox %s", file);
}
while (!file_done) {
sprintf(name, "%s/%0*d", dir, nr_prec, ++nr);

View File

@ -93,10 +93,11 @@ static int name_ref(const char *path, const unsigned char *sha1)
}
if (o && o->type == commit_type) {
struct commit *commit = (struct commit *)o;
const char *p;
while ((p = strchr(path, '/')))
path = p+1;
if (!strncmp(path, "refs/heads/", 11))
path = path + 11;
else if (!strncmp(path, "refs/", 5))
path = path + 5;
name_rev(commit, strdup(path), 0, 0, deref);
}

View File

@ -1,8 +1,8 @@
#include "cache.h"
#include "object.h"
#include "blob.h"
#include "tree.h"
#include "commit.h"
#include "cache.h"
#include "tag.h"
struct object **objs;

View File

@ -9,7 +9,7 @@ struct object_list {
struct object_refs {
unsigned count;
struct object *ref[0];
struct object *ref[FLEX_ARRAY]; /* more */
};
struct object {

View File

@ -24,7 +24,7 @@ struct command {
unsigned char updated;
unsigned char old_sha1[20];
unsigned char new_sha1[20];
char ref_name[0];
char ref_name[FLEX_ARRAY]; /* more */
};
static struct command *commands = NULL;

View File

@ -321,16 +321,12 @@ struct packed_git *packed_git;
static int check_packed_git_idx(const char *path, unsigned long *idx_size_,
void **idx_map_)
{
SHA_CTX ctx;
unsigned char sha1[20];
void *idx_map;
unsigned int *index;
unsigned long idx_size;
int nr, i;
int fd;
int fd = open(path, O_RDONLY);
struct stat st;
fd = open(path, O_RDONLY);
if (fd < 0)
return -1;
if (fstat(fd, &st)) {
@ -368,16 +364,6 @@ static int check_packed_git_idx(const char *path, unsigned long *idx_size_,
if (idx_size != 4*256 + nr * 24 + 20 + 20)
return error("wrong index file size");
/*
* File checksum.
*/
SHA1_Init(&ctx);
SHA1_Update(&ctx, idx_map, idx_size-20);
SHA1_Final(sha1, &ctx);
if (memcmp(sha1, idx_map + idx_size - 20, 20))
return error("index checksum mismatch");
return 0;
}

View File

@ -492,7 +492,7 @@ static void append_one_rev(const char *av)
append_ref(av, revkey);
return;
}
if (strchr(av, '*') || strchr(av, '?')) {
if (strchr(av, '*') || strchr(av, '?') || strchr(av, '[')) {
/* glob style match */
int saved_matches = ref_name_cnt;
match_ref_pattern = av;

View File

@ -74,7 +74,7 @@ test_debug 'show_files $tree3'
test_expect_success \
'read previously written tree and checkout.' \
'git-read-tree $tree2 && git-checkout-index -f -a'
test_debug show_files $tree2
test_debug 'show_files $tree2'
test_expect_success \
'checking out conflicting path with -f' \

View File

@ -46,14 +46,14 @@ H=$(doit 8 H $A $F)
test_expect_success 'compute merge-base (single)' \
'MB=$(git-merge-base G H) &&
expr "$(git-name-rev "$MB")" : "[0-9a-f]* B"'
expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/B"'
test_expect_success 'compute merge-base (all)' \
'MB=$(git-merge-base --all G H) &&
expr "$(git-name-rev "$MB")" : "[0-9a-f]* B"'
expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/B"'
test_expect_success 'compute merge-base with show-branch' \
'MB=$(git-show-branch --merge-base G H) &&
expr "$(git-name-rev "$MB")" : "[0-9a-f]* B"'
expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/B"'
test_done

2
tag.c
View File

@ -1,5 +1,5 @@
#include "tag.h"
#include "cache.h"
#include "tag.h"
const char *tag_type = "tag";

View File

@ -433,7 +433,7 @@ int main(int argc, char **argv)
archive_time = time(NULL);
if (basedir)
write_header((unsigned char *)"0", TYPEFLAG_DIR, NULL, NULL,
basedir, 040755, NULL, 0);
basedir, 040777, NULL, 0);
traverse_tree(buffer, size, NULL);
free(buffer);
write_trailer();

2
tree.c
View File

@ -1,8 +1,8 @@
#include "cache.h"
#include "tree.h"
#include "blob.h"
#include "commit.h"
#include "tag.h"
#include "cache.h"
#include <stdlib.h>
const char *tree_type = "tree";

View File

@ -269,6 +269,8 @@ int main(int argc, char **argv)
setup_git_directory();
quiet = !isatty(2);
for (i = 1 ; i < argc; i++) {
const char *arg = argv[i];

View File

@ -534,10 +534,17 @@ int main(int argc, const char **argv)
struct strbuf buf;
strbuf_init(&buf);
while (1) {
char *path_name;
read_line(&buf, stdin, line_termination);
if (buf.eof)
break;
update_one(buf.buf, prefix, prefix_length);
if (line_termination && buf.buf[0] == '"')
path_name = unquote_c_style(buf.buf, NULL);
else
path_name = buf.buf;
update_one(path_name, prefix, prefix_length);
if (path_name != buf.buf)
free(path_name);
}
}
if (active_cache_changed) {