Code

git.git
12 years agoGit 1.7.6.3 v1.7.6.3
Junio C Hamano [Mon, 12 Sep 2011 17:33:03 +0000 (10:33 -0700)]
Git 1.7.6.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jl/maint-fetch-submodule-check-fix' into maint
Junio C Hamano [Mon, 12 Sep 2011 17:19:57 +0000 (10:19 -0700)]
Merge branch 'jl/maint-fetch-submodule-check-fix' into maint

* jl/maint-fetch-submodule-check-fix:
  fetch: skip on-demand checking when no submodules are configured

12 years agoPrepare for 1.7.6.3 maintenance release
Junio C Hamano [Mon, 12 Sep 2011 05:08:56 +0000 (22:08 -0700)]
Prepare for 1.7.6.3 maintenance release

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'ms/reflog-show-is-default' into maint
Junio C Hamano [Mon, 12 Sep 2011 05:33:24 +0000 (22:33 -0700)]
Merge branch 'ms/reflog-show-is-default' into maint

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

12 years agoMerge branch 'jk/reset-reflog-message-fix' into maint
Junio C Hamano [Mon, 12 Sep 2011 05:33:20 +0000 (22:33 -0700)]
Merge branch 'jk/reset-reflog-message-fix' into maint

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

12 years agoMerge branch 'vi/make-test-vector-less-specific' into maint
Junio C Hamano [Mon, 12 Sep 2011 05:33:16 +0000 (22:33 -0700)]
Merge branch 'vi/make-test-vector-less-specific' into maint

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

12 years agoMerge branch 'jk/tag-contains-ab' (early part) into maint
Junio C Hamano [Mon, 12 Sep 2011 04:54:32 +0000 (21:54 -0700)]
Merge branch 'jk/tag-contains-ab' (early part) into maint

* 'jk/tag-contains-ab' (early part):
  tag: speed up --contains calculation

12 years agoMerge branch 'dz/connect-error-report' into maint
Junio C Hamano [Mon, 12 Sep 2011 04:53:47 +0000 (21:53 -0700)]
Merge branch 'dz/connect-error-report' into maint

* dz/connect-error-report:
  Do not log unless all connect() attempts fail

12 years agoMerge branch 'jc/maint-mergetool-read-fix' into maint
Junio C Hamano [Mon, 12 Sep 2011 04:53:39 +0000 (21:53 -0700)]
Merge branch 'jc/maint-mergetool-read-fix' into maint

* jc/maint-mergetool-read-fix:
  mergetool: check return value from read

12 years agoMerge branch 'jk/maint-config-param' into maint
Junio C Hamano [Mon, 12 Sep 2011 04:53:13 +0000 (21:53 -0700)]
Merge branch 'jk/maint-config-param' into maint

* jk/maint-config-param:
  config: use strbuf_split_str instead of a temporary strbuf
  strbuf: allow strbuf_split to work on non-strbufs
  config: avoid segfault when parsing command-line config
  config: die on error in command-line config
  fix "git -c" parsing of values with equals signs
  strbuf_split: add a max parameter

12 years agoMerge branch 'jn/doc-dashdash' into maint
Junio C Hamano [Mon, 12 Sep 2011 04:52:18 +0000 (21:52 -0700)]
Merge branch 'jn/doc-dashdash' into maint

* jn/doc-dashdash:
  Documentation/i18n: quote double-dash for AsciiDoc
  Documentation: quote double-dash for AsciiDoc

Conflicts:
Documentation/git-mergetool--lib.txt

12 years agoMerge branch 'jk/maint-1.7.2-status-ignored' into maint
Junio C Hamano [Mon, 12 Sep 2011 04:51:10 +0000 (21:51 -0700)]
Merge branch 'jk/maint-1.7.2-status-ignored' into maint

* jk/maint-1.7.2-status-ignored:
  git status --ignored: tests and docs
  status: fix bug with missing --ignore files

Conflicts:
Documentation/git-status.txt
t/t7508-status.sh

12 years agoSubmittingPathces: remove Cogito reference
Sverre Rabbelier [Sun, 11 Sep 2011 12:38:10 +0000 (14:38 +0200)]
SubmittingPathces: remove Cogito reference

Removing Cogito leaves just git and StGit, which is a rather
incomplete list of git diff tools available. Sidestep the problem
of deciding what tools to mention by not mentioning any.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agofetch: skip on-demand checking when no submodules are configured
Jens Lehmann [Fri, 9 Sep 2011 18:22:03 +0000 (20:22 +0200)]
fetch: skip on-demand checking when no submodules are configured

It makes no sense to do the - possibly very expensive - call to "rev-list
<new-ref-sha1> --not --all" in check_for_new_submodule_commits() when
there aren't any submodules configured.

Leave check_for_new_submodule_commits() early when no name <-> path
mappings for submodules are found in the configuration. To make that work
reading the configuration had to be moved further up in cmd_fetch(), as
doing that after the actual fetch of the superproject was too late.

Reported-by: Martin Fick <mfick@codeaurora.org>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.7.6.2 v1.7.6.2
Junio C Hamano [Tue, 6 Sep 2011 18:41:02 +0000 (11:41 -0700)]
Git 1.7.6.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoRevert "Merge branch 'cb/maint-quiet-push' into maint"
Junio C Hamano [Tue, 6 Sep 2011 18:06:32 +0000 (11:06 -0700)]
Revert "Merge branch 'cb/maint-quiet-push' into maint"

This reverts commit ffa69e61d3c5730bd4b65a465efc130b0ef3c7df, reversing
changes made to 4a13c4d14841343d7caad6ed41a152fee550261d.

Adding a new command line option to receive-pack and feed it from
send-pack is not an acceptable way to add features, as there is no
guarantee that your updated send-pack will be talking to updated
receive-pack. New features need to be added via the capability mechanism
negotiated over the protocol.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation: clarify effects of -- <path> arguments
Thomas Rast [Tue, 30 Aug 2011 09:21:07 +0000 (11:21 +0200)]
Documentation: clarify effects of -- <path> arguments

'git log -- <path>' does not "show commits that affect the specified
paths" in a literal sense unless --full-history is given (for example,
a file that only existed on a side branch will turn up no commits at
all!).

Reword it to specify the actual intent of the filtering, and point to
the "History Simplification" section.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agowhitespace: have SP on both sides of an assignment "="
Junio C Hamano [Thu, 25 Aug 2011 21:46:52 +0000 (14:46 -0700)]
whitespace: have SP on both sides of an assignment "="

I've deliberately excluded the borrowed code in compat/nedmalloc
directory.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoupdate-ref: whitespace fix
Pang Yan Han [Thu, 25 Aug 2011 15:40:50 +0000 (23:40 +0800)]
update-ref: whitespace fix

Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.7.6.1 v1.7.6.1
Junio C Hamano [Wed, 24 Aug 2011 19:16:58 +0000 (12:16 -0700)]
Git 1.7.6.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jc/maint-smart-http-race-upload-pack' into maint
Junio C Hamano [Wed, 24 Aug 2011 19:16:15 +0000 (12:16 -0700)]
Merge branch 'jc/maint-smart-http-race-upload-pack' into maint

* jc/maint-smart-http-race-upload-pack:
  get_indexed_object can return NULL if nothing is in that slot; check for it

12 years agoget_indexed_object can return NULL if nothing is in that slot; check for it
Brian Harring [Wed, 24 Aug 2011 05:47:17 +0000 (22:47 -0700)]
get_indexed_object can return NULL if nothing is in that slot; check for it

This fixes a segfault introduced by 051e400; via it, no longer able to
trigger the http/smartserv race.

Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoUpdate draft release notes for 1.7.6.1
Junio C Hamano [Tue, 23 Aug 2011 22:28:18 +0000 (15:28 -0700)]
Update draft release notes for 1.7.6.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jc/maint-combined-diff-work-tree' into maint
Junio C Hamano [Tue, 23 Aug 2011 22:27:30 +0000 (15:27 -0700)]
Merge branch 'jc/maint-combined-diff-work-tree' into maint

* 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' into maint
Junio C Hamano [Tue, 23 Aug 2011 22:20:06 +0000 (15:20 -0700)]
Merge branch 'cb/maint-exec-error-report' into maint

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

12 years agoMerge branch 'cb/maint-quiet-push' into maint
Junio C Hamano [Tue, 23 Aug 2011 22:19:45 +0000 (15:19 -0700)]
Merge branch 'cb/maint-quiet-push' into maint

* 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-smart-http-race-upload-pack' into maint
Junio C Hamano [Tue, 23 Aug 2011 22:17:50 +0000 (15:17 -0700)]
Merge branch 'jc/maint-smart-http-race-upload-pack' into maint

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

12 years agoMerge branch 'jc/no-gitweb-test-without-cgi-etc' into maint
Junio C Hamano [Tue, 23 Aug 2011 22:17:14 +0000 (15:17 -0700)]
Merge branch 'jc/no-gitweb-test-without-cgi-etc' into maint

* jc/no-gitweb-test-without-cgi-etc:
  t/gitweb-lib.sh: skip gitweb tests when perl dependencies are not met

12 years agoadd technical documentation about ref iteration
Heiko Voigt [Mon, 22 Aug 2011 20:36:45 +0000 (22:36 +0200)]
add technical documentation about ref iteration

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDo not use C++-style comments
Michael Haggerty [Mon, 22 Aug 2011 10:33:52 +0000 (12:33 +0200)]
Do not use C++-style comments

Detected by "gcc -std=iso9899:1990 ...".  This patch applies against
"maint".

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agofetch-pack: check for valid commit from server
Nguyễn Thái Ngọc Duy [Thu, 18 Aug 2011 13:36:03 +0000 (20:36 +0700)]
fetch-pack: check for valid commit from server

A malicious server can return ACK with non-existent SHA-1 or not a
commit. lookup_commit() in this case may return NULL. Do not let
fetch-pack crash by accessing NULL address in this case.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 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 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 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 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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

12 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

12 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

12 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

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

12 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

12 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>
12 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>
12 years agopropagate --quiet to send-pack/receive-pack
Clemens Buchacher [Sat, 30 Jul 2011 12:10:14 +0000 (14:10 +0200)]
propagate --quiet to send-pack/receive-pack

Currently, git push --quiet produces some non-error output, e.g.:

 $ git push --quiet
 Unpacking objects: 100% (3/3), done.

Add the --quiet option to send-pack/receive-pack and pass it to
unpack-objects in the receive-pack codepath and to receive-pack in
the push codepath.

This fixes a bug reported for the fedora git package:

 https://bugzilla.redhat.com/show_bug.cgi?id=725593

Reported-by: Jesse Keating <jkeating@redhat.com>
Cc: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoBreak down no-lstat() condition checks in verify_uptodate()
Nguyễn Thái Ngọc Duy [Sat, 30 Jul 2011 03:55:05 +0000 (10:55 +0700)]
Break down no-lstat() condition checks in verify_uptodate()

Make it easier to grok under what conditions we can skip lstat().

While at there, shorten ie_match_stat() line for the sake of my eyes.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot7400: fix bogus test failure with symlinked trash
Jeff King [Sat, 30 Jul 2011 15:05:54 +0000 (09:05 -0600)]
t7400: fix bogus test failure with symlinked trash

One of the tests in t7400 fails if the trash directory has a
symlink anywhere in its path. E.g.:

  $ mkdir /tmp/git-test
  $ mkdir /tmp/git-test/real
  $ ln -s real /tmp/git-test/link

  $ ./t7400-submodule-basic --root=/tmp/git-test/real
  ...
  # passed all 44 test(s)

  $ ./t7400-submodule-basic --root=/tmp/git-test/link
  ...
  not ok - 41 use superproject as upstream when path is relative and no url is set there

The failing test does:

  git submodule add ../repo relative &&
  ...
  git submodule sync relative &&
  test "$(git config submodule.relative.url)" = "$submodurl/repo"

where $submodurl comes from the $TRASH_DIRECTORY the user
gave us. However, git will resolve symlinks when converting
the relative path into an absolute one, leading them to be
textually different (even though they point to the same
directory).

Fix this by asking pwd to canonicalize the name of the trash
directory for us.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoerror_routine: use parent's stderr if exec fails
Clemens Buchacher [Wed, 27 Jul 2011 21:32:34 +0000 (23:32 +0200)]
error_routine: use parent's stderr if exec fails

The new process's error output may be redirected elsewhere, but if
the exec fails, output should still go to the parent's stderr. This
has already been done for the die_routine. Do the same for
error_routine.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation: clarify the invalidated tree entry format
Carlos Martín Nieto [Tue, 26 Jul 2011 12:27:57 +0000 (14:27 +0200)]
Documentation: clarify the invalidated tree entry format

When the entry_count is -1, the tree is invalidated and therefore has
not associated hash (or object name). Explicitly state that the next
entry starts after the newline.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agosubmodule: update and add must honor --quiet flag
Jens Lehmann [Tue, 26 Jul 2011 21:39:03 +0000 (23:39 +0200)]
submodule: update and add must honor --quiet flag

When using the --quiet flag "git submodule update" and "git submodule add"
didn't behave as the documentation stated. They printed progress output
from the clone, even though they should only print error messages.

Fix that by passing the -q flag to git clone in module_clone() when the
GIT_QUIET variable is set. Two tests in t7400 have been modified to test
that behavior.

Reported-by: Daniel Holtmann-Rice <flyingtabmow@gmail.com>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoEnsure git ls-tree exits with a non-zero exit code if read_tree_recursive fails.
Jon Seymour [Sun, 24 Jul 2011 14:59:14 +0000 (00:59 +1000)]
Ensure git ls-tree exits with a non-zero exit code if read_tree_recursive fails.

In the case of a corrupt repository, git ls-tree may report an error but
presently it exits with a code of 0.

This change uses the return code of read_tree_recursive instead.

Improved-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agotests: print failed test numbers at the end of the test run
Jens Lehmann [Sun, 24 Jul 2011 13:35:54 +0000 (15:35 +0200)]
tests: print failed test numbers at the end of the test run

On modern multi-core processors "make test" is often run in multiple jobs.
If one of them fails the test run does stop, but the concurrently running
tests finish their run. It is rather easy to find out which test failed by
doing a "ls -d t/trash*". But that only works when you don't use the "-i"
option to "make test" because you want to get an overview of all failing
tests. In that case all thrash directories are deleted end and the
information which tests failed is lost.

If one or more tests failed, print a list of them before the test summary:

failed test(s): t1000 t6500

fixed   0
success 7638
failed  3
broken  49
total   7723

This makes it possible to just run the test suite with -i and collect all
failed test scripts at the end for further examination.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoAdd a test to check that git ls-tree sets non-zero exit code on error.
Jon Seymour [Sun, 24 Jul 2011 14:59:13 +0000 (00:59 +1000)]
Add a test to check that git ls-tree sets non-zero exit code on error.

Expected to fail at this commit, fixed by subsequent commit.

Additional tests of adhoc or uncategorised nature should be added to this
file.

Improved-by: Jens Lehmann <Jens.Lehmann@web.de>
Improved-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodoc/fast-import: clarify notemodify command
Dmitry Ivankov [Wed, 13 Jul 2011 17:10:53 +0000 (23:10 +0600)]
doc/fast-import: clarify notemodify command

The "notemodify" fast-import command was introduced in commit a8dd2e7
(fast-import: Add support for importing commit notes, 2009-10-09)
The commit log has slightly different description than the added
documentation. The latter is somewhat confusing. "notemodify" is a
subcommand of "commit" command used to add a note for some commit.
Does this note annotate the commit produced by the "commit" command
or a commit given by it's committish parameter? Which notes tree
does it write notes to?

The exact meaning could be deduced with old description and some
notes machinery knowledge. But let's make it more obvious. This
command is used in a context like "commit refs/notes/test" to
add or rewrite an annotation for a committish parameter. So the
advised way to add notes in a fast-import stream is:
1) import some commits (optional)
2) prepare a "commit" to the notes tree:
2.1) choose notes ref, committer, log message, etc.
2.2) create annotations with "notemodify", where each can refer to
a commit being annotated via a branch name, import mark reference,
sha1 and other expressions specified in the Documentation.

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoreset: give better reflog messages
Jeff King [Fri, 22 Jul 2011 16:12:23 +0000 (10:12 -0600)]
reset: give better reflog messages

The reset command creates its reflog entry from argv.
However, it does so after having run parse_options, which
means the only thing left in argv is any non-option
arguments. Thus you would end up with confusing reflog
entries like:

  $ git reset --hard HEAD^
  $ git reset --soft HEAD@{1}
  $ git log -2 -g --oneline
  8e46cad HEAD@{0}: HEAD@{1}: updating HEAD
  1eb9486 HEAD@{1}: HEAD^: updating HEAD

However, we must also consider that some scripts may set
GIT_REFLOG_ACTION before calling reset, and we need to show
their reflog action (with our text appended). For example:

  rebase -i (squash): updating HEAD

On top of that, we also set the ORIG_HEAD reflog action
(even though it doesn't generally exist). In that case, the
reset argument is somewhat meaningless, as it has nothing to
do with what's in ORIG_HEAD.

This patch changes the reset reflog code to show:

  $GIT_REFLOG_ACTION: updating {HEAD,ORIG_HEAD}

as before, but only if GIT_REFLOG_ACTION is set. Otherwise,
show:

   reset: moving to $rev

for HEAD, and:

   reset: updating ORIG_HEAD

for ORIG_HEAD (this is still somewhat superfluous, since we
are in the ORIG_HEAD reflog, obviously, but at least we now
mention which command was used to update it).

While we're at it, we can clean up the code a bit:

 - Use strbufs to make the message.

 - Use the "rev" parameter instead of showing all options.
   This makes more sense, since it is the only thing
   impacting the writing of the ref.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation: minor grammatical fix in rev-list-options.txt
Jack Nagel [Fri, 22 Jul 2011 01:33:15 +0000 (20:33 -0500)]
Documentation: minor grammatical fix in rev-list-options.txt

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation: git-filter-branch honors replacement refs
Peter Collingbourne [Thu, 21 Jul 2011 15:10:52 +0000 (16:10 +0100)]
Documentation: git-filter-branch honors replacement refs

Make it clear that git-filter-branch will honor and make permanent
replacement refs as well as grafts.

Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoremote-curl: Add a format check to parsing of info/refs
Julian Phillips [Sat, 16 Jul 2011 18:23:51 +0000 (19:23 +0100)]
remote-curl: Add a format check to parsing of info/refs

When parsing info/refs, no checks were applied that the file was in
the requried format.  Since the file is read from a remote webserver,
this isn't guarenteed to be true.  Add a check that the file at least
only contains lines that consist of 40 characters followed by a tab
and then the ref name.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-config: Remove extra whitespaces
Pavan Kumar Sunkara [Sat, 16 Jul 2011 21:55:52 +0000 (03:25 +0530)]
git-config: Remove extra whitespaces

Remove extra whitespaces introduced by commits
01ebb9dc and fc1905bb

Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agotests: cleanup binary test vector files
Vitaliy Ivanov [Tue, 19 Jul 2011 17:21:47 +0000 (20:21 +0300)]
tests: cleanup binary test vector files

The test4012.png test vector file that was originally used for t4012 to
check operations on binary files was later reused in other tests, making
it no longer consistent to name it after a specific test. Rename it to more
generic "test-binary-1.png".

While at it, rename test9200b to "test-binary-2.png" (even though it is
only used by t9200).

Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDo not log unless all connect() attempts fail
Dave Zarzycki [Tue, 12 Jul 2011 16:28:34 +0000 (09:28 -0700)]
Do not log unless all connect() attempts fail

IPv6 hosts are often unreachable on the primarily IPv4 Internet and
therefore we shouldn't print an error if there are still other hosts we
can try to connect() to. This helps "git fetch --quiet" stay quiet.

Signed-off-by: Dave Zarzycki <zarzycki@apple.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agorebase: clarify "restore the original branch"
Martin von Zweigbergk [Thu, 14 Jul 2011 03:47:06 +0000 (23:47 -0400)]
rebase: clarify "restore the original branch"

The description for 'git rebase --abort' currently says:

    Restore the original branch and abort the rebase operation.

The "restore" can be misinterpreted to imply that the original branch
was somehow in a broken state during the rebase operation. It is also
not completely clear what "the original branch" is --- is it the
branch that was checked out before the rebase operation was called or
is the the branch that is being rebased (it is the latter)? Although
both issues are made clear in the DESCRIPTION section, let us also
make the entry in the OPTIONS secion more clear.

Also remove the term "rebasing process" from the usage text, since the
user already knows that the text is about "git rebase".

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoreset [<commit>] paths...: do not mishandle unmerged paths
Junio C Hamano [Thu, 14 Jul 2011 04:36:29 +0000 (21:36 -0700)]
reset [<commit>] paths...: do not mishandle unmerged paths

Because "diff --cached HEAD" showed an incorrect blob object name on the
LHS of the diff, we ended up updating the index entry with bogus value,
not what we read from the tree.

Noticed by John Nowak.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation: clearly specify what refs are honored by core.logAllRefUpdates
Bert Wesarg [Mon, 11 Jul 2011 09:14:18 +0000 (11:14 +0200)]
Documentation: clearly specify what refs are honored by core.logAllRefUpdates

The documentation for logging updates in git-update-ref, doesn't make it
clear that only a specific subset of refs are honored by this variable.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoget_pwd_cwd(): Do not trust st_dev/st_ino blindly
Johannes Schindelin [Sat, 9 Jul 2011 17:38:08 +0000 (19:38 +0200)]
get_pwd_cwd(): Do not trust st_dev/st_ino blindly

10c4c88 (Allow add_path() to add non-existent directories to the path,
2008-07-21) introduced get_pwd_cwd() function in order to favor $PWD when
getenv("PWD") and getcwd() refer to the same directory but are different
strings (e.g. the former gives a nicer looking name via a symbolic link to
an uglier looking automounted path). The function tried to determine if
two directories are the same by running stat(2) on both and comparing
ino/dev fields.

Unfortunately, stat() does not fill any ino or dev fields in msysgit.  But
there is a telltale: both ino and dev are 0 when they are not filled
correctly, so let's be extra cautious.

This happens to fix a bug in "get-receive-pack working_directory/" when
the GIT_DIR would not be set correctly due to absolute_path(".")
returning the wrong value.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agohelp_unknown_cmd: do not propose an "unknown" cmd
Michael Schubert [Fri, 8 Jul 2011 10:08:49 +0000 (12:08 +0200)]
help_unknown_cmd: do not propose an "unknown" cmd

When executing an external shell script like `git foo` with a bad
shebang, e.g. "#!/usr/bin/not/existing", execvp returns 127 (ENOENT).

Since help_unknown_cmd proposes the use of all external commands similar
to the name of the "unknown" command, it suggests the just failed command
again. Stop it and give some advice to the user.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge commit 'v1.7.6' into jc/checkout-reflog-fix
Junio C Hamano [Wed, 6 Jul 2011 22:38:28 +0000 (15:38 -0700)]
Merge commit 'v1.7.6' into jc/checkout-reflog-fix

* commit 'v1.7.6': (3211 commits)
  Git 1.7.6
  completion: replace core.abbrevguard to core.abbrev
  Git 1.7.6-rc3
  Documentation: git diff --check respects core.whitespace
  gitweb: 'pickaxe' and 'grep' features requires 'search' to be enabled
  t7810: avoid unportable use of "echo"
  plug a few coverity-spotted leaks
  builtin/gc.c: add missing newline in message
  tests: link shell libraries into valgrind directory
  t/Makefile: pass test opts to valgrind target properly
  sh-i18n--envsubst.c: do not #include getopt.h
  Fix typo: existant->existent
  Git 1.7.6-rc2
  gitweb: do not misparse nonnumeric content tag files that contain a digit
  Git 1.7.6-rc1
  fetch: do not leak a refspec
  t3703: skip more tests using colons in file names on Windows
  gitweb: Fix usability of $prevent_xss
  gitweb: Move "Requirements" up in gitweb/INSTALL
  gitweb: Describe CSSMIN and JSMIN in gitweb/INSTALL
  ...

12 years agoMerge commit 'v1.7.0' into jc/checkout-reflog-fix
Junio C Hamano [Wed, 6 Jul 2011 22:38:18 +0000 (15:38 -0700)]
Merge commit 'v1.7.0' into jc/checkout-reflog-fix

* commit 'v1.7.0': (4188 commits)
  Git 1.7.0
  Fix typo in 1.6.6.2 release notes
  Re-fix check-ref-format documentation mark-up
  archive documentation: attributes are taken from the tree by default
  Documentation: minor fixes to RelNotes-1.7.0
  bash: support 'git am's new '--continue' option
  filter-branch: Fix error message for --prune-empty --commit-filter
  am: switch --resolved to --continue
  Update draft release notes to 1.7.0 one more time
  Git 1.6.6.2
  t8003: check exit code of command and error message separately
  check-ref-format documentation: fix enumeration mark-up
  Documentation: quote braces in {upstream} notation
  t3902: Protect against OS X normalization
  blame: prevent a segv when -L given start > EOF
  git-push: document all the status flags used in the output
  Fix parsing of imap.preformattedHTML and imap.sslverify
  git-add documentation: Fix shell quoting example
  Revert "pack-objects: fix pack generation when using pack_size_limit"
  archive: simplify archive format guessing
  ...

12 years agoMerge commit 'v1.6.0' into jc/checkout-reflog-fix
Junio C Hamano [Wed, 6 Jul 2011 22:37:42 +0000 (15:37 -0700)]
Merge commit 'v1.6.0' into jc/checkout-reflog-fix

* commit 'v1.6.0': (2063 commits)
  GIT 1.6.0
  git-p4: chdir now properly sets PWD environment variable in msysGit
  Improve error output of git-rebase
  t9300: replace '!' with test_must_fail
  Git.pm: Make File::Spec and File::Temp requirement lazy
  Documentation: document the pager.* configuration setting
  git-stash: improve synopsis in help and manual page
  Makefile: building git in cygwin 1.7.0
  git-am: ignore --binary option
  bash-completion: Add non-command git help files to bash-completion
  Fix t3700 on filesystems which do not support question marks in names
  Utilise our new p4_read_pipe and p4_write_pipe wrappers
  Add p4 read_pipe and write_pipe wrappers
  bash completion: Add '--merge' long option for 'git log'
  bash completion: Add completion for 'git mergetool'
  git format-patch documentation: clarify what --cover-letter does
  bash completion: 'git apply' should use 'fix' not 'strip'
  t5304-prune: adjust file mtime based on system time rather than file mtime
  test-parse-options: use appropriate cast in length_callback
  Fix escaping of glob special characters in pathspecs
  ...

Conflicts:
builtin-checkout.c