git
11 years agoMerge branch 'bc/receive-pack-stdout-protection'
Junio C Hamano [Mon, 27 Aug 2012 18:55:00 +0000 (11:55 -0700)] 
Merge branch 'bc/receive-pack-stdout-protection'

When "git push" triggered the automatic gc on the receiving end, a
message from "git prune" that said it was removing cruft leaked to
the standard output, breaking the communication protocol.

* bc/receive-pack-stdout-protection:
  receive-pack: do not leak output from auto-gc to standard output
  t/t5400: demonstrate breakage caused by informational message from prune

11 years agoMerge branch 'ab/diff-write-incomplete-line'
Junio C Hamano [Mon, 27 Aug 2012 18:54:46 +0000 (11:54 -0700)] 
Merge branch 'ab/diff-write-incomplete-line'

The output from "git diff -B" for a file that ends with an
incomplete line did not put "\ No newline..." on a line of its own.

* ab/diff-write-incomplete-line:
  Fix '\ No newline...' annotation in rewrite diffs

11 years agoMerge branch 'jc/maint-t7406-rev-parse-max-count-huh'
Junio C Hamano [Mon, 27 Aug 2012 18:54:36 +0000 (11:54 -0700)] 
Merge branch 'jc/maint-t7406-rev-parse-max-count-huh'

Test clean-up, with no behaviour change.

* jc/maint-t7406-rev-parse-max-count-huh:
  t7406: fix misleading "rev-parse --max-count=1 HEAD"

11 years agoMerge branch 'jk/maint-null-in-trees'
Junio C Hamano [Mon, 27 Aug 2012 18:54:28 +0000 (11:54 -0700)] 
Merge branch 'jk/maint-null-in-trees'

We do not want a link to 0{40} object stored anywhere in our objects.

* jk/maint-null-in-trees:
  fsck: detect null sha1 in tree entries
  do not write null sha1s to on-disk index
  diff: do not use null sha1 as a sentinel value

11 years agoMerge branch 'mm/push-default-switch-warning'
Junio C Hamano [Mon, 27 Aug 2012 18:54:04 +0000 (11:54 -0700)] 
Merge branch 'mm/push-default-switch-warning'

In the next major release, we will switch "git push [$there]" that
does not say what to push from the traditional "matching" to the
updated "simple" semantics, that pushes the current branch to the
branch with the same name only when the current branch is set to
integrate with that remote branch (all other cases will error out).

* mm/push-default-switch-warning:
  push: start warning upcoming default change for push.default

11 years agoMerge branch 'maint'
Junio C Hamano [Fri, 24 Aug 2012 20:13:53 +0000 (13:13 -0700)] 
Merge branch 'maint'

* maint:
  Prepare for 1.7.11.6
  Make the ciabot scripts completely self-configuring in the normal case.
  Improved documentation for the ciabot scripts.

11 years agoMerge branch 'maint-1.7.11' into maint
Junio C Hamano [Fri, 24 Aug 2012 19:34:19 +0000 (12:34 -0700)] 
Merge branch 'maint-1.7.11' into maint

* maint-1.7.11:
  Prepare for 1.7.11.6
  Make the ciabot scripts completely self-configuring in the normal case.
  Improved documentation for the ciabot scripts.
  man: git pull -r is a short for --rebase
  gitcli: describe abbreviation of long options
  rev-list docs: clarify --topo-order description
  Documentation/CodingGuidelines: spell out more shell guidelines
  Documentation: do not mention .git/refs/* directories
  tests: Introduce test_seq

11 years agoPrepare for 1.7.11.6
Junio C Hamano [Fri, 24 Aug 2012 19:33:31 +0000 (12:33 -0700)] 
Prepare for 1.7.11.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'mv/pull-r-for-rebase' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:47 +0000 (12:05 -0700)] 
Merge branch 'mv/pull-r-for-rebase' into maint-1.7.11

A minor documentation update.

* mv/pull-r-for-rebase:
  man: git pull -r is a short for --rebase

11 years agoMerge branch 'jc/maint-abbrev-option-cli' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:44 +0000 (12:05 -0700)] 
Merge branch 'jc/maint-abbrev-option-cli' into maint-1.7.11

We did not document that many commands take unique prefix
abbreviations of long options (e.g. "--option" may be the only flag
that the command accepts that begin with "--opt", in which case you
can give "--opt") anywhere easy to find for new people.

* jc/maint-abbrev-option-cli:
  gitcli: describe abbreviation of long options

11 years agoMerge branch 'jc/maint-rev-list-topo-doc' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:40 +0000 (12:05 -0700)] 
Merge branch 'jc/maint-rev-list-topo-doc' into maint-1.7.11

It was unclear what "--topo-order" was really about in the
documentation. It is not just about "children before parent", but
also about "don't mix lineages".

* jc/maint-rev-list-topo-doc:
  rev-list docs: clarify --topo-order description

11 years agoMerge branch 'hv/coding-guidelines' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:35 +0000 (12:05 -0700)] 
Merge branch 'hv/coding-guidelines' into maint-1.7.11

In earlier days, "imitate the style in the neibouring code" was
sufficient to keep the coherent style, but over time some parts of
the codebase have drifted enough to make it ineffective.

* hv/coding-guidelines:
  Documentation/CodingGuidelines: spell out more shell guidelines

11 years agoMerge branch 'jc/tag-doc' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:30 +0000 (12:05 -0700)] 
Merge branch 'jc/tag-doc' into maint-1.7.11

Our documentation used to assume having files in .git/refs/*
directories was the only to have branches and tags, but that is not
true for quite some time.

* jc/tag-doc:
  Documentation: do not mention .git/refs/* directories

11 years agoMerge branch 'mk/test-seq' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:24 +0000 (12:05 -0700)] 
Merge branch 'mk/test-seq' into maint-1.7.11

Add a compatibility/utility function to the test framework.

* mk/test-seq:
  tests: Introduce test_seq

11 years agoMerge branch 'lp/no-cmd-http-fetch' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:19 +0000 (12:05 -0700)] 
Merge branch 'lp/no-cmd-http-fetch' into maint-1.7.11

* lp/no-cmd-http-fetch:
  builtin.h: remove unused cmd_<foo> declarations

11 years agoMerge branch 'bw/maint-1.7.9-solaris-getpass' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:11 +0000 (12:05 -0700)] 
Merge branch 'bw/maint-1.7.9-solaris-getpass' into maint-1.7.11

* bw/maint-1.7.9-solaris-getpass:
  Enable HAVE_DEV_TTY for Solaris
  terminal: seek when switching between reading and writing

11 years agoMerge branch 'jk/maint-commit-check-committer-early' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:08 +0000 (12:05 -0700)] 
Merge branch 'jk/maint-commit-check-committer-early' into maint-1.7.11

* jk/maint-commit-check-committer-early:
  commit: check committer identity more strictly

11 years agoMake the ciabot scripts completely self-configuring in the normal case.
Eric S. Raymond [Thu, 23 Aug 2012 05:21:53 +0000 (01:21 -0400)] 
Make the ciabot scripts completely self-configuring in the normal case.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoImproved documentation for the ciabot scripts.
Eric S. Raymond [Thu, 23 Aug 2012 04:10:53 +0000 (00:10 -0400)] 
Improved documentation for the ciabot scripts.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoKick off cycle towards 1.8.0
Junio C Hamano [Wed, 22 Aug 2012 18:49:26 +0000 (11:49 -0700)] 
Kick off cycle towards 1.8.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint'
Junio C Hamano [Wed, 22 Aug 2012 18:53:58 +0000 (11:53 -0700)] 
Merge branch 'maint'

* maint:
  contrib/ciabot: Get ciabot configuration from git variables

11 years agoMerge branch 'jc/doc-git-updates'
Junio C Hamano [Wed, 22 Aug 2012 18:53:36 +0000 (11:53 -0700)] 
Merge branch 'jc/doc-git-updates'

A minor documentation update.

* jc/doc-git-updates:
  Documentation: update the introductory section

11 years agoMerge branch 'mv/pull-r-for-rebase'
Junio C Hamano [Wed, 22 Aug 2012 18:53:31 +0000 (11:53 -0700)] 
Merge branch 'mv/pull-r-for-rebase'

A minor documentation update.

* mv/pull-r-for-rebase:
  man: git pull -r is a short for --rebase

11 years agoMerge branch 'jc/maint-abbrev-option-cli'
Junio C Hamano [Wed, 22 Aug 2012 18:53:25 +0000 (11:53 -0700)] 
Merge branch 'jc/maint-abbrev-option-cli'

We did not document that many commands take unique prefix
abbreviations of long options (e.g. "--option" may be the only flag
that the command accepts that begin with "--opt", in which case you
can give "--opt") anywhere easy to find for new people.

* jc/maint-abbrev-option-cli:
  gitcli: describe abbreviation of long options

11 years agoMerge branch 'jc/maint-rev-list-topo-doc'
Junio C Hamano [Wed, 22 Aug 2012 18:53:20 +0000 (11:53 -0700)] 
Merge branch 'jc/maint-rev-list-topo-doc'

It was unclear what "--topo-order" was really about in the
documentation. It is not just about "children before parent", but
also about "don't mix lineages".

* jc/maint-rev-list-topo-doc:
  rev-list docs: clarify --topo-order description

11 years agoMerge branch 'hv/coding-guidelines'
Junio C Hamano [Wed, 22 Aug 2012 18:53:07 +0000 (11:53 -0700)] 
Merge branch 'hv/coding-guidelines'

In earlier days, "imitate the style in the neibouring code" was
sufficient to keep the coherent style, but over time some parts of
the codebase have drifted enough to make it ineffective.

* hv/coding-guidelines:
  Documentation/CodingGuidelines: spell out more shell guidelines

11 years agoMerge branch 'jk/check-docs-update'
Junio C Hamano [Wed, 22 Aug 2012 18:53:00 +0000 (11:53 -0700)] 
Merge branch 'jk/check-docs-update'

Simplify "make check-docs" implementation and update its coverage.

* jk/check-docs-update:
  check-docs: get documented command list from Makefile
  check-docs: drop git-help special-case
  check-docs: list git-gui as a command
  check-docs: factor out command-list
  command-list: mention git-credential-* helpers
  command-list: add git-sh-i18n
  check-docs: update non-command documentation list
  check-docs: mention gitweb specially

11 years agoMerge branch 'jc/tag-doc'
Junio C Hamano [Wed, 22 Aug 2012 18:52:55 +0000 (11:52 -0700)] 
Merge branch 'jc/tag-doc'

Our documentation used to assume having files in .git/refs/*
directories was the only to have branches and tags, but that is not
true for quite some time.

* jc/tag-doc:
  Documentation: do not mention .git/refs/* directories

11 years agoMerge branch 'js/gitweb-path-info-unquote'
Junio C Hamano [Wed, 22 Aug 2012 18:52:32 +0000 (11:52 -0700)] 
Merge branch 'js/gitweb-path-info-unquote'

"gitweb" when used with PATH_INFO failed to notice directories with
SP (and other characters that need URL-style quoting) in them.

* js/gitweb-path-info-unquote:
  gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFO

11 years agoMerge branch 'tr/void-diff-setup-done'
Junio C Hamano [Wed, 22 Aug 2012 18:52:26 +0000 (11:52 -0700)] 
Merge branch 'tr/void-diff-setup-done'

Remove unnecessary code.

* tr/void-diff-setup-done:
  diff_setup_done(): return void

11 years agoMerge branch 'tr/merge-recursive-flush'
Junio C Hamano [Wed, 22 Aug 2012 18:52:19 +0000 (11:52 -0700)] 
Merge branch 'tr/merge-recursive-flush'

Remove unnecessary code.

* tr/merge-recursive-flush:
  merge-recursive: eliminate flush_buffer() in favor of write_in_full()

11 years agoMerge branch 'mm/die-with-dashdash-help'
Junio C Hamano [Wed, 22 Aug 2012 18:51:53 +0000 (11:51 -0700)] 
Merge branch 'mm/die-with-dashdash-help'

When the user gives an argument that can be taken as both a revision
name and a pathname without disambiguating with "--", we used to
give a help message "Use '--' to separate".  The message has been
clarified to show where that '--' goes on the command line.

* mm/die-with-dashdash-help:
  setup: clarify error messages for file/revisions ambiguity

11 years agoMerge branch 'tr/maint-send-email-2047'
Junio C Hamano [Wed, 22 Aug 2012 18:51:47 +0000 (11:51 -0700)] 
Merge branch 'tr/maint-send-email-2047'

"git send-email" did not unquote encoded words that appear on the
header correctly, and lost "_" from strings.

* tr/maint-send-email-2047:
  send-email: improve RFC2047 quote parsing

11 years agoMerge branch 'nd/index-errno'
Junio C Hamano [Wed, 22 Aug 2012 18:51:42 +0000 (11:51 -0700)] 
Merge branch 'nd/index-errno'

Assignments to errno before calling system functions that used to
matter in the old code were left behind after the code structure
changed sufficiently to make them useless.

* nd/index-errno:
  read_index_from: remove bogus errno assignments

11 years agoMerge branch 'mk/test-seq'
Junio C Hamano [Wed, 22 Aug 2012 18:51:37 +0000 (11:51 -0700)] 
Merge branch 'mk/test-seq'

Add a compatibility/utility function to the test framework.

* mk/test-seq:
  tests: Introduce test_seq

11 years agoMerge branch 'pg/maint-apply-remove-unused-variable'
Junio C Hamano [Wed, 22 Aug 2012 18:51:33 +0000 (11:51 -0700)] 
Merge branch 'pg/maint-apply-remove-unused-variable'

Remove an unused field.

* pg/maint-apply-remove-unused-variable:
  apply: delete unused deflate_origlen from patch struct

11 years agoMerge branch 'jc/test-prereq'
Junio C Hamano [Wed, 22 Aug 2012 18:51:26 +0000 (11:51 -0700)] 
Merge branch 'jc/test-prereq'

Teaches the test framework to probe rarely used prerequistes lazily,
and make use of it for detecting SYMLINKS, CASE_INSENSITIVE_FS and
NKD/NKC MacOS x gotcha.

* jc/test-prereq:
  t3910: use the UTF8_NFD_TO_NFC test prereq
  test-lib: provide UTF8 behaviour as a prerequisite
  t0050: use the SYMLINKS test prereq
  t0050: use the CASE_INSENSITIVE_FS test prereq
  test-lib: provide case insensitivity as a prerequisite
  test: allow prerequisite to be evaluated lazily
  test: rename $satisfied to $satisfied_prereq

11 years agoMerge branch 'ms/git-svn-1.7'
Junio C Hamano [Wed, 22 Aug 2012 18:51:20 +0000 (11:51 -0700)] 
Merge branch 'ms/git-svn-1.7'

A series by Michael Schwern via Eric to update git-svn to revamp the
way URLs are internally passed around, to make it work with SVN 1.7.

* ms/git-svn-1.7:
  git-svn: remove ad-hoc canonicalizations
  git-svn: canonicalize newly-minted URLs
  git-svn: introduce add_path_to_url function
  git-svn: canonicalize earlier
  git-svn: replace URL escapes with canonicalization
  git-svn: attempt to mimic SVN 1.7 URL canonicalization
  t9107: fix typo
  t9118: workaround inconsistency between SVN versions
  Git::SVN{,::Ra}: canonicalize earlier
  git-svn: path canonicalization uses SVN API
  Git::SVN::Utils: remove irrelevant comment
  git-svn: add join_paths() to safely concatenate paths
  git-svn: factor out _collapse_dotdot function
  git-svn: use SVN 1.7 to canonicalize when possible
  git-svn: move canonicalization to Git::SVN::Utils
  use Git::SVN{,::RA}->url accessor globally
  use Git::SVN->path accessor globally
  Git::SVN::Ra: use accessor for URLs
  Git::SVN: use accessor for URLs internally
  Git::SVN: use accessors internally for path

11 years agot3910: use the UTF8_NFD_TO_NFC test prereq
Michael J Gruber [Mon, 30 Jul 2012 09:57:18 +0000 (11:57 +0200)] 
t3910: use the UTF8_NFD_TO_NFC test prereq

Besides reusing the new test prerequisite, this fixes also the issue
that the current output is not TAP compliant and produces the output "no
reason given" [for skipping].

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint-1.7.11' into maint
Junio C Hamano [Wed, 22 Aug 2012 18:27:30 +0000 (11:27 -0700)] 
Merge branch 'maint-1.7.11' into maint

* maint-1.7.11:
  contrib/ciabot: Get ciabot configuration from git variables

11 years agocontrib/ciabot: Get ciabot configuration from git variables
Eric S. Raymond [Wed, 22 Aug 2012 10:52:30 +0000 (06:52 -0400)] 
contrib/ciabot: Get ciabot configuration from git variables

These changes remove all need to modify the ciabot scripts for installation.
Instead, per-project configuration can be dome via variables in a [ciabot]
section of the config file.

Also, correct for the new server address.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoGit 1.7.12 v1.7.12
Junio C Hamano [Mon, 20 Aug 2012 00:02:11 +0000 (17:02 -0700)] 
Git 1.7.12

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jc/doc-git-updates' (early part)
Junio C Hamano [Fri, 17 Aug 2012 20:27:10 +0000 (13:27 -0700)] 
Merge branch 'jc/doc-git-updates' (early part)

* 'jc/doc-git-updates' (early part):
  Documentation: update URL for formatted pages

11 years agoDocumentation: update the introductory section
Junio C Hamano [Fri, 17 Aug 2012 19:48:52 +0000 (12:48 -0700)] 
Documentation: update the introductory section

The second paragraph in the git(1) description section were meant to
guide people who are not ready to dive into this page away from here.
Referring migrating CVS users to another page before they get
acquainted with Git was somewhat out of place.  Move the reference to
the "FURTHER DOCUMENTATION" section and push that section down.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation: update URL for formatted pages
Junio C Hamano [Fri, 17 Aug 2012 19:14:57 +0000 (12:14 -0700)] 
Documentation: update URL for formatted pages

The one at kernel.org has not been updated for quite a while and
can no longer be called "the latest".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoman: git pull -r is a short for --rebase
Miklos Vajna [Thu, 16 Aug 2012 09:50:18 +0000 (11:50 +0200)] 
man: git pull -r is a short for --rebase

Letting the "--rebase" option squat on the short-and-sweet single
letter option "-r" was an unintended accident and was not even
documented, but the short option seems to be already used in the
wild. Let's document it so that other options that begin with "r"
would not be tempted to steal it.

Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogitcli: describe abbreviation of long options
Junio C Hamano [Fri, 17 Aug 2012 06:16:22 +0000 (23:16 -0700)] 
gitcli: describe abbreviation of long options

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge git://github.com/git-l10n/git-po to update Swedish translation
Junio C Hamano [Fri, 17 Aug 2012 03:13:45 +0000 (20:13 -0700)] 
Merge git://github.com/git-l10n/git-po to update Swedish translation

* git://github.com/git-l10n/git-po:
  l10n: Fixes to Swedish translation

11 years agol10n: Fixes to Swedish translation
Peter Krefting [Tue, 14 Aug 2012 08:58:14 +0000 (09:58 +0100)] 
l10n: Fixes to Swedish translation

Tersify texts overflowing an 80-character terminal.
Fix spelling mistakes.

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
11 years agoGit 1.7.12-rc3 v1.7.12-rc3
Junio C Hamano [Wed, 15 Aug 2012 20:46:16 +0000 (13:46 -0700)] 
Git 1.7.12-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoSync with 1.7.11.5
Junio C Hamano [Wed, 15 Aug 2012 20:41:17 +0000 (13:41 -0700)] 
Sync with 1.7.11.5

11 years agoGit 1.7.11.5 v1.7.11.5
Junio C Hamano [Wed, 15 Aug 2012 20:39:53 +0000 (13:39 -0700)] 
Git 1.7.11.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'rj/maint-grep-remove-redundant-test' into maint
Junio C Hamano [Wed, 15 Aug 2012 20:37:20 +0000 (13:37 -0700)] 
Merge branch 'rj/maint-grep-remove-redundant-test' into maint

* rj/maint-grep-remove-redundant-test:
  t7810-*.sh: Remove redundant test

11 years agoMerge branch 'hv/link-alt-odb-entry' into maint
Junio C Hamano [Wed, 15 Aug 2012 20:36:47 +0000 (13:36 -0700)] 
Merge branch 'hv/link-alt-odb-entry' into maint

* hv/link-alt-odb-entry:
  link_alt_odb_entry: fix read over array bounds reported by valgrind

11 years agorev-list docs: clarify --topo-order description
Junio C Hamano [Wed, 15 Aug 2012 20:02:48 +0000 (13:02 -0700)] 
rev-list docs: clarify --topo-order description

It was unclear what "--topo-order" was really about in the
documentation.  It is not just about "children before parent", but
also about "don't mix lineages".

Reword the description for both "--date-order" and "--topo-order",
and add an illustration to it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogitweb: URL-decode $my_url/$my_uri when stripping PATH_INFO
Jay Soffian [Thu, 9 Aug 2012 02:29:26 +0000 (22:29 -0400)] 
gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFO

When gitweb is used as a DirectoryIndex, it attempts to strip
PATH_INFO on its own, as $cgi->url() fails to do so.

However, it fails to account for the fact that PATH_INFO has
already been URL-decoded by the web server, but the value
returned by $cgi->url() has not been. This causes the stripping
to fail whenever the URL contains encoded characters.

To see this in action, setup gitweb as a DirectoryIndex and
then use it on a repository with a directory containing a
space in the name. Navigate to tree view, examine the gitweb
generated html and you'll see a link such as:

  <a href="/test.git/tree/HEAD:/directory with spaces">directory with spaces</a>

When clicked on, the browser will URL-encode this link, giving
a $cgi->url() of the form:

   /test.git/tree/HEAD:/directory%20with%20spaces

While PATH_INFO is:

   /test.git/tree/HEAD:/directory with spaces

Fix this by calling unescape() on both $my_url and $my_uri before
stripping PATH_INFO from them.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation/CodingGuidelines: spell out more shell guidelines
Heiko Voigt [Wed, 15 Aug 2012 17:06:01 +0000 (19:06 +0200)] 
Documentation/CodingGuidelines: spell out more shell guidelines

In earlier days, "imitate the style in the neibouring code" was
sufficient to keep the coherent style, but over time some parts of
the codebase have drifted enough to make it ineffective.

Spell some of the guidelines out.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit svn: reset invalidates the memoized mergeinfo caches
Peter Baumann [Thu, 9 Aug 2012 06:42:53 +0000 (08:42 +0200)] 
git svn: reset invalidates the memoized mergeinfo caches

Since v1.7.0-rc2~11 (git-svn: persistent memoization, 2010-01-30),
git-svn has maintained some private per-repository caches in
.git/svn/.caches to avoid refetching and recalculating some
mergeinfo-related information with every 'git svn fetch'.

This memoization can cause problems, e.g consider the following case:

SVN repo:

  ... - a - b - c - m  <- trunk
          \        /
            d  -  e    <- branch1

The Git import of the above repo is at commit 'a' and doesn't know about
the branch1. In case of an 'git svn rebase', only the trunk of the
SVN repo is imported. During the creation of the git commit 'm', git svn
uses the svn:mergeinfo property and tries to find the corresponding git
commit 'e' to create 'm' with 'c' and 'e' as parents. But git svn rebase
only imports the current branch so commit 'e' is not imported.
Therefore git svn fails to create commit 'm' as a merge commit, because one
of its parents is not known to git. The imported history looks like this:

  ... - a - b - c - m  <- trunk

A later 'git svn fetch' to import all branches can't rewrite the commit 'm'
to add 'e' as a parent and to make it a real git merge commit, because it
was already imported.

That's why the imported history misses the merge and looks like this:

  ... - a - b - c - m  <- trunk
          \
            d  -  e    <- branch1

Right now the only known workaround for importing 'm' as a merge is to
force reimporting 'm' again from SVN, e.g. via

  $ git svn reset --revision $(git find-rev $c)
  $ git svn fetch

Sadly, this is where the behavior has regressed: git svn reset doesn't
invalidate the old mergeinfo cache, which is no longer valid for the
reimport, which leads to 'm' beeing imprted with only 'c' as parent.

As solution to this problem, this commit invalidates the mergeinfo cache
to force correct recalculation of the parents.

During development of this patch, several ways for invalidating the cache
where considered. One of them is to use Memoize::flush_cache, which will
call the CLEAR method on the underlying Memoize persistency implementation.
Sadly, neither Memoize::Storable nor the newer Memoize::YAML module
introduced in 68f532f4ba888 could optionally be used implement the
CLEAR method, so this is not an option.

Reseting the internal hash used to store the memoized values has the same
problem, because it calls the non-existing CLEAR method of the
underlying persistency layer, too.

Considering this and taking into account the different implementations
of the memoization modules, where Memoize::Storable is not in our control,
implementing the missing CLEAR method is not an option, at least not if
Memoize::Storable is still used.

Therefore the easiest solution to clear the cache is to delete the files
on disk in 'git svn reset'. Normally, deleting the files behind the back
of the memoization module would be problematic, because the in-memory
representation would still exist and contain wrong data. Fortunately, the
memoization is active in memory only for a small portion of the code.
Invalidating the cache by deleting the files on disk if it isn't active
should be safe.

Signed-off-by: Peter Baumann <waste.manager@gmx.de>
Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
11 years agogit svn: handle errors and concurrent commits in dcommit
Robert Luberda [Wed, 8 Aug 2012 05:35:00 +0000 (07:35 +0200)] 
git svn: handle errors and concurrent commits in dcommit

dcommit didn't handle errors returned by SVN and coped very
poorly with concurrent commits that appear in SVN repository
while dcommit was running. In both cases it left git repository
in inconsistent state: index (which was reset with `git reset
--mixed' after a successful commit to SVN) no longer matched the
checkouted tree, when the following commit failed or needed to be
rebased. See http://bugs.debian.org/676904 for examples.

This patch fixes the issues by:
- introducing error handler for dcommit. The handler will try
  to rebase or reset working tree before returning error to the
  end user. dcommit_rebase function was extracted out of cmd_dcommit
  to ensure consistency between cmd_dcommit and the error handler.
- calling `git reset --mixed' only once after all patches are
  successfully committed to SVN. This ensures index is not touched
  for most of the time of dcommit run.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
11 years agoMerge git://github.com/git-l10n/git-po
Junio C Hamano [Thu, 9 Aug 2012 17:51:46 +0000 (10:51 -0700)] 
Merge git://github.com/git-l10n/git-po

L10n updates for 1.7.12-rc2

* 'master' of git://github.com/git-l10n/git-po:
  l10n: Update Swedish translation (1168t0f0u)
  l10n: de.po: translate 77 new messages
  l10n: vi.po: update one message
  l10n: zh_CN.po: update one translation
  l10n: Update one message in git.pot

11 years agol10n: Update Swedish translation (1168t0f0u)
Peter Krefting [Thu, 9 Aug 2012 05:36:41 +0000 (06:36 +0100)] 
l10n: Update Swedish translation (1168t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
11 years agoMerge branch 'bw/maint-1.7.9-solaris-getpass'
Junio C Hamano [Wed, 8 Aug 2012 22:14:57 +0000 (15:14 -0700)] 
Merge branch 'bw/maint-1.7.9-solaris-getpass'

The recent update to terminal I/O interface to get passwords &c
interactively didn't quite work on Solaris.

* bw/maint-1.7.9-solaris-getpass:
  Enable HAVE_DEV_TTY for Solaris
  terminal: seek when switching between reading and writing

11 years agocheck-docs: get documented command list from Makefile
Jeff King [Wed, 8 Aug 2012 20:57:52 +0000 (16:57 -0400)] 
check-docs: get documented command list from Makefile

The current code tries to get a list of documented commands
by doing "ls Documentation/git*txt" and culling a bunch of
special cases from the result. Looking for "git-*.txt" would
be more accurate, but would miss a few commands like
"gitweb" and "gitk".

Fortunately, Documentation/Makefile already knows what this
list is, so we can just ask it. Annoyingly, we still have to
post-process its output a little, since make will print
extra cruft like "GIT-VERSION-FILE is up to date" to stdout.

Now that our list is accurate, we can remove all of the ugly
special-cases.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocheck-docs: drop git-help special-case
Jeff King [Wed, 8 Aug 2012 20:57:13 +0000 (16:57 -0400)] 
check-docs: drop git-help special-case

The check-docs target special-cases git-help to avoid
mentioning it as "documented but removed". This dates back
to the early implementation of git-help, when its code was
simply included inside git.c.

These days it is a full-fledged builtin (in builtin/help.c)
and does not need special-casing.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocheck-docs: list git-gui as a command
Jeff King [Wed, 8 Aug 2012 20:56:42 +0000 (16:56 -0400)] 
check-docs: list git-gui as a command

git-gui is already documented and mentioned in command-list,
but adding it to the Makefile makes sure it is so. We also
add its alias git-citool (which is also documented).

As a result, we can drop them from the special case
statement that avoids them being listed as "documented but
does not exist".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocheck-docs: factor out command-list
Jeff King [Wed, 8 Aug 2012 20:56:04 +0000 (16:56 -0400)] 
check-docs: factor out command-list

The check-docs command list is composed from several
Makefile variables plus some special cases. Let's make the
meaning of the list more obvious and avoid repeating
ourselves by factoring it out.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocommand-list: mention git-credential-* helpers
Jeff King [Wed, 8 Aug 2012 18:34:49 +0000 (14:34 -0400)] 
command-list: mention git-credential-* helpers

These commands were never added to the command-list. Adding
them makes "make check-docs" run without complaint.
While we're at it, let's capitalize the first letter of
their one-line summaries to match the rest of the git
manpages.

The credential-cache--daemon command is somewhat special. It
is already ignored by check-docs because it contains a "--",
marking it as a non-interesting implementation detail. It
is, in fact, documented, but since the documentation
basically just redirects you to a more appropriate command
anyway, let's explicitly omit it so it is not mentioned in
git(1).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocommand-list: add git-sh-i18n
Jeff King [Wed, 8 Aug 2012 18:34:39 +0000 (14:34 -0400)] 
command-list: add git-sh-i18n

This is in the same category as git-sh-setup.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocheck-docs: update non-command documentation list
Jeff King [Wed, 8 Aug 2012 18:34:33 +0000 (14:34 -0400)] 
check-docs: update non-command documentation list

The check-docs target looks at Documentation/git*txt and
complains if any entry does not have a matching command.
Therefore we need to explicitly ignore any entries which are
not meant to describe a command (like gitattributes.txt).
This list has grown stale over time, so let's bring it up to
date.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocheck-docs: mention gitweb specially
Jeff King [Wed, 8 Aug 2012 18:32:37 +0000 (14:32 -0400)] 
check-docs: mention gitweb specially

Like gitk, gitweb is not listed in the usual Makefile
variables and must be fed to check-docs specially. Otherwise
check-docs thinks it is documented but removed.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation: list git-credential in plumbing commands
Matthieu Moy [Wed, 8 Aug 2012 07:58:27 +0000 (09:58 +0200)] 
Documentation: list git-credential in plumbing commands

Commit e30b2feb1b (Jun 24 2012, add 'git credential' plumbing command)
forgot to add git-credential to command-list.txt, hence the command was
not appearing in the documentation, making it hard for users to discover
it.

While we're there, capitalize the description line for git-crendential
for consistency with other commands.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge git://github.com/ralfth/git-po-de
Jiang Xin [Tue, 7 Aug 2012 23:23:01 +0000 (07:23 +0800)] 
Merge git://github.com/ralfth/git-po-de

* git://github.com/ralfth/git-po-de:
  l10n: de.po: translate 77 new messages

11 years agoGit 1.7.12-rc2 v1.7.12-rc2
Junio C Hamano [Tue, 7 Aug 2012 17:39:34 +0000 (10:39 -0700)] 
Git 1.7.12-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agol10n: de.po: translate 77 new messages
Ralf Thielow [Thu, 2 Aug 2012 16:06:12 +0000 (18:06 +0200)] 
l10n: de.po: translate 77 new messages

Translate 77 new messages came from git.pot update
in 3b6137f (l10n: Update git.pot (76 new, 4 removed
messages)) and bb2ba06 (l10n: Update one message in
git.pot).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
11 years agoreceive-pack: do not leak output from auto-gc to standard output
Junio C Hamano [Tue, 7 Aug 2012 05:31:10 +0000 (22:31 -0700)] 
receive-pack: do not leak output from auto-gc to standard output

The standard output channel of receive-pack is a structured protocol
channel, and subprocesses must never be allowed to leak anything
into it by writing to their standard output.

Use RUN_COMMAND_STDOUT_TO_STDERR option to run_command_v_opt() just
like we do when running hooks to prevent output from "gc" leaking to
the standard output.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot/t5400: demonstrate breakage caused by informational message from prune
Brandon Casey [Tue, 7 Aug 2012 05:01:48 +0000 (22:01 -0700)] 
t/t5400: demonstrate breakage caused by informational message from prune

When receive-pack triggers 'git gc --auto' and 'git prune' is called to
remove a stale temporary object, 'git prune' prints an informational
message to stdout about the file that it will remove.  Since this message
is written to stdout, it is sent back over the transport channel to the git
client which tries to interpret it as part of the pack protocol and then
promptly terminates with a complaint about a protocol error.

Introduce a test which exercises the auto-gc functionality of receive-pack
and demonstrates this breakage.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoEnable HAVE_DEV_TTY for Solaris
Ben Walton [Tue, 7 Aug 2012 03:07:42 +0000 (23:07 -0400)] 
Enable HAVE_DEV_TTY for Solaris

Now that git_terminal_prompt can cleanly interact with /dev/tty on
Solaris, enable HAVE_DEV_TTY so that this code path is used for
credential reading instead of relying on the crippled getpass().

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoterminal: seek when switching between reading and writing
Jeff King [Tue, 7 Aug 2012 04:10:26 +0000 (00:10 -0400)] 
terminal: seek when switching between reading and writing

When a stdio stream is opened in update mode (e.g., "w+"),
the C standard forbids switching between reading or writing
without an intervening positioning function. Many
implementations are lenient about this, but Solaris libc
will flush the recently-read contents to the output buffer.
In this instance, that meant writing the non-echoed password
that the user just typed to the terminal.

Fix it by inserting a no-op fseek between the read and
write.

The opposite direction (writing followed by reading) is also
disallowed, but our intervening fflush is an acceptable
positioning function for that alternative.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agol10n: vi.po: update one message
Tran Ngoc Quan [Tue, 7 Aug 2012 00:18:01 +0000 (07:18 +0700)] 
l10n: vi.po: update one message

* Translate message that updated from commit bb2ba06

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
11 years agoDrop 1.7.11.x items from 1.7.12 release notes
Junio C Hamano [Mon, 6 Aug 2012 22:58:38 +0000 (15:58 -0700)] 
Drop 1.7.11.x items from 1.7.12 release notes

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoSync with maint
Junio C Hamano [Mon, 6 Aug 2012 22:53:33 +0000 (15:53 -0700)] 
Sync with maint

11 years agoPrepare for 1.7.11.5
Junio C Hamano [Mon, 6 Aug 2012 22:51:58 +0000 (15:51 -0700)] 
Prepare for 1.7.11.5

Hopefully that will be the final 1.7.11.x maintenance release.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jn/block-sha1' into maint
Junio C Hamano [Mon, 6 Aug 2012 22:40:00 +0000 (15:40 -0700)] 
Merge branch 'jn/block-sha1' into maint

* jn/block-sha1:
  Makefile: BLK_SHA1 does not require fast htonl() and unaligned loads
  block-sha1: put expanded macro parameters in parentheses
  block-sha1: avoid pointer conversion that violates alignment constraints

11 years agoMerge branch 'jn/make-assembly-in-right-directory' into maint
Junio C Hamano [Mon, 6 Aug 2012 22:39:38 +0000 (15:39 -0700)] 
Merge branch 'jn/make-assembly-in-right-directory' into maint

* jn/make-assembly-in-right-directory:
  Makefile: fix location of listing produced by "make subdir/foo.s"

11 years agoMerge branch 'ms/daemon-doc-typo' into maint
Junio C Hamano [Mon, 6 Aug 2012 22:39:16 +0000 (15:39 -0700)] 
Merge branch 'ms/daemon-doc-typo' into maint

* ms/daemon-doc-typo:
  Documentation/git-daemon: add missing word

11 years agoMerge branch 'lm/git-blame-el' into maint
Junio C Hamano [Mon, 6 Aug 2012 22:37:54 +0000 (15:37 -0700)] 
Merge branch 'lm/git-blame-el' into maint

* lm/git-blame-el:
  git-blame.el: Do not use bare 0 to mean (point-min)
  git-blame.el: Use with-current-buffer where appropriate
  git-blame.el: Do not use goto-line in lisp code

11 years agoMerge branch 'rs/ipv6-ssh-url' into maint
Junio C Hamano [Mon, 6 Aug 2012 22:37:43 +0000 (15:37 -0700)] 
Merge branch 'rs/ipv6-ssh-url' into maint

* rs/ipv6-ssh-url:
  git: Wrong parsing of ssh urls with IPv6 literals ignores port

11 years agoMerge branch 'rs/git-blame-mapcar-mapc' into maint
Junio C Hamano [Mon, 6 Aug 2012 22:37:28 +0000 (15:37 -0700)] 
Merge branch 'rs/git-blame-mapcar-mapc' into maint

* rs/git-blame-mapcar-mapc:
  git-blame.el: use mapc instead of mapcar

11 years agoMerge branch 'rr/doc-commit' into maint
Junio C Hamano [Mon, 6 Aug 2012 22:37:09 +0000 (15:37 -0700)] 
Merge branch 'rr/doc-commit' into maint

* rr/doc-commit:
  commit: document a couple of options

11 years agodoc: A few minor copy edits.
Štěpán Němec [Sat, 14 Jul 2012 22:20:36 +0000 (00:20 +0200)] 
doc: A few minor copy edits.

- (glossary) the quotes around the Wikipedia URL prevented its
  linkification in frontends that support it; remove them

- (manual) newer version (SHA-1) == following, older == preceding, not
  the other way around

- trivial typo and wording fixes

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jk/maint-checkout-orphan-check-fix' into maint
Junio C Hamano [Mon, 6 Aug 2012 22:31:16 +0000 (15:31 -0700)] 
Merge branch 'jk/maint-checkout-orphan-check-fix' into maint

* jk/maint-checkout-orphan-check-fix:
  checkout: don't confuse ref and object flags

11 years agoMerge branch 'mh/maint-revisions-doc' into maint
Junio C Hamano [Mon, 6 Aug 2012 22:30:57 +0000 (15:30 -0700)] 
Merge branch 'mh/maint-revisions-doc' into maint

* mh/maint-revisions-doc:
  Enumerate revision range specifiers in the documentation
  Make <refname> documentation more consistent.

11 years agoMerge branch 'jc/mergetool-tool-help' into maint
Junio C Hamano [Mon, 6 Aug 2012 22:30:18 +0000 (15:30 -0700)] 
Merge branch 'jc/mergetool-tool-help' into maint

* jc/mergetool-tool-help:
  mergetool: support --tool-help option like difftool does

11 years agoMakefile: use overridable $(FIND) instead of hard-coded 'find'
Johannes Sixt [Mon, 6 Aug 2012 21:06:14 +0000 (23:06 +0200)] 
Makefile: use overridable $(FIND) instead of hard-coded 'find'

The Makefile already offers the variable $(FIND) and uses it except in one
place. Fix it.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation: do not mention .git/refs/* directories
Junio C Hamano [Mon, 6 Aug 2012 20:36:47 +0000 (13:36 -0700)] 
Documentation: do not mention .git/refs/* directories

It is an implementation detail that a new tag is created by adding a
file in the .git/refs/tags directory.  The only thing the user needs
to know is that a "git tag" creates a ref in the refs/tags namespace,
and without "-f", it does not overwrite an existing tag.

Inspired by a report from 乙酸鋰 <ch3cooli@gmail.com>; I think I
caught all the existing mention in Documentation/ directory in the
tip of 1.7.9.X maintenance track, but we may have added new ones
since then.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agol10n: zh_CN.po: update one translation
Jiang Xin [Mon, 6 Aug 2012 17:10:34 +0000 (01:10 +0800)] 
l10n: zh_CN.po: update one translation

Translate 1 new messages came from git.pot update in bb2ba06
(l10n: Update one message in git.pot)

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
11 years agoread_index_from: remove bogus errno assignments
Nguyễn Thái Ngọc Duy [Mon, 6 Aug 2012 11:27:09 +0000 (18:27 +0700)] 
read_index_from: remove bogus errno assignments

These assignments comes from the very first commit e83c516 (Initial
revision of "git", the information manager from hell - 2005-04-07).
Back then we did not die() when errors happened so correct errno was
required.

Since 5d1a5c0 ([PATCH] Better error reporting for "git status" -
2005-10-01), read_index_from() learned to die rather than just return
-1 and these assignments became irrelevant. Remove them.

While at it, move die_errno() next to xmmap() call because it's the
mmap's error code that we care about. Otherwise if close(fd); fails,
it could overwrite mmap's errno.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agol10n: Update one message in git.pot
Jiang Xin [Mon, 6 Aug 2012 15:48:08 +0000 (23:48 +0800)] 
l10n: Update one message in git.pot

This update comes from commit v1.7.12-rc1-18-ge0453
(merge-recursive: separate message for common ancestors).

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
11 years agoMerge git://github.com/git-l10n/git-po
Junio C Hamano [Mon, 6 Aug 2012 03:51:05 +0000 (20:51 -0700)] 
Merge git://github.com/git-l10n/git-po

* git://github.com/git-l10n/git-po:
  l10n: zh_CN.po: translate 76 new messages
  l10n: vi.po update to follow POT in 3b613
  l10n: Update git.pot (76 new, 4 removed messages)

11 years agoapply: delete unused deflate_origlen from patch struct
Paul Gortmaker [Thu, 2 Aug 2012 22:25:30 +0000 (18:25 -0400)] 
apply: delete unused deflate_origlen from patch struct

It hasn't been used since 2006, as of commit 3cd4f5e8

    "git-apply --binary: clean up and prepare for --reverse"

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>