Commit Graph

27277 Commits

Author SHA1 Message Date
Junio C Hamano
bc0fe84b06 Merge branch 'maint-1.7.7' into maint
* maint-1.7.7:
  docs: describe behavior of relative submodule URLs
  Documentation: read-tree --prefix works with existing subtrees
  Add MYMETA.json to perl/.gitignore
2012-01-03 13:47:46 -08:00
Junio C Hamano
c07aa5b218 Merge branch 'maint-1.7.6' into maint-1.7.7
* maint-1.7.6:
  Documentation: read-tree --prefix works with existing subtrees
  Add MYMETA.json to perl/.gitignore
2012-01-03 13:47:15 -08:00
Jens Lehmann
9e6ed475e7 docs: describe behavior of relative submodule URLs
Since the relative submodule URLs have been introduced in f31a522a2d, they
do not conform to the rules for resolving relative URIs but rather to
those of relative directories.

Document that behavior.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-03 12:47:58 -08:00
Brian Harring
54440e154f fix hang in git fetch if pointed at a 0 length bundle
git-repo if interupted at the exact wrong time will generate zero
length bundles- literal empty files.  git-repo is wrong here, but
git fetch shouldn't effectively spin loop if pointed at a zero
length bundle.

Signed-off-by: Brian Harring <ferringb@chromium.org>
Helped-by: Johannes Sixt
Helped-by: Nguyen Thai Ngoc Duy
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-03 12:13:28 -08:00
Clemens Buchacher
5c951ef47b 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>
2012-01-01 01:18:53 -08:00
Jack Nagel
0eddcbf161 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>
2011-12-29 13:08:47 -08:00
Junio C Hamano
f3f778df69 Git 1.7.8.2
Contains accumulated fixes since 1.7.8 that have been merged to the
'master' branch in preparation for the 1.7.9 release.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-28 12:03:24 -08:00
Junio C Hamano
9a8e485430 Merge branch 'jv/maint-config-set' into maint
* jv/maint-config-set:
  Fix an incorrect reference to --set-all.
2011-12-28 12:03:19 -08:00
Junio C Hamano
0d57085943 Merge branch 'jk/follow-rename-score' into maint
* jk/follow-rename-score:
  use custom rename score during --follow
2011-12-28 11:49:37 -08:00
Junio C Hamano
9b0b0b4f45 Merge branch 'jc/checkout-m-twoway' into maint
* jc/checkout-m-twoway:
  t/t2023-checkout-m.sh: fix use of test_must_fail
  checkout_merged(): squelch false warning from some gcc
  Test 'checkout -m -- path'
  checkout -m: no need to insist on having all 3 stages
2011-12-28 11:44:54 -08:00
Junio C Hamano
00754b20f9 Merge branch 'tr/doc-sh-setup' into maint
* tr/doc-sh-setup:
  git-sh-setup: make require_clean_work_tree part of the interface
2011-12-28 11:42:51 -08:00
Junio C Hamano
b42e81afe2 Merge branch 'jk/maint-strbuf-missing-init' into maint
* jk/maint-strbuf-missing-init:
  commit, merge: initialize static strbuf
2011-12-28 11:42:46 -08:00
Junio C Hamano
4a242d6cb7 Merge branch 'jk/maint-push-v-is-verbose' into maint
* jk/maint-push-v-is-verbose:
  make "git push -v" actually verbose
2011-12-28 11:42:42 -08:00
Junio C Hamano
b5c12797b4 Merge branch 'jk/http-push-to-empty' into maint
* jk/http-push-to-empty:
  remote-curl: don't pass back fake refs

Conflicts:
	remote-curl.c
2011-12-28 11:42:37 -08:00
Junio C Hamano
81eaa0655f Merge branch 'jk/doc-fsck' into maint
* jk/doc-fsck:
  docs: brush up obsolete bits of git-fsck manpage
2011-12-28 11:42:33 -08:00
Junio C Hamano
23838b8a15 Merge branch 'jc/maint-lf-to-crlf-keep-crlf' into maint
* jc/maint-lf-to-crlf-keep-crlf:
  lf_to_crlf_filter(): resurrect CRLF->CRLF hack
2011-12-28 11:42:27 -08:00
Junio C Hamano
e8f6b51a6b Merge branch 'ef/setenv-putenv' into maint
* ef/setenv-putenv:
  compat/setenv.c: error if name contains '='
  compat/setenv.c: update errno when erroring out
2011-12-28 11:42:24 -08:00
Junio C Hamano
3c06ab69b1 Merge branch 'jc/advice-doc' into maint
* jc/advice-doc:
  advice: Document that they all default to true
2011-12-28 11:32:39 -08:00
Junio C Hamano
770dd00ebd Merge branch 'jn/maint-sequencer-fixes' into maint
* jn/maint-sequencer-fixes:
  revert: stop creating and removing sequencer-old directory
  Revert "reset: Make reset remove the sequencer state"
  revert: do not remove state until sequence is finished
  revert: allow single-pick in the middle of cherry-pick sequence
  revert: pass around rev-list args in already-parsed form
  revert: allow cherry-pick --continue to commit before resuming
  revert: give --continue handling its own function
2011-12-28 11:32:39 -08:00
Junio C Hamano
7fc1495b18 Merge branch 'jk/maint-snprintf-va-copy' into maint
* jk/maint-snprintf-va-copy:
  compat/snprintf: don't look at va_list twice
2011-12-28 11:32:38 -08:00
Junio C Hamano
f1c12e1b4a Merge branch 'jk/maint-push-over-dav' into maint
* jk/maint-push-over-dav:
  http-push: enable "proactive auth"
  t5540: test DAV push with authentication
2011-12-28 11:32:37 -08:00
Junio C Hamano
699eb54876 Merge branch 'jk/maint-mv' into maint
* jk/maint-mv:
  mv: be quiet about overwriting
  mv: improve overwrite warning
  mv: make non-directory destination error more clear
  mv: honor --verbose flag
  docs: mention "-k" for both forms of "git mv"
2011-12-28 11:32:36 -08:00
Junio C Hamano
7a5638a159 Merge branch 'jk/fetch-no-tail-match-refs' into maint
* jk/fetch-no-tail-match-refs:
  connect.c: drop path_match function
  fetch-pack: match refs exactly
  t5500: give fully-qualified refs to fetch-pack
  drop "match" parameter from get_remote_heads
2011-12-28 11:32:36 -08:00
Junio C Hamano
2cb1ff9ac3 Merge branch 'ew/keepalive' into maint
* ew/keepalive:
  enable SO_KEEPALIVE for connected TCP sockets
2011-12-28 11:32:36 -08:00
Junio C Hamano
474294963e Merge branch 'ci/stripspace-docs' into maint
* ci/stripspace-docs:
  Update documentation for stripspace
2011-12-28 11:32:35 -08:00
Junio C Hamano
9ddb7ead52 Merge branch 'jh/fast-import-notes' into maint
* jh/fast-import-notes:
  fast-import: Fix incorrect fanout level when modifying existing notes refs
  t9301: Add 2nd testcase exposing bugs in fast-import's notes fanout handling
  t9301: Fix testcase covering up a bug in fast-import's notes fanout handling
2011-12-28 11:32:35 -08:00
Junio C Hamano
d9d73b37f3 Merge branch 'aw/rebase-i-stop-on-failure-to-amend' into maint
* aw/rebase-i-stop-on-failure-to-amend:
  rebase -i: interrupt rebase when "commit --amend" failed during "reword"
2011-12-28 11:32:34 -08:00
Junio C Hamano
4df989f953 Merge branch 'tj/maint-imap-send-remove-unused' into maint
* tj/maint-imap-send-remove-unused:
  imap-send: Remove unused 'use_namespace' variable
2011-12-28 11:32:34 -08:00
Junio C Hamano
79587741cb Merge branch 'jn/branch-move-to-self' into maint
* jn/branch-move-to-self:
  Allow checkout -B <current-branch> to update the current branch
  branch: allow a no-op "branch -M <current-branch> HEAD"
2011-12-28 11:32:33 -08:00
Junio C Hamano
e39888ba21 Merge branch 'na/strtoimax' into maint
* na/strtoimax:
  Support sizes >=2G in various config options accepting 'g' sizes.
  Compatibility: declare strtoimax() under NO_STRTOUMAX
  Add strtoimax() compatibility function.
2011-12-28 11:32:33 -08:00
Junio C Hamano
786a9611f4 Merge branch 'jk/refresh-porcelain-output' into maint
* jk/refresh-porcelain-output:
  refresh_index: make porcelain output more specific
  refresh_index: rename format variables
  read-cache: let refresh_cache_ent pass up changed flags
2011-12-28 11:32:32 -08:00
Jelmer Vernooij
67e223edc4 Fix an incorrect reference to --set-all.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-27 11:14:18 -08:00
Junio C Hamano
2ce0edcd78 Git 1.7.8.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21 12:02:13 -08:00
Junio C Hamano
b43ba78914 Merge branch 'jl/submodule-status-failure-report' into maint
* jl/submodule-status-failure-report:
  diff/status: print submodule path when looking for changes fails
2011-12-21 11:42:45 -08:00
Junio C Hamano
f0b4fd4707 Merge branch 'tr/userdiff-c-returns-pointer' into maint
* tr/userdiff-c-returns-pointer:
  userdiff: allow * between cpp funcname words
2011-12-21 11:42:45 -08:00
Junio C Hamano
406cc9b822 Merge branch 'bc/maint-apply-check-no-patch' into maint
* bc/maint-apply-check-no-patch:
  builtin/apply.c: report error on failure to recognize input
  t/t4131-apply-fake-ancestor.sh: fix broken test
2011-12-21 11:42:45 -08:00
Junio C Hamano
3bb8d69cdd Merge branch 'cn/maint-lf-to-crlf-filter' into maint
* cn/maint-lf-to-crlf-filter:
  lf_to_crlf_filter(): tell the caller we added "\n" when draining
  convert: track state in LF-to-CRLF filter
2011-12-21 11:42:44 -08:00
Junio C Hamano
1a7bd4fcfa Merge branch 'jk/maint-upload-archive' into maint
* jk/maint-upload-archive:
  archive: don't let remote clients get unreachable commits
2011-12-21 11:42:44 -08:00
Carlos Martín Nieto
a31275d6ff clone: the -o option has nothing to do with <branch>
It is to give an alternate <name> instead of "origin" to the remote
we are cloning from.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21 11:26:30 -08:00
Michael Schubert
967cf9867d builtin/log: remove redundant initialization
"abbrev" and "commit_format" in struct rev_info get initialized in
init_revisions - no need to reinit in cmd_log_init_defaults.

Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21 11:15:56 -08:00
Junio C Hamano
f1f509cc45 Merge branch 'ms/commit-cc-option-helpstring' into maint
* ms/commit-cc-option-helpstring:
  builtin/commit: add missing '/' in help message
2011-12-21 10:50:20 -08:00
Michael Schubert
ee0400df4e builtin/commit: add missing '/' in help message
Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21 10:46:10 -08:00
Ævar Arnfjörð Bjarmason
97f261b1e7 builtin/init-db.c: eliminate -Wformat warning on Solaris
On Solaris systems we'd warn about an implicit cast of mode_t when we
printed things out with the %d format. We'd get this warning under GCC
4.6.0 with Solaris headers:

    builtin/init-db.c: In function ‘separate_git_dir’:
    builtin/init-db.c:354:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘mode_t’ [-Wformat]

We've been doing this ever since v1.7.4.1-296-gb57fb80. Just work
around this by adding an explicit cast.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-20 16:02:08 -08:00
Thomas Rast
d577cd216e git-sh-setup: make require_clean_work_tree part of the interface
92c62a3 (Porcelain scripts: Rewrite cryptic "needs update" error
message, 2010-10-19) refactored git's own checking to a function in
git-sh-setup.  This is a very useful thing for script writers, so
document it.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-20 14:01:41 -08:00
Ævar Arnfjörð Bjarmason
5cd7fadc07 t/t2023-checkout-m.sh: fix use of test_must_fail
Change an invocation of test_must_fail() to be inside a
test_expect_success() as is our usual pattern. Having it outside
caused our tests to fail under prove(1) since we wouldn't print a
newline before TAP output:

    CONFLICT (content): Merge conflict in both.txt
    # GETTEXT POISON #ok 2 - -m restores 2-way conflicted+resolved file

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-20 13:24:02 -08:00
Jeff King
02f7914734 remote-curl: don't pass back fake refs
When receive-pack advertises its list of refs, it generally hides the
capabilities information after a NUL at the end of the first ref.

However, when we have an empty repository, there are no refs, and
therefore receive-pack writes a fake ref "capabilities^{}" with the
capabilities afterwards.

On the client side, git reads the result with get_remote_heads(). We pick
the capabilities from the end of the line, and then call check_ref() to
make sure the ref name is valid. We see that it isn't, and don't bother
adding it to our list of refs.

However, the call to check_ref() is enabled by passing the REF_NORMAL flag
to get_remote_heads. For the regular git transport, we pass REF_NORMAL in
get_refs_via_connect() if we are doing a push (since only receive-pack
uses this fake ref).  But in remote-curl, we never use this flag, and we
accept the fake ref as a real one, passing it back from the helper to the
parent git-push.

Most of the time this bug goes unnoticed, as the fake ref won't match our
refspecs. However, if "--mirror" is used, then we see it as remote cruft
to be pruned, and try to pass along a deletion refspec for it. Of course
this refspec has bogus syntax (because of the ^{}), and the helper
complains, aborting the push.

Let's have remote-curl mirror what the builtin get_refs_via_connect() does
(at least for the case of using git protocol; we can leave the dumb
info/refs reader as it is).

This also fixes pushing with --mirror to a smart-http remote that uses
alternates. The fake ".have" refs the server gives to avoid unnecessary
network transfer has a similar bad interactions with the machinery.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-19 11:21:29 -08:00
Junio C Hamano
26e94af0ba advice: Document that they all default to true
By definition, the default value of "advice.*" variables must be true and
they all control various additional help messages that are designed to aid
new users. Setting one to false is to tell Git that the user understands
the nature of the error and does not need the additional verbose help
message.

Also fix the asciidoc markup for linkgit:git-checkout[1] in the
description of the detachedHead advice by removing an excess colon.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-18 21:38:55 -08:00
Junio C Hamano
8496f56873 lf_to_crlf_filter(): resurrect CRLF->CRLF hack
The non-streaming version of the filter counts CRLF and LF in the whole
buffer, and returns without doing anything when they match (i.e. what is
recorded in the object store already uses CRLF). This was done to help
people who added files from the DOS world before realizing they want to go
cross platform and adding .gitattributes to tell Git that they only want
CRLF in their working tree.

The streaming version of the filter does not want to read the whole thing
before starting to work, as that defeats the whole point of streaming. So
we instead check what byte follows CR whenever we see one, and add CR
before LF only when the LF does not immediately follow CR already to keep
CRLF as is.

Reported-and-tested-by: Ralf Thielow
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-18 20:40:41 -08:00
Junio C Hamano
03f94ae9f9 Update jk/maint-strbuf-missing-init to builtin/ rename 2011-12-18 00:28:16 -08:00
Jeff King
2c47789d81 commit, merge: initialize static strbuf
Strbufs cannot rely on static all-zero initialization; instead, they must
use STRBUF_INIT to point to the "slopbuf".

Without this patch, "git commit --no-message" segfaults reliably. Fix the
same issue in builtin/merge.c as well.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-18 00:11:54 -08:00