Code

git.git
14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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>
14 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

14 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

14 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>
14 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>
14 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

14 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>
14 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>
14 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>
14 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

14 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>
14 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>
14 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>
14 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

14 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>
14 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>
14 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

14 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

14 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.

14 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

14 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

14 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

14 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

14 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

14 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

14 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#

14 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

14 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

14 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>
14 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>
14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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>
14 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>
14 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>
14 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>
14 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

14 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

14 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>
14 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>
14 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

14 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

14 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.

14 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

14 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

14 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

14 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

14 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

14 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

14 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"

14 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.

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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

14 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>
14 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>
14 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>
14 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>
14 years agogit-svn: fix fetch with deleted tag
David D. Kilzer [Sun, 15 Aug 2010 13:15:55 +0000 (06:15 -0700)]
git-svn: fix fetch with deleted tag

Currently git-svn assumes that two tags created from the same
revision will have the same repo url, so it uses a ref to the
tag without checking that its url matches the current url.

This causes issues when fetching an svn repo where a tag was
created, deleted, and then recreated under the following
circumstances:

- Both tags were copied from the same revision.
- Both tags had the same name.
- Both tags had different repository paths.
- [Optional] Both tags have a file with the same name but
  different content.

When all four conditions are met, a checksum mismatch error
occurs because the content of two files with the same path
differs (see t/t9155--git-svn-fetch-deleted-tag.sh):

    Checksum mismatch: ChangeLog 065854....
    expected: ce771b....
         got: 9563fd....

When only the first three conditions are met, no error occurs
but the tag in git matches the first (deleted) tag instead of
the last (most recent) tag (see
t/t9156-git-svn-fetch-deleted-tag-2.sh).

The fix is to verify that the repo url for the ref matches the
current url.  If the urls do not match, then a "tail" is grown
on the tag name by appending a dash and rechecking the new ref's
repo url until either a matching repo url is found or a new tag
is created.

Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
14 years agogit-svn: fix regex to remove "tail" from svn tags
David D. Kilzer [Sun, 15 Aug 2010 13:15:54 +0000 (06:15 -0700)]
git-svn: fix regex to remove "tail" from svn tags

Fix a regular expression used to remove the revision from the
end of an svn tag or branch name.  The regex did not account for
any "tail" (dashes) that may have been added to the end of the
tag name (which first appeared in v1.4.1-rc2~11).  If not fixed,
tags with names like "tags/mytag@5--@2" may be created.

Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
14 years agot9010 (svn-fe): avoid symlinks in test
Jonathan Nieder [Sat, 14 Aug 2010 00:06:15 +0000 (19:06 -0500)]
t9010 (svn-fe): avoid symlinks in test

The svn-fe test fails on Windows in the “svn export” step because of
the lack of symlink support.  With a less ambitious dump, it passes.

Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot9010 (svn-fe): use Unix-style path in URI
Jonathan Nieder [Sat, 14 Aug 2010 00:04:50 +0000 (19:04 -0500)]
t9010 (svn-fe): use Unix-style path in URI

Ever since v1.6.3-rc0~101^2~14 (Tests on Windows: $(pwd) must return
Windows-style paths, 2009-03-13), there is a subtle difference between
$(pwd) and $PWD in tests: the former returns Windows-style paths as
might be output by git and the latter Unix-style paths which msys
programs tend to prefer.

In file:// URIs, Unix-style paths are needed.  Before: “svn export”
declares it cannot find

 file://c:/apps/git/git/t/trash directory/simple-svco

After: “svn export” successfully finds

 file:///c/apps/git/git/...

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agovcs-svn: Avoid %z in format string
Jonathan Nieder [Sat, 14 Aug 2010 00:03:17 +0000 (19:03 -0500)]
vcs-svn: Avoid %z in format string

In the spirit of v1.6.4-rc0~124 (MinGW: Fix compiler warning in
merge-recursive, 2009-05-23), use a 32-bit integer instead; the
dump file parser does not support any better, anyway.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agovcs-svn: Rename dirent pool to build on Windows
Jonathan Nieder [Sat, 14 Aug 2010 00:01:34 +0000 (19:01 -0500)]
vcs-svn: Rename dirent pool to build on Windows

dirent is #define’d to mingw_dirent in compat/mingw.h, with the
result that

 obj_pool_gen(dirent, struct repo_dirent, 4096)

creates functions with names like mingw_dirent_alloc and
references to dirent_alloc go unresolved.  Rename the functions
to dent_* to avoid this problem.

Reported-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agocompat: add strtok_r()
Jonathan Nieder [Fri, 13 Aug 2010 23:59:40 +0000 (18:59 -0500)]
compat: add strtok_r()

Windows does not have strtok_r (and while it does have an identical
strtok_s, but it is not obvious how to use it).  Grab an
implementation from glibc.

The svn-fe tool uses strtok_r to parse paths.

Acked-by: Johannes Sixt <j6t@kdbg.org>
Helped-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotreap: style fix
Jonathan Nieder [Thu, 12 Aug 2010 22:02:57 +0000 (17:02 -0500)]
treap: style fix

Missing spaces in while (0) and trpn_pointer(a, b).

Remove parentheses around return value.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agovcs-svn: remove build artifacts on "make clean"
Jonathan Nieder [Thu, 12 Aug 2010 21:30:47 +0000 (16:30 -0500)]
vcs-svn: remove build artifacts on "make clean"

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agosvn-fe manual: Clarify warning about deltas in dump files
Jonathan Nieder [Mon, 9 Aug 2010 22:58:36 +0000 (17:58 -0500)]
svn-fe manual: Clarify warning about deltas in dump files

Those in the know would notice that dump file format version 2
means "svnadmin dump --no-deltas", but for the rest of us, an
explicit reminder is useful.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate svn-fe manual
Jonathan Nieder [Mon, 9 Aug 2010 22:55:43 +0000 (17:55 -0500)]
Update svn-fe manual

The svn-fe example does not litter the working directory with
.bin files any more (hoorah!).

The permissive error handling implies a known bug.  We should
be flagging iffy input and, even if we continue, reporting it
on exit.

Cc: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoSVN dump parser
David Barr [Mon, 9 Aug 2010 22:55:00 +0000 (17:55 -0500)]
SVN dump parser

svndump parses data that is in SVN dumpfile format produced by
`svnadmin dump` with the help of line_buffer and uses repo_tree and
fast_export to emit a git fast-import stream.

Based roughly on com.hydrografix.svndump 0.92 from the SvnToCCase
project at <http://svn2cc.sarovar.org/>, by Stefan Hegny and
others.

[rr: allow input from files other than stdin]
[jn: with test, more error reporting]

Signed-off-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoInfrastructure to write revisions in fast-export format
David Barr [Mon, 9 Aug 2010 22:48:10 +0000 (17:48 -0500)]
Infrastructure to write revisions in fast-export format

repo_tree maintains the exporter's state and provides a facility to to
call fast_export, which writes objects to stdout suitable for
consumption by fast-import.

The exported functions roughly correspond to Subversion FS operations.

 . repo_add, repo_modify, repo_copy, repo_replace, and repo_delete
   update the current commit, based roughly on the corresponding
   Subversion FS operation.

 . repo_commit calls out to fast_export to write the current commit to
   the fast-import stream in stdout.

 . repo_diff is used by the fast_export module to write the changes
   for a commit.

 . repo_reset erases the exporter's state, so valgrind can be happy.

[rr: squelched compiler warnings]
[jn: removed support for maintaining state on-disk, though we may
want to add it back later]

Signed-off-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoAdd stream helper library
David Barr [Mon, 9 Aug 2010 22:39:43 +0000 (17:39 -0500)]
Add stream helper library

This library provides thread-unsafe fgets()- and fread()-like
functions where the caller does not have to supply a buffer.  It
maintains a couple of static buffers and provides an API to use
them.

[rr: allow input from files other than stdin]
[jn: with tests, documentation, and error handling improvements]

Signed-off-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoAdd string-specific memory pool
David Barr [Mon, 9 Aug 2010 22:34:42 +0000 (17:34 -0500)]
Add string-specific memory pool

Intern strings so they can be compared by address and stored without
wasting space.

This library uses the macros in the obj_pool.h and trp.h to create a
memory pool for strings and expose an API for handling them.

[rr: added API docs]
[jn: with some API simplifications, new documentation and tests]

Signed-off-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>