git/git.git
11 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Mon, 23 Nov 2009 03:01:15 +0000 (19:01 -0800)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  git svn: strip leading path when making empty dirs
  git svn: always reuse existing remotes on fetch

11 years agogit svn: strip leading path when making empty dirs
Eric Wong [Mon, 23 Nov 2009 02:11:32 +0000 (18:11 -0800)]
git svn: strip leading path when making empty dirs

Since unhandled.log stores paths relative to the repository
root, we need to strip out leading path components if the
directories we're tracking are not the repository root.

Reported-by: Björn Steinbrink
Signed-off-by: Eric Wong <normalperson@yhbt.net>
11 years agoMerge branch 'th/maint-remote-update-help-string'
Junio C Hamano [Mon, 23 Nov 2009 00:41:54 +0000 (16:41 -0800)]
Merge branch 'th/maint-remote-update-help-string'

* th/maint-remote-update-help-string:
  Update 'git remote update' usage string to match man page.

11 years agoMerge branch 'jn/faster-completion-startup'
Junio C Hamano [Mon, 23 Nov 2009 00:41:43 +0000 (16:41 -0800)]
Merge branch 'jn/faster-completion-startup'

* jn/faster-completion-startup:
  Speed up bash completion loading

11 years agoMerge branch 'rj/maint-t9700'
Junio C Hamano [Mon, 23 Nov 2009 00:40:52 +0000 (16:40 -0800)]
Merge branch 'rj/maint-t9700'

* rj/maint-t9700:
  t9700-perl-git.sh: Fix a test failure on Cygwin

11 years agoMerge branch 'ls/maint-mailinfo-no-inbody'
Junio C Hamano [Mon, 23 Nov 2009 00:40:26 +0000 (16:40 -0800)]
Merge branch 'ls/maint-mailinfo-no-inbody'

* ls/maint-mailinfo-no-inbody:
  git am/mailinfo: Don't look at in-body headers when rebasing

11 years agoMerge branch 'mo/maint-crlf-doc'
Junio C Hamano [Mon, 23 Nov 2009 00:29:57 +0000 (16:29 -0800)]
Merge branch 'mo/maint-crlf-doc'

* mo/maint-crlf-doc:
  core.autocrlf documentation: mention the crlf attribute

11 years agoMerge branch 'th/remote-usage'
Junio C Hamano [Mon, 23 Nov 2009 00:29:50 +0000 (16:29 -0800)]
Merge branch 'th/remote-usage'

* th/remote-usage:
  git remote: Separate usage strings for subcommands

11 years agoMerge branch 'pb/maint-use-custom-perl'
Junio C Hamano [Mon, 23 Nov 2009 00:28:46 +0000 (16:28 -0800)]
Merge branch 'pb/maint-use-custom-perl'

* pb/maint-use-custom-perl:
  Make sure $PERL_PATH is defined when the test suite is run.

11 years agoMerge branch 'mm/config-pathname-tilde-expand'
Junio C Hamano [Mon, 23 Nov 2009 00:28:38 +0000 (16:28 -0800)]
Merge branch 'mm/config-pathname-tilde-expand'

* mm/config-pathname-tilde-expand:
  Documentation: avoid xmlto input error
  expand_user_path: expand ~ to $HOME, not to the actual homedir.
  Expand ~ and ~user in core.excludesfile, commit.template

11 years agoMerge branch 'bc/grep-i-F'
Junio C Hamano [Mon, 23 Nov 2009 00:28:29 +0000 (16:28 -0800)]
Merge branch 'bc/grep-i-F'

* bc/grep-i-F:
  grep: Allow case insensitive search of fixed-strings

11 years agoMerge branch 'jk/maint-break-rename-reduce-memory'
Junio C Hamano [Mon, 23 Nov 2009 00:28:23 +0000 (16:28 -0800)]
Merge branch 'jk/maint-break-rename-reduce-memory'

* jk/maint-break-rename-reduce-memory:
  diffcore-rename: reduce memory footprint by freeing blob data early
  diffcore-break: save cnt_data for other phases
  diffcore-break: free filespec data as we go

11 years agoMerge branch 'tc/format-attribute'
Junio C Hamano [Mon, 23 Nov 2009 00:28:14 +0000 (16:28 -0800)]
Merge branch 'tc/format-attribute'

* tc/format-attribute:
  Check the format of more printf-type functions

11 years agoMerge branch 'tr/maint-merge-ours-clarification' (early part)
Junio C Hamano [Mon, 23 Nov 2009 00:28:06 +0000 (16:28 -0800)]
Merge branch 'tr/maint-merge-ours-clarification' (early part)

* 'tr/maint-merge-ours-clarification' (early part):
  rebase docs: clarify --merge and --strategy
  Documentation: clarify 'ours' merge strategy

11 years agolog --format: document %w
René Scharfe [Sun, 22 Nov 2009 16:15:31 +0000 (17:15 +0100)]
log --format: document %w

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agostrbuf_add_wrapped_text(): factor out strbuf_add_indented_text()
René Scharfe [Sun, 22 Nov 2009 16:15:29 +0000 (17:15 +0100)]
strbuf_add_wrapped_text(): factor out strbuf_add_indented_text()

Add a new helper function, strbuf_add_indented_text(), to indent text
without a width limit, and call it from strbuf_add_wrapped_text().  It
respects both indent (applied to the first line) and indent2 (applied to
the rest of the lines); indent2 was ignored by the indent-only path of
strbuf_add_wrapped_text() before the patch.

Two simple test cases are added, one exercising strbuf_add_wrapped_text()
and the other strbuf_add_indented_text().

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogrep: unset GREP_OPTIONS before spawning external grep
René Scharfe [Sun, 22 Nov 2009 15:58:09 +0000 (16:58 +0100)]
grep: unset GREP_OPTIONS before spawning external grep

While we're at it, also unset GREP_COLOR and GREP_COLORS in case colouring
is not enabled, to be on the safe side.  The presence of these variables
alone is not sufficient to trigger coloured output with GNU grep, but
other implementations may behave differently.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUser Manual: Write "Git" instead of "GIT"
Björn Gustavsson [Sun, 22 Nov 2009 09:47:04 +0000 (10:47 +0100)]
User Manual: Write "Git" instead of "GIT"

In the Table of Contents, there is a notable inconsistency:
first there is "GIT Glossary", followed by "Git Quick Reference"
on the very next line.

Running "grep -c" on user-manual.txt, I find 780 occurrrences of
"git", 37 occurrences of "Git", and 9 occurrences of "GIT".
In general, "git" is the preferred spelling, except at the
beginning of a sentence.

Therefore, change "GIT Glossary" to "Git Glossary" for consistency
with the rest of the document.

Looking at the other eight occurrences of "GIT" I found one other
occurrence that should be changed:

* The mention of "StGIT". Looking at the web pages for "Stacked Git"
  at http://www.procode.org/stgit, I only saw the spelling "StGit",
  except in http://wiki.procode.org/cgi-bin/wiki.cgi/StGIT_Tutorial,
  but that page was last updated in 2006.

The other seven occurrences should not be changed:

* Three occurrences were in the output of 'git show-branch' run
  on the git.git repository.

* One occurrence was in the output of 'git cat-file'.

* One occurrence was as part of the file name "GIT-VERSION-GEN".

* Two occurrences were in comments in scripts quoted in a description
  of Tony Luck's workflow.

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoFix truncated usage messages
Björn Gustavsson [Sun, 22 Nov 2009 21:19:53 +0000 (22:19 +0100)]
Fix truncated usage messages

The usage messages for some commands (such as 'git diff-tree')
are truncated because they don't fit in a fixed buffer of
1024 bytes.

It would be tempting to eliminate the buffer and the problem once
and for all by doing the output in three steps, but doing so could
(according to commit d048a96e) increase the likelyhood of messing
up the display.

So we just increase the size of the buffer.

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit svn: always reuse existing remotes on fetch
Eric Wong [Sun, 22 Nov 2009 20:37:06 +0000 (12:37 -0800)]
git svn: always reuse existing remotes on fetch

The internal no_reuse_existing flag is set to allow initializing
multiple remotes with the same URL, common with SVM users.

Unfortunately, this flag caused misbehavior when used
with the -R command-line flag for fetching.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
11 years agoDocumentation: avoid xmlto input error
Junio C Hamano [Sat, 21 Nov 2009 08:37:26 +0000 (00:37 -0800)]
Documentation: avoid xmlto input error

Do not write literal "~/" or "~user" but use "{tilde}/" and "{tilde}user";
otherwise the text between them gets enclosed in
"<subscript>...</subscript>".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jc/fix-tree-walk' (early part)
Junio C Hamano [Sat, 21 Nov 2009 07:55:50 +0000 (23:55 -0800)]
Merge branch 'jc/fix-tree-walk' (early part)

* 'jc/fix-tree-walk' (early part):
  unpack_callback(): use unpack_failed() consistently
  unpack-trees: typofix
  diff-lib.c: fix misleading comments on oneway_diff()

11 years agoMerge branch 'jh/notes' (early part)
Junio C Hamano [Sat, 21 Nov 2009 07:53:55 +0000 (23:53 -0800)]
Merge branch 'jh/notes' (early part)

* 'jh/notes' (early part):
  Add selftests verifying concatenation of multiple notes for the same commit
  Refactor notes code to concatenate multiple notes annotating the same object
  Add selftests verifying that we can parse notes trees with various fanouts
  Teach the notes lookup code to parse notes trees with various fanout schemes
  Teach notes code to free its internal data structures on request
  Add '%N'-format for pretty-printing commit notes
  Add flags to get_commit_notes() to control the format of the note string
  t3302-notes-index-expensive: Speed up create_repo()
  fast-import: Add support for importing commit notes
  Teach "-m <msg>" and "-F <file>" to "git notes edit"
  Add an expensive test for git-notes
  Speed up git notes lookup
  Add a script to edit/inspect notes
  Introduce commit notes

Conflicts:
.gitignore
Documentation/pretty-formats.txt
pretty.c

11 years agoMerge branch 'sp/smart-http'
Junio C Hamano [Sat, 21 Nov 2009 07:51:23 +0000 (23:51 -0800)]
Merge branch 'sp/smart-http'

* sp/smart-http: (37 commits)
  http-backend: Let gcc check the format of more printf-type functions.
  http-backend: Fix access beyond end of string.
  http-backend: Fix bad treatment of uintmax_t in Content-Length
  t5551-http-fetch: Work around broken Accept header in libcurl
  t5551-http-fetch: Work around some libcurl versions
  http-backend: Protect GIT_PROJECT_ROOT from /../ requests
  Git-aware CGI to provide dumb HTTP transport
  http-backend: Test configuration options
  http-backend: Use http.getanyfile to disable dumb HTTP serving
  test smart http fetch and push
  http tests: use /dumb/ URL prefix
  set httpd port before sourcing lib-httpd
  t5540-http-push: remove redundant fetches
  Smart HTTP fetch: gzip requests
  Smart fetch over HTTP: client side
  Smart push over HTTP: client side
  Discover refs via smart HTTP server when available
  http-backend: more explict LocationMatch
  http-backend: add example for gitweb on same URL
  http-backend: use mod_alias instead of mod_rewrite
  ...

Conflicts:
.gitignore
remote-curl.c

11 years agoMerge branch 'bw/autoconf-more'
Junio C Hamano [Sat, 21 Nov 2009 07:48:57 +0000 (23:48 -0800)]
Merge branch 'bw/autoconf-more'

* bw/autoconf-more:
  configure: add settings for gitconfig, editor and pager
  configure: add macro to set arbitrary make variables

11 years agoMerge branch 'jn/editor-pager'
Junio C Hamano [Sat, 21 Nov 2009 07:48:52 +0000 (23:48 -0800)]
Merge branch 'jn/editor-pager'

* jn/editor-pager:
  Provide a build time default-pager setting
  Provide a build time default-editor setting
  am -i, git-svn: use "git var GIT_PAGER"
  add -i, send-email, svn, p4, etc: use "git var GIT_EDITOR"
  Teach git var about GIT_PAGER
  Teach git var about GIT_EDITOR
  Suppress warnings from "git var -l"
  Do not use VISUAL editor on dumb terminals
  Handle more shell metacharacters in editor names

11 years agoMerge branch 'rj/cygwin-msvc'
Junio C Hamano [Sat, 21 Nov 2009 07:48:11 +0000 (23:48 -0800)]
Merge branch 'rj/cygwin-msvc'

* rj/cygwin-msvc:
  MSVC: Add support for building with NO_MMAP
  Makefile: keep MSVC and Cygwin configuration separate

11 years agoMerge branch 'rj/maint-simplify-cygwin-makefile'
Junio C Hamano [Sat, 21 Nov 2009 07:47:43 +0000 (23:47 -0800)]
Merge branch 'rj/maint-simplify-cygwin-makefile'

* rj/maint-simplify-cygwin-makefile:
  Makefile: merge two Cygwin configuration sections into one

11 years agoMerge branch 'bg/format-patch-doc-update'
Junio C Hamano [Sat, 21 Nov 2009 07:47:10 +0000 (23:47 -0800)]
Merge branch 'bg/format-patch-doc-update'

* bg/format-patch-doc-update:
  format-patch: Add "--no-stat" as a synonym for "-p"
  format-patch documentation: Fix formatting
  format-patch documentation: Remove diff options that are not useful
  format-patch: Always generate a patch

11 years agoMerge branch 'tr/filter-branch'
Junio C Hamano [Sat, 21 Nov 2009 07:46:14 +0000 (23:46 -0800)]
Merge branch 'tr/filter-branch'

* tr/filter-branch:
  filter-branch: nearest-ancestor rewriting outside subdir filter
  filter-branch: stop special-casing $filter_subdir argument

11 years agoMerge branch 'sc/protocol-doc'
Junio C Hamano [Sat, 21 Nov 2009 07:46:12 +0000 (23:46 -0800)]
Merge branch 'sc/protocol-doc'

* sc/protocol-doc:
  Update packfile transfer protocol documentation

11 years agoMerge branch 'jl/submodule-add-noname'
Junio C Hamano [Sat, 21 Nov 2009 07:46:07 +0000 (23:46 -0800)]
Merge branch 'jl/submodule-add-noname'

* jl/submodule-add-noname:
  git submodule add: make the <path> parameter optional

11 years agoMerge branch 'sb/ls-tree-parseopt'
Junio C Hamano [Sat, 21 Nov 2009 07:46:03 +0000 (23:46 -0800)]
Merge branch 'sb/ls-tree-parseopt'

* sb/ls-tree-parseopt:
  ls-tree: migrate to parse-options
  t3101: test more ls-tree options

11 years agoMerge branch 'rg/doc-workflow'
Junio C Hamano [Sat, 21 Nov 2009 07:45:49 +0000 (23:45 -0800)]
Merge branch 'rg/doc-workflow'

* rg/doc-workflow:
  Add branch management for releases to gitworkflows

11 years agoMerge branch 'jn/gitweb-log-history'
Junio C Hamano [Sat, 21 Nov 2009 07:45:39 +0000 (23:45 -0800)]
Merge branch 'jn/gitweb-log-history'

* jn/gitweb-log-history:
  gitweb: Make 'history' view (re)use git_log_generic()
  gitweb: Refactor common parts of 'log' and 'shortlog' views
  gitweb: Refactor 'log' action generation, adding git_log_body()

11 years agoMerge branch 'jn/help-everywhere'
Junio C Hamano [Sat, 21 Nov 2009 07:44:52 +0000 (23:44 -0800)]
Merge branch 'jn/help-everywhere'

* jn/help-everywhere: (23 commits)
  diff --no-index: make the usage string less scary
  merge-{recursive,subtree}: use usagef() to print usage
  Introduce usagef() that takes a printf-style format
  Let 'git <command> -h' show usage without a git dir
  Show usage string for 'git http-push -h'
  Let 'git http-fetch -h' show usage outside any git repository
  Show usage string for 'git stripspace -h'
  Show usage string for 'git unpack-file -h'
  Show usage string for 'git show-index -h'
  Show usage string for 'git rev-parse -h'
  Show usage string for 'git merge-one-file -h'
  Show usage string for 'git mailsplit -h'
  Show usage string for 'git imap-send -h'
  Show usage string for 'git get-tar-commit-id -h'
  Show usage string for 'git fast-import -h'
  Show usage string for 'git check-ref-format -h'
  http-fetch: add missing initialization of argv0_path
  Show usage string for 'git show-ref -h'
  Show usage string for 'git merge-ours -h'
  Show usage string for 'git commit-tree -h'
  ...

Conflicts:
imap-send.c

11 years agoMerge branch 'jp/fetch-cull-many-refs'
Junio C Hamano [Sat, 21 Nov 2009 07:44:35 +0000 (23:44 -0800)]
Merge branch 'jp/fetch-cull-many-refs'

* jp/fetch-cull-many-refs:
  remote: fix use-after-free error detected by glibc in ref_remove_duplicates
  fetch: Speed up fetch of large numbers of refs
  remote: Make ref_remove_duplicates faster for large numbers of refs

11 years agoAdd branch management for releases to gitworkflows
Raman Gupta [Thu, 12 Nov 2009 19:46:04 +0000 (14:46 -0500)]
Add branch management for releases to gitworkflows

The current man page does a reasonable job at describing branch management
during the development process, but it does not contain any guidance as to
how the branches are affected by releases.

Add a basic introduction to the branch management undertaken during a
git.git release, so that a reader may gain some insight into how the
integration, maintenance, and topic branches are affected during the
release transition, and is thus able to better design the process for their
own project.

Other release activities such as reviews, testing, and creating
distributions are currently out of scope.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit am/mailinfo: Don't look at in-body headers when rebasing
Lukas Sandström [Fri, 20 Nov 2009 16:12:47 +0000 (17:12 +0100)]
git am/mailinfo: Don't look at in-body headers when rebasing

When we are rebasing we know that the header lines in the
patch are good and that we don't need to pick up any headers
from the body of the patch.

This makes it possible to rebase commits whose commit message
start with "From" or "Date".

Test vectors by Jeff King.

Signed-off-by: Lukas Sandström <luksan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit remote: Separate usage strings for subcommands
Tim Henigan [Fri, 20 Nov 2009 23:43:13 +0000 (18:43 -0500)]
git remote: Separate usage strings for subcommands

When the usage string for a subcommand must be printed,
only print the information relevant to that command.

This commit also removes the complete options list from
the first line of the subcommand usage string. Instead,
individual options are documented in the detailed
description following the general usage line.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodiffcore-rename: reduce memory footprint by freeing blob data early
Junio C Hamano [Sat, 21 Nov 2009 06:13:47 +0000 (22:13 -0800)]
diffcore-rename: reduce memory footprint by freeing blob data early

After running one round of estimate_similarity(), filespecs on either
side will have populated their cnt_data fields, and we do not need
the blob text anymore.  We used to retain the blob data to optimize
for smaller projects (not freeing the blob data here would mean that
the final output phase would not have to re-read it), but we are
efficient enough without such optimization for smaller projects anyway,
and freeing memory early will help larger projects.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodescribe: do not use unannotated tag even if exact match
Thomas Rast [Wed, 18 Nov 2009 13:32:26 +0000 (14:32 +0100)]
describe: do not use unannotated tag even if exact match

4d23660 (describe: when failing, tell the user about options that
work, 2009-10-28) forgot to update the shortcut path where the code
detected and used a possible exact match.  This means that an
unannotated tag on HEAD would be used by 'git describe'.

Guard this code path against the new circumstances, where unannotated
tags can be present in ->util even if we're not actually planning to
use them.

While there, also add some tests for --all.

Reported by 'yashi' on IRC.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agosubmodule.c: Squelch a "use before assignment" warning
David Aguilar [Fri, 20 Nov 2009 11:33:53 +0000 (03:33 -0800)]
submodule.c: Squelch a "use before assignment" warning

i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493) compiler
(and probably others) mistakenly thinks variable 'right' is used
before assigned.  Work around it by giving it a fake initialization.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot9700-perl-git.sh: Fix a test failure on Cygwin
Ramsay Jones [Thu, 19 Nov 2009 18:41:20 +0000 (18:41 +0000)]
t9700-perl-git.sh: Fix a test failure on Cygwin

The t/t9700/test.pl script uses method invocation syntax when
using the Cwd module to determine the current working directory.
This fails on cygwin, since cygwin perl specifically checks for
any arguments to the cwd() function and croak()'s with the message
"Usage: Cwd::cwd()". (In perl v5.8.8 distribution, see the file
perl-5.8.8/cygwin/cygwin.c lines 139-157)

In order to avoid the problem, we replace the method invocation
syntax with a simple function call.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoexpand_user_path: expand ~ to $HOME, not to the actual homedir.
Matthieu Moy [Thu, 19 Nov 2009 15:21:15 +0000 (16:21 +0100)]
expand_user_path: expand ~ to $HOME, not to the actual homedir.

In 395de250d (Expand ~ and ~user in core.excludesfile, commit.template),
we introduced the mechanism. But expanding ~ using getpw is not what
people overriding $HOME would usually expect. In particular, git looks
for the user's .gitconfig using $HOME, so it's better to be consistent.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'np/maint-sideband-favor-status'
Junio C Hamano [Wed, 18 Nov 2009 06:03:20 +0000 (22:03 -0800)]
Merge branch 'np/maint-sideband-favor-status'

* np/maint-sideband-favor-status:
  give priority to progress messages

11 years agoMerge branch 'sb/tutorial-test'
Junio C Hamano [Wed, 18 Nov 2009 06:03:02 +0000 (22:03 -0800)]
Merge branch 'sb/tutorial-test'

* sb/tutorial-test:
  t1200: prepare for merging with Fast-forward bikeshedding
  t1200: further modernize test script style
  t1200: Make documentation and test agree
  t1200: cleanup and modernize test style

11 years agoMerge branch 'ef/msys-imap'
Junio C Hamano [Wed, 18 Nov 2009 06:03:00 +0000 (22:03 -0800)]
Merge branch 'ef/msys-imap'

* ef/msys-imap:
  Windows: use BLK_SHA1 again
  MSVC: Enable OpenSSL, and translate -lcrypto
  mingw: enable OpenSSL
  mingw: wrap SSL_set_(w|r)fd to call _get_osfhandle
  imap-send: build imap-send on Windows
  imap-send: fix compilation-error on Windows
  imap-send: use run-command API for tunneling
  imap-send: use separate read and write fds
  imap-send: remove useless uid code

11 years agols-tree: migrate to parse-options
Stephen Boyd [Sat, 14 Nov 2009 04:34:08 +0000 (20:34 -0800)]
ls-tree: migrate to parse-options

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoExpand ~ and ~user in core.excludesfile, commit.template
Matthieu Moy [Tue, 17 Nov 2009 17:24:25 +0000 (18:24 +0100)]
Expand ~ and ~user in core.excludesfile, commit.template

These config variables are parsed to substitute ~ and ~user with getpw
entries.

user_path() refactored into new function expand_user_path(), to allow
dynamically allocating the return buffer.

Original patch by Karl Chen, modified by Matthieu Moy, and further
amended by Junio C Hamano.

Signed-off-by: Karl Chen <quarl@quarl.org>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoSpeed up bash completion loading
Jonathan Nieder [Wed, 18 Nov 2009 00:49:10 +0000 (18:49 -0600)]
Speed up bash completion loading

Since git is not used in each and every interactive xterm, it
seems best to load completion support with cold caches and then
load each needed thing lazily.  This has most of the speed
advantage of pre-generating everything at build time, without the
complication of figuring out at build time what commands will be
available at run time.

On this slow laptop, this decreases the time to load
git-completion.bash from about 500 ms to about 175 ms.

Suggested-by: Kirill Smelkov <kirr@mns.spb.ru>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Cc: Stephen Boyd <bebarino@gmail.com>
Cc: SZEDER Gábor <szeder@ira.uka.de>
Cc: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Tue, 17 Nov 2009 16:59:27 +0000 (08:59 -0800)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  Document git-svn's first-parent rule
  git svn: attempt to create empty dirs on clone+rebase
  git svn: add authorsfile test case for ~/.gitconfig
  git svn: read global+system config for clone+init
  git svn: handle SVN merges from revisions past the tip of the branch

11 years agoMake sure $PERL_PATH is defined when the test suite is run.
Philippe Bruhat (BooK) [Tue, 17 Nov 2009 08:42:39 +0000 (09:42 +0100)]
Make sure $PERL_PATH is defined when the test suite is run.

Some test scripts run Perl scripts as if they were git-* scripts, and
thus need to use the same perl that will be put in the shebang line of
git*.perl commands. $PERL_PATH therefore needs to be used instead of
a bare "perl".

The tests can fail if another perl is found in $PATH before the one
defined in $PERL_PATH.

Example test failure caused by this: the perl defined in $PERL_PATH has
Error.pm installed, and therefore the Git.pm's Makefile.PL doesn't install
the private copy. The perl from $PATH doesn't have Error.pm installed, and
all git*.perl scripts invoked during the test will fail loading Error.pm.

Makefile patch by Jeff King <peff@peff.net>.

Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocument git-svn's first-parent rule
Thomas Rast [Mon, 16 Nov 2009 10:15:17 +0000 (11:15 +0100)]
Document git-svn's first-parent rule

git-svn has the following rule to detect the SVN base for its
operations: find the first git-svn-id line reachable through
first-parent ancestry.  IOW,

  git log --grep=^git-svn-id: --first-parent -1

Document this, as it is very important when using merges with git-svn.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
11 years agocore.autocrlf documentation: mention the crlf attribute
Matthew Ogilvie [Sat, 14 Nov 2009 18:35:00 +0000 (11:35 -0700)]
core.autocrlf documentation: mention the crlf attribute

The description of the configuration variable is obsolete and
wrong (saying only file content is used), not just incomplete.
It has used the attribute mechanism for a long time.

The documentation of gitattributes mentions the core.autocrlf
configuration variable in its description of crlf attribute.
Refer to the gitattributes documentation from here as well.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agorebase docs: clarify --merge and --strategy
Thomas Rast [Sun, 15 Nov 2009 18:25:31 +0000 (19:25 +0100)]
rebase docs: clarify --merge and --strategy

Add a paragraph about the swapped sides in a --merge rebase, which was
otherwise only documented in the sources.

Add a paragraph about the effects of the 'ours' strategy to the -s
description.  Also remove the mention of the 'octopus' strategy, which
was copied from the git-merge description but is pointless in a
rebase.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot3101: test more ls-tree options
Stephen Boyd [Sat, 14 Nov 2009 04:34:07 +0000 (20:34 -0800)]
t3101: test more ls-tree options

Add tests for --full-name, --full-tree, --abbrev, and --name-only.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogrep: Allow case insensitive search of fixed-strings
Brian Collins [Fri, 6 Nov 2009 09:22:35 +0000 (01:22 -0800)]
grep: Allow case insensitive search of fixed-strings

"git grep" currently an error when you combine the -F and -i flags.
This isn't in line with how GNU grep handles it.

This patch allows the simultaneous use of those flags.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Brian Collins <bricollins@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodiffcore-break: save cnt_data for other phases
Jeff King [Mon, 16 Nov 2009 16:02:02 +0000 (11:02 -0500)]
diffcore-break: save cnt_data for other phases

The "break" phase works by counting changes between two
blobs with the same path. We do this by splitting the file
into chunks (or lines for text oriented files) and then
keeping a count of chunk hashes.

The "rename" phase counts changes between blobs at two
different paths. However, it uses the exact same set of
chunk hashes (which are immutable for a given sha1).

The rename phase can therefore use the same hash data as
break. Unfortunately, we were throwing this data away after
computing it in the break phase. This patch instead attaches
it to the filespec and lets it live through the rename
phase, working under the assumption that most of the time
that breaks are being computed, renames will be too.

We only do this optimization for files which have actually
been broken, as those ones will be candidates for rename
detection (and it is a time-space tradeoff, so we don't want
to waste space keeping useless data).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodiffcore-break: free filespec data as we go
Jeff King [Mon, 16 Nov 2009 15:56:25 +0000 (10:56 -0500)]
diffcore-break: free filespec data as we go

As we look at each changed file and consider breaking it, we
load the blob data and make a decision about whether to
break, which is independent of any other blobs that might
have changed. However, we keep the data in memory while we
consider breaking all of the other files. Which means that
both versions of every file you are diffing are in memory at
the same time.

This patch instead frees the blob data as we finish with
each file pair, leading to much lower memory usage.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate draft release notes to 1.6.6
Junio C Hamano [Mon, 16 Nov 2009 08:07:48 +0000 (00:07 -0800)]
Update draft release notes to 1.6.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoSync with 1.6.5.3
Junio C Hamano [Mon, 16 Nov 2009 08:06:23 +0000 (00:06 -0800)]
Sync with 1.6.5.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoGit 1.6.5.3 v1.6.5.3
Junio C Hamano [Mon, 16 Nov 2009 08:05:12 +0000 (00:05 -0800)]
Git 1.6.5.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'bs/maint-pre-commit-hook-sample' into maint
Junio C Hamano [Mon, 16 Nov 2009 08:03:15 +0000 (00:03 -0800)]
Merge branch 'bs/maint-pre-commit-hook-sample' into maint

* bs/maint-pre-commit-hook-sample:
  pre-commit.sample: Diff against the empty tree when HEAD is invalid

11 years agoMerge branch 'jk/maint-add-p-empty' into maint
Junio C Hamano [Mon, 16 Nov 2009 08:02:44 +0000 (00:02 -0800)]
Merge branch 'jk/maint-add-p-empty' into maint

* jk/maint-add-p-empty:
  add-interactive: handle deletion of empty files

11 years agoMerge branch 'js/maint-diff-color-words' into maint
Junio C Hamano [Mon, 16 Nov 2009 08:01:56 +0000 (00:01 -0800)]
Merge branch 'js/maint-diff-color-words' into maint

* js/maint-diff-color-words:
  diff --color-words: bit of clean-up
  diff --color-words -U0: fix the location of hunk headers
  t4034-diff-words: add a test for word diff without context

Conflicts:
diff.c

11 years agoMerge branch 'tz/maint-rpm' into maint
Junio C Hamano [Mon, 16 Nov 2009 07:08:42 +0000 (23:08 -0800)]
Merge branch 'tz/maint-rpm' into maint

* tz/maint-rpm:
  Makefile: Ensure rpm packages can be read by older rpm versions

11 years agoMerge branch 'jk/maint-format-patch-p-suppress-stat' into maint
Junio C Hamano [Mon, 16 Nov 2009 07:07:49 +0000 (23:07 -0800)]
Merge branch 'jk/maint-format-patch-p-suppress-stat' into maint

* jk/maint-format-patch-p-suppress-stat:
  format-patch: make "-p" suppress diffstat

11 years agoMerge branch 'pb/maint-gitweb-blob-lineno' into maint
Junio C Hamano [Mon, 16 Nov 2009 07:07:38 +0000 (23:07 -0800)]
Merge branch 'pb/maint-gitweb-blob-lineno' into maint

* pb/maint-gitweb-blob-lineno:
  gitweb: Fix blob linenr links in pathinfo mode

11 years agoMerge branch 'jk/maint-1.6.3-ls-files-i' into maint
Junio C Hamano [Mon, 16 Nov 2009 07:07:32 +0000 (23:07 -0800)]
Merge branch 'jk/maint-1.6.3-ls-files-i' into maint

* jk/maint-1.6.3-ls-files-i:
  ls-files: unbreak "ls-files -i"

11 years agoMerge branch 'vl/maint-openssl-signature-change' into maint
Junio C Hamano [Mon, 16 Nov 2009 07:07:27 +0000 (23:07 -0800)]
Merge branch 'vl/maint-openssl-signature-change' into maint

* vl/maint-openssl-signature-change:
  imap-send.c: fix compiler warnings for OpenSSL 1.0

11 years agoMerge branch 'jk/maint-push-config' into maint
Junio C Hamano [Mon, 16 Nov 2009 07:07:17 +0000 (23:07 -0800)]
Merge branch 'jk/maint-push-config' into maint

* jk/maint-push-config:
  push: always load default config

11 years agoMerge branch 'sr/blame-incomplete' into maint
Junio C Hamano [Mon, 16 Nov 2009 07:07:07 +0000 (23:07 -0800)]
Merge branch 'sr/blame-incomplete' into maint

* sr/blame-incomplete:
  blame: make sure that the last line ends in an LF

11 years agoMerge branch 'jc/maint-blank-at-eof' into maint
Junio C Hamano [Mon, 16 Nov 2009 07:06:34 +0000 (23:06 -0800)]
Merge branch 'jc/maint-blank-at-eof' into maint

* jc/maint-blank-at-eof:
  diff -B: colour whitespace errors
  diff.c: emit_add_line() takes only the rest of the line
  diff.c: split emit_line() from the first char and the rest of the line
  diff.c: shuffling code around
  diff --whitespace: fix blank lines at end
  core.whitespace: split trailing-space into blank-at-{eol,eof}
  diff --color: color blank-at-eof
  diff --whitespace=warn/error: fix blank-at-eof check
  diff --whitespace=warn/error: obey blank-at-eof
  diff.c: the builtin_diff() deals with only two-file comparison
  apply --whitespace: warn blank but not necessarily empty lines at EOF
  apply --whitespace=warn/error: diagnose blank at EOF
  apply.c: split check_whitespace() into two
  apply --whitespace=fix: detect new blank lines at eof correctly
  apply --whitespace=fix: fix handling of blank lines at the eof

11 years agohttp-backend: Let gcc check the format of more printf-type functions.
Tarmigan Casebolt [Sat, 14 Nov 2009 21:10:58 +0000 (13:10 -0800)]
http-backend: Let gcc check the format of more printf-type functions.

We already have these checks in many printf-type functions that have
prototypes which are in header files.  Add these same checks to
static functions in http-backend.c

Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agohttp-backend: Fix access beyond end of string.
Tarmigan Casebolt [Sat, 14 Nov 2009 21:10:57 +0000 (13:10 -0800)]
http-backend: Fix access beyond end of string.

Found with valgrind while looking for Content-Length corruption in
smart http.

Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit svn: attempt to create empty dirs on clone+rebase
Eric Wong [Mon, 16 Nov 2009 02:57:16 +0000 (18:57 -0800)]
git svn: attempt to create empty dirs on clone+rebase

We parse unhandled.log files for empty_dir statements and make a
best effort attempt to recreate empty directories on fresh
clones and rebase.  This should cover the majority of cases
where users work off a single branch or for projects where
branches do not differ in empty directories.

Since this cannot affect "normal" git commands like "checkout"
or "reset", so users switching between branches in a single
working directory should use the new "git svn mkdirs" command
after switching branches.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
11 years agoCheck the format of more printf-type functions
Tarmigan Casebolt [Sat, 14 Nov 2009 21:33:13 +0000 (13:33 -0800)]
Check the format of more printf-type functions

We already have these checks in many printf-type functions that have
prototypes which are in header files.  Add these same checks to some
more prototypes in header functions and to static functions in .c
files.

cc: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint'
Junio C Hamano [Mon, 16 Nov 2009 00:41:42 +0000 (16:41 -0800)]
Merge branch 'maint'

* maint:

11 years agoMerge branch 'bs/maint-pre-commit-hook-sample'
Junio C Hamano [Mon, 16 Nov 2009 00:41:33 +0000 (16:41 -0800)]
Merge branch 'bs/maint-pre-commit-hook-sample'

* bs/maint-pre-commit-hook-sample:
  pre-commit.sample: Diff against the empty tree when HEAD is invalid

11 years agoMerge branch 'js/maint-diff-color-words'
Junio C Hamano [Mon, 16 Nov 2009 00:41:29 +0000 (16:41 -0800)]
Merge branch 'js/maint-diff-color-words'

* js/maint-diff-color-words:
  diff --color-words: bit of clean-up
  diff --color-words -U0: fix the location of hunk headers
  t4034-diff-words: add a test for word diff without context

Conflicts:
diff.c

11 years agoMerge branch 'rs/pretty-wrap'
Junio C Hamano [Mon, 16 Nov 2009 00:41:17 +0000 (16:41 -0800)]
Merge branch 'rs/pretty-wrap'

* rs/pretty-wrap:
  log --format: don't ignore %w() at the start of format string
  Implement wrap format %w() as if it is a mode switch

Conflicts:
pretty.c

11 years agoMerge branch 'js/log-rewrap'
Junio C Hamano [Mon, 16 Nov 2009 00:41:07 +0000 (16:41 -0800)]
Merge branch 'js/log-rewrap'

* js/log-rewrap:
  Teach --wrap to only indent without wrapping
  Add strbuf_add_wrapped_text() to utf8.[ch]
  print_wrapped_text(): allow hard newlines

11 years agoMerge branch 'fc/doc-fast-forward'
Junio C Hamano [Mon, 16 Nov 2009 00:41:02 +0000 (16:41 -0800)]
Merge branch 'fc/doc-fast-forward'

* fc/doc-fast-forward:
  Use 'fast-forward' all over the place

Conflicts:
builtin-merge.c

11 years agoMerge branch 'sc/difftool-p4merge'
Junio C Hamano [Mon, 16 Nov 2009 00:40:50 +0000 (16:40 -0800)]
Merge branch 'sc/difftool-p4merge'

* sc/difftool-p4merge:
  mergetool--lib: add p4merge as a pre-configured mergetool option

11 years agoMerge branch 'jk/maint-add-p-empty'
Junio C Hamano [Mon, 16 Nov 2009 00:40:46 +0000 (16:40 -0800)]
Merge branch 'jk/maint-add-p-empty'

* jk/maint-add-p-empty:
  add-interactive: handle deletion of empty files

11 years agoMerge branch 'lt/revision-bisect'
Junio C Hamano [Mon, 16 Nov 2009 00:40:39 +0000 (16:40 -0800)]
Merge branch 'lt/revision-bisect'

* lt/revision-bisect:
  Add '--bisect' revision machinery argument

11 years agoMerge branch 'jc/maint-1.6.3-graft-trailing-space' into maint
Junio C Hamano [Mon, 16 Nov 2009 00:38:47 +0000 (16:38 -0800)]
Merge branch 'jc/maint-1.6.3-graft-trailing-space' into maint

* jc/maint-1.6.3-graft-trailing-space:
  info/grafts: allow trailing whitespaces at the end of line

11 years agoMerge branch 'tr/maint-roff-quote' into maint
Junio C Hamano [Mon, 16 Nov 2009 00:38:36 +0000 (16:38 -0800)]
Merge branch 'tr/maint-roff-quote' into maint

* tr/maint-roff-quote:
  Quote ' as \(aq in manpages

11 years agoMerge branch 'ja/fetch-doc' into maint
Junio C Hamano [Mon, 16 Nov 2009 00:38:18 +0000 (16:38 -0800)]
Merge branch 'ja/fetch-doc' into maint

* ja/fetch-doc:
  Documentation/merge-options.txt: order options in alphabetical groups
  Documentation/git-pull.txt: Add subtitles above included option files
  Documentation/fetch-options.txt: order options alphabetically

11 years agoMerge branch 'cb/doc-fetch-pull-merge' into maint
Junio C Hamano [Mon, 16 Nov 2009 00:37:58 +0000 (16:37 -0800)]
Merge branch 'cb/doc-fetch-pull-merge' into maint

* cb/doc-fetch-pull-merge:
  modernize fetch/merge/pull examples

11 years agoMerge branch 'jk/maint-cvsimport-pathname' into maint
Junio C Hamano [Mon, 16 Nov 2009 00:37:53 +0000 (16:37 -0800)]
Merge branch 'jk/maint-cvsimport-pathname' into maint

* jk/maint-cvsimport-pathname:
  cvsimport: fix relative argument filenames

11 years agoMerge branch 'jc/receive-pack-auto' into maint
Junio C Hamano [Mon, 16 Nov 2009 00:37:49 +0000 (16:37 -0800)]
Merge branch 'jc/receive-pack-auto' into maint

* jc/receive-pack-auto:
  receive-pack: run "gc --auto --quiet" and optionally "update-server-info"
  gc --auto --quiet: make the notice a bit less verboase

11 years agoMerge branch 'gb/maint-gitweb-esc-param' into maint
Junio C Hamano [Mon, 16 Nov 2009 00:37:39 +0000 (16:37 -0800)]
Merge branch 'gb/maint-gitweb-esc-param' into maint

* gb/maint-gitweb-esc-param:
  gitweb: fix esc_param

11 years agoMerge branch 'jn/gitweb-patch' into maint
Junio C Hamano [Mon, 16 Nov 2009 00:37:36 +0000 (16:37 -0800)]
Merge branch 'jn/gitweb-patch' into maint

* jn/gitweb-patch:
  gitweb: Do not show 'patch' link for merge commits

11 years agoDocumentation: clarify 'ours' merge strategy
Thomas Rast [Sun, 15 Nov 2009 18:25:30 +0000 (19:25 +0100)]
Documentation: clarify 'ours' merge strategy

Make it clear in the docs that the merge takes the tree of HEAD and
ignores everything in the other branches.  This should hopefully clear
up confusion, usually caused by the user looking for a strategy that
resolves all conflict hunks in favour of HEAD (which is completely
different and currently not supported).

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate 'git remote update' usage string to match man page.
Tim Henigan [Sun, 15 Nov 2009 19:46:25 +0000 (14:46 -0500)]
Update 'git remote update' usage string to match man page.

Commit b344e161 taught 'git remote update' to understand
[group | remote] as its argument.  The man page was updated
to document this change, but the usage string was not.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint'
Junio C Hamano [Sun, 15 Nov 2009 08:26:51 +0000 (00:26 -0800)]
Merge branch 'maint'

* maint:
  git-add.txt: fix formatting of --patch section

11 years agoremote: fix use-after-free error detected by glibc in ref_remove_duplicates
Julian Phillips [Fri, 13 Nov 2009 21:25:56 +0000 (21:25 +0000)]
remote: fix use-after-free error detected by glibc in ref_remove_duplicates

In ref_remove_duplicates, when we encounter a duplicate and remove it
from the list we need to make sure that the prev pointer stays
pointing at the last entry and also skip over adding the just freed
entry to the string_list.

Previously fetch could crash with:
*** glibc detected *** git: corrupted double-linked list: ...

Also add a test to try and catch problems with duplicate removal in
the future.

Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMakefile: Ensure rpm packages can be read by older rpm versions
Todd Zullinger [Wed, 11 Nov 2009 21:59:52 +0000 (16:59 -0500)]
Makefile: Ensure rpm packages can be read by older rpm versions

The kernel.org hosts where the packages are built are now using Fedora
11, which defaults to sha256 for file digests instead of md5.  Older
versions of rpm can not handle these packages.  Tell rpmbuild to use md5
file digests for better compatibility.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>