Code

git.git
13 years agoMerge branch 'sg/completion-updates'
Junio C Hamano [Mon, 16 May 2011 23:47:00 +0000 (16:47 -0700)]
Merge branch 'sg/completion-updates'

* sg/completion-updates:
  Revert "completion: don't declare 'local words' to make zsh happy"
  git-completion: fix regression in zsh support
  completion: move private shopt shim for zsh to __git_ namespace
  completion: don't declare 'local words' to make zsh happy

13 years agoMerge branch 'kk/maint-prefix-in-config-mak'
Junio C Hamano [Mon, 16 May 2011 23:46:53 +0000 (16:46 -0700)]
Merge branch 'kk/maint-prefix-in-config-mak'

* kk/maint-prefix-in-config-mak:
  Honor $(prefix) set in config.mak* when defining ETC_GIT*
  Revert "Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir"
  Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir

13 years agoMerge branch 'mg/merge-ff-config'
Junio C Hamano [Mon, 16 May 2011 23:46:23 +0000 (16:46 -0700)]
Merge branch 'mg/merge-ff-config'

* mg/merge-ff-config:
  tests: check git does not barf on merge.ff values for future versions of git
  merge: introduce merge.ff configuration variable

Conflicts:
t/t7600-merge.sh

13 years agoMerge branch 'maint'
Junio C Hamano [Mon, 16 May 2011 23:44:57 +0000 (16:44 -0700)]
Merge branch 'maint'

* maint:
  Update draft release notes to 1.7.5.2
  Documentation/git-fsck.txt: fix typo: unreadable -> unreachable

13 years agoUpdate draft release notes to 1.7.5.2
Junio C Hamano [Mon, 16 May 2011 23:44:50 +0000 (16:44 -0700)]
Update draft release notes to 1.7.5.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jn/maint-format-patch-doc' into maint
Junio C Hamano [Mon, 16 May 2011 23:39:09 +0000 (16:39 -0700)]
Merge branch 'jn/maint-format-patch-doc' into maint

* jn/maint-format-patch-doc:
  Documentation: describe the format of messages with inline patches

13 years agoMerge branch 'ss/cherry-pick-x-doc' into maint
Junio C Hamano [Mon, 16 May 2011 23:38:56 +0000 (16:38 -0700)]
Merge branch 'ss/cherry-pick-x-doc' into maint

* ss/cherry-pick-x-doc:
  doc: Clarify that "cherry-pick -x" does not use "git notes"

13 years agoMerge branch 'vr/merge-base-doc' into maint
Junio C Hamano [Mon, 16 May 2011 23:38:46 +0000 (16:38 -0700)]
Merge branch 'vr/merge-base-doc' into maint

* vr/merge-base-doc:
  Restructure documentation for git-merge-base.
  Documentation: update to git-merge-base --octopus

13 years agoMerge branch 'sr/maint-fast-import-tighten-option-parsing' into maint
Junio C Hamano [Mon, 16 May 2011 23:38:16 +0000 (16:38 -0700)]
Merge branch 'sr/maint-fast-import-tighten-option-parsing' into maint

* sr/maint-fast-import-tighten-option-parsing:
  fast-import: fix option parser for no-arg options

13 years agoMerge branch 'jc/t1506-shell-param-expansion-gotcha' into maint
Junio C Hamano [Mon, 16 May 2011 23:37:54 +0000 (16:37 -0700)]
Merge branch 'jc/t1506-shell-param-expansion-gotcha' into maint

* jc/t1506-shell-param-expansion-gotcha:
  t1507: avoid "${parameter<op>'word'}" inside double-quotes

13 years agoMerge branch 'jc/fix-add-u-unmerged' into maint
Junio C Hamano [Mon, 16 May 2011 23:37:33 +0000 (16:37 -0700)]
Merge branch 'jc/fix-add-u-unmerged' into maint

* jc/fix-add-u-unmerged:
  Fix "add -u" that sometimes fails to resolve unmerged paths

Conflicts:
builtin/add.c

13 years agoMerge branch 'jn/gitweb-dependency' into maint
Junio C Hamano [Mon, 16 May 2011 23:37:12 +0000 (16:37 -0700)]
Merge branch 'jn/gitweb-dependency' into maint

* jn/gitweb-dependency:
  Remove gitweb/gitweb.cgi and other legacy targets from main Makefile
  git-instaweb: Simplify build dependency on gitweb

13 years agoMerge branch 'jc/maint-branch-mergeoptions' into maint
Junio C Hamano [Mon, 16 May 2011 23:37:07 +0000 (16:37 -0700)]
Merge branch 'jc/maint-branch-mergeoptions' into maint

* jc/maint-branch-mergeoptions:
  merge: make branch.<name>.mergeoptions correctly override merge.<option>

Conflicts:
builtin/merge.c

13 years agoMerge branch 'jc/maint-add-p-overlapping-hunks' into maint
Junio C Hamano [Mon, 16 May 2011 23:36:46 +0000 (16:36 -0700)]
Merge branch 'jc/maint-add-p-overlapping-hunks' into maint

* jc/maint-add-p-overlapping-hunks:
  t3701: add-p-fix makes the last test to pass
  "add -p": work-around an old laziness that does not coalesce hunks
  add--interactive.perl: factor out repeated --recount option
  t3701: Editing a split hunk in an "add -p" session
  add -p: 'q' should really quit

13 years agoDocumentation/git-fsck.txt: fix typo: unreadable -> unreachable
Jim Meyering [Mon, 16 May 2011 18:23:35 +0000 (20:23 +0200)]
Documentation/git-fsck.txt: fix typo: unreadable -> unreachable

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoSync release notes for 1.7.6 to exclude what are in maintenance track
Junio C Hamano [Sun, 15 May 2011 23:19:16 +0000 (16:19 -0700)]
Sync release notes for 1.7.6 to exclude what are in maintenance track

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Sun, 15 May 2011 23:16:56 +0000 (16:16 -0700)]
Merge branch 'maint'

* maint:
  Update draft release notes to 1.7.5.2
  git_open_noatime(): drop unused parameter
  sha1_file: typofix

13 years agoUpdate draft release notes to 1.7.5.2
Junio C Hamano [Sun, 15 May 2011 23:11:55 +0000 (16:11 -0700)]
Update draft release notes to 1.7.5.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'cn/format-patch-quiet' into maint
Junio C Hamano [Sun, 15 May 2011 23:10:49 +0000 (16:10 -0700)]
Merge branch 'cn/format-patch-quiet' into maint

* cn/format-patch-quiet:
  format-patch: document --quiet option
  format-patch: don't pass on the --quiet flag

13 years agoMerge branch 'jm/mergetool-submodules' into maint
Junio C Hamano [Sun, 15 May 2011 22:57:16 +0000 (15:57 -0700)]
Merge branch 'jm/mergetool-submodules' into maint

* jm/mergetool-submodules:
  mergetool: Teach about submodules

13 years agoMerge branch 'jk/format-patch-quote-special-in-from' into maint
Junio C Hamano [Sun, 15 May 2011 22:56:44 +0000 (15:56 -0700)]
Merge branch 'jk/format-patch-quote-special-in-from' into maint

* jk/format-patch-quote-special-in-from:
  pretty: quote rfc822 specials in email addresses

13 years agoMerge branch 'vh/git-svn-doc' into maint
Junio C Hamano [Sun, 15 May 2011 22:52:40 +0000 (15:52 -0700)]
Merge branch 'vh/git-svn-doc' into maint

* vh/git-svn-doc:
  git-svn.txt: small typeface improvements
  git-svn.txt: move option descriptions
  git-svn.txt: fix usage of --add-author-from

13 years agogit_open_noatime(): drop unused parameter
Junio C Hamano [Sun, 15 May 2011 19:16:29 +0000 (12:16 -0700)]
git_open_noatime(): drop unused parameter

Since commit c793430 (Limit file descriptors used by packs, 2011-02-28),
the extra parameter added in f2e872aa (Work around EMFILE when there are
too many pack files, 2010-11-01) is not used anymore.

Remove it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
13 years agosha1_file: typofix
Junio C Hamano [Sun, 15 May 2011 19:16:03 +0000 (12:16 -0700)]
sha1_file: typofix

The number zero is spelled "zero", not "zer0".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Sun, 15 May 2011 03:44:09 +0000 (20:44 -0700)]
Merge branch 'maint'

* maint:
  add, merge, diff: do not use strcasecmp to compare config variable names

13 years agoadd, merge, diff: do not use strcasecmp to compare config variable names
Jonathan Nieder [Sat, 14 May 2011 20:19:21 +0000 (15:19 -0500)]
add, merge, diff: do not use strcasecmp to compare config variable names

The config machinery already makes section and variable names
lowercase when parsing them, so using strcasecmp for comparison just
feels wasteful.  No noticeable change intended.

Noticed-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoUpdate draft release notes to 1.7.6
Junio C Hamano [Fri, 13 May 2011 18:14:07 +0000 (11:14 -0700)]
Update draft release notes to 1.7.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'bf/commit-template-no-cleanup'
Junio C Hamano [Fri, 13 May 2011 18:03:08 +0000 (11:03 -0700)]
Merge branch 'bf/commit-template-no-cleanup'

* bf/commit-template-no-cleanup:
  Do not strip empty lines / trailing spaces from a commit message template

13 years agoMerge branch 'jc/t1506-shell-param-expansion-gotcha'
Junio C Hamano [Fri, 13 May 2011 18:02:47 +0000 (11:02 -0700)]
Merge branch 'jc/t1506-shell-param-expansion-gotcha'

* jc/t1506-shell-param-expansion-gotcha:
  t1507: avoid "${parameter<op>'word'}" inside double-quotes

13 years agoMerge branch 'rr/rerere-libify-clear-gc'
Junio C Hamano [Fri, 13 May 2011 18:02:40 +0000 (11:02 -0700)]
Merge branch 'rr/rerere-libify-clear-gc'

* rr/rerere-libify-clear-gc:
  rerere: libify rerere_clear() and rerere_gc()

13 years agoMerge branch 'js/maint-send-pack-stateless-rpc-deadlock-fix'
Junio C Hamano [Fri, 13 May 2011 18:02:29 +0000 (11:02 -0700)]
Merge branch 'js/maint-send-pack-stateless-rpc-deadlock-fix'

* js/maint-send-pack-stateless-rpc-deadlock-fix:
  send-pack: unbreak push over stateless rpc
  send-pack: avoid deadlock when pack-object dies early

13 years agoMerge branch 'jh/dirstat-lines'
Junio C Hamano [Fri, 13 May 2011 18:01:32 +0000 (11:01 -0700)]
Merge branch 'jh/dirstat-lines'

* jh/dirstat-lines:
  Mark dirstat error messages for translation
  Improve error handling when parsing dirstat parameters
  New --dirstat=lines mode, doing dirstat analysis based on diffstat
  Allow specifying --dirstat cut-off percentage as a floating point number
  Add config variable for specifying default --dirstat behavior
  Refactor --dirstat parsing; deprecate --cumulative and --dirstat-by-file
  Make --dirstat=0 output directories that contribute < 0.1% of changes
  Add several testcases for --dirstat and friends

13 years agoMerge branch 'jc/fix-add-u-unmerged'
Junio C Hamano [Fri, 13 May 2011 18:01:15 +0000 (11:01 -0700)]
Merge branch 'jc/fix-add-u-unmerged'

* jc/fix-add-u-unmerged:
  Fix "add -u" that sometimes fails to resolve unmerged paths

13 years agoMerge branch 'jn/setup-revisions-glob-and-friends-passthru'
Junio C Hamano [Fri, 13 May 2011 18:00:25 +0000 (11:00 -0700)]
Merge branch 'jn/setup-revisions-glob-and-friends-passthru'

* jn/setup-revisions-glob-and-friends-passthru:
  revisions: allow --glob and friends in parse_options-enabled commands
  revisions: split out handle_revision_pseudo_opt function

13 years agoMerge branch 'cn/log-parse-opt'
Junio C Hamano [Fri, 13 May 2011 17:59:57 +0000 (10:59 -0700)]
Merge branch 'cn/log-parse-opt'

* cn/log-parse-opt:
  log: convert to parse-options

13 years agoMerge branch 'maint'
Junio C Hamano [Fri, 13 May 2011 17:58:10 +0000 (10:58 -0700)]
Merge branch 'maint'

* maint:
  Prepare for 1.7.5.2
  t5400: Fix a couple of typos

Conflicts:
RelNotes

13 years agoPrepare for 1.7.5.2
Junio C Hamano [Fri, 13 May 2011 17:57:09 +0000 (10:57 -0700)]
Prepare for 1.7.5.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'aw/maint-rebase-i-p-no-ff' into maint
Junio C Hamano [Fri, 13 May 2011 17:45:21 +0000 (10:45 -0700)]
Merge branch 'aw/maint-rebase-i-p-no-ff' into maint

* aw/maint-rebase-i-p-no-ff:
  git-rebase--interactive.sh: preserve-merges fails on merges created with no-ff

13 years agoMerge branch 'js/blame-parsename' into maint
Junio C Hamano [Fri, 13 May 2011 17:45:00 +0000 (10:45 -0700)]
Merge branch 'js/blame-parsename' into maint

* js/blame-parsename:
  t/annotate-tests: Use echo & cat instead of sed
  blame: tolerate bogus e-mail addresses a bit better

13 years agoMerge branch 'gr/cvsimport-alternative-cvspass-location' into maint
Junio C Hamano [Fri, 13 May 2011 17:44:54 +0000 (10:44 -0700)]
Merge branch 'gr/cvsimport-alternative-cvspass-location' into maint

* gr/cvsimport-alternative-cvspass-location:
  Look for password in both CVS and CVSNT password files.

13 years agoMerge branch 'cj/p4merge' into maint
Junio C Hamano [Fri, 13 May 2011 17:44:46 +0000 (10:44 -0700)]
Merge branch 'cj/p4merge' into maint

* cj/p4merge:
  Pass empty file to p4merge where no base is suitable.

13 years agoMerge branch 'jk/merge-one-file-working-tree' into maint
Junio C Hamano [Fri, 13 May 2011 17:44:19 +0000 (10:44 -0700)]
Merge branch 'jk/merge-one-file-working-tree' into maint

* jk/merge-one-file-working-tree:
  merge-one-file: fix broken merges with alternate work trees
  add tests for merge-index / merge-one-file

13 years agoMerge branch 'jc/fix-diff-files-unmerged' into maint
Junio C Hamano [Fri, 13 May 2011 17:41:54 +0000 (10:41 -0700)]
Merge branch 'jc/fix-diff-files-unmerged' into maint

* jc/fix-diff-files-unmerged:
  diff-files: show unmerged entries correctly
  diff: remove often unused parameters from diff_unmerge()
  diff.c: return filepair from diff_unmerge()
  test: use $_z40 from test-lib

13 years agoMerge branch 'mz/maint-rename-unmerged' into maint
Junio C Hamano [Fri, 13 May 2011 17:41:24 +0000 (10:41 -0700)]
Merge branch 'mz/maint-rename-unmerged' into maint

* mz/maint-rename-unmerged:
  diffcore-rename: don't consider unmerged path as source

13 years agot5400: Fix a couple of typos
Johan Herland [Fri, 13 May 2011 16:43:29 +0000 (18:43 +0200)]
t5400: Fix a couple of typos

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'nd/struct-pathspec'
Junio C Hamano [Fri, 13 May 2011 05:36:41 +0000 (22:36 -0700)]
Merge branch 'nd/struct-pathspec'

* nd/struct-pathspec:
  Tweak t3102-ls-tree-wildcards to run on Windows

13 years agoTweak t3102-ls-tree-wildcards to run on Windows
Johannes Sixt [Thu, 12 May 2011 08:37:22 +0000 (10:37 +0200)]
Tweak t3102-ls-tree-wildcards to run on Windows

The test case fails on Windows, because "a*" is an invalid file name.
Therefore, use "a[a]" instead.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoUpdate draft release notes to 1.7.6
Junio C Hamano [Wed, 11 May 2011 18:56:11 +0000 (11:56 -0700)]
Update draft release notes to 1.7.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jn/gitweb-dependency'
Junio C Hamano [Wed, 11 May 2011 18:38:39 +0000 (11:38 -0700)]
Merge branch 'jn/gitweb-dependency'

* jn/gitweb-dependency:
  Remove gitweb/gitweb.cgi and other legacy targets from main Makefile
  git-instaweb: Simplify build dependency on gitweb

13 years agoMerge branch 'jc/maint-branch-mergeoptions'
Junio C Hamano [Wed, 11 May 2011 18:38:36 +0000 (11:38 -0700)]
Merge branch 'jc/maint-branch-mergeoptions'

* jc/maint-branch-mergeoptions:
  merge: make branch.<name>.mergeoptions correctly override merge.<option>

Conflicts:
builtin/merge.c

13 years agoMerge branch 'jn/maint-test-merge-verify-parents'
Junio C Hamano [Wed, 11 May 2011 18:38:10 +0000 (11:38 -0700)]
Merge branch 'jn/maint-test-merge-verify-parents'

* jn/maint-test-merge-verify-parents:
  tests: teach verify_parents to check for extra parents
  tests: eliminate unnecessary setup test assertions

13 years agoMerge branch 'vh/config-interactive-singlekey-doc'
Junio C Hamano [Wed, 11 May 2011 18:38:06 +0000 (11:38 -0700)]
Merge branch 'vh/config-interactive-singlekey-doc'

* vh/config-interactive-singlekey-doc:
  git-reset.txt: better docs for '--patch'
  git-checkout.txt: better docs for '--patch'
  git-stash.txt: better docs for '--patch'
  git-add.txt: document 'interactive.singlekey'
  config.txt: 'interactive.singlekey; is used by...

13 years agoMerge branch 'jc/maint-add-p-overlapping-hunks'
Junio C Hamano [Wed, 11 May 2011 18:37:46 +0000 (11:37 -0700)]
Merge branch 'jc/maint-add-p-overlapping-hunks'

* jc/maint-add-p-overlapping-hunks:
  t3701: add-p-fix makes the last test to pass
  "add -p": work-around an old laziness that does not coalesce hunks
  add--interactive.perl: factor out repeated --recount option
  t3701: Editing a split hunk in an "add -p" session
  add -p: 'q' should really quit

13 years agoMerge branch 'sr/maint-fast-import-tighten-option-parsing'
Junio C Hamano [Wed, 11 May 2011 18:37:41 +0000 (11:37 -0700)]
Merge branch 'sr/maint-fast-import-tighten-option-parsing'

* sr/maint-fast-import-tighten-option-parsing:
  fast-import: fix option parser for no-arg options

13 years agoMerge branch 'dm/http-cleanup'
Junio C Hamano [Wed, 11 May 2011 18:37:38 +0000 (11:37 -0700)]
Merge branch 'dm/http-cleanup'

* dm/http-cleanup:
  t5541-http-push: add test for chunked
  http-push: refactor curl_easy_setup madness
  http-push: use const for strings in signatures
  http: make curl callbacks match contracts from curl header

13 years agoMerge branch 'jn/ctags'
Junio C Hamano [Wed, 11 May 2011 18:37:32 +0000 (11:37 -0700)]
Merge branch 'jn/ctags'

* jn/ctags:
  gitweb: Mark matched 'ctag' / contents tag (?by_tag=foo)
  gitweb: Change the way "content tags" ('ctags') are handled
  gitweb: Restructure projects list generation

13 years agoDo not strip empty lines / trailing spaces from a commit message template
Boris Faure [Sun, 8 May 2011 10:31:02 +0000 (12:31 +0200)]
Do not strip empty lines / trailing spaces from a commit message template

Templates should be just that: A form that the user fills out, and forms
have blanks. If people are attached to not having extra whitespace in the
editor, they can simply clean up their templates.

Added test with editor adding even more whitespace.

Signed-off-by: Boris Faure <billiob@gmail.com>
Based-on-patch-by:Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'fc/completion-zsh' into sg/completion-updates
Junio C Hamano [Tue, 10 May 2011 20:14:58 +0000 (13:14 -0700)]
Merge branch 'fc/completion-zsh' into sg/completion-updates

* fc/completion-zsh:
  git-completion: fix regression in zsh support

13 years agoRevert "completion: don't declare 'local words' to make zsh happy"
Junio C Hamano [Tue, 10 May 2011 20:13:50 +0000 (13:13 -0700)]
Revert "completion: don't declare 'local words' to make zsh happy"

This reverts commit 3bee6a4733a1ff03b9cc659ea026c6dc17567d4d, as the fix
that will be used by upstream zsh folks should make it unnecessary.

13 years agogit-completion: fix regression in zsh support
Felipe Contreras [Tue, 10 May 2011 12:20:39 +0000 (15:20 +0300)]
git-completion: fix regression in zsh support

The zsh support of git-completion script in contrib/ is broken for current
versions of zsh, and does not notice when there's a subcommand.

For example: "git log origi<TAB>" gives no completions because it would
try to find a "git origi..." command. This will be fixed by zsh 4.3.12,
but for now we can workaround it by backporting the same fix as zsh folks
implemented.

The problem started after commit v1.7.4-rc0~11^2~2 (bash: get
--pretty=m<tab> completion to work with bash v4), which introduced
_get_comp_words_by_ref() that comes from bash-completion[1] scripts, and
relies on the 'words' variable.

However, it turns out 'words' is a special variable used by zsh
completion. From zshcompwid(1):

  [...] the parameters are reset on each function exit (including nested
  function calls from within the completion widget) to the values they had
  when the function was entered.

As a result, subcommand words are lost.  Ouch.

This is now fixed in the latest master branch of zsh[2] by simply defining
'words' as hidden (typeset -h), which removes the special meaning inside
the emulated bash function. So let's do the same.

Jonathan Nieder helped on the commit message.

  [1] http://bash-completion.alioth.debian.org/
  [2] http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=commitdiff;h=e880604f029088f32fb1ecc39213d720ae526aaa

Reported-by: Stefan Haller <lists@haller-berlin.de>
Comments-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoHonor $(prefix) set in config.mak* when defining ETC_GIT*
Johannes Sixt [Mon, 9 May 2011 08:24:55 +0000 (10:24 +0200)]
Honor $(prefix) set in config.mak* when defining ETC_GIT*

Notice that the prefix specified for the build influenced the definitions
of ETC_GITCONFIG and ETC_GITATTRIBUTES only when it was exactly '/usr'.
Kacper Kornet noticed that this was furthermore only the case when the
build was triggered using 'make prefix=/usr', i.e., the prefix was given
on the command line; it did not work when the prefix was specified in
config.mak because this file is included much later in the Makefile.

To fix this, move the conditional after the inclusion of config.mak.

Additionally, it is desirable to specify the etc directory for a build
(for example, a build with prefix /usr/local may still want to have the
system configuration in /etc/gitconfig). For this purpose, promote the
variable 'sysconfdir' from a helper variable to a configuration
variable. The prefix check that was moved must now be wrapped so that it
does not override sysconfdir setting given in config.mak.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoRevert "Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir"
Junio C Hamano [Mon, 9 May 2011 22:12:13 +0000 (15:12 -0700)]
Revert "Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir"

This reverts commit 2910bf56a4ffc13c398fb04ba32910cb3b724091, as it
does not really solve the issue of making $(sysconfigdir) any more
useful than it currently is.

13 years agot1507: avoid "${parameter<op>'word'}" inside double-quotes
Junio C Hamano [Mon, 9 May 2011 04:43:20 +0000 (21:43 -0700)]
t1507: avoid "${parameter<op>'word'}" inside double-quotes

Kacper Kornet noticed that a $variable in "word" in the above construct is
not substituted by his pdksh.  Modern POSIX compliant shells (e.g. dash,
ksh, bash) all seem to interpret POSIX "2.6.2 Parameter Expansion" that
says "word shall be subjected to tilde expansion, parameter expansion,
command substitution, and arithmetic expansion" in ${parameter<op>word},
to mean that the word is expanded as if it appeared in dq pairs, so if the
word were "'$variable'" (sans dq) it would expand to a single quote, the
value of the $variable and then a single quote.

Johannes Sixt reports that the behavior of quoting at the right of :- when
the ${...:-...} expansion appears in double-quotes was debated recently at
length at the Austin group.  We can avoid this issue and future-proof the
test by a slight rewrite.

Helped-by: Johannes Sixt <j.sixt@viscovery.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocompletion: move private shopt shim for zsh to __git_ namespace
Jonathan Nieder [Wed, 27 Apr 2011 21:27:04 +0000 (16:27 -0500)]
completion: move private shopt shim for zsh to __git_ namespace

Most zsh users probably probably do not expect a custom shopt function
to enter their environment just because they ran "source
~/.git-completion.sh".

Such namespace pollution makes development of other scripts confusing
(because it makes the bash-specific shopt utility seem to be available
in zsh) and makes git's tab completion script brittle (since any other
shell snippet implementing some other subset of shopt will break it).
Rename the shopt shim to the more innocuous __git_shopt to be a good
citizen (with two underscores to avoid confusion with completion rules
for a hypothetical "git shopt" command).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot3701: add-p-fix makes the last test to pass
Junio C Hamano [Sun, 8 May 2011 20:43:04 +0000 (13:43 -0700)]
t3701: add-p-fix makes the last test to pass

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorerere: libify rerere_clear() and rerere_gc()
Junio C Hamano [Sun, 8 May 2011 19:55:34 +0000 (12:55 -0700)]
rerere: libify rerere_clear() and rerere_gc()

This moves the two features from builtin/rerere.c to a more library-ish
portion of the codebase.  No behaviour change.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoRemove gitweb/gitweb.cgi and other legacy targets from main Makefile
Jakub Narebski [Sat, 7 May 2011 12:45:21 +0000 (14:45 +0200)]
Remove gitweb/gitweb.cgi and other legacy targets from main Makefile

Now that there is gitweb/Makefile, let's leave only "gitweb" and
"install-gitweb" targets in main Makefile.  Those targets just
delegate to gitweb's Makefile.

Requested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-instaweb: Simplify build dependency on gitweb
Jakub Narebski [Sat, 7 May 2011 12:45:20 +0000 (14:45 +0200)]
git-instaweb: Simplify build dependency on gitweb

Since c0cb4ed (git-instaweb: Configure it to work with new gitweb
structure, 2010-05-28) git-instaweb does not re-create gitweb.cgi
etc., but makes use of installed gitweb.  Therefore simplify
git-instaweb dependency on gitweb subsystem in main Makefile from
'gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/static/gitweb.js'
to simply 'gitweb'.

This is preparation for splitting gitweb.perl script, and for
splitting gitweb.js (to be reassembled / combined on build).  This way
we don't have to duplicate parts of gitweb/Makefile in main
Makefile... it is also more correct description of git-instaweb
dependency.

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotests: check git does not barf on merge.ff values for future versions of git
Jonathan Nieder [Fri, 6 May 2011 21:59:47 +0000 (16:59 -0500)]
tests: check git does not barf on merge.ff values for future versions of git

Maybe some day in the future we will want to support a syntax
like

[merge]
ff = branch1
ff = branch2
ff = branch3

in addition to the currently permitted "true", "false", and "only"
values.  So make sure we continue to treat such configurations as
though an unknown variable had been defined rather than erroring out,
until it is time to implement such a thing, so configuration files
using such a facility can be shared between present and future git.

While at it, add a few missing && and start the "combining --squash
and --no-ff" test with a known state so we can be sure it does not
succeed or fail for the wrong reason.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotests: teach verify_parents to check for extra parents
Jonathan Nieder [Fri, 6 May 2011 21:00:21 +0000 (16:00 -0500)]
tests: teach verify_parents to check for extra parents

Currently verify_parents only makes sure that the earlier parents of
HEAD match the commits given, and does not care if there are more
parents.  This makes it harder than one would like to check that, for
example, parent reduction works correctly when making an octopus.

Fix it by checking that HEAD^(n+1) is not a valid commit name.
Noticed while working on a new test that was supposed to create a
fast-forward one commit ahead but actually created a merge.

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agomerge: introduce merge.ff configuration variable
Junio C Hamano [Fri, 6 May 2011 19:27:05 +0000 (12:27 -0700)]
merge: introduce merge.ff configuration variable

This variable gives the default setting for --ff, --no-ff or --ff-only
options of "git merge" command.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jc/maint-branch-mergeoptions' into mg/merge-ff-config
Junio C Hamano [Fri, 6 May 2011 22:03:25 +0000 (15:03 -0700)]
Merge branch 'jc/maint-branch-mergeoptions' into mg/merge-ff-config

* jc/maint-branch-mergeoptions:
  merge: make branch.<name>.mergeoptions correctly override merge.<option>

13 years agomerge: make branch.<name>.mergeoptions correctly override merge.<option>
Junio C Hamano [Thu, 5 May 2011 00:42:51 +0000 (17:42 -0700)]
merge: make branch.<name>.mergeoptions correctly override merge.<option>

The parsing of the additional command line parameters supplied to
the branch.<name>.mergeoptions configuration variable was implemented
at the wrong stage.  If any merge-related variable came after we read
branch.<name>.mergeoptions, the earlier value was overwritten.

We should first read all the merge.* configuration, override them by
reading from branch.<name>.mergeoptions and then finally read from
the command line.

This patch should fix it, even though I now strongly suspect that
branch.<name>.mergeoptions that gives a single command line that
needs to be parsed was likely to be an ill-conceived idea to begin
with.  Sigh...

Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotests: eliminate unnecessary setup test assertions
Jonathan Nieder [Fri, 6 May 2011 20:58:52 +0000 (15:58 -0500)]
tests: eliminate unnecessary setup test assertions

Most of git's tests write files and define shell functions and
variables that will last throughout a test script at the top of
the script, before all test assertions:

. ./test-lib.sh

VAR='some value'
export VAR

>empty

fn () {
do something
}

test_expect_success 'setup' '
... nontrivial commands go here ...
'

Two scripts use a different style with this kind of trivial code
enclosed by a test assertion; fix them.  The usual style is easier to
read since there is less indentation to keep track of and no need to
worry about nested quotes; and on the other hand, because the commands
in question are trivial, it should not make the test suite any worse
at catching future bugs in git.

While at it, make some other small tweaks:

 - spell function definitions with a space before () for consistency
   with other scripts;

 - use the self-contained command "git mktree </dev/null" in
   preference to "git write-tree" which looks at the index when
   writing an empty tree.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoUpdate draft release notes to 1.7.6
Junio C Hamano [Fri, 6 May 2011 18:13:08 +0000 (11:13 -0700)]
Update draft release notes to 1.7.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jn/run-command-error-failure'
Junio C Hamano [Fri, 6 May 2011 18:01:04 +0000 (11:01 -0700)]
Merge branch 'jn/run-command-error-failure'

* jn/run-command-error-failure:
  run-command: handle short writes and EINTR in die_child
  tests: check error message from run_command

13 years agoMerge branch 'js/info-man-path'
Junio C Hamano [Fri, 6 May 2011 18:00:46 +0000 (11:00 -0700)]
Merge branch 'js/info-man-path'

* js/info-man-path:
  Documentation: clarify meaning of --html-path, --man-path, and --info-path
  git: add --info-path and --man-path options

Conflicts:
Makefile

13 years agoMerge branch 'im/hashcmp-optim'
Junio C Hamano [Fri, 6 May 2011 18:00:36 +0000 (11:00 -0700)]
Merge branch 'im/hashcmp-optim'

* im/hashcmp-optim:
  hashcmp(): inline memcmp() by hand to optimize

13 years agoMerge branch 'jk/merge-one-file-working-tree'
Junio C Hamano [Fri, 6 May 2011 17:54:08 +0000 (10:54 -0700)]
Merge branch 'jk/merge-one-file-working-tree'

* jk/merge-one-file-working-tree:
  merge-one-file: fix broken merges with alternate work trees
  add tests for merge-index / merge-one-file

13 years agoMerge branch 'jc/fix-diff-files-unmerged'
Junio C Hamano [Fri, 6 May 2011 17:52:58 +0000 (10:52 -0700)]
Merge branch 'jc/fix-diff-files-unmerged'

* jc/fix-diff-files-unmerged:
  diff-files: show unmerged entries correctly
  diff: remove often unused parameters from diff_unmerge()
  diff.c: return filepair from diff_unmerge()
  test: use $_z40 from test-lib

13 years agoMerge branch 'cj/p4merge'
Junio C Hamano [Fri, 6 May 2011 17:52:16 +0000 (10:52 -0700)]
Merge branch 'cj/p4merge'

* cj/p4merge:
  Pass empty file to p4merge where no base is suitable.

13 years agoMerge branch 'gr/cvsimport-alternative-cvspass-location'
Junio C Hamano [Fri, 6 May 2011 17:52:12 +0000 (10:52 -0700)]
Merge branch 'gr/cvsimport-alternative-cvspass-location'

* gr/cvsimport-alternative-cvspass-location:
  Look for password in both CVS and CVSNT password files.

13 years agoMerge branch 'sg/completion-cleanup'
Junio C Hamano [Fri, 6 May 2011 17:52:03 +0000 (10:52 -0700)]
Merge branch 'sg/completion-cleanup'

* sg/completion-cleanup:
  completion: remove unnecessary _get_comp_words_by_ref() invocations
  completion: don't modify the $cur variable in completion functions

13 years agoMerge branch 'js/blame-parsename'
Junio C Hamano [Fri, 6 May 2011 17:50:32 +0000 (10:50 -0700)]
Merge branch 'js/blame-parsename'

* js/blame-parsename:
  t/annotate-tests: Use echo & cat instead of sed
  blame: tolerate bogus e-mail addresses a bit better

13 years agoMerge branch 'jk/format-patch-quote-special-in-from'
Junio C Hamano [Fri, 6 May 2011 17:50:18 +0000 (10:50 -0700)]
Merge branch 'jk/format-patch-quote-special-in-from'

* jk/format-patch-quote-special-in-from:
  pretty: quote rfc822 specials in email addresses

Conflicts:
pretty.c
t/t4014-format-patch.sh

13 years agoMerge branch 'nd/struct-pathspec'
Junio C Hamano [Fri, 6 May 2011 17:50:06 +0000 (10:50 -0700)]
Merge branch 'nd/struct-pathspec'

* nd/struct-pathspec:
  pathspec: rename per-item field has_wildcard to use_wildcard
  Improve tree_entry_interesting() handling code
  Convert read_tree{,_recursive} to support struct pathspec
  Reimplement read_tree_recursive() using tree_entry_interesting()

13 years agoMerge branch 'aw/maint-rebase-i-p-no-ff'
Junio C Hamano [Fri, 6 May 2011 17:50:00 +0000 (10:50 -0700)]
Merge branch 'aw/maint-rebase-i-p-no-ff'

* aw/maint-rebase-i-p-no-ff:
  git-rebase--interactive.sh: preserve-merges fails on merges created with no-ff

Conflicts:
git-rebase--interactive.sh

13 years agoMerge branch 'mg/alias-expose-prefix'
Junio C Hamano [Fri, 6 May 2011 17:49:57 +0000 (10:49 -0700)]
Merge branch 'mg/alias-expose-prefix'

* mg/alias-expose-prefix:
  handle_alias: provide GIT_PREFIX to !alias
  t1020: test !alias in subdirectory

13 years agoMerge branch 'mg/diff-uiconfig-doc'
Junio C Hamano [Fri, 6 May 2011 17:49:53 +0000 (10:49 -0700)]
Merge branch 'mg/diff-uiconfig-doc'

* mg/diff-uiconfig-doc:
  config.txt,diff-options.txt: porcelain vs. plumbing for color.diff

13 years agoMerge branch 'maint'
Junio C Hamano [Fri, 6 May 2011 17:44:23 +0000 (10:44 -0700)]
Merge branch 'maint'

* maint:
  Remove duplicated "is a"

13 years agoRemove duplicated "is a"
João Britto [Fri, 6 May 2011 04:16:17 +0000 (01:16 -0300)]
Remove duplicated "is a"

Signed-off-by: João Britto <jabcalves@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agofast-import: fix option parser for no-arg options
Sverre Rabbelier [Thu, 5 May 2011 18:56:00 +0000 (20:56 +0200)]
fast-import: fix option parser for no-arg options

While refactoring the options parser in bc3c79a (fast-import: add
(non-)relative-marks feature, 2009-12-04), it was made too lenient
for options that take no argument, fix that.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Thu, 5 May 2011 21:43:45 +0000 (14:43 -0700)]
Merge branch 'maint'

* maint:
  t3701: fix here document
  git-fast-import.txt: --relative-marks takes no parameter
  shell: add missing initialization of argv0_path

13 years agoMerge branch 'js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix' into js/maint...
Junio C Hamano [Thu, 5 May 2011 20:46:36 +0000 (13:46 -0700)]
Merge branch 'js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix' into js/maint-send-pack-stateless-rpc-deadlock-fix

* js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix:
  send-pack: unbreak push over stateless rpc

13 years agosend-pack: unbreak push over stateless rpc
Jeff King [Thu, 5 May 2011 06:18:45 +0000 (02:18 -0400)]
send-pack: unbreak push over stateless rpc

Commit 09c9957 (send-pack: avoid deadlock when pack-object
dies early, 2011-04-25) attempted to fix a hang in the
stateless rpc case by closing a file descriptor early, but
we still need that descriptor.

Basically the deadlock can happen when pack-objects fails,
and the descriptor to upstream is left open. We never send
the pack, so the upstream is left waiting for us to say
something, and we are left waiting for upstream to close the
connection.

In the non-rpc case, our descriptor points straight to the
upstream. We hand it off to run-command, which takes
ownership and closes the descriptor after pack-objects
finishes (whether it succeeds or not).

Commit 09c9957 tried to emulate that in the rpc case. That
isn't right, though. We actually have a descriptor going
back to the remote-helper, and we need to keep using it
after pack-objects is finished. Closing it early completely
breaks pushing via smart-http.

We still need to do something on error to signal the
remote-helper that we won't be sending any pack data
(otherwise we get the deadlock).  In an ideal world, we
would send a special packet back that says "Sorry, there was
an error". But the remote-helper doesn't understand any such
packet, so the best we can do is close the descriptor and
let it report that we hung up unexpectedly.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-reset.txt: better docs for '--patch'
Valentin Haenel [Thu, 5 May 2011 19:58:18 +0000 (21:58 +0200)]
git-reset.txt: better docs for '--patch'

Describe '-p' as a short form of '--patch' in synopsis. Also include a better
explanation of this option and additionally refer the reader to the patch mode
description of git-add documentation.

Helped-by: Jeff King <peff@peff.net>
Mentored-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Valentin Haenel <valentin.haenel@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-checkout.txt: better docs for '--patch'
Valentin Haenel [Thu, 5 May 2011 18:48:48 +0000 (20:48 +0200)]
git-checkout.txt: better docs for '--patch'

Describe '-p' as a short form of '--patch' in synopsis and options.  Also
refer the reader to the patch mode description of git-add documentation.

Helped-by: Jeff King <peff@peff.net>
Mentored-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Valentin Haenel <valentin.haenel@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-stash.txt: better docs for '--patch'
Valentin Haenel [Thu, 5 May 2011 18:48:47 +0000 (20:48 +0200)]
git-stash.txt: better docs for '--patch'

Describe '-p' as a short form of '--patch' in synopsis and options.  Also
refer the reader to the patch mode description of git-add documentation.

Helped-by: Jeff King <peff@peff.net>
Mentored-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Valentin Haenel <valentin.haenel@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-add.txt: document 'interactive.singlekey'
Valentin Haenel [Thu, 5 May 2011 18:48:45 +0000 (20:48 +0200)]
git-add.txt: document 'interactive.singlekey'

This is documented in the section about the 'Interactive Mode', rather than for
the option '--patch', since this is the section is where people go to learn
about '--patch'.

Helped-by: Jeff King <peff@peff.net>
Mentored-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Valentin Haenel <valentin.haenel@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoconfig.txt: 'interactive.singlekey; is used by...
Valentin Haenel [Mon, 2 May 2011 13:44:28 +0000 (15:44 +0200)]
config.txt: 'interactive.singlekey; is used by...

The config variable 'interactive.singlekey' influences also '--patch' mode of
git-add, git-reset, and git-checkout.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Valentin Haenel <valentin.haenel@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>