Граф коммитов

17931 Коммитов

Автор SHA1 Сообщение Дата
Nicolas Pitre f04833ef9f honor repack.usedeltabaseoffset when fetching packs
If the local receiving repository has disabled the use of delta base
offset, for example to retain compatibility with older versions of
Git that predate OFS_DELTA, we shouldn't ask for ofs-delta support
when we obtain a pack from the remote server.

[ issue noticed by Shawn Pearce ]

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-01 22:13:43 -07:00
Junio C Hamano a2dc04ba15 Merge branch 'maint-1.6.1' into maint
* maint-1.6.1:
  diff -c -p: do not die on submodules
2009-04-29 15:40:33 -07:00
Junio C Hamano 934747323c Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0:
  diff -c -p: do not die on submodules
2009-04-29 13:43:13 -07:00
Junio C Hamano 7dae8b21c2 diff -c -p: do not die on submodules
The combine diff logic knew only about blobs (and their checked-out form
in the work tree, either regular files or symlinks), and barfed when fed
submodules.  This "externalizes" gitlinks in the same way as the normal
patch generation codepath does (i.e. "Subproject commit Xxx\n") to fix the
issue.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-29 12:49:52 -07:00
Junio C Hamano 2254da06a5 Merge branch 'maint-1.6.1' into maint
* maint-1.6.1:
  grep: fix segfault when "git grep '('" is given
  Documentation: fix a grammatical error in api-builtin.txt
  builtin-merge: fix a typo in an error message
2009-04-28 00:46:25 -07:00
Junio C Hamano 3e73cb2f48 Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0:
  grep: fix segfault when "git grep '('" is given
  Documentation: fix a grammatical error in api-builtin.txt
  builtin-merge: fix a typo in an error message
2009-04-28 00:46:20 -07:00
Linus Torvalds c922b01f54 grep: fix segfault when "git grep '('" is given
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-27 17:28:18 -07:00
Allan Caffee d649048e68 Documentation: fix a grammatical error in api-builtin.txt
Signed-off-by: Allan Caffee <allan.caffee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-27 09:36:40 -07:00
Allan Caffee 345f6e2cb5 builtin-merge: fix a typo in an error message
Signed-off-by: Allan Caffee <allan.caffee@gmail.com>
Acked-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-27 09:36:14 -07:00
Junio C Hamano f06b9f1dff Merge branch 'maint-1.6.1' into maint
* maint-1.6.1:
  test-genrandom: Add newline to usage string
2009-04-24 22:58:31 -07:00
Junio C Hamano cc13719451 Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0:
  test-genrandom: Add newline to usage string
2009-04-24 22:49:34 -07:00
Stephen Boyd c2318228ab test-genrandom: Add newline to usage string
A minor fix to place the terminal input on a new line if test-genrandom
is run with no arguments.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-23 01:29:00 -07:00
Michał Kiedrowicz f0583867e7 tests: make test-apply-criss-cross-rename more robust
I realized that this test does check if git-apply succeeds, but doesn't
tell if it applies patches correctly. So I added test_cmp to check it.

I also added a test which checks swapping three files.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-20 13:47:02 -07:00
Michał Kiedrowicz e8141fcf54 builtin-apply: keep information about files to be deleted
Example correct diff generated by `diff -M -B' might look like this:

	diff --git a/file1 b/file2
	similarity index 100%
	rename from file1
	rename to file2
	diff --git a/file2 b/file1
	similarity index 100%
	rename from file2
	rename to file1

Information about removing `file2' comes after information about creation
of new `file2' (renamed from `file1'). Existing implementation isn't able to
apply such patch, because it has to know in advance which files will be
removed.

This patch populates fn_table with information about removal of files
before calling check_patch() for each patch to be applied.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-20 13:46:58 -07:00
Michał Kiedrowicz 1d49f0d1a1 tests: test applying criss-cross rename patch
Originally reported by Linus in $gmane/116198

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-20 13:46:55 -07:00
Frank Lichtenheld 3ac3cfb8eb gitcvs-migration: Link to git-cvsimport documentation
Signed-off-by: Frank Lichtenheld <flichtenheld@astaro.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-20 13:45:02 -07:00
Johannes Schindelin 7183c09d11 Fix off-by-one in read_tree_recursive
Found by valgrind.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-20 13:44:14 -07:00
Junio C Hamano 83ae209bf9 checkout branch: prime cache-tree fully
When switching to another branch, the earlier code relied on incremental
invalidation of cache-tree entries to degrade it.  While it is not wrong
per-se, we know that the resulting index must fully match the branch we
are switching to unless the -m (merge) option is used.

We should simply fully re-prime the cache-tree using the new tree object
in such a case.  And for safety, invalidate the cache-tree as a whole in
other cases.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-20 04:16:42 -07:00
Junio C Hamano 456156dc06 read-tree -m A B: prime cache-tree from the switched-to tree
When switching to a new branch with "read-tree -m A B", the resulting
index must match tree B and we can prime the cache tree with it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-20 04:16:41 -07:00
Junio C Hamano b9d37a5420 Move prime_cache_tree() to cache-tree.c
The interface to build cache-tree belongs there.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-20 04:16:41 -07:00
Junio C Hamano 8cc21ce78c read-tree A B: do not corrupt cache-tree
An earlier commit aab3b9a (read-tree A B C: do not create a bogus index
and do not segfault, 2009-03-12) resurrected the support for an obscure
(but useful) feature to read and overlay more than one tree into the index
without the -m (merge) option.  But the fix was not enough.

Exercising this feature exposes a longstanding bug in the code that primes
the cache-tree in the index from the tree that was read.  The intention
was that when we know that the index must exactly match the tree we just
read, we prime the entire cache-tree with it.

However, the logic to detect that case incorrectly triggered if you read
two trees without -m.  This resulted in a corrupted cache-tree, and
write-tree would have produced an incorrect tree object out of such an
index.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-20 04:16:40 -07:00
Wincent Colaiuta a2fc8d6536 git add -p: add missing "q" to patch prompt
Commit cbd3a01 added a new "q" subcommand to the "git add -p"
command loop, but forgot to add it to the prompt.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-20 03:38:44 -07:00
Junio C Hamano 1f9b620fdb GIT 1.6.2.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-19 17:34:26 -07:00
Nguyễn Thái Ngọc Duy 318b847031 Makefile: remove {fetch,send}-pack from PROGRAMS as they are builtins
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-19 17:23:42 -07:00
Junio C Hamano 4f26c39806 Merge branch 'ef/maint-fast-export' into maint
* ef/maint-fast-export:
  builtin-fast-export.c: handle nested tags
  builtin-fast-export.c: fix crash on tagged trees
  builtin-fast-export.c: turn error into warning
  test-suite: adding a test for fast-export with tag variants
2009-04-19 12:40:17 -07:00
Junio C Hamano fe4ce3a721 Merge branch 'mm/maint-add-p-quit' into maint
* mm/maint-add-p-quit:
  Update git-add.txt according to the new possibilities of 'git add -p'.
  add-interactive: refactor mode hunk handling
  git add -p: new "quit" command at the prompt.
2009-04-19 12:40:14 -07:00
Junio C Hamano 84047e0f28 Merge branch 'lt/maint-reflog-expire' into maint
* lt/maint-reflog-expire:
  Speed up reflog pruning of unreachable commits
  Clean up reflog unreachability pruning decision
2009-04-19 12:40:11 -07:00
Junio C Hamano 5027acc4db Merge branch 'jc/maint-shared-literally' into maint
* jc/maint-shared-literally:
  Update docs on behaviour of 'core.sharedRepository' and 'git init --shared'
  t1301-shared-repo: fix forced modes test
2009-04-19 12:40:05 -07:00
Matthieu Moy cafa56702b Update git-add.txt according to the new possibilities of 'git add -p'.
The text is merely cut-and-pasted from git-add--interactive.perl. The
cut-and-paste also fixes a typo.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-19 12:35:38 -07:00
Jeff King 7535e5a16a add-interactive: refactor mode hunk handling
The original implementation considered the mode separately
from the rest of the hunks, asking about it outside the main
hunk-selection loop. This patch instead places a mode change
as the first hunk in the loop. This has two advantages:

  1. less duplicated code (since we use the main selection
     loop). This also cleans up an inconsistency, which is
     that the main selection loop separates options with a
     comma, whereas the mode prompt used slashes.

  2. users can now skip the mode change and come back to it,
     search for it (via "/mode"), etc, as they can with other
     hunks.

To facilitate this, each hunk is now marked with a "type".
Mode hunks are not considered for splitting (which would
make no sense, and also confuses the split_hunk function),
nor are they editable. In theory, one could edit the mode
lines and change to a new mode. In practice, there are only
two modes that git cares about (0644 and 0755), so either
you want to move from one to the other or not (and you can
do that by staging or not staging).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-19 12:35:38 -07:00
Matthieu Moy cbd3a01ed8 git add -p: new "quit" command at the prompt.
There's already 'd' to stop staging hunks in a file, but no explicit
command to stop the interactive staging (for the current files and the
remaining ones).  Of course you can do 'd' and then ^C, but it would be
more intuitive to allow 'quit' action.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-19 12:35:37 -07:00
Junio Hamano 24cb1bb198 Speed up reflog pruning of unreachable commits
Instead of doing the (potentially very expensive) "in_merge_base()"
check for each commit that might be pruned if it is unreachable, do a
preparatory reachability graph of the commit space, so that the common
case of being reachable can be tested directly.

[ Cleaned up a bit and tweaked to actually work.  - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-19 12:31:56 -07:00
Linus Torvalds 9ffb15d52a Clean up reflog unreachability pruning decision
This clarifies the pruning rules for unreachable commits by having a
separate helpder function for the unreachability decision.

It's preparation for actual bigger changes to come to speed up the
decision when the reachability calculations become a bottleneck.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-19 12:31:56 -07:00
Erik Faye-Lund aadd44404b builtin-fast-export.c: handle nested tags
When tags that points to tags are passed to fast-export, an error is given,
saying "Tag [TAGNAME] points nowhere?". This fix calls parse_object() on the
object before referencing it's tag, to ensure the tag-info is fully initialized.
In addition, it inserts a comment to point out where nested tags are handled.
This is consistent with the comment for signed tags.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-19 12:29:26 -07:00
Erik Faye-Lund 426193c025 builtin-fast-export.c: fix crash on tagged trees
If a tag object points to a tree (or another unhandled type), the commit-
pointer is left uninitialized and later dereferenced. This patch adds a
default case to the switch that issues a warning and skips the object.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-19 12:29:26 -07:00
Erik Faye-Lund 38124d8f31 builtin-fast-export.c: turn error into warning
fast-import doesn't have a syntax to support tree-objects (and some other
object-types), so fast-export shouldn't handle them. However, aborting the
operation is a bit drastic. This patch turns the error into a warning instead.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-19 12:29:26 -07:00
Erik Faye-Lund 1092f6b3f8 test-suite: adding a test for fast-export with tag variants
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-19 12:29:25 -07:00
Junio C Hamano 67daebfd3b Describe fixes since 1.6.2.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-18 14:45:29 -07:00
Junio C Hamano a51609a1c1 Merge branch 'maint-1.6.1' into maint
* maint-1.6.1:
2009-04-18 14:43:39 -07:00
Junio C Hamano a4d1797332 Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0:
  doc/git-daemon: add missing arguments to options
  init: Do not segfault on big GIT_TEMPLATE_DIR environment variable
2009-04-18 14:43:24 -07:00
Junio C Hamano 08e7239c36 Merge branch 'bs/maint-1.6.0-tree-walk-prefix' into maint
* bs/maint-1.6.0-tree-walk-prefix:
  match_tree_entry(): a pathspec only matches at directory boundaries
  tree_entry_interesting: a pathspec only matches at directory boundary
2009-04-18 14:18:32 -07:00
Junio C Hamano f392485813 Merge branch 'js/maint-submodule-checkout' into maint
* js/maint-submodule-checkout:
  Fix 'git checkout <submodule>' to update the index
2009-04-18 14:18:29 -07:00
Junio C Hamano eb8a1c4aed Merge branch 'cb/maint-merge-recursive-submodule-fix' into maint
* cb/maint-merge-recursive-submodule-fix:
  simplify output of conflicting merge
  update cache for conflicting submodule entries
  add tests for merging with submodules
2009-04-18 14:18:25 -07:00
Markus Heidelberg 2aa3140bc0 doc/git-daemon: add missing arguments to max-connections option
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-18 13:40:34 -07:00
Junio C Hamano d890d3f996 Merge branch 'maint-1.6.0' into maint
* maint-1.6.0:
  doc/git-daemon: add missing arguments to options
  init: Do not segfault on big GIT_TEMPLATE_DIR environment variable
2009-04-18 13:39:52 -07:00
Markus Heidelberg 6285441044 doc/git-daemon: add missing arguments to options
Also fix some spellings and typos.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-18 13:39:42 -07:00
Frank Lichtenheld 32d1776b13 init: Do not segfault on big GIT_TEMPLATE_DIR environment variable
Signed-off-by: Frank Lichtenheld <flichtenheld@astaro.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-18 13:06:40 -07:00
Paul Bolle 43be7a782e imap-send: use correct configuration variable in documentation
It's imap.pass (not imap.password).

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-18 12:54:45 -07:00
Johan Herland 098082fb78 Update docs on behaviour of 'core.sharedRepository' and 'git init --shared'
This documentation update is needed to reflect the recent changes where
"core.sharedRepository = 0mode" was changed to set, not loosen, the
repository permissions.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-18 12:51:06 -07:00
Jeff King c4c86d2389 doc/gitattributes: clarify location of config text
The gitattributes documentation has a section on the "diff"
attribute, with subsections for each of the things you might
want to configure in your diff config section (external
diff, hunk headers, etc). The first such subsection
specifically notes that the definition of the diff driver
should go into $GIT_DIR/config, but subsequent sections do
not.

This location is implied if you are reading the
documentation sequentially, but it is not uncommon for a new
user to jump to (or be referred to) a specific section. For
a new user who does not know git well enough to recognize
the config syntax, it is not clear that those directives
don't also go into the gitattributes file.

This patch just mentions the config file in each subsection,
similar to the way it is mentioned in the first.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-17 21:28:07 -07:00