Code

git.git
14 years agoMerge branch 'bw/cvsimport'
Junio C Hamano [Thu, 21 Jan 2010 04:28:51 +0000 (20:28 -0800)]
Merge branch 'bw/cvsimport'

* bw/cvsimport:
  cvsimport: standarize system() calls to external git tools
  cvsimport: standarize open() calls to external git tools
  cvsimport: modernize callouts to git subcommands

14 years agoMerge branch 'jc/checkout-merge-base'
Junio C Hamano [Thu, 21 Jan 2010 04:28:51 +0000 (20:28 -0800)]
Merge branch 'jc/checkout-merge-base'

* jc/checkout-merge-base:
  Fix "checkout A..." synonym for "checkout A...HEAD" on Windows

14 years agoMerge branch 'ag/patch-header-verify'
Junio C Hamano [Thu, 21 Jan 2010 04:28:51 +0000 (20:28 -0800)]
Merge branch 'ag/patch-header-verify'

* ag/patch-header-verify:
  builtin-apply.c: fix the --- and +++ header filename consistency check

14 years agoMerge branch 'jc/conflict-marker-size'
Junio C Hamano [Thu, 21 Jan 2010 04:28:51 +0000 (20:28 -0800)]
Merge branch 'jc/conflict-marker-size'

* jc/conflict-marker-size:
  rerere: honor conflict-marker-size attribute
  rerere: prepare for customizable conflict marker length
  conflict-marker-size: new attribute
  rerere: use ll_merge() instead of using xdl_merge()
  merge-tree: use ll_merge() not xdl_merge()
  xdl_merge(): allow passing down marker_size in xmparam_t
  xdl_merge(): introduce xmparam_t for merge specific parameters
  git_attr(): fix function signature

Conflicts:
builtin-merge-file.c
ll-merge.c
xdiff/xdiff.h
xdiff/xmerge.c

14 years agoMerge branch 'ag/maint-apply-too-large-p'
Junio C Hamano [Thu, 21 Jan 2010 04:28:50 +0000 (20:28 -0800)]
Merge branch 'ag/maint-apply-too-large-p'

* ag/maint-apply-too-large-p:
  builtin-apply.c: Skip filenames without enough components

14 years agoMerge branch 'ap/merge-backend-opts'
Junio C Hamano [Thu, 21 Jan 2010 04:28:50 +0000 (20:28 -0800)]
Merge branch 'ap/merge-backend-opts'

* ap/merge-backend-opts:
  Document that merge strategies can now take their own options
  Extend merge-subtree tests to test -Xsubtree=dir.
  Make "subtree" part more orthogonal to the rest of merge-recursive.
  pull: Fix parsing of -X<option>
  Teach git-pull to pass -X<option> to git-merge
  git merge -X<option>
  git-merge-file --ours, --theirs

Conflicts:
git-compat-util.h

14 years agoMerge branch 'nd/status-partial-refresh'
Junio C Hamano [Thu, 21 Jan 2010 04:28:50 +0000 (20:28 -0800)]
Merge branch 'nd/status-partial-refresh'

* nd/status-partial-refresh:
  rm: only refresh entries that we may touch
  status: only touch path we may need to check

14 years agoMerge remote branch 'remotes/trast-doc/for-next'
Junio C Hamano [Thu, 21 Jan 2010 04:28:49 +0000 (20:28 -0800)]
Merge remote branch 'remotes/trast-doc/for-next'

* remotes/trast-doc/for-next:
  Documentation: spell 'git cmd' without dash throughout
  Documentation: format full commands in typewriter font
  Documentation: warn prominently against merging with dirty trees
  Documentation/git-merge: reword references to "remote" and "pull"

Conflicts:
Documentation/config.txt
Documentation/git-config.txt
Documentation/git-merge.txt

14 years agoMerge branch 'jh/notes' (early part)
Junio C Hamano [Thu, 21 Jan 2010 04:28:49 +0000 (20:28 -0800)]
Merge branch 'jh/notes' (early part)

* 'jh/notes' (early part):
  Add more testcases to test fast-import of notes
  Rename t9301 to t9350, to make room for more fast-import tests
  fast-import: Proper notes tree manipulation

14 years agoMerge branch 'maint'
Junio C Hamano [Thu, 21 Jan 2010 04:28:39 +0000 (20:28 -0800)]
Merge branch 'maint'

* maint:
  status: don't require the repository to be writable

Conflicts:
builtin-commit.c

14 years agoMerge branch 'jc/maint-refresh-index-is-optional-for-status' into maint
Junio C Hamano [Thu, 21 Jan 2010 04:25:11 +0000 (20:25 -0800)]
Merge branch 'jc/maint-refresh-index-is-optional-for-status' into maint

* jc/maint-refresh-index-is-optional-for-status:
  status: don't require the repository to be writable

14 years agoMerge branch 'rr/core-tutorial'
Junio C Hamano [Wed, 20 Jan 2010 23:24:42 +0000 (15:24 -0800)]
Merge branch 'rr/core-tutorial'

* rr/core-tutorial:
  Documentation: Update git core tutorial clarifying reference to scripts

14 years agoMerge branch 'jc/cache-unmerge'
Junio C Hamano [Wed, 20 Jan 2010 22:44:31 +0000 (14:44 -0800)]
Merge branch 'jc/cache-unmerge'

* jc/cache-unmerge:
  rerere forget path: forget recorded resolution
  rerere: refactor rerere logic to make it independent from I/O
  rerere: remove silly 1024-byte line limit
  resolve-undo: teach "update-index --unresolve" to use resolve-undo info
  resolve-undo: "checkout -m path" uses resolve-undo information
  resolve-undo: allow plumbing to clear the information
  resolve-undo: basic tests
  resolve-undo: record resolved conflicts in a new index extension section
  builtin-merge.c: use standard active_cache macros

Conflicts:
builtin-ls-files.c
builtin-merge.c
builtin-rerere.c

14 years agoMerge branch 'js/exec-error-report'
Junio C Hamano [Wed, 20 Jan 2010 22:44:12 +0000 (14:44 -0800)]
Merge branch 'js/exec-error-report'

* js/exec-error-report:
  Improve error message when a transport helper was not found
  start_command: detect execvp failures early
  run-command: move wait_or_whine earlier
  start_command: report child process setup errors to the parent's stderr

Conflicts:
Makefile

14 years agoMerge branch 'jc/ls-files-ignored-pathspec'
Junio C Hamano [Wed, 20 Jan 2010 22:43:54 +0000 (14:43 -0800)]
Merge branch 'jc/ls-files-ignored-pathspec'

* jc/ls-files-ignored-pathspec:
  ls-files: fix overeager pathspec optimization
  read_directory(): further split treat_path()
  read_directory_recursive(): refactor handling of a single path into a separate function
  t3001: test ls-files -o ignored/dir

14 years agoMerge branch 'jc/grep-lookahead'
Junio C Hamano [Wed, 20 Jan 2010 22:43:41 +0000 (14:43 -0800)]
Merge branch 'jc/grep-lookahead'

* jc/grep-lookahead:
  grep --no-index: allow use of "git grep" outside a git repository
  grep: prepare to run outside of a work tree
  grep: rip out pessimization to use fixmatch()
  grep: rip out support for external grep
  grep: optimize built-in grep by skipping lines that do not hit

Conflicts:
builtin-grep.c
t/t7002-grep.sh

14 years agoMerge branch 'jc/maint-strbuf-add-fix-doubling'
Junio C Hamano [Wed, 20 Jan 2010 22:43:09 +0000 (14:43 -0800)]
Merge branch 'jc/maint-strbuf-add-fix-doubling'

* jc/maint-strbuf-add-fix-doubling:
  strbuf_addbuf(): allow passing the same buf to dst and src

14 years agoMerge branch 'mm/conflict-advice'
Junio C Hamano [Wed, 20 Jan 2010 22:42:59 +0000 (14:42 -0800)]
Merge branch 'mm/conflict-advice'

* mm/conflict-advice:
  Be more user-friendly when refusing to do something because of conflict.

Conflicts:
Documentation/config.txt
advice.c
advice.h

14 years agoMerge branch 'da/difftool'
Junio C Hamano [Wed, 20 Jan 2010 22:42:20 +0000 (14:42 -0800)]
Merge branch 'da/difftool'

* da/difftool:
  difftool: Update copyright notices to list each year separately
  difftool: Use eval to expand '--extcmd' expressions
  difftool: Add '-x' and as an alias for '--extcmd'
  t7800-difftool.sh: Simplify the --extcmd test
  git-diff.txt: Link to git-difftool
  difftool: Allow specifying unconfigured commands with --extcmd
  difftool--helper: Remove use of the GIT_MERGE_TOOL variable
  difftool--helper: Update copyright and remove distracting comments
  git-difftool: Add '--gui' for selecting a GUI tool
  t7800-difftool: Set a bogus tool for use by tests

14 years agoMerge branch 'mh/rebase-fixup'
Junio C Hamano [Wed, 20 Jan 2010 22:42:07 +0000 (14:42 -0800)]
Merge branch 'mh/rebase-fixup'

* mh/rebase-fixup:
  rebase -i: Retain user-edited commit messages after squash/fixup conflicts
  t3404: Set up more of the test repo in the "setup" step
  rebase -i: For fixup commands without squashes, do not start editor
  rebase -i: Change function make_squash_message into update_squash_message
  rebase -i: Extract function do_with_author
  rebase -i: Handle the author script all in one place in do_next
  rebase -i: Extract a function "commit_message"
  rebase -i: Simplify commit counting for generated commit messages
  rebase -i: Improve consistency of commit count in generated commit messages
  t3404: Test the commit count in commit messages generated by "rebase -i"
  rebase -i: Introduce a constant AMEND
  rebase -i: Introduce a constant AUTHOR_SCRIPT
  rebase -i: Document how temporary files are used
  rebase -i: Use symbolic constant $MSG consistently
  rebase -i: Use "test -n" instead of "test ! -z"
  rebase -i: Inline expression
  rebase -i: Remove dead code
  rebase -i: Make the condition for an "if" more transparent

14 years agoMerge branch 'ns/rebase-auto-squash'
Junio C Hamano [Wed, 20 Jan 2010 22:42:04 +0000 (14:42 -0800)]
Merge branch 'ns/rebase-auto-squash'

* ns/rebase-auto-squash:
  rebase -i --autosquash: auto-squash commits

Conflicts:
git-rebase--interactive.sh

14 years agoMerge branch 'mh/rebase-fixup' (early part)
Junio C Hamano [Wed, 20 Jan 2010 22:41:48 +0000 (14:41 -0800)]
Merge branch 'mh/rebase-fixup' (early part)

* 'mh/rebase-fixup' (early part):
  rebase-i: Ignore comments and blank lines in peek_next_command
  lib-rebase: Allow comments and blank lines to be added to the rebase script
  lib-rebase: Provide clearer debugging info about what the editor did
  Add a command "fixup" to rebase --interactive
  t3404: Use test_commit to set up test repository

14 years agoMerge branch 'il/push-set-upstream'
Junio C Hamano [Wed, 20 Jan 2010 22:40:48 +0000 (14:40 -0800)]
Merge branch 'il/push-set-upstream'

* il/push-set-upstream:
  Add push --set-upstream

Conflicts:
transport.c

14 years agoMerge branch 'jk/warn-author-committer-after-commit'
Junio C Hamano [Wed, 20 Jan 2010 22:40:12 +0000 (14:40 -0800)]
Merge branch 'jk/warn-author-committer-after-commit'

* jk/warn-author-committer-after-commit:
  user_ident_sufficiently_given(): refactor the logic to be usable from elsewhere
  commit.c::print_summary: do not release the format string too early
  commit: allow suppression of implicit identity advice
  commit: show interesting ident information in summary
  strbuf: add strbuf_addbuf_percentquote
  strbuf_expand: convert "%%" to "%"

Conflicts:
builtin-commit.c
ident.c

14 years agoMerge branch 'jc/ident'
Junio C Hamano [Wed, 20 Jan 2010 22:39:52 +0000 (14:39 -0800)]
Merge branch 'jc/ident'

* jc/ident:
  ident.c: replace fprintf with fputs to suppress compiler warning
  user_ident_sufficiently_given(): refactor the logic to be usable from elsewhere
  ident.c: treat $EMAIL as giving user.email identity explicitly
  ident.c: check explicit identity for name and email separately
  ident.c: remove unused variables

14 years agoMerge branch 'tr/http-push-ref-status'
Junio C Hamano [Wed, 20 Jan 2010 22:39:48 +0000 (14:39 -0800)]
Merge branch 'tr/http-push-ref-status'

* tr/http-push-ref-status:
  transport-helper.c::push_refs(): emit "no refs" error message
  transport-helper.c::push_refs(): ignore helper-reported status if ref is not to be pushed
  transport.c::transport_push(): make ref status affect return value
  refactor ref status logic for pushing
  t5541-http-push.sh: add test for unmatched, non-fast-forwarded refs
  t5541-http-push.sh: add tests for non-fast-forward pushes

Conflicts:
transport-helper.c

14 years agoMerge branch 'bk/fix-relative-gitdir-file'
Junio C Hamano [Wed, 20 Jan 2010 22:38:34 +0000 (14:38 -0800)]
Merge branch 'bk/fix-relative-gitdir-file'

* bk/fix-relative-gitdir-file:
  Handle relative paths in submodule .git files
  Test update-index for a gitlink to a .git file

14 years agoMerge branch 'sd/cd-p-show-toplevel'
Junio C Hamano [Wed, 20 Jan 2010 22:38:30 +0000 (14:38 -0800)]
Merge branch 'sd/cd-p-show-toplevel'

* sd/cd-p-show-toplevel:
  Use $(git rev-parse --show-toplevel) in cd_to_toplevel().
  Add 'git rev-parse --show-toplevel' option.

14 years agoMerge branch 'jc/symbol-static'
Junio C Hamano [Wed, 20 Jan 2010 22:37:25 +0000 (14:37 -0800)]
Merge branch 'jc/symbol-static'

* jc/symbol-static:
  date.c: mark file-local function static
  Replace parse_blob() with an explanatory comment
  symlinks.c: remove unused functions
  object.c: remove unused functions
  strbuf.c: remove unused function
  sha1_file.c: remove unused function
  mailmap.c: remove unused function
  utf8.c: mark file-local function static
  submodule.c: mark file-local function static
  quote.c: mark file-local function static
  remote-curl.c: mark file-local function static
  read-cache.c: mark file-local functions static
  parse-options.c: mark file-local function static
  entry.c: mark file-local function static
  http.c: mark file-local functions static
  pretty.c: mark file-local function static
  builtin-rev-list.c: mark file-local function static
  bisect.c: mark file-local function static

14 years agodate.c: mark file-local function static
Junio C Hamano [Tue, 12 Jan 2010 07:52:47 +0000 (23:52 -0800)]
date.c: mark file-local function static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoSync with 1.6.6.1
Junio C Hamano [Wed, 20 Jan 2010 22:01:28 +0000 (14:01 -0800)]
Sync with 1.6.6.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoGit 1.6.6.1 v1.6.6.1
Junio C Hamano [Wed, 20 Jan 2010 21:29:21 +0000 (13:29 -0800)]
Git 1.6.6.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'bg/maint-remote-update-default' into maint
Junio C Hamano [Wed, 20 Jan 2010 21:23:59 +0000 (13:23 -0800)]
Merge branch 'bg/maint-remote-update-default' into maint

* bg/maint-remote-update-default:
  Fix "git remote update" with remotes.defalt set

14 years agoMerge branch 'sb/maint-octopus' into maint
Junio C Hamano [Wed, 20 Jan 2010 21:02:24 +0000 (13:02 -0800)]
Merge branch 'sb/maint-octopus' into maint

* sb/maint-octopus:
  octopus: remove dead code
  octopus: reenable fast-forward merges
  octopus: make merge process simpler to follow

Conflicts:
git-merge-octopus.sh

14 years agoMerge branch 'bg/maint-add-all-doc' into maint
Junio C Hamano [Wed, 20 Jan 2010 21:01:33 +0000 (13:01 -0800)]
Merge branch 'bg/maint-add-all-doc' into maint

* bg/maint-add-all-doc:
  git-rm doc: Describe how to sync index & work tree
  git-add/rm doc: Consistently back-quote
  Documentation: 'git add -A' can remove files

14 years agoMerge branch 'maint-1.6.5' into maint
Junio C Hamano [Wed, 20 Jan 2010 21:01:19 +0000 (13:01 -0800)]
Merge branch 'maint-1.6.5' into maint

* maint-1.6.5:
  Git 1.6.5.8
  Fix mis-backport of t7002
  bash completion: factor submodules into dirty state
  reset: unbreak hard resets with GIT_WORK_TREE

Conflicts:
Documentation/git.txt
GIT-VERSION-GEN
RelNotes

14 years agoGit 1.6.5.8 v1.6.5.8
Junio C Hamano [Wed, 20 Jan 2010 20:44:59 +0000 (12:44 -0800)]
Git 1.6.5.8

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'jk/maint-1.6.5-reset-hard' into maint-1.6.5
Junio C Hamano [Wed, 20 Jan 2010 20:22:58 +0000 (12:22 -0800)]
Merge branch 'jk/maint-1.6.5-reset-hard' into maint-1.6.5

* jk/maint-1.6.5-reset-hard:
  reset: unbreak hard resets with GIT_WORK_TREE

14 years agoMerge branch 'tr/maint-1.6.5-bash-prompt-show-submodule-changes' into maint-1.6.5
Junio C Hamano [Wed, 20 Jan 2010 20:22:54 +0000 (12:22 -0800)]
Merge branch 'tr/maint-1.6.5-bash-prompt-show-submodule-changes' into maint-1.6.5

* tr/maint-1.6.5-bash-prompt-show-submodule-changes:
  bash completion: factor submodules into dirty state

14 years agoMerge branch 'dp/maint-1.6.5-fast-import-non-commit-tag' into maint-1.6.5
Junio C Hamano [Wed, 20 Jan 2010 20:17:24 +0000 (12:17 -0800)]
Merge branch 'dp/maint-1.6.5-fast-import-non-commit-tag' into maint-1.6.5

* dp/maint-1.6.5-fast-import-non-commit-tag:
  fast-import: tag may point to any object type

14 years agoMerge branch 'jm/maint-1.6.5-grep-NUL-terminate' into maint-1.6.5
Junio C Hamano [Wed, 20 Jan 2010 20:16:46 +0000 (12:16 -0800)]
Merge branch 'jm/maint-1.6.5-grep-NUL-terminate' into maint-1.6.5

* jm/maint-1.6.5-grep-NUL-terminate:
  grep: NUL terminate input from a file

14 years agoFix "checkout A..." synonym for "checkout A...HEAD" on Windows
Junio C Hamano [Wed, 20 Jan 2010 03:30:06 +0000 (19:30 -0800)]
Fix "checkout A..." synonym for "checkout A...HEAD" on Windows

When switching to a different commit, we first see the named rev exists
as a commit using lookup_commit_reference_gently(), and set new.path to
a string "refs/heads/" followed by the name the user gave us (but after
taking into special short-hands like @{-1} == "previous branch" and
"@{upstream}" == "the branch we merge with" into account).  If the
resulting string names an existsing ref, then we are switching to that
branch (and will be building new commits on top of it); otherwise we are
detaching HEAD at that commit.

When the "master..." syntax is used as a short-hand for "master...HEAD",
we do want to detach HEAD at the merge base.  However, on Windows, when
asked if ".git/refs/heads/master..." exists, the filesystem happily says
"it does" when ".git/refs/heads/master" exists.

Work this issue around by first calling check_ref_format(new.path) to see
if the string can possibly be a valid ref under "refs/heads/", before
asking resolve_ref().

We used to run another lookup_commit_reference(rev) even though we know it
succeeded and we have a good commit in new.commit already; this has been
with us from 782c2d6 (Build in checkout, 2008-02-07), the first version we
had "git checkout" implemented in C.  Drop it.

Noticed by Alex Riesen.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agostatus: don't require the repository to be writable
Junio C Hamano [Wed, 20 Jan 2010 01:10:35 +0000 (17:10 -0800)]
status: don't require the repository to be writable

We need to update the index before hooks run when actually making a
commit, but we shouldn't have to write the index when running "status".
If we can, then we have already spent cycles to refresh the index and
it is a waste not to write it out, but it is not a disaster if we cannot
write it out.  The main reason the user is running "git status" is to get
the "status", and refreshing the index is a mere side effect that we can
do without.

Discovery and initial attempted fix by Dscho.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Wed, 20 Jan 2010 00:57:10 +0000 (16:57 -0800)]
Merge branch 'maint'

* maint:
  bisect: fix singular/plural grammar nit

14 years agoMakefile: honor NO_CURL when setting REMOTE_CURL_* variables
Johannes Sixt [Tue, 19 Jan 2010 15:39:12 +0000 (16:39 +0100)]
Makefile: honor NO_CURL when setting REMOTE_CURL_* variables

Previously, these variables were set before there was a chance to set
NO_CURL.

This made a difference only during 'make install', because by installing
$(REMOTE_CURL_ALIASES), the rule  tries to access $(REMOTE_CURL_PRIMARY),
which was never installed. On Windows, this fails; on Unix, stale symbolic
links are created.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoident.c: replace fprintf with fputs to suppress compiler warning
Tarmigan Casebolt [Sun, 17 Jan 2010 08:19:24 +0000 (00:19 -0800)]
ident.c: replace fprintf with fputs to suppress compiler warning

Compiling today's pu gave
    ...
    CC ident.o
    CC levenshtein.o
ident.c: In function 'fmt_ident':
ident.c:206: warning: format not a string literal and no format arguments
    CC list-objects.o
    ...

This warning seems to have appeared first in 18e95f279ec6 (ident.c:
remove unused variables) which removed additional fprintf arguments.

Suppress this warning by using fputs instead of fprintf.

Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agorm: only refresh entries that we may touch
Nguyễn Thái Ngọc Duy [Sun, 17 Jan 2010 08:43:13 +0000 (15:43 +0700)]
rm: only refresh entries that we may touch

This gets rid of the whole tree cache refresh. Instead only path that
we touch will get refreshed. We may still lstat() more than needed,
but it'd be better playing safe.

This potentially reduces a large number of lstat() on big trees. Take
gentoo-x86 tree for example, which has roughly 80k files:

Unmodified Git:

$ time git rm --cached skel.ebuild
rm 'skel.ebuild'

real    0m1.441s
user    0m0.821s
sys     0m0.531s

Modified Git:

$ time ~/w/git/git rm --cached skel.ebuild
rm 'skel.ebuild'

real    0m0.941s
user    0m0.828s
sys     0m0.091s

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agobisect: fix singular/plural grammar nit
David Ripton [Tue, 19 Jan 2010 15:13:33 +0000 (07:13 -0800)]
bisect: fix singular/plural grammar nit

Remove the trailing 's' from "revisions" and "steps" when there is
only one.

Signed-off-by: David Ripton <dripton@ripton.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agocvsimport: standarize system() calls to external git tools
Ben Walton [Tue, 19 Jan 2010 19:03:10 +0000 (14:03 -0500)]
cvsimport: standarize system() calls to external git tools

This patch standardizes calls to system() where external git tools are
called.  Instead of system("git foo ... "), use system(qw(git foo ...)).
All calls are made without the use of an 'sh -c' process to split the
arguments.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agocvsimport: standarize open() calls to external git tools
Ben Walton [Tue, 19 Jan 2010 19:03:09 +0000 (14:03 -0500)]
cvsimport: standarize open() calls to external git tools

Standardize calls to open() where external git tools are used as
part of a pipeline.  Instead of open(X, "git foo ... |)", use
open(X, "-|", qw(git foo ...)).  All calls are made without the
use of an 'sh -c' process to split the arguments.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agocvsimport: modernize callouts to git subcommands
Ben Walton [Tue, 19 Jan 2010 19:03:08 +0000 (14:03 -0500)]
cvsimport: modernize callouts to git subcommands

This patch updates all calling conventions for external git tools.  to
use the modern calling convention (eg: git foo instead of git-foo).
This is almost entierly a s/git-/git / operation, with deviations only
as required to keep tests passing.

Reported-by: Alexander Maier <amaier@opencsw.org>
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint-1.6.4' into maint-1.6.5
Junio C Hamano [Tue, 19 Jan 2010 05:37:12 +0000 (21:37 -0800)]
Merge branch 'maint-1.6.4' into maint-1.6.5

* maint-1.6.4:
  Fix mis-backport of t7002
  base85: Make the code more obvious instead of explaining the non-obvious
  base85: encode_85() does not use the decode table
  base85 debug code: Fix length byte calculation
  checkout -m: do not try to fall back to --merge from an unborn branch
  branch: die explicitly why when calling "git branch [-a|-r] branchname".
  textconv: stop leaking file descriptors
  commit: --cleanup is a message option
  git count-objects: handle packs bigger than 4G
  t7102: make the test fail if one of its check fails

14 years agoMerge branch 'maint-1.6.3' into maint-1.6.4
Junio C Hamano [Tue, 19 Jan 2010 05:37:06 +0000 (21:37 -0800)]
Merge branch 'maint-1.6.3' into maint-1.6.4

* maint-1.6.3:
  base85: Make the code more obvious instead of explaining the non-obvious
  base85: encode_85() does not use the decode table
  base85 debug code: Fix length byte calculation
  checkout -m: do not try to fall back to --merge from an unborn branch
  branch: die explicitly why when calling "git branch [-a|-r] branchname".
  textconv: stop leaking file descriptors
  commit: --cleanup is a message option
  git count-objects: handle packs bigger than 4G
  t7102: make the test fail if one of its check fails

Conflicts:
builtin-commit.c

14 years agoMerge branch 'maint-1.6.2' into maint-1.6.3
Junio C Hamano [Tue, 19 Jan 2010 05:29:47 +0000 (21:29 -0800)]
Merge branch 'maint-1.6.2' into maint-1.6.3

* maint-1.6.2:
  base85: Make the code more obvious instead of explaining the non-obvious
  base85: encode_85() does not use the decode table
  base85 debug code: Fix length byte calculation
  checkout -m: do not try to fall back to --merge from an unborn branch
  branch: die explicitly why when calling "git branch [-a|-r] branchname".
  textconv: stop leaking file descriptors
  commit: --cleanup is a message option
  git count-objects: handle packs bigger than 4G
  t7102: make the test fail if one of its check fails

Conflicts:
diff.c

14 years agoMerge commit 'v1.6.4.4-8-g8de6518' into maint-1.6.4
Junio C Hamano [Tue, 19 Jan 2010 05:18:41 +0000 (21:18 -0800)]
Merge commit 'v1.6.4.4-8-g8de6518' into maint-1.6.4

* commit 'v1.6.4.4-8-g8de6518':
  Fix mis-backport of t7002

14 years agoFix mis-backport of t7002
Junio C Hamano [Tue, 19 Jan 2010 05:14:41 +0000 (21:14 -0800)]
Fix mis-backport of t7002

The original patch that became cfe370c (grep: do not segfault when -f is
used, 2009-10-16), was made against "maint" or newer branch back then, but
the fix addressed the issue that was present as far as in 1.6.4 series.

The maintainer backported the patch to the 1.6.4 maintenance branch, but
failed to notice that the new tests assumed the setup done by the script
in "maint", which did quite a lot more than the same test script in 1.6.4
series, and the output didn't match the expected result.

This should fix it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate draft release notes to 1.7.0
Junio C Hamano [Tue, 19 Jan 2010 02:16:50 +0000 (18:16 -0800)]
Update draft release notes to 1.7.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Tue, 19 Jan 2010 02:16:19 +0000 (18:16 -0800)]
Merge branch 'maint'

* maint:
  Update draft release notes to 1.6.6.1
  grep: NUL terminate input from a file
  fast-import: tag may point to any object type

14 years agoUpdate draft release notes to 1.6.6.1
Junio C Hamano [Tue, 19 Jan 2010 02:16:15 +0000 (18:16 -0800)]
Update draft release notes to 1.6.6.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'dp/maint-1.6.5-fast-import-non-commit-tag' into maint
Junio C Hamano [Tue, 19 Jan 2010 02:15:12 +0000 (18:15 -0800)]
Merge branch 'dp/maint-1.6.5-fast-import-non-commit-tag' into maint

* dp/maint-1.6.5-fast-import-non-commit-tag:
  fast-import: tag may point to any object type

14 years agoMerge branch 'jc/rerere'
Junio C Hamano [Tue, 19 Jan 2010 02:13:01 +0000 (18:13 -0800)]
Merge branch 'jc/rerere'

* jc/rerere:
  Teach --[no-]rerere-autoupdate option to merge, revert and friends

14 years agoMerge branch 'pc/uninteresting-submodule-disappear-upon-switch-branches'
Junio C Hamano [Tue, 19 Jan 2010 02:12:57 +0000 (18:12 -0800)]
Merge branch 'pc/uninteresting-submodule-disappear-upon-switch-branches'

* pc/uninteresting-submodule-disappear-upon-switch-branches:
  Remove empty directories when checking out a commit with fewer submodules

14 years agoMerge branch 'nd/include-termios-for-osol'
Junio C Hamano [Tue, 19 Jan 2010 02:12:53 +0000 (18:12 -0800)]
Merge branch 'nd/include-termios-for-osol'

* nd/include-termios-for-osol:
  Add missing #include to support TIOCGWINSZ on Solaris

14 years agoMerge branch 'js/windows'
Junio C Hamano [Tue, 19 Jan 2010 02:12:49 +0000 (18:12 -0800)]
Merge branch 'js/windows'

* js/windows:
  Do not use date.c:tm_to_time_t() from compat/mingw.c
  MSVC: Windows-native implementation for subset of Pthreads API
  MSVC: Fix an "incompatible pointer types" compiler warning
  Windows: avoid the "dup dance" when spawning a child process
  Windows: simplify the pipe(2) implementation
  Windows: boost startup by avoiding a static dependency on shell32.dll
  Windows: disable Python

14 years agobuiltin-apply.c: fix the --- and +++ header filename consistency check
Andreas Gruenbacher [Mon, 18 Jan 2010 21:37:38 +0000 (22:37 +0100)]
builtin-apply.c: fix the --- and +++ header filename consistency check

gitdiff_verify_name() only did a filename prefix check because of an
off-by-one error.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoReplace parse_blob() with an explanatory comment
Daniel Barkalow [Mon, 18 Jan 2010 18:06:28 +0000 (13:06 -0500)]
Replace parse_blob() with an explanatory comment

parse_blob() has never actually been used; it has served simply to
avoid having a confusing gap in the API. Instead of leaving it, put in
a comment that explains what "parsing a blob" entails (making sure the
object is actually readable), and why code might care whether a blob
has been parsed or not.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'jm/maint-1.6.5-grep-NUL-terminate' into maint
Junio C Hamano [Tue, 19 Jan 2010 01:03:34 +0000 (17:03 -0800)]
Merge branch 'jm/maint-1.6.5-grep-NUL-terminate' into maint

* jm/maint-1.6.5-grep-NUL-terminate:
  grep: NUL terminate input from a file

14 years agogrep: NUL terminate input from a file
Jim Meyering [Mon, 18 Jan 2010 21:55:07 +0000 (22:55 +0100)]
grep: NUL terminate input from a file

Internally "git grep" runs regexec(3) that expects its input string
to be NUL terminated.  When searching inside blob data, read_sha1_file()
automatically gives such a buffer, but builtin-grep.c forgot to put
the NUL at the end, even though it allocated enough space for it.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agobuiltin-apply.c: Skip filenames without enough components
Andreas Gruenbacher [Sun, 17 Jan 2010 02:05:10 +0000 (03:05 +0100)]
builtin-apply.c: Skip filenames without enough components

find_name() wrongly returned the whole filename for filenames without
enough leading pathname components (e.g., when applying a patch to a
top-level file with -p2).

Include the -p value used in the error message when no filenames can be
found.

[jc: squashed a test from Nanako Shiraishi]

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agosymlinks.c: remove unused functions
Junio C Hamano [Tue, 12 Jan 2010 05:18:20 +0000 (21:18 -0800)]
symlinks.c: remove unused functions

invalidate_lstat_cache() and clear_lstat_cache() are not used anywhere.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoobject.c: remove unused functions
Junio C Hamano [Tue, 12 Jan 2010 05:15:12 +0000 (21:15 -0800)]
object.c: remove unused functions

object_list_append() and object_list_length}() are not used anywhere.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocument that merge strategies can now take their own options
Junio C Hamano [Fri, 18 Jul 2008 09:43:00 +0000 (02:43 -0700)]
Document that merge strategies can now take their own options

Also document the recently added -Xtheirs, -Xours and -Xsubtree[=path]
options to the merge-recursive strategy.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoExtend merge-subtree tests to test -Xsubtree=dir.
Avery Pennarun [Thu, 26 Nov 2009 02:23:59 +0000 (21:23 -0500)]
Extend merge-subtree tests to test -Xsubtree=dir.

This tests the configurable -Xsubtree feature of merge-recursive.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMake "subtree" part more orthogonal to the rest of merge-recursive.
Junio C Hamano [Tue, 1 Jul 2008 05:18:57 +0000 (22:18 -0700)]
Make "subtree" part more orthogonal to the rest of merge-recursive.

This makes "subtree" more orthogonal to the rest of recursive merge, so
that you can use subtree and ours/theirs features at the same time.  For
example, you can now say:

git merge -s subtree -Xtheirs other

to merge with "other" branch while shifting it up or down to match the
shape of the tree of the current branch, and resolving conflicts favoring
the changes "other" branch made over changes made in the current branch.

It also allows the prefix used to shift the trees to be specified using
the "-Xsubtree=$prefix" option.  Giving an empty prefix tells the command
to figure out how much to shift trees automatically as we have always
done.  "merge -s subtree" is the same as "merge -s recursive -Xsubtree="
(or "merge -s recursive -Xsubtree").

Based on an old patch done back in the days when git-merge was a script;
Avery ported the script part to builtin-merge.c.  Bugs in shift_tree()
is mine.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agopull: Fix parsing of -X<option>
Junio C Hamano [Mon, 18 Jan 2010 06:31:38 +0000 (22:31 -0800)]
pull: Fix parsing of -X<option>

As -X parameter can contain arbitrary $IFS characters, we need to
properly quote it from the shell while forming the command line.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoTeach git-pull to pass -X<option> to git-merge
Avery Pennarun [Thu, 26 Nov 2009 02:23:57 +0000 (21:23 -0500)]
Teach git-pull to pass -X<option> to git-merge

This needs the usual sq then eval trick to allow IFS characters
in the option.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit merge -X<option>
Avery Pennarun [Thu, 26 Nov 2009 02:23:55 +0000 (21:23 -0500)]
git merge -X<option>

Teach "-X <option>" command line argument to "git merge" that is passed to
strategy implementations.  "ours" and "theirs" autoresolution introduced
by the previous commit can be asked to the recursive strategy.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate draft release notes to 1.7.0
Junio C Hamano [Mon, 18 Jan 2010 00:47:48 +0000 (16:47 -0800)]
Update draft release notes to 1.7.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'tc/test-locate-httpd'
Junio C Hamano [Mon, 18 Jan 2010 00:00:13 +0000 (16:00 -0800)]
Merge branch 'tc/test-locate-httpd'

* tc/test-locate-httpd:
  t/lib-http.sh: Restructure finding of default httpd location

14 years agoMerge branch 'jh/commit-status'
Junio C Hamano [Mon, 18 Jan 2010 00:00:07 +0000 (16:00 -0800)]
Merge branch 'jh/commit-status'

* jh/commit-status:
  t7502: test commit.status, --status and --no-status
  commit: support commit.status, --status, and --no-status

Conflicts:
Documentation/git-commit.txt
builtin-commit.c

14 years agoMerge branch 'jn/makefile'
Junio C Hamano [Sun, 17 Jan 2010 23:59:44 +0000 (15:59 -0800)]
Merge branch 'jn/makefile'

* jn/makefile:
  Makefile: consolidate .FORCE-* targets
  Makefile: learn to generate listings for targets requiring special flags
  Makefile: use target-specific variable to pass flags to cc
  Makefile: regenerate assembler listings when asked

14 years agoMerge branch 'jc/maint-1.6.1-checkout-m-custom-merge'
Junio C Hamano [Sun, 17 Jan 2010 23:59:40 +0000 (15:59 -0800)]
Merge branch 'jc/maint-1.6.1-checkout-m-custom-merge'

* jc/maint-1.6.1-checkout-m-custom-merge:
  checkout -m path: fix recreating conflicts

Conflicts:
t/t7201-co.sh

14 years agoMerge branch 'tc/clone-v-progress'
Junio C Hamano [Sun, 17 Jan 2010 23:58:58 +0000 (15:58 -0800)]
Merge branch 'tc/clone-v-progress'

* tc/clone-v-progress:
  clone: use --progress to force progress reporting
  clone: set transport->verbose when -v/--verbose is used
  git-clone.txt: reword description of progress behaviour
  check stderr with isatty() instead of stdout when deciding to show progress

Conflicts:
transport.c

14 years agoMerge branch 'tc/smart-http-restrict'
Junio C Hamano [Sun, 17 Jan 2010 23:58:23 +0000 (15:58 -0800)]
Merge branch 'tc/smart-http-restrict'

* tc/smart-http-restrict:
  Test t5560: Fix test when run with dash
  Smart-http tests: Test http-backend without curl or a webserver
  Smart-http tests: Break test t5560-http-backend into pieces
  Smart-http tests: Improve coverage in test t5560
  Smart-http: check if repository is OK to export before serving it

14 years agoMerge branch 'jk/run-command-use-shell'
Junio C Hamano [Sun, 17 Jan 2010 23:58:15 +0000 (15:58 -0800)]
Merge branch 'jk/run-command-use-shell'

* jk/run-command-use-shell:
  t4030, t4031: work around bogus MSYS bash path conversion
  diff: run external diff helper with shell
  textconv: use shell to run helper
  editor: use run_command's shell feature
  run-command: optimize out useless shell calls
  run-command: convert simple callsites to use_shell
  t0021: use $SHELL_PATH for the filter script
  run-command: add "use shell" option

14 years agoMerge branch 'sr/gfi-options'
Junio C Hamano [Sun, 17 Jan 2010 23:58:11 +0000 (15:58 -0800)]
Merge branch 'sr/gfi-options'

* sr/gfi-options:
  fast-import: add (non-)relative-marks feature
  fast-import: allow for multiple --import-marks= arguments
  fast-import: test the new option command
  fast-import: add option command
  fast-import: add feature command
  fast-import: put marks reading in its own function
  fast-import: put option parsing code in separate functions

14 years agoUpdate COPYING with GPLv2 with new FSF address
Junio C Hamano [Sat, 16 Jan 2010 05:38:34 +0000 (21:38 -0800)]
Update COPYING with GPLv2 with new FSF address

The mailing address of FSF changed quite a while ago.  Also the expansion
of the acronym LGPL (which we don't use) is "Lesser GPL" not "Library GPL"
these days in recent copies of GPLv2.  Update the copy we have with a
fresh download of <http://www.gnu.org/licenses/gpl-2.0.txt>.

This incidentally removes form-feeds in the text we retained for all these
years.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agouser_ident_sufficiently_given(): refactor the logic to be usable from elsewhere
Junio C Hamano [Sun, 17 Jan 2010 21:59:36 +0000 (13:59 -0800)]
user_ident_sufficiently_given(): refactor the logic to be usable from elsewhere

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agouser_ident_sufficiently_given(): refactor the logic to be usable from elsewhere
Junio C Hamano [Sun, 17 Jan 2010 21:54:28 +0000 (13:54 -0800)]
user_ident_sufficiently_given(): refactor the logic to be usable from elsewhere

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agorerere: honor conflict-marker-size attribute
Junio C Hamano [Sun, 17 Jan 2010 07:28:46 +0000 (23:28 -0800)]
rerere: honor conflict-marker-size attribute

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agorerere: prepare for customizable conflict marker length
Junio C Hamano [Sun, 17 Jan 2010 07:06:45 +0000 (23:06 -0800)]
rerere: prepare for customizable conflict marker length

This still uses the hardcoded conflict marker length of 7 but otherwise
prepares the codepath to deal with customized marker length.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agocommit.c::print_summary: do not release the format string too early
Junio C Hamano [Sun, 17 Jan 2010 08:57:51 +0000 (00:57 -0800)]
commit.c::print_summary: do not release the format string too early

When we are showing a clean merge, log_tree_commit() won't show the header
and we would need the format string to format the commit summary ourselves.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoconflict-marker-size: new attribute
Junio C Hamano [Sat, 16 Jan 2010 06:37:32 +0000 (22:37 -0800)]
conflict-marker-size: new attribute

This can be specified to set the length of the conflict marker (usually 7)
to a non-default value per path.  Only the callers of ll_merge() that are
aware of the per-path attributes are modified.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agorerere: use ll_merge() instead of using xdl_merge()
Junio C Hamano [Sat, 16 Jan 2010 06:50:01 +0000 (22:50 -0800)]
rerere: use ll_merge() instead of using xdl_merge()

This allows us to pay attention to the attribute settings and custom
merge driver the user sets up.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-tree: use ll_merge() not xdl_merge()
Junio C Hamano [Sun, 17 Jan 2010 05:45:40 +0000 (21:45 -0800)]
merge-tree: use ll_merge() not xdl_merge()

ll_merge() interface was designed to merge contents under git control
while taking per-path attributes into account.  Update the three-way
merge implementation used by merge-tree to use it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoxdl_merge(): allow passing down marker_size in xmparam_t
Junio C Hamano [Sun, 17 Jan 2010 05:30:18 +0000 (21:30 -0800)]
xdl_merge(): allow passing down marker_size in xmparam_t

This allows the callers of xdl_merge() to pass marker_size (defaults to 7)
in xmparam_t argument, to use conflict markers of non-default length.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoxdl_merge(): introduce xmparam_t for merge specific parameters
Junio C Hamano [Sun, 17 Jan 2010 05:01:28 +0000 (21:01 -0800)]
xdl_merge(): introduce xmparam_t for merge specific parameters

So far we have only needed to be able to pass an option that is generic to
xdiff family of functions to this function.  Extend the interface so that
we can give it merge specific parameters.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit_attr(): fix function signature
Junio C Hamano [Sun, 17 Jan 2010 04:39:59 +0000 (20:39 -0800)]
git_attr(): fix function signature

The function took (name, namelen) as its arguments, but all the public
callers wanted to pass a full string.

Demote the counted-string interface to an internal API status, and allow
public callers to just pass the string to the function.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDo not use date.c:tm_to_time_t() from compat/mingw.c
Johannes Sixt [Fri, 15 Jan 2010 20:12:21 +0000 (21:12 +0100)]
Do not use date.c:tm_to_time_t() from compat/mingw.c

To implement gettimeofday(), a broken-down UTC time was requested from the
system using GetSystemTime(), then tm_to_time_t() was used to convert it
to a time_t because it does not look at the current timezone, which
mktime() would do.

Use GetSystemTimeAsFileTime() and a different conversion path to avoid this
back-reference from the compatibility layer to the generic code.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMSVC: Windows-native implementation for subset of Pthreads API
Andrzej K. Haczewski [Fri, 15 Jan 2010 20:12:20 +0000 (21:12 +0100)]
MSVC: Windows-native implementation for subset of Pthreads API

This patch implements native to Windows subset of pthreads API used by Git.
It allows to remove Pthreads for Win32 dependency for MSVC, msysgit and
Cygwin.

[J6t: If the MinGW build was built as part of the msysgit build
environment, then threading was already enabled because the
pthreads-win32 package is available in msysgit. With this patch, we can now
enable threaded code unconditionally.]

Signed-off-by: Andrzej K. Haczewski <ahaczewski@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>