Code

git.git
12 years agoMerge branch 'jk/fetch-no-tail-match-refs' into maint
Junio C Hamano [Wed, 28 Dec 2011 19:32:36 +0000 (11:32 -0800)]
Merge branch 'jk/fetch-no-tail-match-refs' into maint

* jk/fetch-no-tail-match-refs:
  connect.c: drop path_match function
  fetch-pack: match refs exactly
  t5500: give fully-qualified refs to fetch-pack
  drop "match" parameter from get_remote_heads

12 years agoMerge branch 'ew/keepalive' into maint
Junio C Hamano [Wed, 28 Dec 2011 19:32:36 +0000 (11:32 -0800)]
Merge branch 'ew/keepalive' into maint

* ew/keepalive:
  enable SO_KEEPALIVE for connected TCP sockets

12 years agoMerge branch 'ci/stripspace-docs' into maint
Junio C Hamano [Wed, 28 Dec 2011 19:32:35 +0000 (11:32 -0800)]
Merge branch 'ci/stripspace-docs' into maint

* ci/stripspace-docs:
  Update documentation for stripspace

12 years agoMerge branch 'jh/fast-import-notes' into maint
Junio C Hamano [Wed, 28 Dec 2011 19:32:35 +0000 (11:32 -0800)]
Merge branch 'jh/fast-import-notes' into maint

* jh/fast-import-notes:
  fast-import: Fix incorrect fanout level when modifying existing notes refs
  t9301: Add 2nd testcase exposing bugs in fast-import's notes fanout handling
  t9301: Fix testcase covering up a bug in fast-import's notes fanout handling

12 years agoMerge branch 'aw/rebase-i-stop-on-failure-to-amend' into maint
Junio C Hamano [Wed, 28 Dec 2011 19:32:34 +0000 (11:32 -0800)]
Merge branch 'aw/rebase-i-stop-on-failure-to-amend' into maint

* aw/rebase-i-stop-on-failure-to-amend:
  rebase -i: interrupt rebase when "commit --amend" failed during "reword"

12 years agoMerge branch 'tj/maint-imap-send-remove-unused' into maint
Junio C Hamano [Wed, 28 Dec 2011 19:32:34 +0000 (11:32 -0800)]
Merge branch 'tj/maint-imap-send-remove-unused' into maint

* tj/maint-imap-send-remove-unused:
  imap-send: Remove unused 'use_namespace' variable

12 years agoMerge branch 'jn/branch-move-to-self' into maint
Junio C Hamano [Wed, 28 Dec 2011 19:32:33 +0000 (11:32 -0800)]
Merge branch 'jn/branch-move-to-self' into maint

* jn/branch-move-to-self:
  Allow checkout -B <current-branch> to update the current branch
  branch: allow a no-op "branch -M <current-branch> HEAD"

12 years agoMerge branch 'na/strtoimax' into maint
Junio C Hamano [Wed, 28 Dec 2011 19:32:33 +0000 (11:32 -0800)]
Merge branch 'na/strtoimax' into maint

* na/strtoimax:
  Support sizes >=2G in various config options accepting 'g' sizes.
  Compatibility: declare strtoimax() under NO_STRTOUMAX
  Add strtoimax() compatibility function.

12 years agoMerge branch 'jk/refresh-porcelain-output' into maint
Junio C Hamano [Wed, 28 Dec 2011 19:32:32 +0000 (11:32 -0800)]
Merge branch 'jk/refresh-porcelain-output' into maint

* jk/refresh-porcelain-output:
  refresh_index: make porcelain output more specific
  refresh_index: rename format variables
  read-cache: let refresh_cache_ent pass up changed flags

12 years agoFix an incorrect reference to --set-all.
Jelmer Vernooij [Tue, 27 Dec 2011 02:03:45 +0000 (03:03 +0100)]
Fix an incorrect reference to --set-all.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: document and test submit options
Pete Wyckoff [Sun, 25 Dec 2011 02:07:40 +0000 (21:07 -0500)]
git-p4: document and test submit options

Clarify there is a -M option, but no -C.  These are both
configurable through variables.

Explain that the allowSubmit variable takes a comma-separated
list of branch names.

Catch earlier an invalid branch name given as an argument to
"git p4 clone".

Test option --origin, variable allowSubmit, and explicit master
branch name.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: test and document --use-client-spec
Pete Wyckoff [Sun, 25 Dec 2011 02:07:39 +0000 (21:07 -0500)]
git-p4: test and document --use-client-spec

The depot path is required, even with this option.  Make sure
git-p4 fails and exits with non-zero.

Contents in the specified depot path will be rearranged according
to the client spec.  Test this and add a note in the docs.

Leave an XXX suggesting that this is somewhat confusing behavior
that might be good to fix later.

Function stripRepoPath() looks at self.useClientSpec.  Make sure
this is set both for command-line option --use-client-spec and
for configuration variable git-p4.useClientSpec.  Test this.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: test --keep-path
Pete Wyckoff [Sun, 25 Dec 2011 02:07:38 +0000 (21:07 -0500)]
git-p4: test --keep-path

Make sure it leaves the path, below //depot, in git.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: test --max-changes
Pete Wyckoff [Sun, 25 Dec 2011 02:07:37 +0000 (21:07 -0500)]
git-p4: test --max-changes

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: document and test --import-local
Pete Wyckoff [Sun, 25 Dec 2011 02:07:36 +0000 (21:07 -0500)]
git-p4: document and test --import-local

Explain that it is needed on future syncs to find p4 branches
in refs/heads.  Test this behavior.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: honor --changesfile option and test
Pete Wyckoff [Sun, 25 Dec 2011 02:07:35 +0000 (21:07 -0500)]
git-p4: honor --changesfile option and test

When an explicit list of changes is given, it makes no sense to
use @all or @3,5 or any of the other p4 revision specifiers.
Make the code notice when this happens, instead of just ignoring
--changesfile.  Test it.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: document and test clone --branch
Pete Wyckoff [Sun, 25 Dec 2011 02:07:34 +0000 (21:07 -0500)]
git-p4: document and test clone --branch

Clone with --branch will not checkout HEAD, unless the branch
happens to be called the default refs/remotes/p4/master.  The
--branch option is most useful with sync; give an example of
that.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: test cloning with two dirs, clarify doc
Pete Wyckoff [Sun, 25 Dec 2011 02:07:33 +0000 (21:07 -0500)]
git-p4: test cloning with two dirs, clarify doc

Document how git-p4 currently works when specifying multiple
depot paths:

1.  No branches or directories are named.

2.  Conflicting files are silently ignored---the last change
    wins.

2.  Option --destination is required, else the last path is construed
    to be a directory.

3.  Revision specifiers must be the same on all paths for them to
    take effect.

Test this behavior.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: clone does not use --git-dir
Pete Wyckoff [Sun, 25 Dec 2011 02:07:32 +0000 (21:07 -0500)]
git-p4: clone does not use --git-dir

Complain if --git-dir is given during a clone.  It has no
effect.  Only --destination and --bare can change where the newly
cloned git dir will be.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: introduce asciidoc documentation
Pete Wyckoff [Sun, 25 Dec 2011 02:07:31 +0000 (21:07 -0500)]
git-p4: introduce asciidoc documentation

Add proper documentation for git-p4.  Delete the old .txt
documentation from contrib/fast-import.

Cc: Frans Klaver <fransklaver@gmail.com>
Cc: Luke Diamand <luke@diamand.org>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agorename git-p4 tests
Pete Wyckoff [Sun, 25 Dec 2011 02:07:30 +0000 (21:07 -0500)]
rename git-p4 tests

Use consistent naming for all tests: "t98<num>-git-p4-<topic>.sh"

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoUpdate draft release notes in preparation for 1.7.9-rc0
Junio C Hamano [Thu, 22 Dec 2011 23:36:48 +0000 (15:36 -0800)]
Update draft release notes in preparation for 1.7.9-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'tr/bash-read-unescaped'
Junio C Hamano [Thu, 22 Dec 2011 23:30:38 +0000 (15:30 -0800)]
Merge branch 'tr/bash-read-unescaped'

* tr/bash-read-unescaped:
  bash completion: use read -r everywhere

12 years agoMerge branch 'ab/sun-studio-portability'
Junio C Hamano [Thu, 22 Dec 2011 23:30:33 +0000 (15:30 -0800)]
Merge branch 'ab/sun-studio-portability'

* ab/sun-studio-portability:
  Appease Sun Studio by renaming "tmpfile"
  Fix a bitwise negation assignment issue spotted by Sun Studio
  Fix an enum assignment issue spotted by Sun Studio

12 years agoMerge branch 'tr/doc-sh-setup'
Junio C Hamano [Thu, 22 Dec 2011 23:30:29 +0000 (15:30 -0800)]
Merge branch 'tr/doc-sh-setup'

* tr/doc-sh-setup:
  git-sh-setup: make require_clean_work_tree part of the interface

12 years agoMerge branch 'rr/revert-cherry-pick'
Junio C Hamano [Thu, 22 Dec 2011 23:30:22 +0000 (15:30 -0800)]
Merge branch 'rr/revert-cherry-pick'

* rr/revert-cherry-pick:
  t3502, t3510: clarify cherry-pick -m failure
  t3510 (cherry-pick-sequencer): use exit status
  revert: simplify getting commit subject in format_todo()
  revert: tolerate extra spaces, tabs in insn sheet
  revert: make commit subjects in insn sheet optional
  revert: free msg in format_todo()

12 years agoMerge branch 'tr/pty-all'
Junio C Hamano [Thu, 22 Dec 2011 23:30:15 +0000 (15:30 -0800)]
Merge branch 'tr/pty-all'

* tr/pty-all:
  test-terminal: set output terminals to raw mode

12 years agoMerge branch 'jn/maint-gitweb-utf8-fix'
Junio C Hamano [Thu, 22 Dec 2011 23:30:12 +0000 (15:30 -0800)]
Merge branch 'jn/maint-gitweb-utf8-fix'

* jn/maint-gitweb-utf8-fix:
  gitweb: Fix fallback mode of to_utf8 subroutine
  gitweb: Output valid utf8 in git_blame_common('data')
  gitweb: esc_html() site name for title in OPML
  gitweb: Call to_utf8() on input string in chop_and_escape_str()

12 years agoUpdate draft release notes to 1.7.9
Junio C Hamano [Thu, 22 Dec 2011 19:43:02 +0000 (11:43 -0800)]
Update draft release notes to 1.7.9

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jk/maint-strbuf-missing-init'
Junio C Hamano [Thu, 22 Dec 2011 19:27:31 +0000 (11:27 -0800)]
Merge branch 'jk/maint-strbuf-missing-init'

* jk/maint-strbuf-missing-init:
  commit, merge: initialize static strbuf

Conflicts:
builtin/merge.c

12 years agoMerge branch 'jc/maint-lf-to-crlf-keep-crlf'
Junio C Hamano [Thu, 22 Dec 2011 19:27:29 +0000 (11:27 -0800)]
Merge branch 'jc/maint-lf-to-crlf-keep-crlf'

* jc/maint-lf-to-crlf-keep-crlf:
  lf_to_crlf_filter(): resurrect CRLF->CRLF hack

12 years agoMerge branch 'rs/diff-tree-combined-clean-up'
Junio C Hamano [Thu, 22 Dec 2011 19:27:29 +0000 (11:27 -0800)]
Merge branch 'rs/diff-tree-combined-clean-up'

* rs/diff-tree-combined-clean-up:
  submodule: use diff_tree_combined_merge() instead of diff_tree_combined()
  pass struct commit to diff_tree_combined_merge()
  use struct sha1_array in diff_tree_combined()

12 years agoMerge branch 'jk/maint-push-v-is-verbose'
Junio C Hamano [Thu, 22 Dec 2011 19:27:29 +0000 (11:27 -0800)]
Merge branch 'jk/maint-push-v-is-verbose'

* jk/maint-push-v-is-verbose:
  make "git push -v" actually verbose

12 years agoMerge branch 'tr/grep-threading'
Junio C Hamano [Thu, 22 Dec 2011 19:27:28 +0000 (11:27 -0800)]
Merge branch 'tr/grep-threading'

* tr/grep-threading:
  grep: disable threading in non-worktree case
  grep: enable threading with -p and -W using lazy attribute lookup
  grep: load funcname patterns for -W

12 years agoMerge branch 'jk/pretty-reglog-ent'
Junio C Hamano [Thu, 22 Dec 2011 19:27:28 +0000 (11:27 -0800)]
Merge branch 'jk/pretty-reglog-ent'

* jk/pretty-reglog-ent:
  pretty: give placeholders to reflog identity

12 years agoMerge branch 'jk/follow-rename-score'
Junio C Hamano [Thu, 22 Dec 2011 19:27:27 +0000 (11:27 -0800)]
Merge branch 'jk/follow-rename-score'

* jk/follow-rename-score:
  use custom rename score during --follow

12 years agoMerge branch 'jk/doc-fsck'
Junio C Hamano [Thu, 22 Dec 2011 19:27:27 +0000 (11:27 -0800)]
Merge branch 'jk/doc-fsck'

* jk/doc-fsck:
  docs: brush up obsolete bits of git-fsck manpage

Conflicts:
Documentation/git-fsck.txt

12 years agoMerge branch 'nd/war-on-nul-in-commit'
Junio C Hamano [Thu, 22 Dec 2011 19:27:26 +0000 (11:27 -0800)]
Merge branch 'nd/war-on-nul-in-commit'

* nd/war-on-nul-in-commit:
  commit_tree(): refuse commit messages that contain NULs
  Convert commit_tree() to take strbuf as message
  merge: abort if fails to commit

Conflicts:
builtin/commit.c
commit.c
commit.h

12 years agoMerge branch 'jk/maint-do-not-feed-stdin-to-tests'
Junio C Hamano [Thu, 22 Dec 2011 19:27:25 +0000 (11:27 -0800)]
Merge branch 'jk/maint-do-not-feed-stdin-to-tests'

* jk/maint-do-not-feed-stdin-to-tests:
  test-lib: redirect stdin of tests

12 years agoMerge branch 'jn/test-cleanup-7006'
Junio C Hamano [Thu, 22 Dec 2011 19:27:24 +0000 (11:27 -0800)]
Merge branch 'jn/test-cleanup-7006'

* jn/test-cleanup-7006:
  test: errors preparing for a test are not special

12 years agoMerge branch 'ef/setenv-putenv'
Junio C Hamano [Thu, 22 Dec 2011 19:27:24 +0000 (11:27 -0800)]
Merge branch 'ef/setenv-putenv'

* ef/setenv-putenv:
  compat/setenv.c: error if name contains '='
  compat/setenv.c: update errno when erroring out

12 years agoMerge branch 'jk/git-prompt'
Junio C Hamano [Thu, 22 Dec 2011 19:27:23 +0000 (11:27 -0800)]
Merge branch 'jk/git-prompt'

* jk/git-prompt:
  contrib: add credential helper for OS X Keychain
  Makefile: OS X has /dev/tty
  Makefile: linux has /dev/tty
  credential: use git_prompt instead of git_getpass
  prompt: use git_terminal_prompt
  add generic terminal prompt function
  refactor git_getpass into generic prompt function
  move git_getpass to its own source file
  imap-send: don't check return value of git_getpass
  imap-send: avoid buffer overflow

Conflicts:
Makefile

12 years agoMerge branch 'jk/http-push-to-empty'
Junio C Hamano [Thu, 22 Dec 2011 19:27:22 +0000 (11:27 -0800)]
Merge branch 'jk/http-push-to-empty'

* jk/http-push-to-empty:
  remote-curl: don't pass back fake refs

Conflicts:
remote-curl.c

12 years agoSync with v1.7.8.1
Junio C Hamano [Wed, 21 Dec 2011 20:02:39 +0000 (12:02 -0800)]
Sync with v1.7.8.1

12 years agoGit 1.7.8.1 v1.7.8.1
Junio C Hamano [Wed, 21 Dec 2011 20:02:13 +0000 (12:02 -0800)]
Git 1.7.8.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jl/submodule-status-failure-report' into maint
Junio C Hamano [Wed, 21 Dec 2011 19:42:45 +0000 (11:42 -0800)]
Merge branch 'jl/submodule-status-failure-report' into maint

* jl/submodule-status-failure-report:
  diff/status: print submodule path when looking for changes fails

12 years agoMerge branch 'tr/userdiff-c-returns-pointer' into maint
Junio C Hamano [Wed, 21 Dec 2011 19:42:45 +0000 (11:42 -0800)]
Merge branch 'tr/userdiff-c-returns-pointer' into maint

* tr/userdiff-c-returns-pointer:
  userdiff: allow * between cpp funcname words

12 years agoMerge branch 'bc/maint-apply-check-no-patch' into maint
Junio C Hamano [Wed, 21 Dec 2011 19:42:45 +0000 (11:42 -0800)]
Merge branch 'bc/maint-apply-check-no-patch' into maint

* bc/maint-apply-check-no-patch:
  builtin/apply.c: report error on failure to recognize input
  t/t4131-apply-fake-ancestor.sh: fix broken test

12 years agoMerge branch 'cn/maint-lf-to-crlf-filter' into maint
Junio C Hamano [Wed, 21 Dec 2011 19:42:44 +0000 (11:42 -0800)]
Merge branch 'cn/maint-lf-to-crlf-filter' into maint

* cn/maint-lf-to-crlf-filter:
  lf_to_crlf_filter(): tell the caller we added "\n" when draining
  convert: track state in LF-to-CRLF filter

12 years agoMerge branch 'jk/maint-upload-archive' into maint
Junio C Hamano [Wed, 21 Dec 2011 19:42:44 +0000 (11:42 -0800)]
Merge branch 'jk/maint-upload-archive' into maint

* jk/maint-upload-archive:
  archive: don't let remote clients get unreachable commits

12 years agobash completion: use read -r everywhere
Thomas Rast [Wed, 21 Dec 2011 15:54:14 +0000 (16:54 +0100)]
bash completion: use read -r everywhere

We use the 'read' command without -r, so that it treats '\' as an
escape character, in several places.  This breaks the loop reading
refnames from git-for-each-ref in __git_refs() if there are refnames
such as "foo'bar", in which case for-each-ref helpfully quotes them as

  $ git update-ref "refs/remotes/test/foo'bar" HEAD
  $ git for-each-ref --shell --format="ref=%(refname:short)" "refs/remotes"
  ref='test/foo'\''bar'

Interpolating the \' here will read "ref='test/foo'''bar'" instead, and
eval then chokes on the unbalanced quotes.

However, since none of the read loops _want_ to have backslashes
interpolated, it's much safer to use read -r everywhere.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoclone: the -o option has nothing to do with <branch>
Carlos Martín Nieto [Wed, 21 Dec 2011 18:14:09 +0000 (18:14 +0000)]
clone: the -o option has nothing to do with <branch>

It is to give an alternate <name> instead of "origin" to the remote
we are cloning from.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agobuiltin/log: remove redundant initialization
Michael Schubert [Wed, 21 Dec 2011 12:05:27 +0000 (13:05 +0100)]
builtin/log: remove redundant initialization

"abbrev" and "commit_format" in struct rev_info get initialized in
init_revisions - no need to reinit in cmd_log_init_defaults.

Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'ms/commit-cc-option-helpstring' into maint
Junio C Hamano [Wed, 21 Dec 2011 18:50:20 +0000 (10:50 -0800)]
Merge branch 'ms/commit-cc-option-helpstring' into maint

* ms/commit-cc-option-helpstring:
  builtin/commit: add missing '/' in help message

12 years agobuiltin/commit: add missing '/' in help message
Michael Schubert [Wed, 21 Dec 2011 14:56:00 +0000 (15:56 +0100)]
builtin/commit: add missing '/' in help message

Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoAppease Sun Studio by renaming "tmpfile"
Ævar Arnfjörð Bjarmason [Wed, 21 Dec 2011 01:18:21 +0000 (01:18 +0000)]
Appease Sun Studio by renaming "tmpfile"

On Solaris the system headers define the "tmpfile" name, which'll
cause Git compiled with Sun Studio 12 Update 1 to whine about us
redefining the name:

    "pack-write.c", line 76: warning: name redefined by pragma redefine_extname declared static: tmpfile     (E_PRAGMA_REDEFINE_STATIC)
    "sha1_file.c", line 2455: warning: name redefined by pragma redefine_extname declared static: tmpfile    (E_PRAGMA_REDEFINE_STATIC)
    "fast-import.c", line 858: warning: name redefined by pragma redefine_extname declared static: tmpfile   (E_PRAGMA_REDEFINE_STATIC)
    "builtin/index-pack.c", line 175: warning: name redefined by pragma redefine_extname declared static: tmpfile    (E_PRAGMA_REDEFINE_STATIC)

Just renaming the "tmpfile" variable to "tmp_file" in the relevant
places is the easiest way to fix this.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoFix a bitwise negation assignment issue spotted by Sun Studio
Ævar Arnfjörð Bjarmason [Wed, 21 Dec 2011 01:18:20 +0000 (01:18 +0000)]
Fix a bitwise negation assignment issue spotted by Sun Studio

Change direct and indirect assignments of the bitwise negation of 0 to
uint32_t variables to have a "U" suffix. I.e. ~0U instead of ~0. This
eliminates warnings under Sun Studio 12 Update 1:

    "vcs-svn/string_pool.c", line 11: warning: initializer will be sign-extended: -1 (E_INIT_SIGN_EXTEND)
    "vcs-svn/string_pool.c", line 81: warning: initializer will be sign-extended: -1 (E_INIT_SIGN_EXTEND)
    "vcs-svn/repo_tree.c", line 112: warning: initializer will be sign-extended: -1 (E_INIT_SIGN_EXTEND)
    "vcs-svn/repo_tree.c", line 112: warning: initializer will be sign-extended: -1 (E_INIT_SIGN_EXTEND)
    "test-treap.c", line 34: warning: initializer will be sign-extended: -1 (E_INIT_SIGN_EXTEND)

The semantics are still the same as demonstrated by this program:

    $ cat test.c && make test && ./test
    #include <stdio.h>
    #include <stdint.h>

    int main(void)
    {
        uint32_t foo = ~0;
        uint32_t bar = ~0U;

        printf("foo = <%u> bar = <%u>\n", foo, bar);

        return 0;
    }
    cc     test.c   -o test
    "test.c", line 5: warning: initializer will be sign-extended: -1
    foo = <4294967295> bar = <4294967295>

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoFix an enum assignment issue spotted by Sun Studio
Ævar Arnfjörð Bjarmason [Wed, 21 Dec 2011 01:18:19 +0000 (01:18 +0000)]
Fix an enum assignment issue spotted by Sun Studio

In builtin/fast-export.c we'd assign to variables of the
tag_of_filtered_mode enum type with constants defined for the
signed_tag_mode enum.

We'd get the intended value since both the value we were assigning
with and the one we actually wanted had the same positional within
their respective enums, but doing it this way makes no sense.

This issue was spotted by Sun Studio 12 Update 1:

    "builtin/fast-export.c", line 54: warning: enum type mismatch: op "=" (E_ENUM_TYPE_MISMATCH_OP)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'maint'
Junio C Hamano [Wed, 21 Dec 2011 00:34:20 +0000 (16:34 -0800)]
Merge branch 'maint'

* maint:
  builtin/init-db.c: eliminate -Wformat warning on Solaris

12 years agobuiltin/init-db.c: eliminate -Wformat warning on Solaris
Ævar Arnfjörð Bjarmason [Tue, 20 Dec 2011 23:27:41 +0000 (23:27 +0000)]
builtin/init-db.c: eliminate -Wformat warning on Solaris

On Solaris systems we'd warn about an implicit cast of mode_t when we
printed things out with the %d format. We'd get this warning under GCC
4.6.0 with Solaris headers:

    builtin/init-db.c: In function ‘separate_git_dir’:
    builtin/init-db.c:354:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘mode_t’ [-Wformat]

We've been doing this ever since v1.7.4.1-296-gb57fb80. Just work
around this by adding an explicit cast.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-sh-setup: make require_clean_work_tree part of the interface
Thomas Rast [Tue, 20 Dec 2011 21:42:39 +0000 (22:42 +0100)]
git-sh-setup: make require_clean_work_tree part of the interface

92c62a3 (Porcelain scripts: Rewrite cryptic "needs update" error
message, 2010-10-19) refactored git's own checking to a function in
git-sh-setup.  This is a very useful thing for script writers, so
document it.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'mh/ref-api'
Junio C Hamano [Tue, 20 Dec 2011 21:25:53 +0000 (13:25 -0800)]
Merge branch 'mh/ref-api'

* mh/ref-api:
  add_ref(): take a (struct ref_entry *) parameter
  create_ref_entry(): extract function from add_ref()
  repack_without_ref(): remove temporary
  resolve_gitlink_ref_recursive(): change to work with struct ref_cache
  Pass a (ref_cache *) to the resolve_gitlink_*() helper functions
  resolve_gitlink_ref(): improve docstring
  get_ref_dir(): change signature
  refs: change signatures of get_packed_refs() and get_loose_refs()
  is_dup_ref(): extract function from sort_ref_array()
  add_ref(): add docstring
  parse_ref_line(): add docstring
  is_refname_available(): remove the "quiet" argument
  clear_ref_array(): rename from free_ref_array()
  refs: rename parameters result -> sha1
  refs: rename "refname" variables
  struct ref_entry: document name member

Conflicts:
cache.h
refs.c

12 years agoMerge branch 'jc/advice-doc'
Junio C Hamano [Tue, 20 Dec 2011 21:25:29 +0000 (13:25 -0800)]
Merge branch 'jc/advice-doc'

* jc/advice-doc:
  advice: Document that they all default to true

12 years agoMerge branch 'jc/request-pull-show-head-4'
Junio C Hamano [Tue, 20 Dec 2011 21:25:27 +0000 (13:25 -0800)]
Merge branch 'jc/request-pull-show-head-4'

* jc/request-pull-show-head-4:
  request-pull: do not emit "tag" before the tagname
  request-pull: update the "pull" command generation logic

12 years agoMerge branch 'jc/pull-signed-tag'
Junio C Hamano [Tue, 20 Dec 2011 21:24:12 +0000 (13:24 -0800)]
Merge branch 'jc/pull-signed-tag'

* jc/pull-signed-tag:
  commit: do not lose mergetag header when not amending

12 years agoMerge branch 'jc/checkout-m-twoway'
Junio C Hamano [Tue, 20 Dec 2011 21:24:08 +0000 (13:24 -0800)]
Merge branch 'jc/checkout-m-twoway'

* jc/checkout-m-twoway:
  t/t2023-checkout-m.sh: fix use of test_must_fail

12 years agot/t2023-checkout-m.sh: fix use of test_must_fail
Ævar Arnfjörð Bjarmason [Tue, 20 Dec 2011 20:37:45 +0000 (20:37 +0000)]
t/t2023-checkout-m.sh: fix use of test_must_fail

Change an invocation of test_must_fail() to be inside a
test_expect_success() as is our usual pattern. Having it outside
caused our tests to fail under prove(1) since we wouldn't print a
newline before TAP output:

    CONFLICT (content): Merge conflict in both.txt
    # GETTEXT POISON #ok 2 - -m restores 2-way conflicted+resolved file

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocommit: do not lose mergetag header when not amending
Junio C Hamano [Tue, 20 Dec 2011 21:20:56 +0000 (13:20 -0800)]
commit: do not lose mergetag header when not amending

The earlier ed7a42a (commit: teach --amend to carry forward extra headers,
2011-11-08) broke "git merge/pull; edit to fix conflict; git commit"
workflow by forgetting that commit_tree_extended() takes the whole extra
header list.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'tr/cache-tree'
Junio C Hamano [Tue, 20 Dec 2011 20:16:04 +0000 (12:16 -0800)]
Merge branch 'tr/cache-tree'

* tr/cache-tree:
  t0090: be prepared that 'wc -l' writes leading blanks

12 years agot0090: be prepared that 'wc -l' writes leading blanks
Johannes Sixt [Tue, 20 Dec 2011 08:24:21 +0000 (09:24 +0100)]
t0090: be prepared that 'wc -l' writes leading blanks

Use 'printf %d $(whatever|wc -l)' so that the shell removes the blanks
for us.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoUpdate draft release notes to 1.7.9
Junio C Hamano [Tue, 20 Dec 2011 00:39:54 +0000 (16:39 -0800)]
Update draft release notes to 1.7.9

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'ab/enable-i18n'
Junio C Hamano [Tue, 20 Dec 2011 00:06:41 +0000 (16:06 -0800)]
Merge branch 'ab/enable-i18n'

* ab/enable-i18n:
  i18n: add infrastructure for translating Git with gettext

Conflicts:
Makefile

12 years agoMerge branch 'ew/keepalive'
Junio C Hamano [Tue, 20 Dec 2011 00:06:32 +0000 (16:06 -0800)]
Merge branch 'ew/keepalive'

* ew/keepalive:
  enable SO_KEEPALIVE for connected TCP sockets

12 years agoMerge branch 'jc/checkout-m-twoway'
Junio C Hamano [Tue, 20 Dec 2011 00:06:22 +0000 (16:06 -0800)]
Merge branch 'jc/checkout-m-twoway'

* jc/checkout-m-twoway:
  checkout_merged(): squelch false warning from some gcc
  Test 'checkout -m -- path'
  checkout -m: no need to insist on having all 3 stages

12 years agoMerge branch 'jk/maint-push-over-dav'
Junio C Hamano [Tue, 20 Dec 2011 00:05:59 +0000 (16:05 -0800)]
Merge branch 'jk/maint-push-over-dav'

* jk/maint-push-over-dav:
  http-push: enable "proactive auth"
  t5540: test DAV push with authentication

Conflicts:
http.c

12 years agoMerge branch 'jk/fetch-no-tail-match-refs'
Junio C Hamano [Tue, 20 Dec 2011 00:05:55 +0000 (16:05 -0800)]
Merge branch 'jk/fetch-no-tail-match-refs'

* jk/fetch-no-tail-match-refs:
  connect.c: drop path_match function
  fetch-pack: match refs exactly
  t5500: give fully-qualified refs to fetch-pack
  drop "match" parameter from get_remote_heads

12 years agoMerge branch 'nd/resolve-ref'
Junio C Hamano [Tue, 20 Dec 2011 00:05:50 +0000 (16:05 -0800)]
Merge branch 'nd/resolve-ref'

* nd/resolve-ref:
  Rename resolve_ref() to resolve_ref_unsafe()
  Convert resolve_ref+xstrdup to new resolve_refdup function
  revert: convert resolve_ref() to read_ref_full()

12 years agoMerge branch 'jn/maint-sequencer-fixes'
Junio C Hamano [Tue, 20 Dec 2011 00:05:45 +0000 (16:05 -0800)]
Merge branch 'jn/maint-sequencer-fixes'

* jn/maint-sequencer-fixes:
  revert: stop creating and removing sequencer-old directory
  Revert "reset: Make reset remove the sequencer state"
  revert: do not remove state until sequence is finished
  revert: allow single-pick in the middle of cherry-pick sequence
  revert: pass around rev-list args in already-parsed form
  revert: allow cherry-pick --continue to commit before resuming
  revert: give --continue handling its own function

12 years agoMerge branch 'jk/maint-snprintf-va-copy'
Junio C Hamano [Tue, 20 Dec 2011 00:05:38 +0000 (16:05 -0800)]
Merge branch 'jk/maint-snprintf-va-copy'

* jk/maint-snprintf-va-copy:
  compat/snprintf: don't look at va_list twice

12 years agoMerge branch 'jk/maint-mv'
Junio C Hamano [Tue, 20 Dec 2011 00:05:34 +0000 (16:05 -0800)]
Merge branch 'jk/maint-mv'

* jk/maint-mv:
  mv: be quiet about overwriting
  mv: improve overwrite warning
  mv: make non-directory destination error more clear
  mv: honor --verbose flag
  docs: mention "-k" for both forms of "git mv"

12 years agoMerge branch 'ci/stripspace-docs'
Junio C Hamano [Tue, 20 Dec 2011 00:05:31 +0000 (16:05 -0800)]
Merge branch 'ci/stripspace-docs'

* ci/stripspace-docs:
  Update documentation for stripspace

12 years agoMerge branch 'rr/test-chaining'
Junio C Hamano [Tue, 20 Dec 2011 00:05:25 +0000 (16:05 -0800)]
Merge branch 'rr/test-chaining'

* rr/test-chaining:
  t3401: use test_commit in setup
  t3401: modernize style
  t3040 (subprojects-basic): fix '&&' chaining, modernize style
  t1510 (worktree): fix '&&' chaining
  t3030 (merge-recursive): use test_expect_code
  test: fix '&&' chaining
  t3200 (branch): fix '&&' chaining

12 years agoMerge branch 'tr/cache-tree'
Junio C Hamano [Tue, 20 Dec 2011 00:05:20 +0000 (16:05 -0800)]
Merge branch 'tr/cache-tree'

* tr/cache-tree:
  reset: update cache-tree data when appropriate
  commit: write cache-tree data when writing index anyway
  Refactor cache_tree_update idiom from commit
  Test the current state of the cache-tree optimization
  Add test-scrap-cache-tree

12 years agoMerge branch 'jk/credentials'
Junio C Hamano [Tue, 20 Dec 2011 00:05:16 +0000 (16:05 -0800)]
Merge branch 'jk/credentials'

* jk/credentials:
  t: add test harness for external credential helpers
  credentials: add "store" helper
  strbuf: add strbuf_add*_urlencode
  Makefile: unix sockets may not available on some platforms
  credentials: add "cache" helper
  docs: end-user documentation for the credential subsystem
  credential: make relevance of http path configurable
  credential: add credential.*.username
  credential: apply helper config
  http: use credential API to get passwords
  credential: add function for parsing url components
  introduce credentials API
  t5550: fix typo
  test-lib: add test_config_global variant

Conflicts:
strbuf.c

12 years agogitweb: Fix fallback mode of to_utf8 subroutine
Jakub Narebski [Sun, 18 Dec 2011 22:00:58 +0000 (23:00 +0100)]
gitweb: Fix fallback mode of to_utf8 subroutine

e5d3de5 (gitweb: use Perl built-in utf8 function for UTF-8 decoding.,
2007-12-04) was meant to make gitweb faster by using Perl's internals
(see subsection "Messing with Perl's Internals" in Encode(3pm) manpage)

Simple benchmark confirms that (old = 00f429a, new = this version):

        old  new
  old    -- -65%
  new  189%   --

Unfortunately it made fallback mode of to_utf8 do not work...  except
for default value 'latin1' of $fallback_encoding ('latin1' is Perl
native encoding), which is why it was not noticed for such long time.

utf8::valid(STRING) is an internal function that tests whether STRING
is in a _consistent state_ regarding UTF-8.  It returns true is
well-formed UTF-8 and has the UTF-8 flag on _*or*_ if string is held
as bytes (both these states are 'consistent').  For gitweb the second
option was true, as output from git commands is opened without ':utf8'
layer.

What made it work at all for STRING in 'latin1' encoding is the fact
that utf8:decode(STRING) turns on UTF-8 flag only if source string is
valid UTF-8 and contains multi-byte UTF-8 characters... and that if
string doesn't have UTF-8 flag set it is treated as in native Perl
encoding, i.e.  'latin1' / 'iso-8859-1' (unless native encoding it is
EBCDIC ;-)).  It was ':utf8' layer that actually converted 'latin1'
(no UTF-8 flag == native == 'latin1) to 'utf8'.

Let's make use of the fact that utf8:decode(STRING) returns false if
STRING is invalid as UTF-8 to check whether to enable fallback mode.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agotest-terminal: set output terminals to raw mode
Thomas Rast [Mon, 12 Dec 2011 18:09:14 +0000 (19:09 +0100)]
test-terminal: set output terminals to raw mode

Not setting them to raw mode causes funny things to happen, such as
\n -> \r\n translation:

  ./test-terminal.perl echo foo | xxd
  0000000: 666f 6f0d 0a                             foo..

(Notice the added 0d.)

To avoid this, set the (pseudo)terminal to raw mode.  Note that the
IO::Pty docs recommend doing it on both master and slave.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agorequest-pull: do not emit "tag" before the tagname
Junio C Hamano [Mon, 19 Dec 2011 19:59:57 +0000 (11:59 -0800)]
request-pull: do not emit "tag" before the tagname

The whole point of the recent update to allow "git pull $url $tagname" is
so that the integrator does not have to store the (signed) tag that is
used to convey authenticity to be recorded in the resulting merge in the
local repository's tag namespace.  Asking for a merge be made with "git
pull $url tag $tagname" defeats it.

Note that the request can become ambiguous if the requestor has a branch
with the same name as the tag, but that is not a new problem limited to
pulling. I wouldn't mind if somebody wants to add disambiguation to the
find_matching_ref logic in the script as a separate patch, though.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoremote-curl: don't pass back fake refs
Jeff King [Sat, 17 Dec 2011 10:45:39 +0000 (05:45 -0500)]
remote-curl: don't pass back fake refs

When receive-pack advertises its list of refs, it generally hides the
capabilities information after a NUL at the end of the first ref.

However, when we have an empty repository, there are no refs, and
therefore receive-pack writes a fake ref "capabilities^{}" with the
capabilities afterwards.

On the client side, git reads the result with get_remote_heads(). We pick
the capabilities from the end of the line, and then call check_ref() to
make sure the ref name is valid. We see that it isn't, and don't bother
adding it to our list of refs.

However, the call to check_ref() is enabled by passing the REF_NORMAL flag
to get_remote_heads. For the regular git transport, we pass REF_NORMAL in
get_refs_via_connect() if we are doing a push (since only receive-pack
uses this fake ref).  But in remote-curl, we never use this flag, and we
accept the fake ref as a real one, passing it back from the helper to the
parent git-push.

Most of the time this bug goes unnoticed, as the fake ref won't match our
refspecs. However, if "--mirror" is used, then we see it as remote cruft
to be pruned, and try to pass along a deletion refspec for it. Of course
this refspec has bogus syntax (because of the ^{}), and the helper
complains, aborting the push.

Let's have remote-curl mirror what the builtin get_refs_via_connect() does
(at least for the case of using git protocol; we can leave the dumb
info/refs reader as it is).

This also fixes pushing with --mirror to a smart-http remote that uses
alternates. The fake ".have" refs the server gives to avoid unnecessary
network transfer has a similar bad interactions with the machinery.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoadvice: Document that they all default to true
Junio C Hamano [Mon, 19 Dec 2011 05:35:01 +0000 (21:35 -0800)]
advice: Document that they all default to true

By definition, the default value of "advice.*" variables must be true and
they all control various additional help messages that are designed to aid
new users. Setting one to false is to tell Git that the user understands
the nature of the error and does not need the additional verbose help
message.

Also fix the asciidoc markup for linkgit:git-checkout[1] in the
description of the detachedHead advice by removing an excess colon.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agolf_to_crlf_filter(): resurrect CRLF->CRLF hack
Junio C Hamano [Fri, 16 Dec 2011 23:44:18 +0000 (15:44 -0800)]
lf_to_crlf_filter(): resurrect CRLF->CRLF hack

The non-streaming version of the filter counts CRLF and LF in the whole
buffer, and returns without doing anything when they match (i.e. what is
recorded in the object store already uses CRLF). This was done to help
people who added files from the DOS world before realizing they want to go
cross platform and adding .gitattributes to tell Git that they only want
CRLF in their working tree.

The streaming version of the filter does not want to read the whole thing
before starting to work, as that defeats the whole point of streaming. So
we instead check what byte follows CR whenever we see one, and add CR
before LF only when the LF does not immediately follow CR already to keep
CRLF as is.

Reported-and-tested-by: Ralf Thielow
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogitweb: Output valid utf8 in git_blame_common('data')
Jürgen Kreileder [Sat, 17 Dec 2011 09:22:23 +0000 (10:22 +0100)]
gitweb: Output valid utf8 in git_blame_common('data')

Otherwise when javascript-actions are enabled gitweb shown broken
author names in the tooltips on blame pages ('blame_incremental'
view).

Signed-off-by: Jürgen Kreileder <jk@blackdown.de>
Acked-by: Jakub Narębski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogitweb: esc_html() site name for title in OPML
Jürgen Kreileder [Sat, 17 Dec 2011 09:22:22 +0000 (10:22 +0100)]
gitweb: esc_html() site name for title in OPML

This escapes the site name in OPML (XML uses the same escaping rules
as HTML).  Also fixes encoding issues because esc_html() uses
to_utf8().

Signed-off-by: Jürgen Kreileder <jk@blackdown.de>
Acked-by: Jakub Narębski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogitweb: Call to_utf8() on input string in chop_and_escape_str()
Jürgen Kreileder [Sat, 17 Dec 2011 09:22:21 +0000 (10:22 +0100)]
gitweb: Call to_utf8() on input string in chop_and_escape_str()

a) To fix the comparison with the chopped string,
   otherwise we compare bytes with characters, as
   chop_str() must run to_utf8() for correct operation
b) To give the title attribute correct encoding;
   we need to mark strings as UTF-8 before outpur

Signed-off-by: Jürgen Kreileder <jk@blackdown.de>
Acked-by: Jakub Narębski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoUpdate jk/maint-strbuf-missing-init to builtin/ rename
Junio C Hamano [Sun, 18 Dec 2011 08:27:59 +0000 (00:27 -0800)]
Update jk/maint-strbuf-missing-init to builtin/ rename

12 years agocommit, merge: initialize static strbuf
Jeff King [Sun, 18 Dec 2011 05:03:22 +0000 (00:03 -0500)]
commit, merge: initialize static strbuf

Strbufs cannot rely on static all-zero initialization; instead, they must
use STRBUF_INIT to point to the "slopbuf".

Without this patch, "git commit --no-message" segfaults reliably. Fix the
same issue in builtin/merge.c as well.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agosubmodule: use diff_tree_combined_merge() instead of diff_tree_combined()
René Scharfe [Sat, 17 Dec 2011 10:27:19 +0000 (11:27 +0100)]
submodule: use diff_tree_combined_merge() instead of diff_tree_combined()

Use diff_tree_combined_merge() instead of open-coding it.

Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agopass struct commit to diff_tree_combined_merge()
René Scharfe [Sat, 17 Dec 2011 10:20:07 +0000 (11:20 +0100)]
pass struct commit to diff_tree_combined_merge()

Instead of passing the hash of a commit and then searching that
same commit in the single caller, simply pass the commit directly.

Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agouse struct sha1_array in diff_tree_combined()
René Scharfe [Sat, 17 Dec 2011 10:15:48 +0000 (11:15 +0100)]
use struct sha1_array in diff_tree_combined()

Maintaining an array of hashes is easier using sha1_array than
open-coding it.  This patch also fixes a leak of the SHA1 array
in  diff_tree_combined_merge().

Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: fix skipSubmitEdit regression
Pete Wyckoff [Sat, 17 Dec 2011 17:39:03 +0000 (12:39 -0500)]
git-p4: fix skipSubmitEdit regression

Commit 7c766e5 (git-p4: introduce skipSubmitEdit, 2011-12-04)
made it easier to automate submission to p4, but broke the most
common case.

Add a test for when the user really does edit and save the change
template, and fix the bug that causes the test to fail.

Also add a confirmation message when submission is cancelled.

Reported-by: Michael Horowitz <michael.horowitz@ieee.org>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agomake "git push -v" actually verbose
Jeff King [Sat, 17 Dec 2011 09:37:15 +0000 (04:37 -0500)]
make "git push -v" actually verbose

Providing a single "-v" to "git push" currently does
nothing. Giving two flags ("git push -v -v") turns on the
first level of verbosity.

This is caused by a regression introduced in 8afd8dc (push:
support multiple levels of verbosity, 2010-02-24). Before
the series containing 8afd8dc, the verbosity handling for
fetching and pushing was completely separate. Commit bde873c
refactored the verbosity handling out of the fetch side, and
then 8afd8dc converted push to use the refactored code.

However, the fetch and push sides numbered and passed along
their verbosity levels differently. For both, a verbosity
level of "-1" meant "quiet", and "0" meant "default output".
But from there they differed.

For fetch, a verbosity level of "1" indicated to the "fetch"
program that it should make the status table slightly more
verbose, showing up-to-date entries. A verbosity level of
"2" meant that we should pass a verbose flag to the
transport; in the case of fetch-pack, this displays protocol
debugging information.

As a result, the refactored code in bde873c checks for
"verbosity >= 2", and only then passes it on to the
transport. From the transport code's perspective, a
verbosity of 0 or 1 both meant "0".

Push, on the other hand, does not show its own status table;
that is always handled by the transport layer or below
(originally send-pack itself, but these days it is done by
the transport code). So a verbosity level of 1 meant that we
should pass the verbose flag to send-pack, so that it knows
we want a verbose status table. However, once 8afd8dc
switched it to the refactored fetch code, a verbosity level
of 1 was now being ignored.  Thus, you needed to
artificially bump the verbosity to 2 (via "-v -v") to have
any effect.

We can fix this by letting the transport code know about the
true verbosity level (i.e., let it distinguish level 0 or
1).

We then have to also make an adjustment to any transport
methods that assumed "verbose > 0" meant they could spew
lots of debugging information. Before, they could only get
"0" or "2", but now they will also receive "1". They need to
adjust their condition for turning on such spew from
"verbose > 0" to "verbose > 1".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>