Code

git.git
12 years agoGit 1.7.6.6 v1.7.6.6
Junio C Hamano [Mon, 6 Feb 2012 07:46:44 +0000 (23:46 -0800)]
Git 1.7.6.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoimap-send: remove dead code
Jeff King [Mon, 6 Feb 2012 06:29:37 +0000 (01:29 -0500)]
imap-send: remove dead code

The imap-send code was adapted from another project, and
still contains many unused bits of code. One of these bits
contains a type "struct string_list" which bears no
resemblence to the "struct string_list" we use elsewhere in
git. This causes the compiler to complain if git's
string_list ever becomes part of cache.h.

Let's just drop the dead code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoUpdate draft release notes to 1.7.6.6
Junio C Hamano [Fri, 13 Jan 2012 07:30:53 +0000 (23:30 -0800)]
Update draft release notes to 1.7.6.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agothin-pack: try harder to use preferred base objects as base
Jeff King [Thu, 12 Jan 2012 22:32:34 +0000 (17:32 -0500)]
thin-pack: try harder to use preferred base objects as base

When creating a pack using objects that reside in existing packs, we try
to avoid recomputing futile delta between an object (trg) and a candidate
for its base object (src) if they are stored in the same packfile, and trg
is not recorded as a delta already. This heuristics makes sense because it
is likely that we tried to express trg as a delta based on src but it did
not produce a good delta when we created the existing pack.

As the pack heuristics prefer producing delta to remove data, and Linus's
law dictates that the size of a file grows over time, we tend to record
the newest version of the file as inflated, and older ones as delta
against it.

When creating a thin-pack to transfer recent history, it is likely that we
will try to send an object that is recorded in full, as it is newer.  But
the heuristics to avoid recomputing futile delta effectively forbids us
from attempting to express such an object as a delta based on another
object. Sending an object in full is often more expensive than sending a
suboptimal delta based on other objects, and it is even more so if we
could use an object we know the receiving end already has (i.e. preferred
base object) as the delta base.

Tweak the recomputation avoidance logic, so that we do not punt on
computing delta against a preferred base object.

The effect of this change can be seen on two simulated upload-pack
workloads. The first is based on 44 reflog entries from my git.git
origin/master reflog, and represents the packs that kernel.org sent me git
updates for the past month or two. The second workload represents much
larger fetches, going from git's v1.0.0 tag to v1.1.0, then v1.1.0 to
v1.2.0, and so on.

The table below shows the average generated pack size and the average CPU
time consumed for each dataset, both before and after the patch:

                  dataset
            | reflog | tags
---------------------------------
     before | 53358  | 2750977
size  after | 32398  | 2668479
     change |   -39% |      -3%
---------------------------------
     before |  0.18  | 1.12
CPU   after |  0.18  | 1.15
     change |    +0% |      +3%

This patch makes a much bigger difference for packs with a shorter slice
of history (since its effect is seen at the boundaries of the pack) though
it has some benefit even for larger packs.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoattr: fix leak in free_attr_elem
Jeff King [Thu, 12 Jan 2012 03:05:03 +0000 (22:05 -0500)]
attr: fix leak in free_attr_elem

This function frees the individual "struct match_attr"s we
have allocated, but forgot to free the array holding their
pointers, leading to a minor memory leak (but it can add up
after checking attributes for paths in many directories).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot2203: fix wrong commit command
Nguyễn Thái Ngọc Duy [Wed, 11 Jan 2012 03:21:38 +0000 (10:21 +0700)]
t2203: fix wrong commit command

Add commit message to avoid commit's aborting due to the lack of
commit message, not because there are INTENT_TO_ADD entries in index.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoPrepare for 1.7.6.6
Junio C Hamano [Tue, 10 Jan 2012 21:11:03 +0000 (13:11 -0800)]
Prepare for 1.7.6.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation: rerere's rr-cache auto-creation and rerere.enabled
Junio C Hamano [Tue, 10 Jan 2012 14:57:27 +0000 (15:57 +0100)]
Documentation: rerere's rr-cache auto-creation and rerere.enabled

The description of rerere.enabled left the user in the dark as to who
might create an rr-cache directory.  Add a note that simply invoking
rerere does this.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoattr.c: clarify the logic to pop attr_stack
Junio C Hamano [Tue, 10 Jan 2012 20:28:38 +0000 (12:28 -0800)]
attr.c: clarify the logic to pop attr_stack

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoattr.c: make bootstrap_attr_stack() leave early
Junio C Hamano [Tue, 10 Jan 2012 20:27:37 +0000 (12:27 -0800)]
attr.c: make bootstrap_attr_stack() leave early

Thas would de-dent the body of a function that has grown rather large over
time, making it a bit easier to read.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoattr: drop misguided defensive coding
Jeff King [Tue, 10 Jan 2012 19:32:06 +0000 (14:32 -0500)]
attr: drop misguided defensive coding

In prepare_attr_stack, we pop the old elements of the stack
(which were left from a previous lookup and may or may not
be useful to us). Our loop to do so checks that we never
reach the top of the stack. However, the code immediately
afterwards will segfault if we did actually reach the top of
the stack.

Fortunately, this is not an actual bug, since we will never
pop all of the stack elements (we will always keep the root
gitattributes, as well as the builtin ones). So the extra
check in the loop condition simply clutters the code and
makes the intent less clear. Let's get rid of it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoattr: don't confuse prefixes with leading directories
Jeff King [Tue, 10 Jan 2012 18:08:21 +0000 (13:08 -0500)]
attr: don't confuse prefixes with leading directories

When we prepare the attribute stack for a lookup on a path,
we start with the cached stack from the previous lookup
(because it is common to do several lookups in the same
directory hierarchy). So the first thing we must do in
preparing the stack is to pop any entries that point to
directories we are no longer interested in.

For example, if our stack contains gitattributes for:

  foo/bar/baz
  foo/bar
  foo

but we want to do a lookup in "foo/bar/bleep", then we want
to pop the top element, but retain the others.

To do this we walk down the stack from the top, popping
elements that do not match our lookup directory. However,
the test do this simply checked strncmp, meaning we would
mistake "foo/bar/baz" as a leading directory of
"foo/bar/baz_plus". We must also check that the character
after our match is '/', meaning we matched the whole path
component.

There are two special cases to consider:

  1. The top of our attr stack has the empty path. So we
     must not check for '/', but rather special-case the
     empty path, which always matches.

  2. Typically when matching paths in this way, you would
     also need to check for a full string match (i.e., the
     character after is '\0'). We don't need to do so in
     this case, though, because our path string is actually
     just the directory component of the path to a file
     (i.e., we know that it terminates with "/", because the
     filename comes after that).

Helped-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation: rerere.enabled is the primary way to configure rerere
Thomas Rast [Fri, 6 Jan 2012 13:08:02 +0000 (14:08 +0100)]
Documentation: rerere.enabled is the primary way to configure rerere

The wording seems to suggest that creating the directory is needed and the
setting of rerere.enabled is only for disabling the feature by setting it
to 'false'. But the configuration is meant to be the primary control and
setting it to 'true' will enable it; the rr-cache directory will be
created as necessary and the user does not have to create it.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation: read-tree --prefix works with existing subtrees
Clemens Buchacher [Sat, 31 Dec 2011 11:50:56 +0000 (12:50 +0100)]
Documentation: read-tree --prefix works with existing subtrees

Since 34110cd4 (Make 'unpack_trees()' have a separate source and
destination index) it is no longer true that a subdirectory with
the same prefix must not exist.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoAdd MYMETA.json to perl/.gitignore
Jack Nagel [Thu, 29 Dec 2011 04:42:05 +0000 (22:42 -0600)]
Add MYMETA.json to perl/.gitignore

ExtUtils::MakeMaker generates MYMETA.json in addition to MYMETA.yml
since version 6.57_07. As it suggests, it is just meta information about
the build and is cleaned up with 'make clean', so it should be ignored.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.7.6.5 v1.7.6.5
Junio C Hamano [Wed, 14 Dec 2011 05:30:40 +0000 (21:30 -0800)]
Git 1.7.6.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jk/maint-fetch-status-table' into maint-1.7.6
Junio C Hamano [Wed, 14 Dec 2011 05:21:30 +0000 (21:21 -0800)]
Merge branch 'jk/maint-fetch-status-table' into maint-1.7.6

* jk/maint-fetch-status-table:
  fetch: create status table using strbuf

12 years agoMerge branch 'jc/maint-name-rev-all' into maint-1.7.6
Junio C Hamano [Wed, 14 Dec 2011 05:12:34 +0000 (21:12 -0800)]
Merge branch 'jc/maint-name-rev-all' into maint-1.7.6

* jc/maint-name-rev-all:
  name-rev --all: do not even attempt to describe non-commit object

12 years agoMerge branch 'ml/mailmap' into maint-1.7.6
Junio C Hamano [Wed, 14 Dec 2011 05:12:14 +0000 (21:12 -0800)]
Merge branch 'ml/mailmap' into maint-1.7.6

* ml/mailmap:
  mailmap: xcalloc mailmap_info

Conflicts:
mailmap.c

12 years agoblame: don't overflow time buffer
Jeff King [Thu, 8 Dec 2011 10:25:54 +0000 (05:25 -0500)]
blame: don't overflow time buffer

When showing the raw timestamp, we format the numeric
seconds-since-epoch into a buffer, followed by the timezone
string. This string has come straight from the commit
object. A well-formed object should have a timezone string
of only a few bytes, but we could be operating on data
pushed by a malicious user.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agofetch: create status table using strbuf
Jeff King [Thu, 8 Dec 2011 08:43:19 +0000 (03:43 -0500)]
fetch: create status table using strbuf

When we fetch from a remote, we print a status table like:

  From url
   * [new branch]   foo -> origin/foo

We create this table in a static buffer using sprintf. If
the remote refnames are long, they can overflow this buffer
and smash the stack.

Instead, let's use a strbuf to build the string.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agostripspace: fix outdated comment
Jeff King [Mon, 5 Dec 2011 22:29:15 +0000 (17:29 -0500)]
stripspace: fix outdated comment

The comment on top of stripspace() claims that the buffer
will no longer be NUL-terminated. However, this has not been
the case at least since the move to using strbuf in 2007.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoAdd MYMETA.yml to perl/.gitignore
Sebastian Morr [Fri, 2 Dec 2011 22:55:28 +0000 (23:55 +0100)]
Add MYMETA.yml to perl/.gitignore

This file is auto-generated by newer versions of ExtUtils::MakeMaker
(presumably starting with the version shipping with Perl 5.14). It just
contains extra information about the environment and arguments to the
Makefile-building process, and should be ignored.

Signed-off-by: Sebastian Morr <sebastian@morr.cc>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agomailmap: xcalloc mailmap_info
Marc-André Lureau [Thu, 17 Nov 2011 01:25:06 +0000 (02:25 +0100)]
mailmap: xcalloc mailmap_info

This is to avoid reaching free of uninitialized members.

With an invalid .mailmap (and perhaps in other cases), it can reach
free(mi->name) with garbage for example.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoname-rev --all: do not even attempt to describe non-commit object
Junio C Hamano [Tue, 15 Nov 2011 23:51:05 +0000 (15:51 -0800)]
name-rev --all: do not even attempt to describe non-commit object

This even dates back to the very beginning of "git name-rev";
it does not make much sense to dump all objects in the repository
and label non-commits as "undefined".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'mh/maint-notes-merge-pathbuf-fix' into maint-1.7.6
Junio C Hamano [Wed, 26 Oct 2011 23:12:48 +0000 (16:12 -0700)]
Merge branch 'mh/maint-notes-merge-pathbuf-fix' into maint-1.7.6

* mh/maint-notes-merge-pathbuf-fix:
  notes_merge_commit(): do not pass temporary buffer to other function

12 years agoMerge branch 'ps/gitweb-js-with-lineno' into maint-1.7.6
Junio C Hamano [Wed, 26 Oct 2011 23:12:35 +0000 (16:12 -0700)]
Merge branch 'ps/gitweb-js-with-lineno' into maint-1.7.6

* ps/gitweb-js-with-lineno:
  gitweb: Fix links to lines in blobs when javascript-actions are enabled

12 years agoMerge branch 'jm/mergetool-pathspec' into maint-1.7.6
Junio C Hamano [Wed, 26 Oct 2011 23:12:25 +0000 (16:12 -0700)]
Merge branch 'jm/mergetool-pathspec' into maint-1.7.6

* jm/mergetool-pathspec:
  mergetool: no longer need to save standard input
  mergetool: Use args as pathspec to unmerged files

12 years agoMerge branch 'mz/remote-rename' into maint-1.7.6
Junio C Hamano [Wed, 26 Oct 2011 23:12:19 +0000 (16:12 -0700)]
Merge branch 'mz/remote-rename' into maint-1.7.6

* mz/remote-rename:
  remote: only update remote-tracking branch if updating refspec
  remote rename: warn when refspec was not updated
  remote: "rename o foo" should not rename ref "origin/bar"
  remote: write correct fetch spec when renaming remote 'remote'

12 years agoMerge branch 'rj/maint-t9159-svn-rev-notation' into maint-1.7.6
Junio C Hamano [Wed, 26 Oct 2011 23:12:13 +0000 (16:12 -0700)]
Merge branch 'rj/maint-t9159-svn-rev-notation' into maint-1.7.6

* rj/maint-t9159-svn-rev-notation:
  t9159-*.sh: skip for mergeinfo test for svn <= 1.4

12 years agoMerge branch 'hl/iso8601-more-zone-formats' into maint-1.7.6
Junio C Hamano [Wed, 26 Oct 2011 23:11:28 +0000 (16:11 -0700)]
Merge branch 'hl/iso8601-more-zone-formats' into maint-1.7.6

* hl/iso8601-more-zone-formats:
  date.c: Support iso8601 timezone formats

12 years agoMerge branch 'tr/doc-note-rewrite' into maint-1.7.6
Junio C Hamano [Wed, 26 Oct 2011 23:09:04 +0000 (16:09 -0700)]
Merge branch 'tr/doc-note-rewrite' into maint-1.7.6

* tr/doc-note-rewrite:
  Documentation: basic configuration of notes.rewriteRef

12 years agoMerge branch 'nd/sparse-doc' into maint-1.7.6
Junio C Hamano [Wed, 26 Oct 2011 23:09:04 +0000 (16:09 -0700)]
Merge branch 'nd/sparse-doc' into maint-1.7.6

* nd/sparse-doc:
  git-read-tree.txt: update sparse checkout examples

12 years agoMerge branch 'mg/maint-doc-sparse-checkout' into maint-1.7.6
Junio C Hamano [Wed, 26 Oct 2011 23:09:03 +0000 (16:09 -0700)]
Merge branch 'mg/maint-doc-sparse-checkout' into maint-1.7.6

* mg/maint-doc-sparse-checkout:
  git-read-tree.txt: correct sparse-checkout and skip-worktree description
  git-read-tree.txt: language and typography fixes
  unpack-trees: print "Aborting" to stderr

12 years agoMerge branch 'maint-1.7.5' into maint-1.7.6
Junio C Hamano [Wed, 26 Oct 2011 23:08:19 +0000 (16:08 -0700)]
Merge branch 'maint-1.7.5' into maint-1.7.6

* maint-1.7.5:
  make the sample pre-commit hook script reject names with newlines, too
  Reindent closing bracket using tab instead of spaces
  Documentation/git-update-index: refer to 'ls-files'

12 years agoMerge branch 'maint-1.7.4' into maint-1.7.5
Junio C Hamano [Wed, 26 Oct 2011 23:08:14 +0000 (16:08 -0700)]
Merge branch 'maint-1.7.4' into maint-1.7.5

* maint-1.7.4:
  make the sample pre-commit hook script reject names with newlines, too
  Reindent closing bracket using tab instead of spaces
  Documentation/git-update-index: refer to 'ls-files'

12 years agoMerge branch 'maint-1.7.3' into maint-1.7.4
Junio C Hamano [Wed, 26 Oct 2011 23:08:08 +0000 (16:08 -0700)]
Merge branch 'maint-1.7.3' into maint-1.7.4

* maint-1.7.3:
  make the sample pre-commit hook script reject names with newlines, too
  Reindent closing bracket using tab instead of spaces
  Documentation/git-update-index: refer to 'ls-files'

12 years agoMerge branch 'sn/doc-update-index-assume-unchanged' into maint-1.7.3
Junio C Hamano [Wed, 26 Oct 2011 23:08:00 +0000 (16:08 -0700)]
Merge branch 'sn/doc-update-index-assume-unchanged' into maint-1.7.3

* sn/doc-update-index-assume-unchanged:
  Documentation/git-update-index: refer to 'ls-files'

12 years agomake the sample pre-commit hook script reject names with newlines, too
Jim Meyering [Sat, 22 Oct 2011 17:44:40 +0000 (19:44 +0200)]
make the sample pre-commit hook script reject names with newlines, too

The sample pre-commit hook script would fail to reject a file name like
"a\nb" because of the way newlines are handled in "$(...)".  Adjust the
test to count filtered bytes and require there be 0.  Also print all
diagnostics to standard error, not stdout, so they will actually be seen.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoReindent closing bracket using tab instead of spaces
Nguyễn Thái Ngọc Duy [Mon, 24 Oct 2011 04:24:51 +0000 (15:24 +1100)]
Reindent closing bracket using tab instead of spaces

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agonotes_merge_commit(): do not pass temporary buffer to other function
Michael Haggerty [Tue, 27 Sep 2011 04:46:53 +0000 (06:46 +0200)]
notes_merge_commit(): do not pass temporary buffer to other function

It is unsafe to pass a temporary buffer as an argument to
read_directory().

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogitweb: Fix links to lines in blobs when javascript-actions are enabled
Peter Stuge [Tue, 27 Sep 2011 09:51:00 +0000 (11:51 +0200)]
gitweb: Fix links to lines in blobs when javascript-actions are enabled

The fixLinks() function adds 'js=1' to each link that does not already
have 'js' query parameter specified. This is used to signal to gitweb
that the browser can actually do javascript when these links are used.

There are two problems with the existing code:

  1. URIs with fragment and 'js' query parameter, like e.g.

        ...foo?js=0#l199

     were not recognized as having 'js' query parameter already.

  2. The 'js' query parameter, in the form of either '?js=1' or ';js=1'
     was appended at the end of URI, even if it included a fragment
     (had a hash part).  This lead to the incorrect links like this

        ...foo#l199?js=1

     instead of adding query parameter as last part of query, but
     before the fragment part, i.e.

        ...foo?js=1#l199

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-read-tree.txt: update sparse checkout examples
Nguyễn Thái Ngọc Duy [Sun, 25 Sep 2011 23:09:15 +0000 (09:09 +1000)]
git-read-tree.txt: update sparse checkout examples

The negation example uses '*' to match everything. This used to work
before 9037026 (unpack-trees: fix sparse checkout's "unable to match
directories") because back then, the list of paths is used to match
sparse patterns, so with the patterns

    *
    !subdir/

subdir/ always matches any path that start with subdir/ and "*" has no
chance to get tested. The result is subdir is excluded.

After the said commit, a tree structure is dynamically created and
sparse pattern matching now follows closely how read_directory()
applies .gitignore. This solves one problem, but reveals another one.

With this new strategy, "!subdir/" rule will be only tested once when
"subdir" directory is examined. Entries inside subdir, when examined,
will match "*" and are (correctly) re-added again because any rules
without a slash will match at every directory level. In the end, "*"
can revert every negation rules.

In order to correctly exclude subdir, we must use

    /*
    !subdir

to limit "match all" rule at top level only.

"*" rule has no actual use in sparse checkout and can be confusing to
users. While we can automatically turn "*" to "/*", this violates
.gitignore definition. Instead, discourage "*" in favor of "/*" (in
the second example).

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agomergetool: no longer need to save standard input
Junio C Hamano [Fri, 16 Sep 2011 20:19:33 +0000 (13:19 -0700)]
mergetool: no longer need to save standard input

Earlier code wanted to run merge_file and prompt_after_failed_merge
both of which wanted to read from the standard input of the entire
script inside a while loop, which read from a pipe, and in order to
do so, it redirected the original standard input to another file
descriptor. We no longer need to do so after the previous change.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agomergetool: Use args as pathspec to unmerged files
Jonathon Mah [Fri, 16 Sep 2011 02:12:10 +0000 (19:12 -0700)]
mergetool: Use args as pathspec to unmerged files

Mergetool now treats its path arguments as a pathspec (like other git
subcommands), restricting action to the given files and directories.
Files matching the pathspec are filtered so mergetool only acts on
unmerged paths; previously it would assume each path argument was in an
unresolved state, and get confused when it couldn't check out their
other stages.

Running "git mergetool subdir" will prompt to resolve all conflicted
blobs under subdir.

Signed-off-by: Jonathon Mah <me@JonathonMah.com>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.7.6.4 v1.7.6.4
Junio C Hamano [Fri, 23 Sep 2011 21:38:39 +0000 (14:38 -0700)]
Git 1.7.6.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'cb/maint-ls-files-error-report' into maint
Junio C Hamano [Fri, 23 Sep 2011 21:30:49 +0000 (14:30 -0700)]
Merge branch 'cb/maint-ls-files-error-report' into maint

* cb/maint-ls-files-error-report:
  t3005: do not assume a particular order of stdout and stderr of git-ls-files
  ls-files: fix pathspec display on error

12 years agodescribe: Refresh the index when run with --dirty
Allan Caffee [Mon, 1 Aug 2011 01:52:41 +0000 (21:52 -0400)]
describe: Refresh the index when run with --dirty

When running git describe --dirty the index should be refreshed.  Previously
the cached index would cause describe to think that the index was dirty when,
in reality, it was just stale.

The issue was exposed by python setuptools which hardlinks files into another
directory when building a distribution.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jc/maint-clone-alternates' into maint
Junio C Hamano [Fri, 23 Sep 2011 21:27:33 +0000 (14:27 -0700)]
Merge branch 'jc/maint-clone-alternates' into maint

* jc/maint-clone-alternates:
  clone: clone from a repository with relative alternates
  clone: allow more than one --reference

12 years agoMerge branch 'nd/maint-clone-gitdir' into maint
Junio C Hamano [Fri, 23 Sep 2011 21:21:39 +0000 (14:21 -0700)]
Merge branch 'nd/maint-clone-gitdir' into maint

* nd/maint-clone-gitdir:
  clone: allow to clone from .git file
  read_gitfile_gently(): rename misnamed function to read_gitfile()

12 years agoMerge branch 'mh/check-ref-format-print-normalize' into maint
Junio C Hamano [Fri, 23 Sep 2011 21:20:51 +0000 (14:20 -0700)]
Merge branch 'mh/check-ref-format-print-normalize' into maint

* mh/check-ref-format-print-normalize:
  Forbid DEL characters in reference names
  check-ref-format --print: Normalize refnames that start with slashes

12 years agoMerge branch 'mg/branch-set-upstream-previous' into maint
Junio C Hamano [Fri, 23 Sep 2011 21:16:22 +0000 (14:16 -0700)]
Merge branch 'mg/branch-set-upstream-previous' into maint

* mg/branch-set-upstream-previous:
  branch.c: use the parsed branch name

12 years agoMerge branch 'gb/maint-am-patch-format-error-message' into maint
Junio C Hamano [Fri, 23 Sep 2011 21:11:18 +0000 (14:11 -0700)]
Merge branch 'gb/maint-am-patch-format-error-message' into maint

* gb/maint-am-patch-format-error-message:
  am: format is in $patch_format, not parse_patch

12 years agogit-read-tree.txt: correct sparse-checkout and skip-worktree description
Michael J Gruber [Wed, 21 Sep 2011 07:48:38 +0000 (09:48 +0200)]
git-read-tree.txt: correct sparse-checkout and skip-worktree description

The description of .git/info/sparse-checkout and
skip-worktree is exactly the opposite of what is true, which is:

If a file matches a pattern in sparse-checkout, then (it is to be
checked out and therefore) skip-worktree is unset for that file;
otherwise, it is set (so that it is not checked out).

Currently, the opposite is documented, and (consistently) read-tree's
behavior with respect to bit flips is descibed incorrectly.

Fix it.

In hindsight, it would have been much better to have a "sparse-ignore"
or "sparse-skip" file so that an empty file would mean a full checkout,
and the file logic would be analogous to that of .gitignore, excludes
and skip-worktree.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-read-tree.txt: language and typography fixes
Michael J Gruber [Wed, 21 Sep 2011 07:48:37 +0000 (09:48 +0200)]
git-read-tree.txt: language and typography fixes

Fix a few missing articles and such, and mark-up 'commands' and `files`
appropriately.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agounpack-trees: print "Aborting" to stderr
Michael J Gruber [Wed, 21 Sep 2011 07:48:36 +0000 (09:48 +0200)]
unpack-trees: print "Aborting" to stderr

display_error_msgs() prints all the errors to stderr already (if any),
followed by "Aborting" (if any) to stdout. Make the latter go to stderr
instead.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot9159-*.sh: skip for mergeinfo test for svn <= 1.4
Ramsay Jones [Sat, 10 Sep 2011 17:40:10 +0000 (18:40 +0100)]
t9159-*.sh: skip for mergeinfo test for svn <= 1.4

t9159 relies on the command-line syntax of svn >= 1.5.  Given the
declining install base of older svn versions, it is not worth our time to
support older svn syntax.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation/git-update-index: refer to 'ls-files'
Stefan Naewe [Wed, 21 Sep 2011 06:21:50 +0000 (08:21 +0200)]
Documentation/git-update-index: refer to 'ls-files'

'ls-files' refers to 'update-index' to show how the 'assume unchanged'
bit can be seen. This makes the connection 'bi-directional'.

Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-mergetool: check return value from read
Jay Soffian [Mon, 19 Sep 2011 23:40:52 +0000 (19:40 -0400)]
git-mergetool: check return value from read

Mostly fixed already by 6b44577 (mergetool: check return value
from read, 2011-07-01). Catch two uses it missed.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation: basic configuration of notes.rewriteRef
Thomas Rast [Tue, 13 Sep 2011 07:32:42 +0000 (09:32 +0200)]
Documentation: basic configuration of notes.rewriteRef

Users had problems finding a working setting for notes.rewriteRef.
Document how to enable rewriting for notes/commits, which should be a
safe setting.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodate.c: Support iso8601 timezone formats
Haitao Li [Fri, 9 Sep 2011 10:10:33 +0000 (18:10 +0800)]
date.c: Support iso8601 timezone formats

Timezone designators in the following formats are all valid according to
ISO8601:2004, section 4.3.2:

    [+-]hh, [+-]hhmm, [+-]hh:mm

but we have ignored the ones with colon so far.

Signed-off-by: Haitao Li <lihaitao@gmail.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.7.6.3 v1.7.6.3
Junio C Hamano [Mon, 12 Sep 2011 17:33:03 +0000 (10:33 -0700)]
Git 1.7.6.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jl/maint-fetch-submodule-check-fix' into maint
Junio C Hamano [Mon, 12 Sep 2011 17:19:57 +0000 (10:19 -0700)]
Merge branch 'jl/maint-fetch-submodule-check-fix' into maint

* jl/maint-fetch-submodule-check-fix:
  fetch: skip on-demand checking when no submodules are configured

12 years agoPrepare for 1.7.6.3 maintenance release
Junio C Hamano [Mon, 12 Sep 2011 05:08:56 +0000 (22:08 -0700)]
Prepare for 1.7.6.3 maintenance release

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'ms/reflog-show-is-default' into maint
Junio C Hamano [Mon, 12 Sep 2011 05:33:24 +0000 (22:33 -0700)]
Merge branch 'ms/reflog-show-is-default' into maint

* ms/reflog-show-is-default:
  reflog: actually default to subcommand 'show'

12 years agoMerge branch 'jk/reset-reflog-message-fix' into maint
Junio C Hamano [Mon, 12 Sep 2011 05:33:20 +0000 (22:33 -0700)]
Merge branch 'jk/reset-reflog-message-fix' into maint

* jk/reset-reflog-message-fix:
  reset: give better reflog messages

12 years agoMerge branch 'vi/make-test-vector-less-specific' into maint
Junio C Hamano [Mon, 12 Sep 2011 05:33:16 +0000 (22:33 -0700)]
Merge branch 'vi/make-test-vector-less-specific' into maint

* vi/make-test-vector-less-specific:
  tests: cleanup binary test vector files

12 years agoMerge branch 'jk/tag-contains-ab' (early part) into maint
Junio C Hamano [Mon, 12 Sep 2011 04:54:32 +0000 (21:54 -0700)]
Merge branch 'jk/tag-contains-ab' (early part) into maint

* 'jk/tag-contains-ab' (early part):
  tag: speed up --contains calculation

12 years agoMerge branch 'dz/connect-error-report' into maint
Junio C Hamano [Mon, 12 Sep 2011 04:53:47 +0000 (21:53 -0700)]
Merge branch 'dz/connect-error-report' into maint

* dz/connect-error-report:
  Do not log unless all connect() attempts fail

12 years agoMerge branch 'jc/maint-mergetool-read-fix' into maint
Junio C Hamano [Mon, 12 Sep 2011 04:53:39 +0000 (21:53 -0700)]
Merge branch 'jc/maint-mergetool-read-fix' into maint

* jc/maint-mergetool-read-fix:
  mergetool: check return value from read

12 years agoMerge branch 'jk/maint-config-param' into maint
Junio C Hamano [Mon, 12 Sep 2011 04:53:13 +0000 (21:53 -0700)]
Merge branch 'jk/maint-config-param' into maint

* jk/maint-config-param:
  config: use strbuf_split_str instead of a temporary strbuf
  strbuf: allow strbuf_split to work on non-strbufs
  config: avoid segfault when parsing command-line config
  config: die on error in command-line config
  fix "git -c" parsing of values with equals signs
  strbuf_split: add a max parameter

12 years agoMerge branch 'jn/doc-dashdash' into maint
Junio C Hamano [Mon, 12 Sep 2011 04:52:18 +0000 (21:52 -0700)]
Merge branch 'jn/doc-dashdash' into maint

* jn/doc-dashdash:
  Documentation/i18n: quote double-dash for AsciiDoc
  Documentation: quote double-dash for AsciiDoc

Conflicts:
Documentation/git-mergetool--lib.txt

12 years agoMerge branch 'jk/maint-1.7.2-status-ignored' into maint
Junio C Hamano [Mon, 12 Sep 2011 04:51:10 +0000 (21:51 -0700)]
Merge branch 'jk/maint-1.7.2-status-ignored' into maint

* jk/maint-1.7.2-status-ignored:
  git status --ignored: tests and docs
  status: fix bug with missing --ignore files

Conflicts:
Documentation/git-status.txt
t/t7508-status.sh

12 years agoremote: only update remote-tracking branch if updating refspec
Martin von Zweigbergk [Sat, 10 Sep 2011 19:39:23 +0000 (15:39 -0400)]
remote: only update remote-tracking branch if updating refspec

'git remote rename' will only update the remote's fetch refspec if it
looks like a default one. If the remote has no default fetch refspec,
as in

[remote "origin"]
    url = git://git.kernel.org/pub/scm/git/git.git
    fetch = +refs/heads/*:refs/remotes/upstream/*

we would not update the fetch refspec and even if there is a ref
called "refs/remotes/origin/master", we should not rename it, since it
was not created by fetching from the remote.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoremote rename: warn when refspec was not updated
Martin von Zweigbergk [Sat, 3 Sep 2011 15:26:59 +0000 (11:26 -0400)]
remote rename: warn when refspec was not updated

When renaming a remote, we also try to update the fetch refspec
accordingly, but only if it has the default format. For others, such
as refs/heads/master:refs/heads/origin, we are conservative and leave
it untouched. Let's give the user a warning about refspecs that are
not updated, so he can manually update the config if necessary.

Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoremote: "rename o foo" should not rename ref "origin/bar"
Martin von Zweigbergk [Fri, 2 Sep 2011 00:50:34 +0000 (20:50 -0400)]
remote: "rename o foo" should not rename ref "origin/bar"

When renaming a remote called 'o' using 'git remote rename o foo', git
should also rename any remote-tracking branches for the remote. This
does happen, but any remote-tracking branches starting with
'refs/remotes/o', such as 'refs/remotes/origin/bar', will also be
renamed (to 'refs/remotes/foorigin/bar' in this case).

Fix it by simply matching one more character, up to the slash
following the remote name.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoremote: write correct fetch spec when renaming remote 'remote'
Martin von Zweigbergk [Fri, 2 Sep 2011 00:50:33 +0000 (20:50 -0400)]
remote: write correct fetch spec when renaming remote 'remote'

When renaming a remote whose name is contained in a configured fetch
refspec for that remote, we currently replace the first occurrence of
the remote name in the refspec. This is correct in most cases, but
breaks if the remote name occurs in the fetch refspec before the
expected place. For example, we currently change

[remote "remote"]
url = git://git.kernel.org/pub/scm/git/git.git
fetch = +refs/heads/*:refs/remotes/remote/*

into

[remote "origin"]
url = git://git.kernel.org/pub/scm/git/git.git
fetch = +refs/heads/*:refs/origins/remote/*

Reduce the risk of changing incorrect sections of the refspec by
matching the entire ":refs/remotes/<name>/" instead of just "<name>".

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoSubmittingPathces: remove Cogito reference
Sverre Rabbelier [Sun, 11 Sep 2011 12:38:10 +0000 (14:38 +0200)]
SubmittingPathces: remove Cogito reference

Removing Cogito leaves just git and StGit, which is a rather
incomplete list of git diff tools available. Sidestep the problem
of deciding what tools to mention by not mentioning any.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agofetch: skip on-demand checking when no submodules are configured
Jens Lehmann [Fri, 9 Sep 2011 18:22:03 +0000 (20:22 +0200)]
fetch: skip on-demand checking when no submodules are configured

It makes no sense to do the - possibly very expensive - call to "rev-list
<new-ref-sha1> --not --all" in check_for_new_submodule_commits() when
there aren't any submodules configured.

Leave check_for_new_submodule_commits() early when no name <-> path
mappings for submodules are found in the configuration. To make that work
reading the configuration had to be moved further up in cmd_fetch(), as
doing that after the actual fetch of the superproject was too late.

Reported-by: Martin Fick <mfick@codeaurora.org>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.7.6.2 v1.7.6.2
Junio C Hamano [Tue, 6 Sep 2011 18:41:02 +0000 (11:41 -0700)]
Git 1.7.6.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoRevert "Merge branch 'cb/maint-quiet-push' into maint"
Junio C Hamano [Tue, 6 Sep 2011 18:06:32 +0000 (11:06 -0700)]
Revert "Merge branch 'cb/maint-quiet-push' into maint"

This reverts commit ffa69e61d3c5730bd4b65a465efc130b0ef3c7df, reversing
changes made to 4a13c4d14841343d7caad6ed41a152fee550261d.

Adding a new command line option to receive-pack and feed it from
send-pack is not an acceptable way to add features, as there is no
guarantee that your updated send-pack will be talking to updated
receive-pack. New features need to be added via the capability mechanism
negotiated over the protocol.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation: clarify effects of -- <path> arguments
Thomas Rast [Tue, 30 Aug 2011 09:21:07 +0000 (11:21 +0200)]
Documentation: clarify effects of -- <path> arguments

'git log -- <path>' does not "show commits that affect the specified
paths" in a literal sense unless --full-history is given (for example,
a file that only existed on a side branch will turn up no commits at
all!).

Reword it to specify the actual intent of the filtering, and point to
the "History Simplification" section.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoam: format is in $patch_format, not parse_patch
Giuseppe Bilotta [Mon, 29 Aug 2011 15:22:06 +0000 (17:22 +0200)]
am: format is in $patch_format, not parse_patch

The error message given when the patch format was not recognized was
wrong, since the variable checked was $parse_patch rather than
$patch_format. Fix by checking the non-emptyness of the correct
variable.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot3005: do not assume a particular order of stdout and stderr of git-ls-files
Johannes Sixt [Sun, 28 Aug 2011 07:34:56 +0000 (09:34 +0200)]
t3005: do not assume a particular order of stdout and stderr of git-ls-files

There is no guarantee that stderr is flushed before stdout when both
channels are redirected to a file. Check the channels using independent
files.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoForbid DEL characters in reference names
Michael Haggerty [Sat, 27 Aug 2011 04:12:44 +0000 (06:12 +0200)]
Forbid DEL characters in reference names

DEL is an ASCII control character and therefore should not be
permitted in reference names.  Add tests for this and other unusual
characters.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agowhitespace: have SP on both sides of an assignment "="
Junio C Hamano [Thu, 25 Aug 2011 21:46:52 +0000 (14:46 -0700)]
whitespace: have SP on both sides of an assignment "="

I've deliberately excluded the borrowed code in compat/nedmalloc
directory.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoupdate-ref: whitespace fix
Pang Yan Han [Thu, 25 Aug 2011 15:40:50 +0000 (23:40 +0800)]
update-ref: whitespace fix

Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocheck-ref-format --print: Normalize refnames that start with slashes
Michael Haggerty [Thu, 25 Aug 2011 19:19:24 +0000 (21:19 +0200)]
check-ref-format --print: Normalize refnames that start with slashes

When asked if "refs///heads/master" is valid, check-ref-format says "Yes,
it is well formed", and when asked to print canonical form, it shows
"refs/heads/master". This is so that it can be tucked after "$GIT_DIR/"
to form a valid pathname for a loose ref, and we normalize a pathname like
"$GIT_DIR/refs///heads/master" to de-dup the slashes in it.

Similarly, when asked if "/refs/heads/master" is valid, check-ref-format
says "Yes, it is Ok", but the leading slash is not removed when printing,
leading to "$GIT_DIR//refs/heads/master".

Fix it to make sure such leading slashes are removed.  Add tests that such
refnames are accepted and normalized correctly.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.7.6.1 v1.7.6.1
Junio C Hamano [Wed, 24 Aug 2011 19:16:58 +0000 (12:16 -0700)]
Git 1.7.6.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jc/maint-smart-http-race-upload-pack' into maint
Junio C Hamano [Wed, 24 Aug 2011 19:16:15 +0000 (12:16 -0700)]
Merge branch 'jc/maint-smart-http-race-upload-pack' into maint

* jc/maint-smart-http-race-upload-pack:
  get_indexed_object can return NULL if nothing is in that slot; check for it

12 years agoget_indexed_object can return NULL if nothing is in that slot; check for it
Brian Harring [Wed, 24 Aug 2011 05:47:17 +0000 (22:47 -0700)]
get_indexed_object can return NULL if nothing is in that slot; check for it

This fixes a segfault introduced by 051e400; via it, no longer able to
trigger the http/smartserv race.

Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoUpdate draft release notes for 1.7.6.1
Junio C Hamano [Tue, 23 Aug 2011 22:28:18 +0000 (15:28 -0700)]
Update draft release notes for 1.7.6.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jc/maint-combined-diff-work-tree' into maint
Junio C Hamano [Tue, 23 Aug 2011 22:27:30 +0000 (15:27 -0700)]
Merge branch 'jc/maint-combined-diff-work-tree' into maint

* jc/maint-combined-diff-work-tree:
  diff -c/--cc: do not mistake "resolved as deletion" as "use working tree"

Conflicts:
combine-diff.c

12 years agoMerge branch 'cb/maint-exec-error-report' into maint
Junio C Hamano [Tue, 23 Aug 2011 22:20:06 +0000 (15:20 -0700)]
Merge branch 'cb/maint-exec-error-report' into maint

* cb/maint-exec-error-report:
  notice error exit from pager
  error_routine: use parent's stderr if exec fails

12 years agoMerge branch 'cb/maint-quiet-push' into maint
Junio C Hamano [Tue, 23 Aug 2011 22:19:45 +0000 (15:19 -0700)]
Merge branch 'cb/maint-quiet-push' into maint

* cb/maint-quiet-push:
  receive-pack: do not overstep command line argument array
  propagate --quiet to send-pack/receive-pack

Conflicts:
Documentation/git-receive-pack.txt
Documentation/git-send-pack.txt

12 years agoMerge branch 'jc/maint-smart-http-race-upload-pack' into maint
Junio C Hamano [Tue, 23 Aug 2011 22:17:50 +0000 (15:17 -0700)]
Merge branch 'jc/maint-smart-http-race-upload-pack' into maint

* jc/maint-smart-http-race-upload-pack:
  helping smart-http/stateless-rpc fetch race

12 years agoMerge branch 'jc/no-gitweb-test-without-cgi-etc' into maint
Junio C Hamano [Tue, 23 Aug 2011 22:17:14 +0000 (15:17 -0700)]
Merge branch 'jc/no-gitweb-test-without-cgi-etc' into maint

* jc/no-gitweb-test-without-cgi-etc:
  t/gitweb-lib.sh: skip gitweb tests when perl dependencies are not met

12 years agoclone: clone from a repository with relative alternates
Junio C Hamano [Tue, 23 Aug 2011 01:05:16 +0000 (18:05 -0700)]
clone: clone from a repository with relative alternates

Cloning from a local repository blindly copies or hardlinks all the files
under objects/ hierarchy. This results in two issues:

 - If the repository cloned has an "objects/info/alternates" file, and the
   command line of clone specifies --reference, the ones specified on the
   command line get overwritten by the copy from the original repository.

 - An entry in a "objects/info/alternates" file can specify the object
   stores it borrows objects from as a path relative to the "objects/"
   directory. When cloning a repository with such an alternates file, if
   the new repository is not sitting next to the original repository, such
   relative paths needs to be adjusted so that they can be used in the new
   repository.

This updates add_to_alternates_file() to take the path to the alternate
object store, including the "/objects" part at the end (earlier, it was
taking the path to $GIT_DIR and was adding "/objects" itself), as it is
technically possible to specify in objects/info/alternates file the path
of a directory whose name does not end with "/objects".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoclone: allow more than one --reference
Junio C Hamano [Tue, 23 Aug 2011 01:05:15 +0000 (18:05 -0700)]
clone: allow more than one --reference

Also add a test to expose a long-standing bug that is triggered when
cloning with --reference option from a local repository that has its own
alternates. The alternate object stores specified on the command line
are lost, and only alternates copied from the source repository remain.
The bug will be fixed in the next patch.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoadd technical documentation about ref iteration
Heiko Voigt [Mon, 22 Aug 2011 20:36:45 +0000 (22:36 +0200)]
add technical documentation about ref iteration

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>