1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-01 04:16:28 +02:00
Commit Graph

10078 Commits

Author SHA1 Message Date
Junio C Hamano d44c782bbd Merge branch 'sv/objfixes'
* sv/objfixes:
  Don't assume tree entries that are not dirs are blobs
  git-cvsimport: Make sure to use $git_dir always instead of .git sometimes
  fix documentation of unpack-objects -n
  Accept dates before 2000/01/01 when specified as seconds since the epoch
2007-06-06 15:43:24 -07:00
Sam Vilain e2ac7cb5fb Don't assume tree entries that are not dirs are blobs
When scanning the trees in track_tree_refs() there is a "lazy" test
that assumes that entries are either directories or files.  Don't do
that.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06 15:43:18 -07:00
Michael Milligan 23fcdc7971 git-cvsimport: Make sure to use $git_dir always instead of .git sometimes
CVS import was failing on a couple repos I was trying to import.
I was setting GIT_DIR=newproj.git and using the -i flag, but this bug
was thwarting the effort...  evil CVS.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06 15:23:35 -07:00
Sam Vilain e59ade9f90 fix documentation of unpack-objects -n
unpack-objects -n didn't print the object list as promised on the
manual page, so alter the documentation to reflect the behaviour

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06 15:20:13 -07:00
Johannes Sixt a1a5a6347b Accept dates before 2000/01/01 when specified as seconds since the epoch
Tests with git-filter-branch on a repository that was converted from
CVS and that has commits reaching back to 1999 revealed that it is
necessary to parse dates before 2000/01/01 when they are specified
as seconds since 1970/01/01. There is now still a limit, 100000000,
which is 1973/03/03 09:46:40 UTC, in order to allow that dates are
represented as 8 digits.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06 15:20:12 -07:00
Johannes Sixt f07dfbad29 Makefile: Remove git-merge-base from PROGRAMS.
git-merge-base is a builtin.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06 13:19:16 -07:00
Johannes Schindelin 3a86f36bed t5000: skip ZIP tests if unzip was not found
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06 13:13:58 -07:00
Junio C Hamano 6abd0fb396 Merge branch 'mm/tag'
* mm/tag:
  Teach git-tag about showing tag annotations.
2007-06-06 02:29:41 -07:00
Junio C Hamano 11f68d9082 git-branch --track: fix tracking branch computation.
The original code did not take hierarchical branch names into account at all.

Tested-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06 01:10:53 -07:00
Josh Triplett 2571ac6722 Fix typo in git-mergetool
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06 00:40:50 -07:00
Jon Loeliger e6ff0f42bb Add the --numbered-files option to git-format-patch.
With this option, git-format-patch will generate simple
numbered files as output instead of the default using
with the first commit line appended.

This simplifies the ability to generate an MH-style
drafts folder with each message to be sent.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06 00:35:15 -07:00
Pierre Habouzit ec563e8153 $EMAIL is a last resort fallback, as it's system-wide.
$EMAIL is a system-wide setup that is used for many many many
applications. If the git user chose a specific user.email setup,
then _this_ should be honoured rather than $EMAIL.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06 00:31:40 -07:00
Matthias Lederhofer d0f51a8b2a make clean should remove all the test programs too
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06 00:28:24 -07:00
Matthias Lederhofer aaa3ca7477 add git-filter-branch to .gitignore
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06 00:28:10 -07:00
Junio C Hamano 7be003b026 Merge branch 'gb/idx'
* gb/idx:
  Unify write_index_file functions
2007-06-05 21:36:51 -07:00
Johannes Schindelin 9f30855d0f merge-recursive: refuse to merge binary files
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-04 23:07:19 -07:00
Johannes Schindelin 6bfce93e04 Move buffer_is_binary() to xdiff-interface.h
We already have two instances where we want to determine if a buffer
contains binary data as opposed to text.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-04 23:07:00 -07:00
Johannes Schindelin 20f1eb6b46 git-fsck: learn about --verbose
With --verbose, it gets really chatty now.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-04 22:42:49 -07:00
Martin Koegler 00f429af7b gitweb: Handle non UTF-8 text better
gitweb assumes that everything is in UTF-8. If a text contains invalid
UTF-8 character sequences, the text must be in a different encoding.

This commit introduces $fallback_encoding which would be used as input
encoding if gitweb encounters text with is not valid UTF-8.

Add basic test for this in t/t9500-gitweb-standalone-no-errors.sh

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Tested-by: Alexandre Julliard <julliard@winehq.org>
Tested-by: Ismail Dönmez <ismail@pardus.org.tr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-03 16:51:53 -07:00
Randal L. Schwartz 2169368fc1 Add test-sha1 to .gitignore.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-03 14:54:56 -07:00
Matthijs Melchior 980ea5c5bb Teach git-tag about showing tag annotations.
The <pattern> for -l is now a shell pattern, not a list of grep parameters.
Option -l may be repeated with another <pattern>.

The new -n [<num>] option specifies how many lines from
the annotation are to be printed.
Not specifieing -n or -n 0 will just produce the tag names
Just -n or -n 1 will show the first line of the annotation on
the tag line.
Other valuse for -n will show that number of lines from the annotation.

The exit code used to indicate if any tag was found.
This is changed due to a different implementation.

A good way to test a tag for existence is to use:
git show-ref --quiet --verify refs/tags/$TAGNAME

Signed-off-by: Matthijs Melchior <mmelchior@xs4all.nl>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-06-02 20:04:14 -07:00
Junio C Hamano c94bf41c9a git-apply: what is detected and fixed is not just trailing spaces.
But we kept saying "trailing whitespace" all the same.  Reword the
error messages a bit.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-06-02 20:02:19 -07:00
Johannes Schindelin d3017e9373 Update to SubmittingPatches
Make people aware of our testsuite, and of non-ASCII encodings.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-06-02 20:02:15 -07:00
Junio C Hamano 8009533070 Merge branch 'maint' to sync with 1.5.2.1 2007-06-02 20:01:47 -07:00
Junio C Hamano 556df5e9c4 Release Notes: start preparing for 1.5.3
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-06-02 19:34:54 -07:00
Junio C Hamano 1a8b76912e Merge branches 'lh/submodules' and 'pb/am'
* lh/submodules:
  Add basic test-script for git-submodule
  Add git-submodule command

* pb/am:
  Remove git-applypatch
  git-applymbox: Remove command
2007-06-02 19:04:54 -07:00
Junio C Hamano 41cf68a85c GIT 1.5.2.1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-06-02 16:02:49 -07:00
Geert Bosch aa7e44bf57 Unify write_index_file functions
This patch unifies the write_index_file functions in
builtin-pack-objects.c and index-pack.c.  As the name
"index" is overloaded in git, move in the direction of
using "idx" and "pack idx" when refering to the pack index.
There should be no change in functionality.

Signed-off-by: Geert Bosch <bosch@gnat.com>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-06-02 13:14:18 -07:00
Lars Hjemli 88961ef258 Add basic test-script for git-submodule
This test tries to verify basic sanity of git-submodule, i.e. that it is
able to clone and update a submodule repository, that its status output is
sane, and that it barfs when the submodule path is occupied during init.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-06-02 12:48:07 -07:00
Junio C Hamano 4bc708347e Merge branch 'np/pack'
* np/pack:
  fix repack with --max-pack-size
  builtin-pack-object: cache small deltas
  git-pack-objects: cache small deltas between big objects
  builtin-pack-objects: don't fail, if delta is not possible
2007-06-02 12:18:56 -07:00
Junio C Hamano 17c2929aa2 Merge branch 'sp/pack'
* sp/pack:
  Style nit - don't put space after function names
  Ensure the pack index is opened before access
  Simplify index access condition in count-objects, pack-redundant
  Test for recent rev-parse $abbrev_sha1 regression
  rev-parse: Identify short sha1 sums correctly.
  Attempt to delay prepare_alt_odb during get_sha1
  Micro-optimize prepare_alt_odb
  Lazily open pack index files on demand
2007-06-02 12:18:51 -07:00
Jonas Fonseca 9b07873a52 git-rebase: suggest to use git-add instead of git-update-index
The command is part of the main porcelain making git-add more
appropriate.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-06-02 12:07:44 -07:00
Junio C Hamano 86eff8c512 Merge branch 'maint'
* maint:
  Use =20 when rfc2047 encoding spaces.
  Create a new manpage for the gitignore format, and reference it elsewhere
  Documentation: robustify asciidoc GIT_VERSION replacement
2007-06-02 12:05:08 -07:00
Kristian Høgsberg 996e2d6ea2 Use =20 when rfc2047 encoding spaces.
Encode ' ' using '=20' even though rfc2047 allows using '_' for
readability.  Unfortunately, many programs do not understand this and
just leave the underscore in place.  Using '=20' seems to work better.

[jc: with adjustment to t3901]

Signed-off-by: Kristian Høgsberg <hoegsberg@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-06-02 12:00:26 -07:00
Josh Triplett cedb8d5d33 Create a new manpage for the gitignore format, and reference it elsewhere
Only git-ls-files(1) describes the gitignore format in detail, and it does so
with reference to git-ls-files options.  Most users don't use the plumbing
command git-ls-files directly, and shouldn't have to look in its manpage for
information on the gitignore format.

Create a new manpage gitignore(5) (Documentation/gitignore.txt), and factor
out the gitignore documentation into that file, changing it to refer to
.gitignore and $GIT_DIR/info/exclude as used by porcelain commands.  Reference
gitignore(5) from other relevant manpages and documentation.  Remove
now-redundant information on exclude patterns from git-ls-files(1), leaving
only information on how git-ls-files options specify exclude patterns and what
precedence they have.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-06-02 11:59:19 -07:00
Jeff King 4159c57813 Documentation: robustify asciidoc GIT_VERSION replacement
Instead of using sed on the resulting file, we now have a
git_version asciidoc attribute. This means that we don't
pipe the output of asciidoc, which means we can detect build
failures.

Problem reported by Scott Lamb, solution suggested by Jonas Fonseca.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-06-02 11:28:13 -07:00
Jonas Fonseca 302665473c Fix git-am(1) synopsis formatting
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-06-02 11:26:51 -07:00
Theodore Ts'o 5049012f4f Fix minor grammatical typos in the git-gc man page
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-31 16:22:28 -07:00
Martin Koegler b75c6c6de1 diff-delta: use realloc instead of xrealloc
Commit 83572c1a91 changed many
realloc to xrealloc. This change was made in diff-delta.c too,
although the code can handle an out of memory failure.

This patch reverts this change in diff-delta.c.

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-31 00:15:18 -07:00
Junio C Hamano bd724be4be Merge branch 'maint'
* maint:
  git-config: Improve documentation of git-config file handling
  git-config: Various small fixes to asciidoc documentation
  decode_85(): fix missing return.
  fix signed range problems with hex conversions
2007-05-31 00:15:14 -07:00
Junio C Hamano 8e29f903eb Merge branch 'maint-1.5.1' into maint
* maint-1.5.1:
  git-config: Improve documentation of git-config file handling
  git-config: Various small fixes to asciidoc documentation
  decode_85(): fix missing return.
  fix signed range problems with hex conversions
2007-05-31 00:09:26 -07:00
Frank Lichtenheld 1701409003 git-config: Improve documentation of git-config file handling
The description which files git-config uses and how the various
command line options and environment variables affect its
behaviour was incomplete, outdated and confusing.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-30 23:56:37 -07:00
Frank Lichtenheld 90a36e581d git-config: Various small fixes to asciidoc documentation
Add '' around the only mentioned commandline option that didn't
have it.

Make reference to section EXAMPLE a link and rename it to
EXAMPLES because it actually contains a lot of examples.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-30 23:44:59 -07:00
Nicolas Pitre f7c22cc68c always start looking up objects in the last used pack first
Jon Smirl said:

| Once an object reference hits a pack file it is very likely that
| following references will hit the same pack file. So first place to
| look for an object is the same place the previous object was found.

This is indeed a good heuristic so here it is.  The search always start
with the pack where the last object lookup succeeded.  If the wanted
object is not available there then the search continues with the normal
pack ordering.

To test this I split the Linux repository into 66 packs and performed a
"time git-rev-list --objects --all > /dev/null".  Best results are as
follows:

	Pack Sort			w/o this patch	w/ this patch
	-------------------------------------------------------------
	recent objects last		26.4s		20.9s
	recent objects first		24.9s		18.4s

This shows that the pack order based on object age has some influence,
but that the last-used-pack heuristic is even more significant in
reducing object lookup.

Signed-off-by: Nicolas Pitre <nico@cam.org> --- Note: the
--max-pack-size to git-repack currently produces packs with old objects
after those containing recent objects.  The pack sort based on
filesystem timestamp is therefore backward for those.  This needs to be
fixed of course, but at least it made me think about this variable for
the test.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-30 23:35:07 -07:00
Nicolas Pitre 5476a8adcc fix repack with --max-pack-size
Two issues here:

1) git-repack -a --max-pack-size=10 on the GIT repo dies pretty quick.
   There is a lot of confusion about deltas that were suposed to be
   reused from another pack but that get stored undeltified due to pack
   limit and object size doesn't match entry->size anymore.  This test
   is not really worth the complexity for determining when it is valid
   so get rid of it.

2) If pack limit is reached, the object buffer is freed, including when
   it comes from a cached delta data.  In practice the object will be
   stored in a subsequent pack undeltified, but let's make sure no
   pointer to freed data subsists by clearing entry->delta_data.

I also reorganized that code a bit to make it more readable.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-30 23:32:42 -07:00
Julian Phillips 5c5ba73b21 Makefile: Use generic rule to build test programs
Use a generic make rule to build all the test programs, rather than
specifically mentioning each one.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-30 18:23:37 -07:00
Jerald Fitzjerald 86d14e1b1d decode_85(): fix missing return.
When the function detected an invalid base85 sequence, it issued
an error message but forgot to return error status at that point
and kept going.

Signed-off-by: Jerald Fitzjerald <jfj@freemail.gr>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-30 15:03:50 -07:00
Linus Torvalds 192a6be2a7 fix signed range problems with hex conversions
Make hexval_table[] "const".  Also make sure that the accessor
function hexval() does not access the table with out-of-range
values by declaring its parameter "unsigned char", instead of
"unsigned int".

With this, gcc can just generate:

	movzbl  (%rdi), %eax
	movsbl  hexval_table(%rax),%edx
	movzbl  1(%rdi), %eax
	movsbl  hexval_table(%rax),%eax
	sall    $4, %edx
	orl     %eax, %edx

for the code to generate a byte from two hex characters.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-30 15:01:37 -07:00
Junio C Hamano 65c6aca4d4 Add DLH to .mailmap
... and make the entries sorted.
2007-05-30 10:45:55 -07:00
Shawn O. Pearce bc8e478a28 Style nit - don't put space after function names
Our style is to not put a space after a function name.  I did here,
and Junio applied the patch with the incorrect formatting.  So I'm
cleaning up after myself since I noticed it upon review.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-29 23:31:19 -07:00