OSDN Git Service

git-core/git.git
12 years agoMerge branch 'rc/histogram-diff'
Junio C Hamano [Thu, 18 Aug 2011 00:36:06 +0000 (17:36 -0700)]
Merge branch 'rc/histogram-diff'

* rc/histogram-diff:
  xdiff/xhistogram: drop need for additional variable
  xdiff/xhistogram: rely on xdl_trim_ends()
  xdiff/xhistogram: rework handling of recursed results
  xdiff: do away with xdl_mmfile_next()
  Make test number unique
  xdiff/xprepare: use a smaller sample size for histogram diff
  xdiff/xprepare: skip classification
  teach --histogram to diff
  t4033-diff-patience: factor out tests
  xdiff/xpatience: factor out fall-back-diff function
  xdiff/xprepare: refactor abort cleanups
  xdiff/xprepare: use memset()

12 years agoMerge branch 'jc/maint-smart-http-race-upload-pack'
Junio C Hamano [Thu, 18 Aug 2011 00:35:58 +0000 (17:35 -0700)]
Merge branch 'jc/maint-smart-http-race-upload-pack'

* jc/maint-smart-http-race-upload-pack:
  helping smart-http/stateless-rpc fetch race

12 years agoMerge branch 'js/sh-style'
Junio C Hamano [Thu, 18 Aug 2011 00:35:50 +0000 (17:35 -0700)]
Merge branch 'js/sh-style'

* js/sh-style:
  filter-branch.sh: de-dent usage string
  misc-sh: fix up whitespace in some other .sh files.

12 years agoMerge branch 'js/ref-namespaces'
Junio C Hamano [Thu, 18 Aug 2011 00:35:38 +0000 (17:35 -0700)]
Merge branch 'js/ref-namespaces'

* js/ref-namespaces:
  ref namespaces: tests
  ref namespaces: documentation
  ref namespaces: Support remote repositories via upload-pack and receive-pack
  ref namespaces: infrastructure
  Fix prefix handling in ref iteration functions

12 years agoMerge branch 'cb/maint-quiet-push'
Junio C Hamano [Thu, 18 Aug 2011 00:26:05 +0000 (17:26 -0700)]
Merge branch 'cb/maint-quiet-push'

* cb/maint-quiet-push:
  receive-pack: do not overstep command line argument array
  propagate --quiet to send-pack/receive-pack

Conflicts:
Documentation/git-receive-pack.txt
Documentation/git-send-pack.txt

12 years agoMerge branch 'jc/maint-combined-diff-work-tree'
Junio C Hamano [Thu, 18 Aug 2011 00:25:59 +0000 (17:25 -0700)]
Merge branch 'jc/maint-combined-diff-work-tree'

* jc/maint-combined-diff-work-tree:
  diff -c/--cc: do not mistake "resolved as deletion" as "use working tree"

Conflicts:
combine-diff.c

12 years agoMerge branch 'cb/maint-exec-error-report'
Junio C Hamano [Thu, 18 Aug 2011 00:25:55 +0000 (17:25 -0700)]
Merge branch 'cb/maint-exec-error-report'

* cb/maint-exec-error-report:
  notice error exit from pager
  error_routine: use parent's stderr if exec fails

12 years agoMerge branch 'maint'
Junio C Hamano [Thu, 18 Aug 2011 00:25:37 +0000 (17:25 -0700)]
Merge branch 'maint'

* maint:
  checkout-index: remove obsolete comment

12 years agocheckout-index: remove obsolete comment
Nguyễn Thái Ngọc Duy [Wed, 17 Aug 2011 12:22:13 +0000 (19:22 +0700)]
checkout-index: remove obsolete comment

The first paragraph about flag order is no longer true and is
mentioned in git-checkout-index.txt. The rest is also mentioned in
git-checkout-index.txt.

Remove it and keep uptodate document in one place.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoSync with "maint"
Junio C Hamano [Tue, 16 Aug 2011 21:23:43 +0000 (14:23 -0700)]
Sync with "maint"

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'maint'
Junio C Hamano [Tue, 16 Aug 2011 21:22:26 +0000 (14:22 -0700)]
Merge branch 'maint'

* maint:
  Prepare for 1.7.6.1
  am: refresh the index at start and --resolved

Conflicts:
GIT-VERSION-GEN
RelNotes

12 years agoPrepare for 1.7.6.1
Junio C Hamano [Tue, 16 Aug 2011 19:13:38 +0000 (12:13 -0700)]
Prepare for 1.7.6.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jk/tag-list-multiple-patterns' into maint
Junio C Hamano [Tue, 16 Aug 2011 19:41:14 +0000 (12:41 -0700)]
Merge branch 'jk/tag-list-multiple-patterns' into maint

* jk/tag-list-multiple-patterns:
  tag: accept multiple patterns for --list

12 years agoMerge branch 'jl/submodule-update-quiet' into maint
Junio C Hamano [Tue, 16 Aug 2011 19:41:14 +0000 (12:41 -0700)]
Merge branch 'jl/submodule-update-quiet' into maint

* jl/submodule-update-quiet:
  submodule: update and add must honor --quiet flag

12 years agoMerge branch 'jl/submodule-add-relurl-wo-upstream' into maint
Junio C Hamano [Tue, 16 Aug 2011 19:41:13 +0000 (12:41 -0700)]
Merge branch 'jl/submodule-add-relurl-wo-upstream' into maint

* jl/submodule-add-relurl-wo-upstream:
  submodule add: clean up duplicated code
  submodule add: allow relative repository path even when no url is set
  submodule add: test failure when url is not configured in superproject

Conflicts:
git-submodule.sh

12 years agoMerge branch 'oa/pull-reflog' into maint
Junio C Hamano [Tue, 16 Aug 2011 19:41:13 +0000 (12:41 -0700)]
Merge branch 'oa/pull-reflog' into maint

* oa/pull-reflog:
  pull: remove extra space from reflog message

12 years agoMerge branch 'js/ls-tree-error' into maint
Junio C Hamano [Tue, 16 Aug 2011 19:41:12 +0000 (12:41 -0700)]
Merge branch 'js/ls-tree-error' into maint

* js/ls-tree-error:
  Ensure git ls-tree exits with a non-zero exit code if read_tree_recursive fails.
  Add a test to check that git ls-tree sets non-zero exit code on error.

12 years agoMerge branch 'jk/fast-export-quote-path' into maint
Junio C Hamano [Tue, 16 Aug 2011 19:41:12 +0000 (12:41 -0700)]
Merge branch 'jk/fast-export-quote-path' into maint

* jk/fast-export-quote-path:
  fast-export: quote paths in output

12 years agoMerge branch 'jc/checkout-reflog-fix' into maint
Junio C Hamano [Tue, 16 Aug 2011 19:41:12 +0000 (12:41 -0700)]
Merge branch 'jc/checkout-reflog-fix' into maint

* jc/checkout-reflog-fix:
  checkout: do not write bogus reflog entry out

12 years agoMerge branch 'jc/maint-reset-unmerged-path' into maint
Junio C Hamano [Tue, 16 Aug 2011 18:41:28 +0000 (11:41 -0700)]
Merge branch 'jc/maint-reset-unmerged-path' into maint

* jc/maint-reset-unmerged-path:
  reset [<commit>] paths...: do not mishandle unmerged paths

12 years agoMerge branch 'mz/doc-rebase-abort' into maint
Junio C Hamano [Tue, 16 Aug 2011 18:41:28 +0000 (11:41 -0700)]
Merge branch 'mz/doc-rebase-abort' into maint

* mz/doc-rebase-abort:
  rebase: clarify "restore the original branch"

12 years agoMerge branch 'bw/log-all-ref-updates-doc' into maint
Junio C Hamano [Tue, 16 Aug 2011 18:41:28 +0000 (11:41 -0700)]
Merge branch 'bw/log-all-ref-updates-doc' into maint

* bw/log-all-ref-updates-doc:
  Documentation: clearly specify what refs are honored by core.logAllRefUpdates

12 years agoMerge branch 'js/maint-add-path-stat-pwd' into maint
Junio C Hamano [Tue, 16 Aug 2011 18:41:27 +0000 (11:41 -0700)]
Merge branch 'js/maint-add-path-stat-pwd' into maint

* js/maint-add-path-stat-pwd:
  get_pwd_cwd(): Do not trust st_dev/st_ino blindly

12 years agoMerge branch 'ms/help-unknown' into maint
Junio C Hamano [Tue, 16 Aug 2011 18:41:27 +0000 (11:41 -0700)]
Merge branch 'ms/help-unknown' into maint

* ms/help-unknown:
  help_unknown_cmd: do not propose an "unknown" cmd

12 years agoMerge branch 'mz/doc-synopsis-verse' into maint
Junio C Hamano [Tue, 16 Aug 2011 18:41:26 +0000 (11:41 -0700)]
Merge branch 'mz/doc-synopsis-verse' into maint

* mz/doc-synopsis-verse:
  Documentation: use [verse] for SYNOPSIS sections

12 years agoMerge branch 'jn/mime-type-with-params' into maint
Junio C Hamano [Tue, 16 Aug 2011 18:41:26 +0000 (11:41 -0700)]
Merge branch 'jn/mime-type-with-params' into maint

* jn/mime-type-with-params:
  gitweb: Serve */*+xml 'blob_plain' as text/plain with $prevent_xss
  gitweb: Serve text/* 'blob_plain' as text/plain with $prevent_xss

12 years agoMerge branch 'jc/submodule-sync-no-auto-vivify' into maint
Junio C Hamano [Tue, 16 Aug 2011 18:41:26 +0000 (11:41 -0700)]
Merge branch 'jc/submodule-sync-no-auto-vivify' into maint

* jc/submodule-sync-no-auto-vivify:
  submodule add: always initialize .git/config entry
  submodule sync: do not auto-vivify uninteresting submodule

12 years agoMerge branch 'jc/zlib-wrap' into maint
Junio C Hamano [Tue, 16 Aug 2011 18:23:26 +0000 (11:23 -0700)]
Merge branch 'jc/zlib-wrap' into maint

* jc/zlib-wrap:
  zlib: allow feeding more than 4GB in one go
  zlib: zlib can only process 4GB at a time
  zlib: wrap deflateBound() too
  zlib: wrap deflate side of the API
  zlib: wrap inflateInit2 used to accept only for gzip format
  zlib: wrap remaining calls to direct inflate/inflateEnd
  zlib wrapper: refactor error message formatter

12 years agoMerge branch 'fk/relink-upon-ldflags-update' into maint
Junio C Hamano [Tue, 16 Aug 2011 18:23:26 +0000 (11:23 -0700)]
Merge branch 'fk/relink-upon-ldflags-update' into maint

* fk/relink-upon-ldflags-update:
  Makefile: Track changes to LDFLAGS and relink when necessary

12 years agoMerge branch 'bc/submodule-foreach-stdin-fix-1.7.4' into maint
Junio C Hamano [Tue, 16 Aug 2011 18:23:26 +0000 (11:23 -0700)]
Merge branch 'bc/submodule-foreach-stdin-fix-1.7.4' into maint

* bc/submodule-foreach-stdin-fix-1.7.4:
  git-submodule.sh: preserve stdin for the command spawned by foreach
  t/t7407: demonstrate that the command called by 'submodule foreach' loses stdin

12 years agoMerge branch 'aw/rebase-i-p' into maint
Junio C Hamano [Tue, 16 Aug 2011 18:23:25 +0000 (11:23 -0700)]
Merge branch 'aw/rebase-i-p' into maint

* aw/rebase-i-p:
  rebase -i -p: include non-first-parent commits in todo list

12 years agoMerge branch 'jc/diff-index-quick-exit-early' into maint
Junio C Hamano [Tue, 16 Aug 2011 18:23:25 +0000 (11:23 -0700)]
Merge branch 'jc/diff-index-quick-exit-early' into maint

* jc/diff-index-quick-exit-early:
  diff-index --quiet: learn the "stop feeding the backend early" logic

Conflicts:
unpack-trees.h

12 years agoMerge branch 'jk/combine-diff-binary-etc' into maint
Junio C Hamano [Tue, 16 Aug 2011 18:23:24 +0000 (11:23 -0700)]
Merge branch 'jk/combine-diff-binary-etc' into maint

* jk/combine-diff-binary-etc:
  combine-diff: respect textconv attributes
  refactor get_textconv to not require diff_filespec
  combine-diff: handle binary files as binary
  combine-diff: calculate mode_differs earlier
  combine-diff: split header printing into its own function

12 years agoam: refresh the index at start and --resolved
Jeff King [Tue, 16 Aug 2011 00:13:07 +0000 (17:13 -0700)]
am: refresh the index at start and --resolved

If a file is unchanged but stat-dirty, we may erroneously
fail to apply patches, thinking that they conflict with a
dirty working tree.

This patch adds a call to "update-index --refresh". It comes
as late as possible, so that we don't bother with it for
thinks like "git rebase --abort", or when mbox-splitting
fails. However, it does come before we actually start
applying patches, meaning we will only call it once when we
start applying patches (or any time we return to "am" after
having resolved conflicts), and not once per patch.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoUpdate draft release notes to 1.7.7
Junio C Hamano [Thu, 11 Aug 2011 19:12:22 +0000 (12:12 -0700)]
Update draft release notes to 1.7.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'cb/partial-commit-relative-pathspec'
Junio C Hamano [Thu, 11 Aug 2011 18:04:28 +0000 (11:04 -0700)]
Merge branch 'cb/partial-commit-relative-pathspec'

* cb/partial-commit-relative-pathspec:
  commit: allow partial commits with relative paths

12 years agoMerge branch 'jk/fast-export-quote-path'
Junio C Hamano [Thu, 11 Aug 2011 18:03:16 +0000 (11:03 -0700)]
Merge branch 'jk/fast-export-quote-path'

* jk/fast-export-quote-path:
  fast-export: quote paths in output

12 years agoMerge branch 'rc/maint-http-wrong-free'
Junio C Hamano [Thu, 11 Aug 2011 18:03:13 +0000 (11:03 -0700)]
Merge branch 'rc/maint-http-wrong-free'

* rc/maint-http-wrong-free:
  Makefile: some changes for http-related flag documentation
  http.c: fix an invalid free()

Conflicts:
Makefile

12 years agoMerge branch 'rs/grep-function-context'
Junio C Hamano [Thu, 11 Aug 2011 18:03:09 +0000 (11:03 -0700)]
Merge branch 'rs/grep-function-context'

* rs/grep-function-context:
  grep: long context options
  grep: add option to show whole function as context

12 years agoMerge branch 'ef/ipv4-connect-error-report'
Junio C Hamano [Thu, 11 Aug 2011 18:03:06 +0000 (11:03 -0700)]
Merge branch 'ef/ipv4-connect-error-report'

* ef/ipv4-connect-error-report:
  connect: only log if all attempts failed (ipv4)

12 years agohelping smart-http/stateless-rpc fetch race
Junio C Hamano [Fri, 5 Aug 2011 20:54:06 +0000 (13:54 -0700)]
helping smart-http/stateless-rpc fetch race

A request to fetch from a client over smart HTTP protocol is served in
multiple steps. In the first round, the server side shows the set of refs
it has and their values, and the client picks from them and sends "I want
to fetch the history leading to these commits".

When the server tries to respond to this second request, its refs may have
progressed by a push from elsewhere. By design, we do not allow fetching
objects that are not at the tip of an advertised ref, and the server
rejects such a request. The client needs to try again, which is not ideal
especially for a busy server.

Teach upload-pack (which is the workhorse driven by git-daemon and smart
http server interface) that it is OK for a smart-http client to ask for
commits that are not at the tip of any advertised ref, as long as they are
reachable from advertised refs.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoxdiff/xhistogram: drop need for additional variable
Tay Ray Chuan [Mon, 1 Aug 2011 04:20:10 +0000 (12:20 +0800)]
xdiff/xhistogram: drop need for additional variable

Having an additional variable (ptr) instead of changing line(1|2) and
count(1|2) was for debugging purposes.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoxdiff/xhistogram: rely on xdl_trim_ends()
Tay Ray Chuan [Mon, 1 Aug 2011 04:20:09 +0000 (12:20 +0800)]
xdiff/xhistogram: rely on xdl_trim_ends()

Do away with reduce_common_start_end() and use xdf->dstart and xdf->dend
set by xdl_trim_ends() that similarly tells us where the first unmatched
line from the start and end occurs.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoxdiff/xhistogram: rework handling of recursed results
Tay Ray Chuan [Mon, 1 Aug 2011 04:20:08 +0000 (12:20 +0800)]
xdiff/xhistogram: rework handling of recursed results

Previously we were over-complicating matters by trying to combine the
recursed results. Now, terminate immediately if a recursive call failed
and return its result.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'oa/pull-reflog'
Junio C Hamano [Mon, 8 Aug 2011 19:33:36 +0000 (12:33 -0700)]
Merge branch 'oa/pull-reflog'

* oa/pull-reflog:
  pull: remove extra space from reflog message

Conflicts:
git-pull.sh

12 years agoMerge branch 'ms/reflog-show-is-default'
Junio C Hamano [Mon, 8 Aug 2011 19:33:35 +0000 (12:33 -0700)]
Merge branch 'ms/reflog-show-is-default'

* ms/reflog-show-is-default:
  reflog: actually default to subcommand 'show'

12 years agoMerge branch 'jl/submodule-status-summary-doc'
Junio C Hamano [Mon, 8 Aug 2011 19:33:35 +0000 (12:33 -0700)]
Merge branch 'jl/submodule-status-summary-doc'

* jl/submodule-status-summary-doc:
  Documentation/submodule: add command references and update options

12 years agoMerge branch 'jn/gitweb-config-list-case'
Junio C Hamano [Mon, 8 Aug 2011 19:33:35 +0000 (12:33 -0700)]
Merge branch 'jn/gitweb-config-list-case'

* jn/gitweb-config-list-case:
  gitweb: Git config keys are case insensitive, make config search too

12 years agoMerge branch 'jl/submodule-update-quiet'
Junio C Hamano [Mon, 8 Aug 2011 19:33:34 +0000 (12:33 -0700)]
Merge branch 'jl/submodule-update-quiet'

* jl/submodule-update-quiet:
  submodule: update and add must honor --quiet flag

12 years agoMerge branch 'js/ls-tree-error'
Junio C Hamano [Mon, 8 Aug 2011 19:33:34 +0000 (12:33 -0700)]
Merge branch 'js/ls-tree-error'

* js/ls-tree-error:
  Ensure git ls-tree exits with a non-zero exit code if read_tree_recursive fails.
  Add a test to check that git ls-tree sets non-zero exit code on error.

12 years agoMerge branch 'jn/gitweb-system-config'
Junio C Hamano [Mon, 8 Aug 2011 19:33:34 +0000 (12:33 -0700)]
Merge branch 'jn/gitweb-system-config'

* jn/gitweb-system-config:
  gitweb: Introduce common system-wide settings for convenience

12 years agoMerge branch 'jk/reset-reflog-message-fix'
Junio C Hamano [Mon, 8 Aug 2011 19:33:33 +0000 (12:33 -0700)]
Merge branch 'jk/reset-reflog-message-fix'

* jk/reset-reflog-message-fix:
  reset: give better reflog messages

12 years agoMerge branch 'jc/diff-index-refactor'
Junio C Hamano [Mon, 8 Aug 2011 19:33:33 +0000 (12:33 -0700)]
Merge branch 'jc/diff-index-refactor'

* jc/diff-index-refactor:
  diff-lib: refactor run_diff_index() and do_diff_cache()
  diff-lib: simplify do_diff_cache()

12 years agoreceive-pack: do not overstep command line argument array
Junio C Hamano [Mon, 8 Aug 2011 19:31:01 +0000 (12:31 -0700)]
receive-pack: do not overstep command line argument array

Previous commit added one element to the command line, without
making sure the result fits there.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'maint'
Junio C Hamano [Mon, 8 Aug 2011 19:24:16 +0000 (12:24 -0700)]
Merge branch 'maint'

* maint:
  filter-branch: Export variable `workdir' for --commit-filter
  Documentation/Makefile: add *.pdf to `clean' target
  Documentation: ignore *.pdf files

12 years agofilter-branch: Export variable `workdir' for --commit-filter
Michael Witten [Sun, 7 Aug 2011 02:44:43 +0000 (02:44 +0000)]
filter-branch: Export variable `workdir' for --commit-filter

According to `git help filter-branch':

       --commit-filter <command>
           ...
           You can use the _map_ convenience function in this filter,
           and other convenience functions, too...
           ...

However, it turns out that `map' hasn't been usable because it depends
on the variable `workdir', which is not propogated to the environment
of the shell that runs the commit-filter <command> because the
shell is created via a simple-command rather than a compound-command
subshell:

 @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \
                 $(git write-tree) $parentstr < ../message > ../map/$commit ||
                         die "could not write rewritten commit"

One solution is simply to export `workdir'. However, it seems rather
heavy-handed to export `workdir' to the environments of all commands,
so instead this commit exports `workdir' for only the duration of the
shell command in question:

 workdir=$workdir @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \
                 $(git write-tree) $parentstr < ../message > ../map/$commit ||
                         die "could not write rewritten commit"

Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation/Makefile: add *.pdf to `clean' target
Emilio G. Cota [Mon, 8 Aug 2011 08:33:05 +0000 (04:33 -0400)]
Documentation/Makefile: add *.pdf to `clean' target

user-manual.pdf is not removed by `make clean'; fix it.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation: ignore *.pdf files
Emilio G. Cota [Mon, 8 Aug 2011 08:33:04 +0000 (04:33 -0400)]
Documentation: ignore *.pdf files

user-manual.pdf is generated by the build and therefore
should be ignored by git.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agofast-export: quote paths in output
Jeff King [Fri, 5 Aug 2011 22:36:22 +0000 (16:36 -0600)]
fast-export: quote paths in output

Many pathnames in a fast-import stream need to be quoted. In
particular:

  1. Pathnames at the end of an "M" or "D" line need quoting
     if they contain a LF or start with double-quote.

  2. Pathnames on a "C" or "R" line need quoting as above,
     but also if they contain spaces.

For (1), we weren't quoting at all. For (2), we put
double-quotes around the paths to handle spaces, but ignored
the possibility that they would need further quoting.

This patch checks whether each pathname needs c-style
quoting, and uses it. This is slightly overkill for (1),
which doesn't actually need to quote many characters that
vanilla c-style quoting does. However, it shouldn't hurt, as
any implementation needs to be ready to handle quoted
strings anyway.

In addition to adding a test, we have to tweak a test which
blindly assumed that case (2) would always use
double-quotes, whether it needed to or not.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agofilter-branch.sh: de-dent usage string
Junio C Hamano [Fri, 5 Aug 2011 22:06:21 +0000 (15:06 -0700)]
filter-branch.sh: de-dent usage string

"Usage: git filter-branch " that is prefixed to the first line is 25
columns long, so the "[--index-filter ..." on the second line would not
align with "[--env-filter ..." on the first line to begin with. If the
second and subsequent lines do not aim to align with anything on the
first line, it is just fine to indent them with a single HT.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agomisc-sh: fix up whitespace in some other .sh files.
Jon Seymour [Fri, 5 Aug 2011 13:31:29 +0000 (23:31 +1000)]
misc-sh: fix up whitespace in some other .sh files.

I found that the patched 4 files were different when this
filter is applied.

expand -i | unexpand --first-only

This patch contains the corrected files.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'tc/minix'
Junio C Hamano [Fri, 5 Aug 2011 21:55:00 +0000 (14:55 -0700)]
Merge branch 'tc/minix'

* tc/minix:
  Makefile: add Minix configuration options.

13 years agoMerge branch 'jc/pack-order-tweak'
Junio C Hamano [Fri, 5 Aug 2011 21:54:57 +0000 (14:54 -0700)]
Merge branch 'jc/pack-order-tweak'

* jc/pack-order-tweak:
  pack-objects: optimize "recency order"
  core: log offset pack data accesses happened

13 years agodocs: put listed example commands in backticks
Jeff King [Thu, 4 Aug 2011 02:13:29 +0000 (20:13 -0600)]
docs: put listed example commands in backticks

Many examples of git command invocation are given in asciidoc listing
blocks, which makes them monospaced and avoids further interpretation of
special characters.  Some manpages make a list of examples, like:

  git foo::
    Run git foo.

  git foo -q::
    Use the "-q" option.

to quickly show many variants. However, they can sometimes be hard to
read, because they are shown in a proportional-width font (so, for
example, seeing the difference between "-- foo" and "--foo" can be
difficult).

This patch puts all such examples into backticks, which gives the
equivalent formatting to a listing block (i.e., monospaced and without
character interpretation).

As a bonus, this also fixes an example in the git-push manpage, in which
"git push origin :::" was accidentally considered a newly-indented list,
and not a list item with "git push origin :" in it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogitweb: pass string after encoding in utf-8 to syntax highlighter
张忠山 [Thu, 4 Aug 2011 15:52:55 +0000 (23:52 +0800)]
gitweb: pass string after encoding in utf-8 to syntax highlighter

Otherwise the highlight filter would work on a corrupt byte sequence.

Signed-off-by: 张忠山 <zzs213@126.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoAdd option hooks.diffopts to customize change summary in post-receive-email
Jon Jensen [Thu, 4 Aug 2011 03:36:08 +0000 (21:36 -0600)]
Add option hooks.diffopts to customize change summary in post-receive-email

This makes it easy to customize the git diff-tree options, for example
to include -p to include inline diffs.

It defaults to the current options "--stat --summary --find-copies-harder"
and thus is backward-compatible.

Signed-off-by: Jon Jensen <jon@endpoint.com>
Improved-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodiff -c/--cc: do not mistake "resolved as deletion" as "use working tree"
Junio C Hamano [Thu, 4 Aug 2011 18:39:10 +0000 (11:39 -0700)]
diff -c/--cc: do not mistake "resolved as deletion" as "use working tree"

The combined diff machinery can be used to compare:

 - a merge commit with its parent commits;
 - a working-tree file with multiple stages in an unmerged index; or
 - a working-tree file with the HEAD and the index.

The internal function combine-diff.c:show_patch_diff() checked if it needs
to read the "result" from the working tree by looking at the object name
of the result --- if it is null_sha1, it read from the working tree.

This mistook a merge that records a deletion as the conflict resolution
as if it is a cue to read from the working tree. Pass this information
explicitly from the caller instead.

Noticed and reported by Johan Herland.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Wed, 3 Aug 2011 21:16:17 +0000 (14:16 -0700)]
Merge branch 'maint'

* maint:
  add gitignore entry to description about how to write a builtin
  gitattributes: Reword "attribute macro" to "macro attribute"
  gitattributes: Clarify discussion of attribute macros

13 years agoadd gitignore entry to description about how to write a builtin
Heiko Voigt [Wed, 3 Aug 2011 18:06:17 +0000 (20:06 +0200)]
add gitignore entry to description about how to write a builtin

If the author forgets the gitignore entry the built result will show up
as new file in the git working directory.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMakefile: some changes for http-related flag documentation
Tay Ray Chuan [Wed, 3 Aug 2011 12:07:57 +0000 (20:07 +0800)]
Makefile: some changes for http-related flag documentation

Rename git-http-pull to git-http-fetch. This was passed over in 215a7ad
(Big tool rename, Wed Sep 7 17:26:23 2005 -0700).

Also, distinguish between dumb and smart in flag docs, as the "warnings"
in NO_CURL and NO_EXPACT are no longer accurate given the introduction
of smart http(s).

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agohttp.c: fix an invalid free()
Tay Ray Chuan [Wed, 3 Aug 2011 11:54:03 +0000 (19:54 +0800)]
http.c: fix an invalid free()

Remove a free() on the static buffer returned by sha1_file_name().

While we're at it, replace xmalloc() calls on the structs
http_(object|pack)_request with xcalloc() so that pointers in the
structs get initialized to NULL. That way, free()'s are safe - for
example, a free() on the url string member when aborting.

This fixes an invalid free().

Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Helped-by: Jeff King peff@peff.net
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogitattributes: Reword "attribute macro" to "macro attribute"
Michael Haggerty [Wed, 3 Aug 2011 13:41:30 +0000 (15:41 +0200)]
gitattributes: Reword "attribute macro" to "macro attribute"

The new wording makes it clearer that such a beast is an attribute in
addition to being a macro (as opposed to being only a macro that is
used for attributes).

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogitattributes: Clarify discussion of attribute macros
Michael Haggerty [Wed, 3 Aug 2011 13:41:29 +0000 (15:41 +0200)]
gitattributes: Clarify discussion of attribute macros

In particular, make it clear that attribute macros are themselves
recorded as attributes in addition to setting other attributes.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoSkip archive --remote tests on Windows
Johannes Sixt [Wed, 3 Aug 2011 08:20:08 +0000 (10:20 +0200)]
Skip archive --remote tests on Windows

These depend on a working git-upload-archive, which is broken on Windows,
because it depends on fork().

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoxdiff: do away with xdl_mmfile_next()
Tay Ray Chuan [Mon, 1 Aug 2011 04:20:07 +0000 (12:20 +0800)]
xdiff: do away with xdl_mmfile_next()

Given our simple mmfile structure, xdl_mmfile_next() calls are
redundant. Do away with calls to them.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMake test number unique
Johannes Sixt [Wed, 3 Aug 2011 07:25:31 +0000 (09:25 +0200)]
Make test number unique

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocommit: allow partial commits with relative paths
Clemens Buchacher [Sat, 30 Jul 2011 17:13:47 +0000 (19:13 +0200)]
commit: allow partial commits with relative paths

In order to do partial commits, git-commit overlays a tree on the
cache and checks pathspecs against the result. Currently, the
overlaying is done using "prefix" which prevents relative pathspecs
with ".." and absolute pathspec from matching when they refer to
files not under "prefix" and absent from the index, but still in
the tree (i.e.  files staged for removal).

The point of providing a prefix at all is performance optimization.
If we say there is no common prefix for the files of interest, then
we have to read the entire tree into the index.

But even if we cannot use the working directory as a prefix, we can
still figure out if there is a common prefix for all given paths,
and use that instead. The pathspec_prefix() routine from ls-files.c
does exactly that.

Any use of global variables is removed from pathspec_prefix() so
that it can be called from commit.c.

Reported-by: Reuben Thomas <rrt@sc3d.org>
Analyzed-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agonotice error exit from pager
Clemens Buchacher [Mon, 1 Aug 2011 17:59:21 +0000 (19:59 +0200)]
notice error exit from pager

If the pager fails to run, git produces no output, e.g.:

 $ GIT_PAGER=not-a-command git log

The error reporting fails for two reasons:

 (1) start_command: There is a mechanism that detects errors during
     execvp introduced in 2b541bf8 (start_command: detect execvp
     failures early). The child writes one byte to a pipe only if
     execvp fails.  The parent waits for either EOF, when the
     successful execvp automatically closes the pipe (see
     FD_CLOEXEC in fcntl(1)), or it reads a single byte, in which
     case it knows that the execvp failed. This mechanism is
     incompatible with the workaround introduced in 35ce8622
     (pager: Work around window resizing bug in 'less'), which
     waits for input from the parent before the exec. Since both
     the parent and the child are waiting for input from each
     other, that would result in a deadlock. In order to avoid
     that, the mechanism is disabled by closing the child_notifier
     file descriptor.

 (2) finish_command: The parent correctly detects the 127 exit
     status from the child, but the error output goes nowhere,
     since by that time it is already being redirected to the
     child.

No simple solution for (1) comes to mind.

Number (2) can be solved by not sending error output to the pager.
Not redirecting error output to the pager can result in the pager
overwriting error output with standard output, however.

Since there is no reliable way to handle error reporting in the
parent, produce the output in the child instead.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogrep: long context options
René Scharfe [Mon, 1 Aug 2011 17:22:52 +0000 (19:22 +0200)]
grep: long context options

Take long option names for -A (--after-context), -B (--before-context)
and -C (--context) from GNU grep and add a similar long option name
for -W (--function-context).

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogrep: add option to show whole function as context
René Scharfe [Mon, 1 Aug 2011 17:20:53 +0000 (19:20 +0200)]
grep: add option to show whole function as context

Add a new option, -W, to show the whole surrounding function of a match.

It uses the same regular expressions as -p and diff to find the beginning
of sections.

Currently it will not display comments in front of a function, but those
that are following one.  Despite this shortcoming it is already useful,
e.g. to simply see a more complete applicable context or to extract whole
functions.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agopull: remove extra space from reflog message
Ori Avtalion [Fri, 29 Jul 2011 07:19:26 +0000 (10:19 +0300)]
pull: remove extra space from reflog message

When executing "git pull" with no arguments, the reflog message was:
  "pull : Fast-forward"

Signed-off-by: Ori Avtalion <ori@avtalion.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/submodule: add command references and update options
Jens Lehmann [Mon, 1 Aug 2011 20:49:21 +0000 (22:49 +0200)]
Documentation/submodule: add command references and update options

Reference the "git diff" and "git status" commands where they learned
functionality that in earlier git versions was only available through the
'summary' and 'status' subcommands of "git submodule".

The short option '-n' for '--summary-limit' was missing from the synopsis
and the --init option was missing from the "options" section, add those
there. And while at it, quote all options in backticks so they are
decorated properly in the output formats which support that.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'vi/make-test-vector-less-specific'
Junio C Hamano [Mon, 1 Aug 2011 22:00:38 +0000 (15:00 -0700)]
Merge branch 'vi/make-test-vector-less-specific'

* vi/make-test-vector-less-specific:
  tests: cleanup binary test vector files

13 years agoMerge branch 'jk/clone-detached'
Junio C Hamano [Mon, 1 Aug 2011 22:00:35 +0000 (15:00 -0700)]
Merge branch 'jk/clone-detached'

* jk/clone-detached:
  clone: always fetch remote HEAD
  make copy_ref globally available
  consider only branches in guess_remote_head
  t: add tests for cloning remotes with detached HEAD

13 years agoMerge branch 'jc/streaming-filter'
Junio C Hamano [Mon, 1 Aug 2011 22:00:29 +0000 (15:00 -0700)]
Merge branch 'jc/streaming-filter'

* jc/streaming-filter:
  streaming: free git_istream upon closing

13 years agoMerge branch 'sr/transport-helper-fix'
Junio C Hamano [Mon, 1 Aug 2011 22:00:14 +0000 (15:00 -0700)]
Merge branch 'sr/transport-helper-fix'

* sr/transport-helper-fix: (21 commits)
  transport-helper: die early on encountering deleted refs
  transport-helper: implement marks location as capability
  transport-helper: Use capname for refspec capability too
  transport-helper: change import semantics
  transport-helper: update ref status after push with export
  transport-helper: use the new done feature where possible
  transport-helper: check status code of finish_command
  transport-helper: factor out push_update_refs_status
  fast-export: support done feature
  fast-import: introduce 'done' command
  git-remote-testgit: fix error handling
  git-remote-testgit: only push for non-local repositories
  remote-curl: accept empty line as terminator
  remote-helpers: export GIT_DIR variable to helpers
  git_remote_helpers: push all refs during a non-local export
  transport-helper: don't feed bogus refs to export push
  git-remote-testgit: import non-HEAD refs
  t5800: document some non-functional parts of remote helpers
  t5800: use skip_all instead of prereq
  t5800: factor out some ref tests
  ...

13 years agoMerge branch 'jc/maint-reset-unmerged-path'
Junio C Hamano [Mon, 1 Aug 2011 22:00:08 +0000 (15:00 -0700)]
Merge branch 'jc/maint-reset-unmerged-path'

* jc/maint-reset-unmerged-path:
  reset [<commit>] paths...: do not mishandle unmerged paths

13 years agoMerge branch 'maint'
Junio C Hamano [Mon, 1 Aug 2011 21:45:02 +0000 (14:45 -0700)]
Merge branch 'maint'

* maint:
  connect: correctly number ipv6 network adapter

13 years agoMerge branch 'nk/ref-doc' into maint
Junio C Hamano [Mon, 1 Aug 2011 21:44:24 +0000 (14:44 -0700)]
Merge branch 'nk/ref-doc' into maint

* nk/ref-doc:
  glossary: clarify description of HEAD
  glossary: update description of head and ref
  glossary: update description of "tag"
  git.txt: de-emphasize the implementation detail of a ref
  check-ref-format doc: de-emphasize the implementation detail of a ref
  git-remote.txt: avoid sounding as if loose refs are the only ones in the world
  git-remote.txt: fix wrong remote refspec

13 years agoMerge branch 'jl/maint-fetch-recursive-fix' into maint
Junio C Hamano [Mon, 1 Aug 2011 21:44:17 +0000 (14:44 -0700)]
Merge branch 'jl/maint-fetch-recursive-fix' into maint

* jl/maint-fetch-recursive-fix:
  fetch: Also fetch submodules in subdirectories in on-demand mode

13 years agoMerge branch 'jc/maint-cygwin-trust-executable-bit-default' into maint
Junio C Hamano [Mon, 1 Aug 2011 21:44:13 +0000 (14:44 -0700)]
Merge branch 'jc/maint-cygwin-trust-executable-bit-default' into maint

* jc/maint-cygwin-trust-executable-bit-default:
  cygwin: trust executable bit by default

13 years agoMerge branch 'jc/legacy-loose-object' into maint
Junio C Hamano [Mon, 1 Aug 2011 21:43:58 +0000 (14:43 -0700)]
Merge branch 'jc/legacy-loose-object' into maint

* jc/legacy-loose-object:
  sha1_file.c: "legacy" is really the current format

13 years agoMerge branch 'an/shallow-doc' into maint
Junio C Hamano [Mon, 1 Aug 2011 21:43:53 +0000 (14:43 -0700)]
Merge branch 'an/shallow-doc' into maint

* an/shallow-doc:
  Document the underlying protocol used by shallow repositories and --depth commands.
  Fix documentation of fetch-pack that implies that the client can disconnect after sending wants.

13 years agoMerge branch 'jc/maint-1.7.3-checkout-describe' into maint
Junio C Hamano [Mon, 1 Aug 2011 21:43:18 +0000 (14:43 -0700)]
Merge branch 'jc/maint-1.7.3-checkout-describe' into maint

* jc/maint-1.7.3-checkout-describe:
  checkout -b <name>: correctly detect existing branch

13 years agoreflog: actually default to subcommand 'show'
Michael Schubert [Mon, 1 Aug 2011 11:20:42 +0000 (13:20 +0200)]
reflog: actually default to subcommand 'show'

The reflog manpage says:

git reflog [show] [log-options] [<ref>]

the subcommand 'show' is the default "in the absence of any
subcommands". Currently this is only true if the user provided either
at least one option or no additional argument at all. For example:

git reflog master

won't work. Change this by actually calling cmd_log_reflog in
absence of any subcommand.

Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoconnect: only log if all attempts failed (ipv4)
Erik Faye-Lund [Mon, 1 Aug 2011 11:16:10 +0000 (13:16 +0200)]
connect: only log if all attempts failed (ipv4)

In 63a995b (Do not log unless all connect() attempts fail), a
mechanism to only log connection errors if all attempts failed
was introduced for the IPv6 code-path, but not for the IPv4 one.

Introduce a matching mechanism so IPv4-users also benefit from
this noise-reduction.

Move the call to socket after filling in sa, to make it more
apparent that errno can't change in between.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint' into ef/ipv4-connect-error-report
Junio C Hamano [Mon, 1 Aug 2011 17:49:40 +0000 (10:49 -0700)]
Merge branch 'maint' into ef/ipv4-connect-error-report

* maint:
  connect: correctly number ipv6 network adapter

13 years agoconnect: correctly number ipv6 network adapter
Erik Faye-Lund [Mon, 1 Aug 2011 11:16:09 +0000 (13:16 +0200)]
connect: correctly number ipv6 network adapter

In ba50532, the variable 'cnt' was added to both the IPv6 and the
IPv4 version of git_tcp_connect_sock, intended to identify which
network adapter the connection failed on. But in the IPv6 version,
the variable was never increased, leaving it constantly at zero.

This behaviour isn't very useful, so let's fix it by increasing
the variable at every loop-iteration.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-p4: commit time should be most recent p4 change time
Pete Wyckoff [Sun, 31 Jul 2011 13:45:55 +0000 (09:45 -0400)]
git-p4: commit time should be most recent p4 change time

When importing a repo, the time on the initial commit had been
just "now".  But this causes problems when trying to share among
git-p4 repos that were created identically, although at different
times.  Instead, use the time in the top-most p4 change as the
time for the git import commit.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-p4: one test missing config git-p4.skipSubmitEditCheck
Pete Wyckoff [Sun, 31 Jul 2011 13:45:38 +0000 (09:45 -0400)]
git-p4: one test missing config git-p4.skipSubmitEditCheck

Add this missing line in one of the tests.  Otherwise, on fast
machines, the following git-p4 commit will complain that nobody
edited the submission message.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>