git
12 years agoMerge branch 'mm/mediawiki-as-a-remote'
Junio C Hamano [Wed, 5 Oct 2011 19:36:27 +0000 (12:36 -0700)] 
Merge branch 'mm/mediawiki-as-a-remote'

* mm/mediawiki-as-a-remote:
  git-remote-mediawiki: allow a domain to be set for authentication
  git-remote-mediawiki: obey advice.pushNonFastForward
  git-remote-mediawiki: set 'basetimestamp' to let the wiki handle conflicts
  git-remote-mediawiki: trivial fixes
  git-remote-mediawiki: allow push to set MediaWiki metadata
  Add a remote helper to interact with mediawiki (fetch & push)

12 years agoMerge branch 'js/check-attr-cached'
Junio C Hamano [Wed, 5 Oct 2011 19:36:27 +0000 (12:36 -0700)] 
Merge branch 'js/check-attr-cached'

* js/check-attr-cached:
  t0003: remove extra whitespaces
  Teach '--cached' option to check-attr

12 years agoMerge branch 'rj/maint-t9159-svn-rev-notation'
Junio C Hamano [Wed, 5 Oct 2011 19:36:26 +0000 (12:36 -0700)] 
Merge branch 'rj/maint-t9159-svn-rev-notation'

* rj/maint-t9159-svn-rev-notation:
  t9159-*.sh: skip for mergeinfo test for svn <= 1.4

12 years agoMerge branch 'cn/eradicate-working-copy'
Junio C Hamano [Wed, 5 Oct 2011 19:36:26 +0000 (12:36 -0700)] 
Merge branch 'cn/eradicate-working-copy'

* cn/eradicate-working-copy:
  Remove 'working copy' from the documentation and C code

12 years agoMerge branch 'jn/gitweb-highlite-sanitise'
Junio C Hamano [Wed, 5 Oct 2011 19:36:26 +0000 (12:36 -0700)] 
Merge branch 'jn/gitweb-highlite-sanitise'

* jn/gitweb-highlite-sanitise:
  gitweb: Strip non-printable characters from syntax highlighter output

12 years agoMerge branch 'jc/ls-remote-short-help'
Junio C Hamano [Wed, 5 Oct 2011 19:36:26 +0000 (12:36 -0700)] 
Merge branch 'jc/ls-remote-short-help'

* jc/ls-remote-short-help:
  ls-remote: a lone "-h" is asking for help

12 years agoMerge branch 'sn/doc-update-index-assume-unchanged'
Junio C Hamano [Wed, 5 Oct 2011 19:36:25 +0000 (12:36 -0700)] 
Merge branch 'sn/doc-update-index-assume-unchanged'

* sn/doc-update-index-assume-unchanged:
  Documentation/git-update-index: refer to 'ls-files'

12 years agoMerge branch 'mg/maint-doc-sparse-checkout'
Junio C Hamano [Wed, 5 Oct 2011 19:36:25 +0000 (12:36 -0700)] 
Merge branch 'mg/maint-doc-sparse-checkout'

* mg/maint-doc-sparse-checkout:
  git-read-tree.txt: correct sparse-checkout and skip-worktree description
  git-read-tree.txt: language and typography fixes
  unpack-trees: print "Aborting" to stderr

12 years agoMerge branch 'jk/argv-array'
Junio C Hamano [Wed, 5 Oct 2011 19:36:24 +0000 (12:36 -0700)] 
Merge branch 'jk/argv-array'

* jk/argv-array:
  run_hook: use argv_array API
  checkout: use argv_array API
  bisect: use argv_array API
  quote: provide sq_dequote_to_argv_array
  refactor argv_array into generic code
  quote.h: fix bogus comment
  add sha1_array API docs

12 years agoMerge branch 'tr/doc-note-rewrite'
Junio C Hamano [Wed, 5 Oct 2011 19:36:24 +0000 (12:36 -0700)] 
Merge branch 'tr/doc-note-rewrite'

* tr/doc-note-rewrite:
  Documentation: basic configuration of notes.rewriteRef

12 years agoMerge branch 'mg/branch-list'
Junio C Hamano [Wed, 5 Oct 2011 19:36:23 +0000 (12:36 -0700)] 
Merge branch 'mg/branch-list'

* mg/branch-list:
  t3200: clean up checks for file existence
  branch: -v does not automatically imply --list
  branch: allow pattern arguments
  branch: introduce --list option
  git-branch: introduce missing long forms for the options
  git-tag: introduce long forms for the options
  t6040: test branch -vv

Conflicts:
Documentation/git-tag.txt
t/t3200-branch.sh

12 years agoMerge branch 'cb/send-email-help'
Junio C Hamano [Wed, 5 Oct 2011 19:36:23 +0000 (12:36 -0700)] 
Merge branch 'cb/send-email-help'

* cb/send-email-help:
  send-email: add option -h

12 years agoMerge branch 'fk/use-kwset-pickaxe-grep-f'
Junio C Hamano [Wed, 5 Oct 2011 19:36:22 +0000 (12:36 -0700)] 
Merge branch 'fk/use-kwset-pickaxe-grep-f'

* fk/use-kwset-pickaxe-grep-f:
  obstack.c: Fix some sparse warnings
  sparse: Fix an "Using plain integer as NULL pointer" warning

12 years agoMerge branch 'jk/for-each-ref'
Junio C Hamano [Wed, 5 Oct 2011 19:36:22 +0000 (12:36 -0700)] 
Merge branch 'jk/for-each-ref'

* jk/for-each-ref:
  for-each-ref: add split message parts to %(contents:*).
  for-each-ref: handle multiline subjects like --pretty
  for-each-ref: refactor subject and body placeholder parsing
  t6300: add more body-parsing tests
  t7004: factor out gpg setup

12 years agoMerge branch 'wh/normalize-alt-odb-path'
Junio C Hamano [Wed, 5 Oct 2011 19:36:22 +0000 (12:36 -0700)] 
Merge branch 'wh/normalize-alt-odb-path'

* wh/normalize-alt-odb-path:
  sha1_file: normalize alt_odb path before comparing and storing

12 years agoMerge branch 'jc/run-receive-hook-cleanup'
Junio C Hamano [Wed, 5 Oct 2011 19:36:22 +0000 (12:36 -0700)] 
Merge branch 'jc/run-receive-hook-cleanup'

* jc/run-receive-hook-cleanup:
  refactor run_receive_hook()

12 years agoMerge branch 'hl/iso8601-more-zone-formats'
Junio C Hamano [Wed, 5 Oct 2011 19:36:22 +0000 (12:36 -0700)] 
Merge branch 'hl/iso8601-more-zone-formats'

* hl/iso8601-more-zone-formats:
  date.c: Support iso8601 timezone formats

12 years agoMerge branch 'rj/quietly-create-dep-dir'
Junio C Hamano [Wed, 5 Oct 2011 19:36:21 +0000 (12:36 -0700)] 
Merge branch 'rj/quietly-create-dep-dir'

* rj/quietly-create-dep-dir:
  Makefile: Make dependency directory creation less noisy

12 years agoMerge branch 'jc/receive-verify'
Junio C Hamano [Wed, 5 Oct 2011 19:36:21 +0000 (12:36 -0700)] 
Merge branch 'jc/receive-verify'

* jc/receive-verify:
  receive-pack: check connectivity before concluding "git push"
  check_everything_connected(): libify
  check_everything_connected(): refactor to use an iterator
  fetch: verify we have everything we need before updating our ref

Conflicts:
builtin/fetch.c

12 years agoMerge branch 'jc/fetch-verify'
Junio C Hamano [Wed, 5 Oct 2011 19:36:20 +0000 (12:36 -0700)] 
Merge branch 'jc/fetch-verify'

* jc/fetch-verify:
  fetch: verify we have everything we need before updating our ref
  rev-list --verify-object
  list-objects: pass callback data to show_objects()

12 years agoMerge branch 'jc/fetch-pack-fsck-objects'
Junio C Hamano [Wed, 5 Oct 2011 19:36:20 +0000 (12:36 -0700)] 
Merge branch 'jc/fetch-pack-fsck-objects'

* jc/fetch-pack-fsck-objects:
  test: fetch/receive with fsckobjects
  transfer.fsckobjects: unify fetch/receive.fsckobjects
  fetch.fsckobjects: verify downloaded objects

Conflicts:
Documentation/config.txt
builtin/fetch-pack.c

12 years agoMerge branch 'jc/traverse-commit-list'
Junio C Hamano [Wed, 5 Oct 2011 19:36:19 +0000 (12:36 -0700)] 
Merge branch 'jc/traverse-commit-list'

* jc/traverse-commit-list:
  revision.c: update show_object_with_name() without using malloc()
  revision.c: add show_object_with_name() helper function
  rev-list: fix finish_object() call

12 years agoMerge branch 'rr/revert-cherry-pick-continue'
Junio C Hamano [Wed, 5 Oct 2011 19:36:19 +0000 (12:36 -0700)] 
Merge branch 'rr/revert-cherry-pick-continue'

* rr/revert-cherry-pick-continue:
  builtin/revert.c: make commit_list_append() static
  revert: Propagate errors upwards from do_pick_commit
  revert: Introduce --continue to continue the operation
  revert: Don't implicitly stomp pending sequencer operation
  revert: Remove sequencer state when no commits are pending
  reset: Make reset remove the sequencer state
  revert: Introduce --reset to remove sequencer state
  revert: Make pick_commits functionally act on a commit list
  revert: Save command-line options for continuing operation
  revert: Save data for continuing after conflict resolution
  revert: Don't create invalid replay_opts in parse_args
  revert: Separate cmdline parsing from functional code
  revert: Introduce struct to keep command-line options
  revert: Eliminate global "commit" variable
  revert: Rename no_replay to record_origin
  revert: Don't check lone argument in get_encoding
  revert: Simplify and inline add_message_to_msg
  config: Introduce functions to write non-standard file
  advice: Introduce error_resolve_conflict

12 years agoMerge branch 'da/make-auto-header-dependencies'
Junio C Hamano [Wed, 5 Oct 2011 19:36:18 +0000 (12:36 -0700)] 
Merge branch 'da/make-auto-header-dependencies'

* da/make-auto-header-dependencies:
  Makefile: Improve compiler header dependency check

12 years agoMerge branch 'gb/am-hg-patch'
Junio C Hamano [Wed, 5 Oct 2011 19:36:17 +0000 (12:36 -0700)] 
Merge branch 'gb/am-hg-patch'

* gb/am-hg-patch:
  am: preliminary support for hg patches

12 years agoMerge branch 'bc/unstash-clean-crufts'
Junio C Hamano [Wed, 5 Oct 2011 19:36:17 +0000 (12:36 -0700)] 
Merge branch 'bc/unstash-clean-crufts'

* bc/unstash-clean-crufts:
  git-stash: remove untracked/ignored directories when stashed
  t/t3905: add missing '&&' linkage
  git-stash.sh: fix typo in error message
  t/t3905: use the name 'actual' for test output, swap arguments to test_cmp

12 years agoMerge branch 'fk/make-auto-header-dependencies'
Junio C Hamano [Wed, 5 Oct 2011 19:36:16 +0000 (12:36 -0700)] 
Merge branch 'fk/make-auto-header-dependencies'

* fk/make-auto-header-dependencies:
  Makefile: Use computed header dependencies if the compiler supports it

12 years agoMerge branch 'ms/patch-id-with-overlong-line'
Junio C Hamano [Wed, 5 Oct 2011 19:35:55 +0000 (12:35 -0700)] 
Merge branch 'ms/patch-id-with-overlong-line'

* ms/patch-id-with-overlong-line:
  patch-id.c: use strbuf instead of a fixed buffer

12 years agoMerge branch 'jc/maint-bundle-too-quiet'
Junio C Hamano [Wed, 5 Oct 2011 19:35:55 +0000 (12:35 -0700)] 
Merge branch 'jc/maint-bundle-too-quiet'

* jc/maint-bundle-too-quiet:
  Teach progress eye-candy to fetch_refs_from_bundle()

12 years agoMerge branch 'jk/filter-branch-require-clean-work-tree'
Junio C Hamano [Wed, 5 Oct 2011 19:35:55 +0000 (12:35 -0700)] 
Merge branch 'jk/filter-branch-require-clean-work-tree'

* jk/filter-branch-require-clean-work-tree:
  filter-branch: use require_clean_work_tree

12 years agoMerge branch 'jc/want-commit'
Junio C Hamano [Wed, 5 Oct 2011 19:35:55 +0000 (12:35 -0700)] 
Merge branch 'jc/want-commit'

* jc/want-commit:
  Allow git merge ":/<pattern>"

12 years agoMerge branch 'jc/maint-fsck-fwrite-size-check'
Junio C Hamano [Wed, 5 Oct 2011 19:35:54 +0000 (12:35 -0700)] 
Merge branch 'jc/maint-fsck-fwrite-size-check'

* jc/maint-fsck-fwrite-size-check:
  fsck: do not abort upon finding an empty blob

12 years agoMerge branch 'bk/ancestry-path'
Junio C Hamano [Wed, 5 Oct 2011 19:35:54 +0000 (12:35 -0700)] 
Merge branch 'bk/ancestry-path'

* bk/ancestry-path:
  t6019: avoid refname collision on case-insensitive systems
  revision: do not include sibling history in --ancestry-path output
  revision: keep track of the end-user input from the command line
  rev-list: Demonstrate breakage with --ancestry-path --all

12 years agoMerge branch 'jk/maint-fetch-submodule-check-fix'
Junio C Hamano [Wed, 5 Oct 2011 19:35:54 +0000 (12:35 -0700)] 
Merge branch 'jk/maint-fetch-submodule-check-fix'

* jk/maint-fetch-submodule-check-fix:
  fetch: avoid quadratic loop checking for updated submodules

12 years agoMerge branch 'tr/mergetool-valgrind'
Junio C Hamano [Wed, 5 Oct 2011 19:35:53 +0000 (12:35 -0700)] 
Merge branch 'tr/mergetool-valgrind'

* tr/mergetool-valgrind:
  Symlink mergetools scriptlets into valgrind wrappers

12 years agoMerge branch 'nm/grep-object-sha1-lock'
Junio C Hamano [Wed, 5 Oct 2011 19:35:53 +0000 (12:35 -0700)] 
Merge branch 'nm/grep-object-sha1-lock'

* nm/grep-object-sha1-lock:
  grep: Fix race condition in delta_base_cache

Conflicts:
builtin/grep.c

12 years agoMerge branch 'jc/diff-index-unpack'
Junio C Hamano [Wed, 5 Oct 2011 19:35:53 +0000 (12:35 -0700)] 
Merge branch 'jc/diff-index-unpack'

* jc/diff-index-unpack:
  diff-index: pass pathspec down to unpack-trees machinery
  unpack-trees: allow pruning with pathspec
  traverse_trees(): allow pruning with pathspec

12 years agoMerge branch 'mm/rebase-i-exec-edit'
Junio C Hamano [Wed, 5 Oct 2011 19:35:52 +0000 (12:35 -0700)] 
Merge branch 'mm/rebase-i-exec-edit'

* mm/rebase-i-exec-edit:
  rebase -i: notice and warn if "exec $cmd" modifies the index or the working tree
  rebase -i: clean error message for --continue after failed exec

12 years agouse -h for synopsis and --help for manpage consistently
Clemens Buchacher [Mon, 3 Oct 2011 18:21:36 +0000 (20:21 +0200)] 
use -h for synopsis and --help for manpage consistently

A few scripted Porcelain implementations pretend as if the routine to show
their own help messages are triggered upon "git cmd --help", but a command
line parser of "git" will hijack such a request and shows the manpage for
the cmd subcommand.

Leaving the code to handle such input is simply misleading.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoSupport ERR in remote archive like in fetch/push
Ilari Liusvaara [Mon, 3 Oct 2011 11:01:59 +0000 (14:01 +0300)] 
Support ERR in remote archive like in fetch/push

Make ERR as first packet of remote snapshot reply work like it does in
fetch/push. Lets servers decline remote snapshot with message the same
way as declining fetch/push with a message.

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoremote-curl: Fix warning after HTTP failure
Shawn O. Pearce [Tue, 4 Oct 2011 23:20:19 +0000 (16:20 -0700)] 
remote-curl: Fix warning after HTTP failure

If the HTTP connection is broken in the middle of a fetch or clone
body, the client presented a useless error message due to part of
the upload-pack->remote-curl pkt-line protocol leaking out of the
helper as the helper's "fetch result":

  error: RPC failed; result=18, HTTP code = 200
  fatal: The remote end hung up unexpectedly
  fatal: early EOF
  fatal: unpack-objects failed
  warning: https unexpectedly said: '0000'

Instead when the HTTP RPC fails discard all remaining data from
upload-pack and report nothing to the transport helper. Errors
were already sent to stderr.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jc/maint-grep-untracked-exclude' into jc/grep-untracked-exclude
Junio C Hamano [Wed, 5 Oct 2011 01:40:41 +0000 (18:40 -0700)] 
Merge branch 'jc/maint-grep-untracked-exclude' into jc/grep-untracked-exclude

* jc/maint-grep-untracked-exclude:
  grep: teach --untracked and --exclude-standard options
  grep --no-index: don't use git standard exclusions
  grep: do not use --index in the short usage output

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

12 years agogrep: teach --untracked and --exclude-standard options
Junio C Hamano [Tue, 27 Sep 2011 20:43:12 +0000 (13:43 -0700)] 
grep: teach --untracked and --exclude-standard options

In a working tree of a git managed repository, "grep --untracked" would
find the specified patterns from files in untracked files in addition to
its usual behaviour of finding them in the tracked files.

By default, when working with "--no-index" option, "grep" does not pay
attention to .gitignore mechanism. "grep --no-index --exclude-standard"
can be used to tell the command to use .gitignore and stop reporting hits
from files that would be ignored. Also, when working without "--no-index",
"grep" honors .gitignore mechanism, and "grep --no-exclude-standard" can
be used to tell the command to include hits from files that are ignored.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodaemon: log errors if we could not use some sockets
Nguyễn Thái Ngọc Duy [Mon, 3 Oct 2011 19:13:28 +0000 (06:13 +1100)] 
daemon: log errors if we could not use some sockets

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodaemon: return "access denied" if a service is not allowed
Nguyễn Thái Ngọc Duy [Mon, 3 Oct 2011 21:55:09 +0000 (08:55 +1100)] 
daemon: return "access denied" if a service is not allowed

The message is chosen to avoid leaking information, yet let users know
that they are deliberately not allowed to use the service, not a fault
in service configuration or the service itself.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agopack-protocol: document "ERR" line
Nguyen Thai Ngoc Duy [Mon, 3 Oct 2011 18:13:38 +0000 (05:13 +1100)] 
pack-protocol: document "ERR" line

Since a807328 (connect.c: add a way for git-daemon to pass an error
back to client), git client recognizes "ERR" line and prints a
friendly message to user if an error happens at server side.

Document this.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMakefile: do not set setgid bit on directories on GNU/kFreeBSD
Jonathan Nieder [Mon, 3 Oct 2011 06:41:20 +0000 (01:41 -0500)] 
Makefile: do not set setgid bit on directories on GNU/kFreeBSD

The g+s bit on directories to make group ownership inherited is a
SysVism --- BSD and most of its descendants do not need it since they
do the sane thing by default without g+s.  In fact, on some
filesystems (but not all --- tmpfs works this way but UFS does not),
the kernel of FreeBSD does not even allow non-root users to set setgid
bit on directories and produces errors when one tries:

$ git init --shared dir
fatal: Could not make /tmp/dir/.git/refs writable by group

Since the setgid bit would only mean "do what you were going to do
already", it's better to avoid setting it.  Accordingly, ever since
v1.5.5-rc0~59^2 (Do not use GUID on dir in git init --share=all on
FreeBSD, 2008-03-05), git on true FreeBSD has done exactly that.  Set
DIR_HAS_BSD_GROUP_SEMANTICS in the makefile for GNU/kFreeBSD, too, so
machines that use glibc with the kernel of FreeBSD get the same fix.

This fixes t0001-init.sh and t1301-shared-repo.sh on GNU/kFreeBSD
when running tests with --root pointing to a directory that uses
tmpfs.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoident: check /etc/mailname if email is unknown
Jonathan Nieder [Mon, 3 Oct 2011 06:16:33 +0000 (01:16 -0500)] 
ident: check /etc/mailname if email is unknown

Before falling back to gethostname(), check /etc/mailname if
GIT_AUTHOR_EMAIL is not set in the environment or through config
files.  Only fall back if /etc/mailname cannot be opened or read.

The /etc/mailname convention comes from Debian policy section 11.6
("mail transport, delivery and user agents"), though maybe it could be
useful sometimes on other machines, too.  The lack of this support was
noticed by various people in different ways:

 - Ian observed that git was choosing the address
   'ian@anarres.relativity.greenend.org.uk' rather than
   'ian@davenant.greenend.org.uk' as it should have done.

 - Jonathan noticed that operations like "git commit" were needlessly
   slow when using a resolver that was slow to handle reverse DNS
   lookups.

Alas, after this patch, if /etc/mailname is set up and the [user] name
and email configuration aren't, the committer email will not provide a
charming reminder of which machine commits were made on any more.  But
I think it's worth it.

Mechanics: the functionality of reading mailname goes in its own
function, so people who care about other distros can easily add an
implementation to a similar location without making copy_email() too
long and losing clarity.  While at it, we split out the fallback
default logic that does gethostname(), too (rearranging it a little
and adding a check for errors from gethostname while at it).

Based on a patch by Gerrit Pape <pape@smarden.org>.

Requested-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Improved-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodiff: resurrect XDF_NEED_MINIMAL with --minimal
Junio C Hamano [Sun, 2 Oct 2011 04:56:28 +0000 (21:56 -0700)] 
diff: resurrect XDF_NEED_MINIMAL with --minimal

Earlier, 582aa00 (git diff too slow for a file, 2010-05-02)
unconditionally dropped XDF_NEED_MINIMAL option from the internal xdiff
invocation to help performance on pathological cases, while hinting that a
follow-up patch could reintroduce it with "--minimal" option from the
command line.

Make it so.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoname-rev: split usage string
René Scharfe [Sat, 1 Oct 2011 17:04:44 +0000 (19:04 +0200)] 
name-rev: split usage string

Give each mode of operation (all, from stdin, given commits) its own usage
line to make it easier to see that they are mutually exclusive.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agotest-ctype: add test for is_pathspec_magic
René Scharfe [Sat, 1 Oct 2011 16:39:58 +0000 (18:39 +0200)] 
test-ctype: add test for is_pathspec_magic

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agotest-ctype: macrofy
René Scharfe [Sat, 1 Oct 2011 16:36:14 +0000 (18:36 +0200)] 
test-ctype: macrofy

Rewrite test-ctype to use a global variable and a macro instead of
wrapper functions for each character class and complicated structs
with loops going through them.  The resulting code may be uglier,
but that's OK for a test program, and it's actually easier to read
and extend.  And much shorter.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocommit: factor out clear_commit_marks_for_object_array
René Scharfe [Sat, 1 Oct 2011 16:16:08 +0000 (18:16 +0200)] 
commit: factor out clear_commit_marks_for_object_array

Factor out the code to clear the commit marks for a whole struct
object_array from builtin/checkout.c into its own exported function
clear_commit_marks_for_object_array and use it in bisect and bundle
as well.  It handles tags and commits and ignores objects of any
other type.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocheckout: use leak_pending flag
René Scharfe [Sat, 1 Oct 2011 16:09:36 +0000 (18:09 +0200)] 
checkout: use leak_pending flag

Instead of going through all the references again when we clear the
commit marks, do it like bisect and bundle and gain ownership of the
list of pending objects which we constructed from those references.

We simply copy the struct object_array that points to the list, set
the flag leak_pending and then prepare_revision_walk won't destroy
it and it's ours.  We use it to clear the marks and  free it at the
end.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agobundle: use leak_pending flag
René Scharfe [Sat, 1 Oct 2011 16:02:36 +0000 (18:02 +0200)] 
bundle: use leak_pending flag

Instead of creating a copy of the list of pending objects, copy the
struct object_array that points to it, turn on leak_pending, and thus
cause prepare_revision_walk to leave it to us.  And free it once
we're done.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agobisect: use leak_pending flag
René Scharfe [Sat, 1 Oct 2011 16:01:12 +0000 (18:01 +0200)] 
bisect: use leak_pending flag

Instead of creating a copy of the list of pending objects, copy the
struct object_array that points to it, turn on leak_pending, and thus
cause prepare_revision_walk to leave it to us.  And free it once
we're done.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agorevision: add leak_pending flag
René Scharfe [Sat, 1 Oct 2011 15:56:08 +0000 (17:56 +0200)] 
revision: add leak_pending flag

The new flag leak_pending in struct rev_info can be used to prevent
prepare_revision_walk from freeing the list of pending objects.  It
will still forget about them, so it really is leaked.  This behaviour
may look weird at first, but it can be useful if the pointer to the
list is saved before calling prepare_revision_walk.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocheckout: use add_pending_{object,sha1} in orphan check
René Scharfe [Sat, 1 Oct 2011 15:51:39 +0000 (17:51 +0200)] 
checkout: use add_pending_{object,sha1} in orphan check

Instead of building a list of textual arguments for setup_revisions, use
add_pending_object and add_pending_sha1 to queue the objects directly.
This is both faster and simpler.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agorevision: factor out add_pending_sha1
René Scharfe [Sat, 1 Oct 2011 15:43:52 +0000 (17:43 +0200)] 
revision: factor out add_pending_sha1

This function is a combination of the static get_reference and
add_pending_object.  It can be used to easily queue objects by hash.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocheckout: check for "Previous HEAD" notice in t2020
René Scharfe [Sat, 1 Oct 2011 15:38:34 +0000 (17:38 +0200)] 
checkout: check for "Previous HEAD" notice in t2020

If we leave a detached head, exactly one of two things happens: either
checkout warns about it being an orphan or describes it as a courtesy.
Test t2020 already checked that the warning is shown as needed.  This
patch also checks for the description.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agourl.c: simplify is_url()
Junio C Hamano [Mon, 3 Oct 2011 17:56:42 +0000 (10:56 -0700)] 
url.c: simplify is_url()

The function was implemented in an overly complicated way.
Rewrite it to check from left to right in a single pass.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-web--browse: avoid the use of eval
Chris Packham [Sun, 2 Oct 2011 00:44:17 +0000 (13:44 +1300)] 
git-web--browse: avoid the use of eval

Using eval causes problems when the URL contains an appropriately
escaped ampersand (\&). Dropping eval from the built-in browser
invocation avoids the problem.

Helped-by: Jeff King <peff@peff.net> (test case)
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.7 v1.7.7
Junio C Hamano [Fri, 30 Sep 2011 21:20:57 +0000 (14:20 -0700)] 
Git 1.7.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agouse new Git::config_path() for aliasesfile
Cord Seele [Fri, 30 Sep 2011 10:52:25 +0000 (12:52 +0200)] 
use new Git::config_path() for aliasesfile

Signed-off-by: Cord Seele <cowose@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoAdd Git::config_path()
Cord Seele [Fri, 30 Sep 2011 10:52:24 +0000 (12:52 +0200)] 
Add Git::config_path()

Use --path option when calling 'git config' thus allow for pathname
expansion, e.g. a tilde.

Signed-off-by: Cord Seele <cowose@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorefs: Use binary search to lookup refs faster
Julian Phillips [Thu, 29 Sep 2011 22:11:42 +0000 (23:11 +0100)] 
refs: Use binary search to lookup refs faster

Currently we linearly search through lists of refs when we need to
find a specific ref.  This can be very slow if we need to lookup a
large number of refs.  By changing to a binary search we can make this
faster.

In order to be able to use a binary search we need to change from
using linked lists to arrays, which we can manage using ALLOC_GROW.

We can now also use the standard library qsort function to sort the
refs arrays.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosend-email: auth plain/login fix
Zbigniew Jędrzejewski-Szmek [Thu, 29 Sep 2011 17:02:45 +0000 (19:02 +0200)] 
send-email: auth plain/login fix

git send-email was not authenticating properly when communicating over
TLS with a server supporting only AUTH PLAIN and AUTH LOGIN. This is
e.g. the standard server setup under debian with exim4 and probably
everywhere where system accounts are used.

The problem (only?) exists when libauthen-sasl-cyrus-perl
(Authen::SASL::Cyrus) is installed. Importing Authen::SASL::Perl
makes Authen::SASL use the perl implementation which works
better.

The solution is based on this forum thread:
http://www.perlmonks.org/?node_id=904354.

This patch is tested by sending it. Without this fix, the interaction with
the server failed like this:

$ git send-email --smtp-encryption=tls --smtp-server=... --smtp-debug=1 change1.patch
...
Net::SMTP::SSL=GLOB(0x238f668)<<< 250-AUTH LOGIN PLAIN
Password:
Net::SMTP::SSL=GLOB(0x238f668)>>> AUTH
Net::SMTP::SSL=GLOB(0x238f668)<<< 501 5.5.2 AUTH mechanism must be specified
5.5.2 AUTH mechanism must be specified

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotree-walk: micro-optimization in tree_entry_interesting
Dan McGee [Fri, 9 Sep 2011 02:02:46 +0000 (21:02 -0500)] 
tree-walk: micro-optimization in tree_entry_interesting

In the case of a wide breadth top-level tree (~2400 entries, all trees
in this case), we can see a noticeable cost in the profiler calling
strncmp() here. Most of the time we are at the base level of the
repository, so base is "" and baselen == 0, which means we will always
test true. Break out this one tiny case so we can short circuit the
strncmp() call.

Test cases are as follows. packages.git is the Arch Linux git-svn clone
of the packages repository which has the characteristics above.

Commands:
[1] packages.git, /usr/bin/time git log >/dev/null
[2] packages.git, /usr/bin/time git log -- autogen/trunk pacman/trunk wget/trunk >/dev/null
[3] linux.git, /usr/bin/time git log >/dev/null
[4] linux.git, /usr/bin/time git log -- drivers/ata drivers/uio tools >/dev/null

Results:
     before  after  %faster
[1]   2.56    2.55   0.4%
[2]  51.82   48.66   6.5%
[3]   5.58    5.61  -0.5%
[4]   1.55    1.51   0.2%

The takeaway here is this doesn't matter in many operations, but it does
for a certain style of repository and operation where it nets a 6.5%
measured improvement. The other changes are likely not significant by
reasonable statistics methods.

Note: the measured improvement when originally submitted was ~11% (43 to
38 secs) for operation [2]. At the time, the repository had 117220
commits; it now has 137537 commits.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotree-walk: drop unused parameter from match_dir_prefix
Dan McGee [Fri, 9 Sep 2011 02:02:45 +0000 (21:02 -0500)] 
tree-walk: drop unused parameter from match_dir_prefix

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-remote-mediawiki: allow a domain to be set for authentication
Matthieu Moy [Wed, 28 Sep 2011 13:48:01 +0000 (15:48 +0200)] 
git-remote-mediawiki: allow a domain to be set for authentication

When the wiki uses e.g. LDAP for authentication, the web interface shows
a popup to allow the user to chose an authentication domain, and we need
to use lgdomain in the API at login time.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoapply: use OPT_NOOP_NOARG
René Scharfe [Wed, 28 Sep 2011 17:47:54 +0000 (19:47 +0200)] 
apply: use OPT_NOOP_NOARG

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorevert: use OPT_NOOP_NOARG
René Scharfe [Wed, 28 Sep 2011 17:47:50 +0000 (19:47 +0200)] 
revert: use OPT_NOOP_NOARG

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoparseopt: add OPT_NOOP_NOARG
René Scharfe [Wed, 28 Sep 2011 17:44:30 +0000 (19:44 +0200)] 
parseopt: add OPT_NOOP_NOARG

Add OPT_NOOP_NOARG, a helper macro to define deprecated options in a
standard way.  The help text is taken from the no-op option -r of
git revert.

The callback could be made to emit a (conditional?) warning later.  And
we could also add OPT_NOOP (requiring an argument) etc. as needed.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoarchive.c: use OPT_BOOL()
Junio C Hamano [Tue, 27 Sep 2011 23:59:01 +0000 (16:59 -0700)] 
archive.c: use OPT_BOOL()

The list variable (which is OPT_BOOLEAN) is initialized to 0 and only
checked against 0 in the code, so it is safe to use OPT_BOOL().

The worktree_attributes variable (which is OPT_BOOLEAN) is initialized to
0 and later assigned to a field with the same name in struct archive_args,
which is a bitfield of width 1. It is safe and even more correct to use
OPT_BOOL() here; the new test in 5001 demonstrates why using OPT_COUNTUP
is wrong.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoparse-options: deprecate OPT_BOOLEAN
Junio C Hamano [Tue, 27 Sep 2011 23:56:49 +0000 (16:56 -0700)] 
parse-options: deprecate OPT_BOOLEAN

It is natural to expect that an option defined with OPT_BOOLEAN() could be
used in this way:

int option = -1; /* unspecified */

struct option options[] = {
OPT_BOOLEAN(0, "option", &option, "set option"),
                OPT_END()
};
parse_options(ac, av, prefix, options, usage, 0);

        if (option < 0)
         ... do the default thing ...
else if (!option)
... --no-option was given ...
else
... --option was given ...

to easily tell three cases apart:

 - There is no mention of the `--option` on the command line;
 - The variable is positively set with `--option`; or
 - The variable is explicitly negated with `--no-option`.

Unfortunately, this is not the case. OPT_BOOLEAN() increments the variable
every time `--option` is given, and resets it to zero when `--no-option`
is given.

As a first step to remedy this, introduce a true boolean OPT_BOOL(), and
rename OPT_BOOLEAN() to OPT_COUNTUP(). To help transitioning, OPT_BOOLEAN
and OPTION_BOOLEAN are defined as deprecated synonyms to OPT_COUNTUP and
OPTION_COUNTUP respectively.

This is what db7244b (parse-options new features., 2007-11-07) from four
years ago started by marking OPTION_BOOLEAN as "INCR would have been a
better name".

Some existing users do depend on the count-up semantics; for example,
users of OPT__VERBOSE() could use it to raise the verbosity level with
repeated use of `-v` on the command line, but they probably should be
rewritten to use OPT__VERBOSITY() instead these days.  I suspect that some
users of OPT__FORCE() may also use it to implement different level of
forcibleness but I didn't check.

On top of this patch, here are the remaining clean-up tasks that other
people can help:

 - Look at each hit in "git grep -e OPT_BOOLEAN"; trace all uses of the
   value that is set to the underlying variable, and if it can proven that
   the variable is only used as a boolean, replace it with OPT_BOOL(). If
   the caller does depend on the count-up semantics, replace it with
   OPT_COUNTUP() instead.

 - Same for OPTION_BOOLEAN; replace it with OPTION_SET_INT and arrange to
   set 1 to the variable for a true boolean, and otherwise replace it with
   OPTION_COUNTUP.

 - Look at each hit in "git grep -e OPT__VERBOSE -e OPT__QUIET" and see if
   they can be replaced with OPT__VERBOSITY().

I'll follow this message up with a separate patch as an example.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-remote-mediawiki: obey advice.pushNonFastForward
Matthieu Moy [Tue, 27 Sep 2011 17:55:00 +0000 (19:55 +0200)] 
git-remote-mediawiki: obey advice.pushNonFastForward

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-remote-mediawiki: set 'basetimestamp' to let the wiki handle conflicts
Matthieu Moy [Tue, 27 Sep 2011 17:54:59 +0000 (19:54 +0200)] 
git-remote-mediawiki: set 'basetimestamp' to let the wiki handle conflicts

We already have a check that no new revisions are on the wiki at the
beginning of the push, but this didn't handle concurrent accesses to the
wiki.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-remote-mediawiki: trivial fixes
Matthieu Moy [Tue, 27 Sep 2011 17:54:58 +0000 (19:54 +0200)] 
git-remote-mediawiki: trivial fixes

Fix a whitespace issue (no space before :) and remove unused %status in
mw_push.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotemplates/hooks--*: remove sample hooks without any functionality
Gerrit Pape [Tue, 27 Sep 2011 11:56:53 +0000 (11:56 +0000)] 
templates/hooks--*: remove sample hooks without any functionality

Remove the sample post-commit and post-receive hooks.  The sample
post-commit doesn't contain any sample functionality and the comments do
not provide more information than already found in the documentation.
The sample post-receive hooks doesn't provide any sample functionality
either and refers in the comments to a contrib hook that might be
installed in different locations on different systems, which isn't that
helpful.

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agonotes_merge_commit(): do not pass temporary buffer to other function
Michael Haggerty [Tue, 27 Sep 2011 04:46:53 +0000 (06:46 +0200)] 
notes_merge_commit(): do not pass temporary buffer to other function

It is unsafe to pass a temporary buffer as an argument to
read_directory().

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogitweb: Fix links to lines in blobs when javascript-actions are enabled
Peter Stuge [Tue, 27 Sep 2011 09:51:00 +0000 (11:51 +0200)] 
gitweb: Fix links to lines in blobs when javascript-actions are enabled

The fixLinks() function adds 'js=1' to each link that does not already
have 'js' query parameter specified. This is used to signal to gitweb
that the browser can actually do javascript when these links are used.

There are two problems with the existing code:

  1. URIs with fragment and 'js' query parameter, like e.g.

        ...foo?js=0#l199

     were not recognized as having 'js' query parameter already.

  2. The 'js' query parameter, in the form of either '?js=1' or ';js=1'
     was appended at the end of URI, even if it included a fragment
     (had a hash part).  This lead to the incorrect links like this

        ...foo#l199?js=1

     instead of adding query parameter as last part of query, but
     before the fragment part, i.e.

        ...foo?js=1#l199

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDon't sort ref_list too early
Julian Phillips [Tue, 27 Sep 2011 00:00:09 +0000 (01:00 +0100)] 
Don't sort ref_list too early

get_ref_dir is called recursively for subdirectories, which means that
we were calling sort_ref_list for each directory of refs instead of
once for all the refs.  This is a massive wast of processing, so now
just call sort_ref_list on the result of the top-level get_ref_dir, so
that the sort is only done once.

In the common case of only a few different directories of refs the
difference isn't very noticable, but it becomes very noticeable when
you have a large number of direcotries containing refs (e.g. as
created by Gerrit).

Reported by Martin Fick.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocontrib/hooks: adapt comment about Debian install location for contrib hooks
Gerrit Pape [Mon, 26 Sep 2011 12:58:35 +0000 (12:58 +0000)] 
contrib/hooks: adapt comment about Debian install location for contrib hooks

Placing the contrib hooks into /usr/share/doc/ wasn't a good idea in the
first place.  According to the Debian policy they should be located in
/usr/share/git-core/, so let's put them there.

Thanks to Bill Allombert for reporting this through
 http://bugs.debian.org/640949

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoapply --whitespace=error: correctly report new blank lines at end
Junio C Hamano [Mon, 26 Sep 2011 20:30:30 +0000 (13:30 -0700)] 
apply --whitespace=error: correctly report new blank lines at end

Earlier, 77b15bb (apply --whitespace=warn/error: diagnose blank at EOF,
2009-09-03) cheated by reporting the line number of the hunk that contains
the offending line that adds new blank lines at the end of the file. All
other types of whitespace errors are reported with the line number in the
patch file that has the actual offending text.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoRevert removal of multi-match discard heuristic in 27af01
René Scharfe [Sun, 25 Sep 2011 13:39:08 +0000 (21:39 +0800)] 
Revert removal of multi-match discard heuristic in 27af01

27af01d (xdiff/xprepare: improve O(n*m) performance in
xdl_cleanup_records(), 2011-08-17) was supposed to be a performance
boost only. However, it unexpectedly changed the behaviour of diff.

Revert a part of 27af01d that removes logic that mark lines as
"multi-match" (ie. dis[i] == 2). This was preventing the multi-match
discard heuristic (performed in xdl_cleanup_records() and
xdl_clean_mmatch()) from executing.

Reported-by: Alexander Pepper <pepper@inf.fu-berlin.de>
Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jc/namespace-doc-with-old-asciidoc'
Junio C Hamano [Mon, 26 Sep 2011 17:50:08 +0000 (10:50 -0700)] 
Merge branch 'jc/namespace-doc-with-old-asciidoc'

* jc/namespace-doc-with-old-asciidoc:
  Documentation/gitnamespaces.txt: cater to older asciidoc

13 years agogit-read-tree.txt: update sparse checkout examples
Nguyễn Thái Ngọc Duy [Sun, 25 Sep 2011 23:09:15 +0000 (09:09 +1000)] 
git-read-tree.txt: update sparse checkout examples

The negation example uses '*' to match everything. This used to work
before 9037026 (unpack-trees: fix sparse checkout's "unable to match
directories") because back then, the list of paths is used to match
sparse patterns, so with the patterns

    *
    !subdir/

subdir/ always matches any path that start with subdir/ and "*" has no
chance to get tested. The result is subdir is excluded.

After the said commit, a tree structure is dynamically created and
sparse pattern matching now follows closely how read_directory()
applies .gitignore. This solves one problem, but reveals another one.

With this new strategy, "!subdir/" rule will be only tested once when
"subdir" directory is examined. Entries inside subdir, when examined,
will match "*" and are (correctly) re-added again because any rules
without a slash will match at every directory level. In the end, "*"
can revert every negation rules.

In order to correctly exclude subdir, we must use

    /*
    !subdir

to limit "match all" rule at top level only.

"*" rule has no actual use in sparse checkout and can be confusing to
users. While we can automatically turn "*" to "/*", this violates
.gitignore definition. Instead, discourage "*" in favor of "/*" (in
the second example).

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agomergetool: no longer need to save standard input
Junio C Hamano [Fri, 16 Sep 2011 20:19:33 +0000 (13:19 -0700)] 
mergetool: no longer need to save standard input

Earlier code wanted to run merge_file and prompt_after_failed_merge
both of which wanted to read from the standard input of the entire
script inside a while loop, which read from a pipe, and in order to
do so, it redirected the original standard input to another file
descriptor. We no longer need to do so after the previous change.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agomergetool: Use args as pathspec to unmerged files
Jonathon Mah [Fri, 16 Sep 2011 02:12:10 +0000 (19:12 -0700)] 
mergetool: Use args as pathspec to unmerged files

Mergetool now treats its path arguments as a pathspec (like other git
subcommands), restricting action to the given files and directories.
Files matching the pathspec are filtered so mergetool only acts on
unmerged paths; previously it would assume each path argument was in an
unresolved state, and get confused when it couldn't check out their
other stages.

Running "git mergetool subdir" will prompt to resolve all conflicted
blobs under subdir.

Signed-off-by: Jonathon Mah <me@JonathonMah.com>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.7-rc3 v1.7.7-rc3
Junio C Hamano [Fri, 23 Sep 2011 22:35:57 +0000 (15:35 -0700)] 
Git 1.7.7-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge 1.7.6.4 in
Junio C Hamano [Fri, 23 Sep 2011 22:31:08 +0000 (15:31 -0700)] 
Merge 1.7.6.4 in

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agomerge-recursive: Do not look at working tree during a virtual ancestor merge
Junio C Hamano [Fri, 23 Sep 2011 22:21:01 +0000 (15:21 -0700)] 
merge-recursive: Do not look at working tree during a virtual ancestor merge

Fix another instance of a recursive merge incorrectly paying attention to
the working tree file during a virtual ancestor merge, that resulted in
spurious and useless "addinfo_cache failed" error message.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.6.4 v1.7.6.4
Junio C Hamano [Fri, 23 Sep 2011 21:38:39 +0000 (14:38 -0700)] 
Git 1.7.6.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'cb/maint-ls-files-error-report' into maint
Junio C Hamano [Fri, 23 Sep 2011 21:30:49 +0000 (14:30 -0700)] 
Merge branch 'cb/maint-ls-files-error-report' into maint

* cb/maint-ls-files-error-report:
  t3005: do not assume a particular order of stdout and stderr of git-ls-files
  ls-files: fix pathspec display on error

13 years agodescribe: Refresh the index when run with --dirty
Allan Caffee [Mon, 1 Aug 2011 01:52:41 +0000 (21:52 -0400)] 
describe: Refresh the index when run with --dirty

When running git describe --dirty the index should be refreshed.  Previously
the cached index would cause describe to think that the index was dirty when,
in reality, it was just stale.

The issue was exposed by python setuptools which hardlinks files into another
directory when building a distribution.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jc/maint-clone-alternates' into maint
Junio C Hamano [Fri, 23 Sep 2011 21:27:33 +0000 (14:27 -0700)] 
Merge branch 'jc/maint-clone-alternates' into maint

* jc/maint-clone-alternates:
  clone: clone from a repository with relative alternates
  clone: allow more than one --reference

13 years agoMerge branch 'nd/maint-clone-gitdir' into maint
Junio C Hamano [Fri, 23 Sep 2011 21:21:39 +0000 (14:21 -0700)] 
Merge branch 'nd/maint-clone-gitdir' into maint

* nd/maint-clone-gitdir:
  clone: allow to clone from .git file
  read_gitfile_gently(): rename misnamed function to read_gitfile()

13 years agoMerge branch 'mh/check-ref-format-print-normalize' into maint
Junio C Hamano [Fri, 23 Sep 2011 21:20:51 +0000 (14:20 -0700)] 
Merge branch 'mh/check-ref-format-print-normalize' into maint

* mh/check-ref-format-print-normalize:
  Forbid DEL characters in reference names
  check-ref-format --print: Normalize refnames that start with slashes

13 years agoMerge branch 'mg/branch-set-upstream-previous' into maint
Junio C Hamano [Fri, 23 Sep 2011 21:16:22 +0000 (14:16 -0700)] 
Merge branch 'mg/branch-set-upstream-previous' into maint

* mg/branch-set-upstream-previous:
  branch.c: use the parsed branch name

13 years agoMerge branch 'gb/maint-am-patch-format-error-message' into maint
Junio C Hamano [Fri, 23 Sep 2011 21:11:18 +0000 (14:11 -0700)] 
Merge branch 'gb/maint-am-patch-format-error-message' into maint

* gb/maint-am-patch-format-error-message:
  am: format is in $patch_format, not parse_patch