git
13 years agoMerge branch 'da/fix-submodule-sync-superproject-config'
Junio C Hamano [Tue, 31 Aug 2010 23:25:29 +0000 (16:25 -0700)] 
Merge branch 'da/fix-submodule-sync-superproject-config'

* da/fix-submodule-sync-superproject-config:
  submodule sync: Update "submodule.<name>.url"

13 years agoMerge branch 'jn/cherry-revert-message-clean-up'
Junio C Hamano [Tue, 31 Aug 2010 23:25:11 +0000 (16:25 -0700)] 
Merge branch 'jn/cherry-revert-message-clean-up'

* jn/cherry-revert-message-clean-up:
  tests: fix syntax error in "Use advise() for hints" test
  cherry-pick/revert: Use advise() for hints
  cherry-pick/revert: Use error() for failure message
  Introduce advise() to print hints
  Eliminate “Finished cherry-pick/revert” message
  t3508: add check_head_differs_from() helper function and use it
  revert: improve success message by adding abbreviated commit sha1
  revert: don't print "Finished one cherry-pick." if commit failed
  revert: refactor commit code into a new run_git_commit() function
  revert: report success when using option --strategy

13 years agoMerge branch 'cb/binary-patch-id'
Junio C Hamano [Tue, 31 Aug 2010 23:24:48 +0000 (16:24 -0700)] 
Merge branch 'cb/binary-patch-id'

* cb/binary-patch-id:
  hash binary sha1 into patch id

13 years agoMerge branch 'ab/maint-reset-mixed-w-pathspec-advice'
Junio C Hamano [Tue, 31 Aug 2010 23:24:36 +0000 (16:24 -0700)] 
Merge branch 'ab/maint-reset-mixed-w-pathspec-advice'

* ab/maint-reset-mixed-w-pathspec-advice:
  reset: suggest what to do upon "git reset --mixed <paths>"

13 years agoMerge branch 'dj/fetch-tagopt'
Junio C Hamano [Tue, 31 Aug 2010 23:24:24 +0000 (16:24 -0700)] 
Merge branch 'dj/fetch-tagopt'

* dj/fetch-tagopt:
  fetch: allow command line --tags to override config

13 years agoMerge branch 'en/d-f-conflict-fix'
Junio C Hamano [Tue, 31 Aug 2010 23:23:58 +0000 (16:23 -0700)] 
Merge branch 'en/d-f-conflict-fix'

* en/d-f-conflict-fix:
  merge-recursive: Avoid excessive output for and reprocessing of renames
  merge-recursive: Fix multiple file rename across D/F conflict
  t6031: Add a testcase covering multiple renames across a D/F conflict
  merge-recursive: Fix typo
  Mark tests that use symlinks as needing SYMLINKS prerequisite
  t/t6035-merge-dir-to-symlink.sh: Remove TODO on passing test
  fast-import: Improve robustness when D->F changes provided in wrong order
  fast-export: Fix output order of D/F changes
  merge_recursive: Fix renames across paths below D/F conflicts
  merge-recursive: Fix D/F conflicts
  Add a rename + D/F conflict testcase
  Add additional testcases for D/F conflicts

Conflicts:
merge-recursive.c

13 years agoMerge branch 'jn/svn-fe'
Junio C Hamano [Tue, 31 Aug 2010 23:23:38 +0000 (16:23 -0700)] 
Merge branch 'jn/svn-fe'

* jn/svn-fe:
  t/t9010-svn-fe.sh: add an +x bit to this test
  t9010 (svn-fe): avoid symlinks in test
  t9010 (svn-fe): use Unix-style path in URI
  vcs-svn: Avoid %z in format string
  vcs-svn: Rename dirent pool to build on Windows
  compat: add strtok_r()
  treap: style fix
  vcs-svn: remove build artifacts on "make clean"
  svn-fe manual: Clarify warning about deltas in dump files
  Update svn-fe manual
  SVN dump parser
  Infrastructure to write revisions in fast-export format
  Add stream helper library
  Add string-specific memory pool
  Add treap implementation
  Add memory pool library
  Introduce vcs-svn lib

13 years agoMerge branch 'tr/maint-no-unquote-plus'
Junio C Hamano [Tue, 31 Aug 2010 23:23:35 +0000 (16:23 -0700)] 
Merge branch 'tr/maint-no-unquote-plus'

* tr/maint-no-unquote-plus:
  Do not unquote + into ' ' in URLs

13 years agoMerge branch 'jn/paginate-fix'
Junio C Hamano [Tue, 31 Aug 2010 23:23:31 +0000 (16:23 -0700)] 
Merge branch 'jn/paginate-fix'

* jn/paginate-fix:
  t7006 (pager): add missing TTY prerequisites
  merge-file: run setup_git_directory_gently() sooner
  var: run setup_git_directory_gently() sooner
  ls-remote: run setup_git_directory_gently() sooner
  index-pack: run setup_git_directory_gently() sooner
  config: run setup_git_directory_gently() sooner
  bundle: run setup_git_directory_gently() sooner
  apply: run setup_git_directory_gently() sooner
  grep: run setup_git_directory_gently() sooner
  shortlog: run setup_git_directory_gently() sooner
  git wrapper: allow setup_git_directory_gently() be called earlier
  setup: remember whether repository was found
  git wrapper: introduce startup_info struct

Conflicts:
builtin/index-pack.c

13 years agoMerge branch 'jn/maint-setup-fix'
Junio C Hamano [Tue, 31 Aug 2010 23:23:19 +0000 (16:23 -0700)] 
Merge branch 'jn/maint-setup-fix'

* jn/maint-setup-fix:
  setup: split off a function to handle ordinary .git directories
  Revert "rehabilitate 'git index-pack' inside the object store"
  setup: do not forget working dir from subdir of gitdir
  t4111 (apply): refresh index before applying patches to it
  setup: split off get_device_or_die helper
  setup: split off a function to handle hitting ceiling in repo search
  setup: split off code to handle stumbling upon a repository
  setup: split off a function to checks working dir for .git file
  setup: split off $GIT_DIR-set case from setup_git_directory_gently
  tests: try git apply from subdir of toplevel
  t1501 (rev-parse): clarify

Conflicts:
builtin/index-pack.c

13 years agoMerge branch 'en/fast-export-fix'
Junio C Hamano [Tue, 31 Aug 2010 23:15:20 +0000 (16:15 -0700)] 
Merge branch 'en/fast-export-fix'

* en/fast-export-fix:
  fast-export: Add a --full-tree option
  fast-export: Fix dropping of files with --import-marks and path limiting

13 years agoMerge branch 'hv/autosquash-config'
Junio C Hamano [Tue, 31 Aug 2010 23:15:03 +0000 (16:15 -0700)] 
Merge branch 'hv/autosquash-config'

* hv/autosquash-config:
  add configuration variable for --autosquash option of interactive rebase

13 years agoMerge branch 'sg/rerere-gc-old-still-used'
Junio C Hamano [Tue, 31 Aug 2010 23:14:27 +0000 (16:14 -0700)] 
Merge branch 'sg/rerere-gc-old-still-used'

* sg/rerere-gc-old-still-used:
  rerere: fix overeager gc
  mingw_utime(): handle NULL times parameter

13 years agogitweb: Don't die_error in git_tag after already printing headers
Anders Kaseorg [Fri, 27 Aug 2010 17:38:16 +0000 (13:38 -0400)] 
gitweb: Don't die_error in git_tag after already printing headers

This fixes an XML error when visiting a nonexistent tag
(i.e. "../gitweb.cgi?p=git.git;a=tag;h=refs/tags/BADNAME").

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Mon, 30 Aug 2010 06:37:02 +0000 (23:37 -0700)] 
Merge branch 'maint'

* maint:
  t0003: add missing && at end of lines

13 years agoMerge branch 'maint-1.7.1' into maint
Junio C Hamano [Mon, 30 Aug 2010 06:36:57 +0000 (23:36 -0700)] 
Merge branch 'maint-1.7.1' into maint

* maint-1.7.1:
  t0003: add missing && at end of lines

13 years agoobject.h: Add OBJECT_ARRAY_INIT macro and make use of it.
Thiago Farina [Sun, 29 Aug 2010 02:04:17 +0000 (23:04 -0300)] 
object.h: Add OBJECT_ARRAY_INIT macro and make use of it.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot0003: add missing && at end of lines
Matthieu Moy [Sat, 28 Aug 2010 18:18:36 +0000 (20:18 +0200)] 
t0003: add missing && at end of lines

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Thu, 26 Aug 2010 23:42:59 +0000 (16:42 -0700)] 
Merge branch 'maint'

* maint:
  for-each-ref: fix objectname:short bug
  tree-walk: Correct bitrotted comment about tree_entry()
  Fix 'git log' early pager startup error case

13 years agofor-each-ref: fix objectname:short bug
Jay Soffian [Thu, 26 Aug 2010 21:34:29 +0000 (17:34 -0400)] 
for-each-ref: fix objectname:short bug

When objectname:short was introduced, it forgot to copy the result of
find_unique_abbrev. Because the result of find_unique_abbrev is a
pointer to static buffer, this resulted in the same value being
substituted in for each ref.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotree-walk: Correct bitrotted comment about tree_entry()
Elijah Newren [Wed, 25 Aug 2010 02:53:11 +0000 (20:53 -0600)] 
tree-walk: Correct bitrotted comment about tree_entry()

There was a code comment that referred to the "above two functions" but
over time the functions immediately preceding the comment have changed.
Just mention the relevant functions by name.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoFix 'git log' early pager startup error case
Linus Torvalds [Tue, 24 Aug 2010 17:33:59 +0000 (10:33 -0700)] 
Fix 'git log' early pager startup error case

We start the pager too early for several git commands, which results in
the errors sometimes going to the pager rather than show up as errors.

This is often hidden by the fact that we pass in '-X' to less by default,
which causes 'less' to exit for small output, but if you do

  export LESS=-S

you can then clearly see the problem by doing

  git log --prretty

which shows the error message ("fatal: unrecognized argument: --prretty")
being sent to the pager.

This happens for pretty much all git commands that use USE_PAGER, and then
check arguments separately. But "git diff" does it too early too (even
though it does an explicit setup_pager() call)

This only fixes it for the trivial "git log" family case.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Tue, 24 Aug 2010 18:02:04 +0000 (11:02 -0700)] 
Merge branch 'maint'

* maint:
  parse-options: clarify PARSE_OPT_NOARG description
  t3302 (notes): Port to Solaris

13 years agoparse-options: clarify PARSE_OPT_NOARG description
Jonathan Nieder [Sun, 22 Aug 2010 16:26:38 +0000 (21:56 +0530)] 
parse-options: clarify PARSE_OPT_NOARG description

Here "takes no argument" means "does not take an argument".  The
latter phrasing might make it clearer that PARSE_OPT_NOARG does not
make an option with an argument that can optionally be left off.

Noticed-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot3302 (notes): Port to Solaris
Jonathan Nieder [Tue, 24 Aug 2010 07:14:53 +0000 (02:14 -0500)] 
t3302 (notes): Port to Solaris

The time_notes script, which uses POSIX shell features, is
currently sometimes run with a non-POSIX /bin/sh.

Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot7610: cd inside subshell instead of around
Brian Gernhardt [Tue, 24 Aug 2010 02:37:24 +0000 (22:37 -0400)] 
t7610: cd inside subshell instead of around

Instead of using `cd dir && (...) && cd..` use `(cd dir && ...)`

This ensures that the test doesn't get caught in the subdirectory if
there is an error in the subshell.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Mon, 23 Aug 2010 03:18:37 +0000 (20:18 -0700)] 
Merge branch 'maint'

* maint:
  Typos in code comments, an error message, documentation

13 years agoTypos in code comments, an error message, documentation
Ralf Wildenhues [Sun, 22 Aug 2010 11:12:12 +0000 (13:12 +0200)] 
Typos in code comments, an error message, documentation

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoTypos in code comments, an error message, documentation
Ralf Wildenhues [Sun, 22 Aug 2010 11:12:12 +0000 (13:12 +0200)] 
Typos in code comments, an error message, documentation

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'mm/rebase-i-exec'
Junio C Hamano [Sun, 22 Aug 2010 06:29:11 +0000 (23:29 -0700)] 
Merge branch 'mm/rebase-i-exec'

* mm/rebase-i-exec:
  git-rebase--interactive.sh: use printf instead of echo to print commit message
  git-rebase--interactive.sh: rework skip_unnecessary_picks
  test-lib: user-friendly alternatives to test [-d|-f|-e]
  rebase -i: add exec command to launch a shell command

Conflicts:
git-rebase--interactive.sh
t/t3404-rebase-interactive.sh

13 years agoMerge branch 'gb/split-cmdline-errmsg'
Junio C Hamano [Sun, 22 Aug 2010 06:28:55 +0000 (23:28 -0700)] 
Merge branch 'gb/split-cmdline-errmsg'

* gb/split-cmdline-errmsg:
  split_cmdline: Allow caller to access error string

13 years agoMerge branch 'so/http-user-agent'
Junio C Hamano [Sun, 22 Aug 2010 06:28:38 +0000 (23:28 -0700)] 
Merge branch 'so/http-user-agent'

* so/http-user-agent:
  Allow HTTP user agent string to be modified.

13 years agoMerge branch 'mm/shortopt-detached'
Junio C Hamano [Sun, 22 Aug 2010 06:28:31 +0000 (23:28 -0700)] 
Merge branch 'mm/shortopt-detached'

* mm/shortopt-detached:
  log: parse separate option for --glob
  log: parse separate options like git log --grep foo
  diff: parse separate options --stat-width n, --stat-name-width n
  diff: split off a function for --stat-* option parsing
  diff: parse separate options like -S foo

Conflicts:
revision.c

13 years agoMerge branch 'sr/local-config'
Junio C Hamano [Sun, 22 Aug 2010 06:28:09 +0000 (23:28 -0700)] 
Merge branch 'sr/local-config'

* sr/local-config:
  config: add --local option

13 years agoMerge branch 'nd/fix-sparse-checkout'
Junio C Hamano [Sun, 22 Aug 2010 06:28:05 +0000 (23:28 -0700)] 
Merge branch 'nd/fix-sparse-checkout'

* nd/fix-sparse-checkout:
  unpack-trees: mark new entries skip-worktree appropriately
  unpack-trees: do not check for conflict entries too early
  unpack-trees: let read-tree -u remove index entries outside sparse area
  unpack-trees: only clear CE_UPDATE|CE_REMOVE when skip-worktree is always set
  t1011 (sparse checkout): style nitpicks

13 years agoMerge branch 'hv/submodule-find-ff-merge'
Junio C Hamano [Sun, 22 Aug 2010 06:27:59 +0000 (23:27 -0700)] 
Merge branch 'hv/submodule-find-ff-merge'

* hv/submodule-find-ff-merge:
  Implement automatic fast-forward merge for submodules
  setup_revisions(): Allow walking history in a submodule
  Teach ref iteration module about submodules

Conflicts:
submodule.c

13 years agoMerge branch 'en/rebase-against-rebase-fix'
Junio C Hamano [Sun, 22 Aug 2010 06:27:29 +0000 (23:27 -0700)] 
Merge branch 'en/rebase-against-rebase-fix'

* en/rebase-against-rebase-fix:
  pull --rebase: Avoid spurious conflicts and reapplying unnecessary patches
  t5520-pull: Add testcases showing spurious conflicts from git pull --rebase

13 years agoMerge branch 'dg/local-mod-error-messages'
Junio C Hamano [Sun, 22 Aug 2010 06:26:46 +0000 (23:26 -0700)] 
Merge branch 'dg/local-mod-error-messages'

* dg/local-mod-error-messages:
  t7609: test merge and checkout error messages
  unpack_trees: group error messages by type
  merge-recursive: distinguish "removed" and "overwritten" messages
  merge-recursive: porcelain messages for checkout
  Turn unpack_trees_options.msgs into an array + enum

Conflicts:
t/t3400-rebase.sh

13 years agoMerge branch 'po/userdiff-csharp'
Junio C Hamano [Sun, 22 Aug 2010 06:20:51 +0000 (23:20 -0700)] 
Merge branch 'po/userdiff-csharp'

* po/userdiff-csharp:
  Userdiff patterns for C#

13 years agoMerge branch 'ab/perl-install'
Junio C Hamano [Sun, 22 Aug 2010 06:20:31 +0000 (23:20 -0700)] 
Merge branch 'ab/perl-install'

* ab/perl-install:
  perl/Makefile: Unset INSTALL_BASE when making perl.mak

13 years agoreset: suggest what to do upon "git reset --mixed <paths>"
Ævar Arnfjörð Bjarmason [Sun, 15 Aug 2010 08:43:20 +0000 (08:43 +0000)] 
reset: suggest what to do upon "git reset --mixed <paths>"

When you call "git reset --mixed <paths>" git will warn that using mixed
with paths is deprecated:

    warning: --mixed option is deprecated with paths.

That doesn't tell the user what he should use instead. Expand on the
warning and tell the user to just omit --mixed:

    warning: --mixed with paths is deprecated; use 'git reset -- <paths>' instead

The exact wording of the warning was suggested by Jonathan Nieder.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Sun, 22 Aug 2010 06:16:32 +0000 (23:16 -0700)] 
Merge branch 'maint'

* maint:
  t7403: add missing &&'s
  Tell ignore file about generate files in /gitweb/static

13 years agot7403: add missing &&'s
Jens Lehmann [Wed, 18 Aug 2010 21:20:33 +0000 (23:20 +0200)] 
t7403: add missing &&'s

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoTell ignore file about generate files in /gitweb/static
Mark Rada [Sat, 21 Aug 2010 16:18:37 +0000 (12:18 -0400)] 
Tell ignore file about generate files in /gitweb/static

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Fri, 20 Aug 2010 19:55:41 +0000 (12:55 -0700)] 
Merge branch 'maint'

* maint:
  xmalloc: include size in the failure message

13 years agoMerge branch 'jc/maint-follow-rename-fix' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:09 +0000 (12:53 -0700)] 
Merge branch 'jc/maint-follow-rename-fix' into maint

* jc/maint-follow-rename-fix:
  log: test for regression introduced in v1.7.2-rc0~103^2~2
  diff --follow: do call diffcore_std() as necessary
  diff --follow: do not waste cycles while recursing

13 years agoMerge branch 'jn/maint-plug-leak' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:09 +0000 (12:53 -0700)] 
Merge branch 'jn/maint-plug-leak' into maint

* jn/maint-plug-leak:
  write-tree: Avoid leak when index refers to an invalid object
  read-tree: stop leaking tree objects
  core: Stop leaking ondisk_cache_entrys

13 years agoMerge branch 'jn/fix-abbrev' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:09 +0000 (12:53 -0700)] 
Merge branch 'jn/fix-abbrev' into maint

* jn/fix-abbrev:
  examples/commit: use --abbrev for commit summary
  checkout, commit: remove confusing assignments to rev.abbrev
  archive: abbreviate substituted commit ids again

13 years agoMerge branch 'vs/doc-spell' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:08 +0000 (12:53 -0700)] 
Merge branch 'vs/doc-spell' into maint

* vs/doc-spell:
  Documentation: spelling fixes

13 years agoMerge branch 'jn/rebase-rename-am' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:08 +0000 (12:53 -0700)] 
Merge branch 'jn/rebase-rename-am' into maint

* jn/rebase-rename-am:
  rebase: protect against diff.renames configuration
  t3400 (rebase): whitespace cleanup
  Teach "apply --index-info" to handle rename patches
  t4150 (am): futureproof against failing tests
  t4150 (am): style fix

13 years agoMerge branch 'jn/doc-pull' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:08 +0000 (12:53 -0700)] 
Merge branch 'jn/doc-pull' into maint

* jn/doc-pull:
  Documentation: flesh out “git pull” description

13 years agoMerge branch 'bc/use-more-hardlinks-in-install' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:07 +0000 (12:53 -0700)] 
Merge branch 'bc/use-more-hardlinks-in-install' into maint

* bc/use-more-hardlinks-in-install:
  Makefile: make hard/symbolic links for non-builtins too
  Makefile: link builtins residing in bin directory to main git binary too

13 years agoMerge branch 'tr/rfc-reset-doc' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:07 +0000 (12:53 -0700)] 
Merge branch 'tr/rfc-reset-doc' into maint

* tr/rfc-reset-doc:
  Documentation/reset: move "undo permanently" example behind "make topic"
  Documentation/reset: reorder examples to match description
  Documentation/reset: promote 'examples' one section up
  Documentation/reset: separate options by mode
  Documentation/git-reset: reorder modes for soft-mixed-hard progression

13 years agobuiltin/checkout: Fix message when switching to an existing branch
Ramkumar Ramachandra [Fri, 20 Aug 2010 17:41:47 +0000 (23:11 +0530)] 
builtin/checkout: Fix message when switching to an existing branch

Fix "Switched to a new branch <name>" to read "Switched to branch
<name>" when <name> corresponds to an existing branch. This bug was
introduced in 02ac983 while introducing the `-B` switch.

Cc: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoxmalloc: include size in the failure message
Matthieu Moy [Fri, 20 Aug 2010 15:09:51 +0000 (17:09 +0200)] 
xmalloc: include size in the failure message

Out-of-memory errors can either be actual lack of memory, or bugs (like
code trying to call xmalloc(-1) by mistake). A little more information
may help tracking bugs reported by users.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agomerge-recursive: Avoid excessive output for and reprocessing of renames
Elijah Newren [Fri, 20 Aug 2010 12:55:40 +0000 (06:55 -0600)] 
merge-recursive: Avoid excessive output for and reprocessing of renames

In 5a2580d (merge_recursive: Fix renames across paths below D/F conflicts
2010-07-09) and ae74548 (merge-recursive: Fix multiple file rename across
D/F conflict 2010-08-17), renames across D/F conflicts were fixed by
making process_renames() consider as unprocessed renames whose dst_entry
"still" had higher stage entries.  The assumption was that those higher
stage entries would have been cleared out of dst_entry by that point in
cases where the conflict could be resolved (normal renames with no D/F
conflicts).  That is not the case -- higher stage entries will remain in
all cases.

Fix this by checking for higher stage entries corresponding to D/F
conflicts, namely that stages 2 and 3 have exactly one nonzero mode between
them.  The nonzero mode stage corresponds to a file at the path, while the
stage with a zero mode will correspond to a directory at that path (since
rename/delete conflicts will have already been handled before this codepath
is reached.)

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint' to sync with 1.7.2.2
Junio C Hamano [Thu, 19 Aug 2010 23:04:41 +0000 (16:04 -0700)] 
Merge branch 'maint' to sync with 1.7.2.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.2.2 v1.7.2.2
Junio C Hamano [Thu, 19 Aug 2010 23:03:18 +0000 (16:03 -0700)] 
Git 1.7.2.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'tr/xsize-bits' into maint
Junio C Hamano [Thu, 19 Aug 2010 22:49:54 +0000 (15:49 -0700)] 
Merge branch 'tr/xsize-bits' into maint

* tr/xsize-bits:
  xsize_t: check whether we lose bits

13 years agoMerge branch 'jc/sha1-name-find-fix' into maint
Junio C Hamano [Thu, 19 Aug 2010 22:49:24 +0000 (15:49 -0700)] 
Merge branch 'jc/sha1-name-find-fix' into maint

* jc/sha1-name-find-fix:
  sha1_name.c: fix parsing of ":/token" syntax

Conflicts:
sha1_name.c

13 years agot/t9010-svn-fe.sh: add an +x bit to this test
Ævar Arnfjörð Bjarmason [Thu, 19 Aug 2010 15:53:50 +0000 (15:53 +0000)] 
t/t9010-svn-fe.sh: add an +x bit to this test

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot9155: fix compatibility with older SVN
Eric Wong [Thu, 19 Aug 2010 19:03:18 +0000 (12:03 -0700)] 
t9155: fix compatibility with older SVN

The "--parents" option did not appear until SVN 1.5.x
and is completely unnecessary in this case.

Reported-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
13 years agoMerge branch 'sp/fix-smart-http-deadlock-on-error' into maint
Junio C Hamano [Wed, 18 Aug 2010 23:30:11 +0000 (16:30 -0700)] 
Merge branch 'sp/fix-smart-http-deadlock-on-error' into maint

* sp/fix-smart-http-deadlock-on-error:
  smart-http: Don't deadlock on server failure

13 years agosubmodule sync: Update "submodule.<name>.url"
David Aguilar [Wed, 18 Aug 2010 15:58:33 +0000 (08:58 -0700)] 
submodule sync: Update "submodule.<name>.url"

When "git submodule sync" synchronizes the repository URLs
it only updates submodules' .git/config.  However, the old
URLs still exist in the super-project's .git/config.

Update the super-project's configuration so that commands
such as "git submodule update" use the URLs from .gitmodules.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotests: fix syntax error in "Use advise() for hints" test
Ævar Arnfjörð Bjarmason [Wed, 18 Aug 2010 14:36:44 +0000 (14:36 +0000)] 
tests: fix syntax error in "Use advise() for hints" test

Change the test introduced in the "Use advise() for hints" patch by
Jonathan Nieder not to use '' for quotes inside '' delimited code. It
ended up introducing a file called <paths> to the main git repository.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jc/maint-follow-rename-fix'
Junio C Hamano [Wed, 18 Aug 2010 19:47:18 +0000 (12:47 -0700)] 
Merge branch 'jc/maint-follow-rename-fix'

* jc/maint-follow-rename-fix:
  log: test for regression introduced in v1.7.2-rc0~103^2~2
  diff --follow: do call diffcore_std() as necessary
  diff --follow: do not waste cycles while recursing

13 years agoMerge branch 'tf/string-list-init'
Junio C Hamano [Wed, 18 Aug 2010 19:47:04 +0000 (12:47 -0700)] 
Merge branch 'tf/string-list-init'

* tf/string-list-init:
  string_list: Add STRING_LIST_INIT macro and make use of it.

13 years agoMerge branch 'cc/find-commit-subject'
Junio C Hamano [Wed, 18 Aug 2010 19:46:55 +0000 (12:46 -0700)] 
Merge branch 'cc/find-commit-subject'

* cc/find-commit-subject:
  blame: use find_commit_subject() instead of custom code
  merge-recursive: use find_commit_subject() instead of custom code
  bisect: use find_commit_subject() instead of custom code
  revert: rename variables related to subject in get_message()
  revert: refactor code to find commit subject in find_commit_subject()
  revert: fix off by one read when searching the end of a commit subject

13 years agoMerge branch 'jn/maint-plug-leak'
Junio C Hamano [Wed, 18 Aug 2010 19:37:09 +0000 (12:37 -0700)] 
Merge branch 'jn/maint-plug-leak'

* jn/maint-plug-leak:
  write-tree: Avoid leak when index refers to an invalid object
  read-tree: stop leaking tree objects
  core: Stop leaking ondisk_cache_entrys

13 years agoMerge branch 'jl/submodule-ignore-diff'
Junio C Hamano [Wed, 18 Aug 2010 19:36:25 +0000 (12:36 -0700)] 
Merge branch 'jl/submodule-ignore-diff'

* jl/submodule-ignore-diff:
  Add tests for the diff.ignoreSubmodules config option
  Add the 'diff.ignoreSubmodules' config setting
  Submodules: Use "ignore" settings from .gitmodules too for diff and status
  Submodules: Add the new "ignore" config option for diff and status

Conflicts:
diff.c

13 years agoMerge branch 'ml/rebase-x-strategy'
Junio C Hamano [Wed, 18 Aug 2010 19:29:47 +0000 (12:29 -0700)] 
Merge branch 'ml/rebase-x-strategy'

* ml/rebase-x-strategy:
  rebase: support -X to pass through strategy options

13 years agoMerge branch 'jn/fix-abbrev'
Junio C Hamano [Wed, 18 Aug 2010 19:28:58 +0000 (12:28 -0700)] 
Merge branch 'jn/fix-abbrev'

* jn/fix-abbrev:
  examples/commit: use --abbrev for commit summary
  checkout, commit: remove confusing assignments to rev.abbrev
  archive: abbreviate substituted commit ids again

13 years agoMerge branch 'vs/doc-spell'
Junio C Hamano [Wed, 18 Aug 2010 19:28:24 +0000 (12:28 -0700)] 
Merge branch 'vs/doc-spell'

* vs/doc-spell:
  Documentation: spelling fixes

13 years agoMerge branch 'jh/use-test-must-fail'
Junio C Hamano [Wed, 18 Aug 2010 19:17:17 +0000 (12:17 -0700)] 
Merge branch 'jh/use-test-must-fail'

* jh/use-test-must-fail:
  Convert "! git" to "test_must_fail git"

13 years agoMerge branch 'jh/clean-exclude'
Junio C Hamano [Wed, 18 Aug 2010 19:17:02 +0000 (12:17 -0700)] 
Merge branch 'jh/clean-exclude'

* jh/clean-exclude:
  Add test for git clean -e.
  Add -e/--exclude to git-clean.

13 years agoMerge branch 'kf/post-receive-sample-hook'
Junio C Hamano [Wed, 18 Aug 2010 19:16:50 +0000 (12:16 -0700)] 
Merge branch 'kf/post-receive-sample-hook'

* kf/post-receive-sample-hook:
  post-receive-email: optional message line count limit

13 years agoMerge branch 'ab/report-corrupt-object-with-type'
Junio C Hamano [Wed, 18 Aug 2010 19:16:41 +0000 (12:16 -0700)] 
Merge branch 'ab/report-corrupt-object-with-type'

* ab/report-corrupt-object-with-type:
  sha1_file: Show the the type and path to corrupt objects

13 years agoMerge branch 'jn/rebase-rename-am'
Junio C Hamano [Wed, 18 Aug 2010 19:16:31 +0000 (12:16 -0700)] 
Merge branch 'jn/rebase-rename-am'

* jn/rebase-rename-am:
  rebase: protect against diff.renames configuration
  t3400 (rebase): whitespace cleanup
  Teach "apply --index-info" to handle rename patches
  t4150 (am): futureproof against failing tests
  t4150 (am): style fix

13 years agoMerge branch 'jn/fast-import-subtree'
Junio C Hamano [Wed, 18 Aug 2010 19:14:41 +0000 (12:14 -0700)] 
Merge branch 'jn/fast-import-subtree'

* jn/fast-import-subtree:
  Teach fast-import to import subtrees named by tree id

13 years agoMerge branch 'ar/string-list-foreach'
Junio C Hamano [Wed, 18 Aug 2010 19:14:38 +0000 (12:14 -0700)] 
Merge branch 'ar/string-list-foreach'

* ar/string-list-foreach:
  Convert the users of for_each_string_list to for_each_string_list_item macro
  Add a for_each_string_list_item macro

13 years agoMerge branch 'jh/graph-next-line'
Junio C Hamano [Wed, 18 Aug 2010 19:14:32 +0000 (12:14 -0700)] 
Merge branch 'jh/graph-next-line'

* jh/graph-next-line:
  Enable custom schemes for column colors in the graph API
  Make graph_next_line() available in the graph.h API

13 years agoMerge branch 'tr/xsize-bits'
Junio C Hamano [Wed, 18 Aug 2010 19:14:23 +0000 (12:14 -0700)] 
Merge branch 'tr/xsize-bits'

* tr/xsize-bits:
  xsize_t: check whether we lose bits

13 years agomerge-recursive: Fix multiple file rename across D/F conflict
Elijah Newren [Tue, 17 Aug 2010 23:53:19 +0000 (17:53 -0600)] 
merge-recursive: Fix multiple file rename across D/F conflict

In 5a2580d (merge_recursive: Fix renames across paths below D/F conflicts
2010-07-09), detection was added for renames across paths involved in a
directory<->file conflict.  However, the change accidentally involved
reusing an outer loop index ('i') in an inner loop, changing its values
and causing a slightly different type of breakage for cases where there are
multiple renames across the D/F conflict.  Fix by creating a new temporary
variable 'i'.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot6031: Add a testcase covering multiple renames across a D/F conflict
Elijah Newren [Tue, 17 Aug 2010 23:53:18 +0000 (17:53 -0600)] 
t6031: Add a testcase covering multiple renames across a D/F conflict

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agomerge-recursive: Fix typo
Elijah Newren [Tue, 17 Aug 2010 23:52:27 +0000 (17:52 -0600)] 
merge-recursive: Fix typo

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'tc/checkout-B'
Junio C Hamano [Wed, 18 Aug 2010 18:42:47 +0000 (11:42 -0700)] 
Merge branch 'tc/checkout-B'

* tc/checkout-B:
  builtin/checkout: handle -B from detached HEAD correctly
  builtin/checkout: learn -B
  builtin/checkout: reword hint for -b
  add tests for checkout -b

13 years agomergetool: Skip autoresolved paths
David Aguilar [Tue, 17 Aug 2010 09:22:46 +0000 (02:22 -0700)] 
mergetool: Skip autoresolved paths

When mergetool is run without path limiters it loops
over each entry in 'git ls-files -u'.  This includes
autoresolved paths.

Teach mergetool to only merge files listed in 'rerere status'
when rerere is enabled.

There are some subtle but harmless changes in behavior.
We now call cd_to_toplevel when no paths are given.
We do this because 'rerere status' paths are always relative
to the root.  This is beneficial for the non-rerere use as
well in that mergetool now runs against all unmerged files
regardless of the current directory.

This also slightly tweaks the output when run without paths
to be more readable.

The old output:

Merging the files: foo
bar
baz

The new output:

Merging:
foo
bar
baz

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agohash binary sha1 into patch id
Clemens Buchacher [Sun, 15 Aug 2010 07:20:43 +0000 (09:20 +0200)] 
hash binary sha1 into patch id

Since commit 2f82f760 (Take binary diffs into
account for "git rebase"), binary files are
included in patch ID computation. Binary files are
diffed using the text diff algorithm, however,
which has a huge impact on performance. The
following tests performance for a 50000 line file
marked as binary in .gitattributes.

$ git format-patch --stdout --ignore-if-in-upstream master

real    0m0.367s
user    0m0.354s
sys     0m0.010s

Instead of diffing the binary files, hash the pre-
and post-image sha1, which is just as unique. As a
result, performance is much improved.

$ git format-patch --stdout --ignore-if-in-upstream master

real    0m0.016s
user    0m0.015s
sys     0m0.001s

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoUserdiff patterns for C#
Petr Onderka [Mon, 16 Aug 2010 17:01:02 +0000 (17:01 +0000)] 
Userdiff patterns for C#

Add userdiff patterns for C#. This code is an improved version of
code by Adam Petaccia from 21 June 2009 mail to the list.

Signed-off-by: Petr Onderka <gsvick@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot7006 (pager): add missing TTY prerequisites
Jonathan Nieder [Mon, 16 Aug 2010 08:08:34 +0000 (03:08 -0500)] 
t7006 (pager): add missing TTY prerequisites

The "git bundle unbundle" and "git config" pagination tests are not
supposed to run when stdout is not a terminal and IO::Pty not available
to make one on the fly.

Reported-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agomerge-file: run setup_git_directory_gently() sooner
Nguyễn Thái Ngọc Duy [Fri, 6 Aug 2010 03:27:43 +0000 (22:27 -0500)] 
merge-file: run setup_git_directory_gently() sooner

Part of a campaign to make repository-local configuration
available early (simplifying the startup sequence for
built-in commands).

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-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 agovar: run setup_git_directory_gently() sooner
Nguyễn Thái Ngọc Duy [Fri, 6 Aug 2010 03:21:40 +0000 (22:21 -0500)] 
var: run setup_git_directory_gently() sooner

Part of a campaign to make repository-local configuration
available early (simplifying the startup sequence for
built-in commands).

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-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 agols-remote: run setup_git_directory_gently() sooner
Nguyễn Thái Ngọc Duy [Fri, 6 Aug 2010 03:20:08 +0000 (22:20 -0500)] 
ls-remote: run setup_git_directory_gently() sooner

ls-remote already runs a repository search unconditionally to learn
about remote nicknames and "[url] insteadof" shortcuts.  Run that
search a little sooner, and now one can try

[pager]
ls-remote

to automatically paginate ls-remote output, or use repository-local

[core]
pager = whatever

with "git --paginate ls-remote <url>".

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-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 agoindex-pack: run setup_git_directory_gently() sooner
Nguyễn Thái Ngọc Duy [Fri, 6 Aug 2010 03:18:53 +0000 (22:18 -0500)] 
index-pack: run setup_git_directory_gently() sooner

index-pack already runs a repository search unconditionally; running
such a search earlier is not risky and ensures GIT_DIR will be set
correctly if the configuration needs to be accessed from
run_builtin().

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-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 branch 'jn/maint-setup-fix' (early part) into jn/paginate-fix
Junio C Hamano [Mon, 16 Aug 2010 02:58:40 +0000 (19:58 -0700)] 
Merge branch 'jn/maint-setup-fix' (early part) into jn/paginate-fix

* 'jn/maint-setup-fix' (early part):
  Revert "rehabilitate 'git index-pack' inside the object store"
  setup: do not forget working dir from subdir of gitdir
  t4111 (apply): refresh index before applying patches to it
  setup: split off get_device_or_die helper
  setup: split off a function to handle hitting ceiling in repo search
  setup: split off code to handle stumbling upon a repository
  setup: split off a function to checks working dir for .git file
  setup: split off $GIT_DIR-set case from setup_git_directory_gently
  tests: try git apply from subdir of toplevel
  t1501 (rev-parse): clarify

13 years agoconfig: run setup_git_directory_gently() sooner
Nguyễn Thái Ngọc Duy [Fri, 6 Aug 2010 03:15:09 +0000 (22:15 -0500)] 
config: run setup_git_directory_gently() sooner

For the pager choice (and the choice to paginate) to reflect the
current repository configuration, the repository needs to be
located first.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-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 agobundle: run setup_git_directory_gently() sooner
Nguyễn Thái Ngọc Duy [Fri, 6 Aug 2010 03:12:46 +0000 (22:12 -0500)] 
bundle: run setup_git_directory_gently() sooner

Without this change, “git -p bundle” does not always
respect the repository-local “[core] pager” setting.

It is hard to notice because subcommands other than
“git bundle unbundle” do not produce much output.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-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 agoapply: run setup_git_directory_gently() sooner
Nguyễn Thái Ngọc Duy [Mon, 16 Aug 2010 00:36:12 +0000 (10:36 +1000)] 
apply: run setup_git_directory_gently() sooner

As v1.7.2~16^2 (2010-07-14) explains, without this change,
“git --paginate apply” can ignore the repository-local
“[core] pager” configuration.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-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 agolog: test for regression introduced in v1.7.2-rc0~103^2~2
Ævar Arnfjörð Bjarmason [Sun, 15 Aug 2010 10:16:25 +0000 (10:16 +0000)] 
log: test for regression introduced in v1.7.2-rc0~103^2~2

Add a regression test for the git log -M --follow $diff_option bug
introduced in v1.7.2-rc0~103^2~2, $diff_option being diff related
options like -p, --stat, --name-only etc.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocherry-pick/revert: Use advise() for hints
Jonathan Nieder [Wed, 11 Aug 2010 08:37:51 +0000 (03:37 -0500)] 
cherry-pick/revert: Use advise() for hints

When cherry-pick fails after picking a large series of commits, it can
be hard to pick out the error message and advice.  Prefix the advice
with “hint: ” to help.

Before:

    error: could not apply 7ab78c9... foo
      After resolving the conflicts,
    mark the corrected paths with 'git add <paths>' or 'git rm <paths>'
    and commit the result with:

            git commit -c 7ab78c9a7898b87127365478431289cb98f8d98f

After:

    error: could not apply 7ab78c9... foo
    hint: after resolving the conflicts, mark the corrected paths
    hint: with 'git add <paths>' or 'git rm <paths>'
    hint: and commit the result with 'git commit -c 7ab78c9'

Noticed-by: Thomas Rast <trast@student.ethz.ch>
Encouraged-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>