git.git
14 years agostart_command: report child process setup errors to the parent's stderr
Johannes Sixt [Sun, 10 Jan 2010 13:07:52 +0000 (14:07 +0100)]
start_command: report child process setup errors to the parent's stderr

When the child process's environment is set up in start_command(), error
messages were written to wherever the parent redirected the child's stderr
channel. However, even if the parent redirected the child's stderr, errors
during this setup process, including the exec itself, are usually an
indication of a problem in the parent's environment. Therefore, the error
messages should go to the parent's stderr.

Redirection of the child's error messages is usually only used to redirect
hook error messages during client-server exchanges. In these cases, hook
setup errors could be regarded as information leak.

This patch makes a copy of stderr if necessary and uses a special
die routine that is used for all die() calls in the child that sends the
errors messages to the parent's stderr.

The trace call that reported a failed execvp is removed (because it writes
to stderr) and replaced by die_errno() with special treatment of ENOENT.
The improvement in the error message can be seen with this sequence:

   mkdir .git/hooks/pre-commit
   git commit

Previously, the error message was

   error: cannot run .git/hooks/pre-commit: No such file or directory

and now it is

   fatal: cannot exec '.git/hooks/pre-commit': Permission denied

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoReset possible helper before reusing remote structure
Ilari Liusvaara [Sat, 9 Jan 2010 17:28:12 +0000 (19:28 +0200)]
Reset possible helper before reusing remote structure

If one had multiple URLs configured for remote with previous one
having forced helper but the subsequent one not, like:

url = foo::bar://baz
url = ssh://example/example.git

Then the subsequent URL is passed to foo helper, which isn't
correct. Fix it to be parsed normally by resetting foreign VCS
name before parsing the URL protocol.

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoRemove special casing of http, https and ftp
Ilari Liusvaara [Wed, 9 Dec 2009 15:26:34 +0000 (17:26 +0200)]
Remove special casing of http, https and ftp

HTTP, HTTPS and FTP are no longer special to transport code. Also
add support for FTPS (curl supports it so it is easy).

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoSupport remote archive from all smart transports
Ilari Liusvaara [Wed, 9 Dec 2009 15:26:33 +0000 (17:26 +0200)]
Support remote archive from all smart transports

Previously, remote archive required internal (non remote-helper)
smart transport. Extend the remote archive to also support smart
transports implemented by remote helpers.

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoSupport remote helpers implementing smart transports
Ilari Liusvaara [Wed, 9 Dec 2009 15:26:32 +0000 (17:26 +0200)]
Support remote helpers implementing smart transports

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoSupport taking over transports
Ilari Liusvaara [Wed, 9 Dec 2009 15:26:31 +0000 (17:26 +0200)]
Support taking over transports

Add support for taking over transports that turn out to be smart.

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoRefactor git transport options parsing
Ilari Liusvaara [Wed, 9 Dec 2009 15:26:30 +0000 (17:26 +0200)]
Refactor git transport options parsing

Refactor the transport options parsing so that protocols that aren't
directly smart transports (file://, git://, ssh:// & co) can record
the smart transport options for the case if it turns that transport
can actually be smart.

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoPass unknown protocols to external protocol handlers
Ilari Liusvaara [Wed, 9 Dec 2009 15:26:29 +0000 (17:26 +0200)]
Pass unknown protocols to external protocol handlers

Change URL handling to allow external protocol handlers to implement
new protocols without the '::' syntax if helper name does not conflict
with any built-in protocol.

foo:// now invokes git-remote-foo with foo:// as the URL.

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoSupport mandatory capabilities
Ilari Liusvaara [Wed, 9 Dec 2009 15:26:28 +0000 (17:26 +0200)]
Support mandatory capabilities

Add support for marking capability as mandatory for hosting git version
to understand. This is useful for helpers which require various types
of assistance from main git binary.

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoAdd remote helper debug mode
Ilari Liusvaara [Wed, 9 Dec 2009 15:26:27 +0000 (17:26 +0200)]
Add remote helper debug mode

Remote helpers deadlock easily, so support debug mode which shows the
interaction steps.

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'master' into il/vcs-helper
Junio C Hamano [Mon, 7 Dec 2009 06:40:16 +0000 (22:40 -0800)]
Merge branch 'master' into il/vcs-helper

* master: (334 commits)
  bash: update 'git commit' completion
  Git 1.6.5.5
  Fix diff -B/--dirstat miscounting of newly added contents
  reset: improve worktree safety valves
  Documentation: Avoid use of xmlto --stringparam
  archive: clarify description of path parameter
  rerere: don't segfault on failure to open rr-cache
  Prepare for 1.6.5.5
  gitweb: Describe (possible) gitweb.js minification in gitweb/README
  Documentation: xmlto 0.0.18 does not know --stringparam
  Fix crasher on encountering SHA1-like non-note in notes tree
  t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
  t4201: use ISO8859-1 rather than ISO-8859-1
  Git 1.6.5.4
  Unconditionally set man.base.url.for.relative.links
  Documentation/Makefile: allow man.base.url.for.relative.link to be set from Make
  Git 1.6.6-rc1
  git-pull.sh: Fix call to git-merge for new command format
  Prepare for 1.6.5.4
  merge: do not add standard message when message is given with -m option
  ...

Conflicts:
Documentation/git-remote-helpers.txt
Makefile
builtin-ls-remote.c
builtin-push.c
transport-helper.c

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobash: update 'git commit' completion
SZEDER Gábor [Sat, 5 Dec 2009 00:51:41 +0000 (01:51 +0100)]
bash: update 'git commit' completion

I just wanted to add the recently learnt '--reset-author' option, but
then noticed that there are many more options missing.  This patch
adds support for all of 'git commit's options, except '--allow-empty',
because it is primarily there for foreign scm interfaces.

Furthermore, this patch also adds support for completing the arguments
of those options that take a non-filename argument: valid modes are
offered for '--cleanup' and '--untracked-files', while refs for
'--reuse-message' and '--reedit-message', because these two take a
commit as argument.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoSync with 1.6.5.5
Junio C Hamano [Sat, 5 Dec 2009 19:39:13 +0000 (11:39 -0800)]
Sync with 1.6.5.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoGit 1.6.5.5 v1.6.5.5
Junio C Hamano [Sat, 5 Dec 2009 19:08:35 +0000 (11:08 -0800)]
Git 1.6.5.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoFix diff -B/--dirstat miscounting of newly added contents
Linus Torvalds [Fri, 4 Dec 2009 20:07:47 +0000 (12:07 -0800)]
Fix diff -B/--dirstat miscounting of newly added contents

What used to happen is that diffcore_count_changes() simply ignored any
hashes in the destination that didn't match hashes in the source. EXCEPT
if the source hash didn't exist at all, in which case it would count _one_
destination hash that happened to have the "next" hash value.  As a
consequence, newly added material was often undercounted, making output
from --dirstat and "complete rewrite" detection used by -B unrelialble.

This changes it so that:

 - whenever it bypasses a destination hash (because it doesn't match a
   source), it counts the bytes associated with that as "literal added"

 - at the end (once we have used up all the source hashes), we do the same
   thing with the remaining destination hashes.

 - when hashes do match, and we use the difference in counts as a value,
   we also use up that destination hash entry (the 'd++').

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoreset: improve worktree safety valves
Jeff King [Fri, 4 Dec 2009 11:11:58 +0000 (06:11 -0500)]
reset: improve worktree safety valves

The existing code checked to make sure we were not in a bare
repository when doing a hard reset. However, we should take
this one step further, and make sure we are in a worktree.
Otherwise, we can end up munging files inside of '.git'.

Furthermore, we should do the same check for --merge resets,
which have the same properties. Actually, a merge reset of
HEAD^ would already complain, since further down in the code
we want a worktree. However, it is nicer to check up-front;
then we are sure we cover all cases ("git reset --merge"
would run, even though it wasn't doing anything) and we can
give a more specific message.

Add tests to t7103 to cover these cases and some missing ones.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation: Avoid use of xmlto --stringparam
Todd Zullinger [Fri, 4 Dec 2009 17:53:21 +0000 (12:53 -0500)]
Documentation: Avoid use of xmlto --stringparam

The --stringparam option is not available on older xmlto versions.
Instead, set man.base.url.for.relative.links via a .xsl file.  Older
docbook versions will ignore this without causing grief to users of
older xmlto versions.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoarchive: clarify description of path parameter
René Scharfe [Fri, 4 Dec 2009 23:11:01 +0000 (00:11 +0100)]
archive: clarify description of path parameter

Mention that path parameters are based on the current working directory.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
--
 Documentation/git-archive.txt |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agorerere: don't segfault on failure to open rr-cache
Jeff King [Fri, 4 Dec 2009 10:35:57 +0000 (05:35 -0500)]
rerere: don't segfault on failure to open rr-cache

The rr-cache directory should always exist if we are doing
garbage collection (earlier code paths check this
explicitly), but we may not necessarily succeed in opening
it (for example, due to permissions problems). In that case,
we should print an error message rather than simply
segfaulting.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobuiltin-push: don't access freed transport->url
Tay Ray Chuan [Thu, 3 Dec 2009 23:31:44 +0000 (07:31 +0800)]
builtin-push: don't access freed transport->url

Move the failed push message to before transport_disconnect() so that
it doesn't access transport->url after transport has been free()'d (in
transport_disconnect()).

Additionally, make the failed push message more accurate by moving it
before transport_disconnect(), so that it doesn't report errors due
to a failed disconnect.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Thu, 3 Dec 2009 22:07:46 +0000 (14:07 -0800)]
Merge branch 'maint'

* maint:
  Prepare for 1.6.5.5
  Documentation: xmlto 0.0.18 does not know --stringparam
  t4201: use ISO8859-1 rather than ISO-8859-1

15 years agoPrepare for 1.6.5.5
Junio C Hamano [Thu, 3 Dec 2009 22:07:32 +0000 (14:07 -0800)]
Prepare for 1.6.5.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'uk/maint-shortlog-encoding' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:56:50 +0000 (13:56 -0800)]
Merge branch 'uk/maint-shortlog-encoding' into maint

* uk/maint-shortlog-encoding:
  t4201: use ISO8859-1 rather than ISO-8859-1
  shortlog: respect commit encoding

15 years agoMerge branch 'fc/maint-format-patch-pathspec-dashes' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:54:25 +0000 (13:54 -0800)]
Merge branch 'fc/maint-format-patch-pathspec-dashes' into maint

* fc/maint-format-patch-pathspec-dashes:
  format-patch: add test for parsing of "--"
  format-patch: fix parsing of "--" on the command line

15 years agoMerge branch 'ap/maint-merge-strategy-list-fix' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:54:11 +0000 (13:54 -0800)]
Merge branch 'ap/maint-merge-strategy-list-fix' into maint

* ap/maint-merge-strategy-list-fix:
  builtin-merge.c: call exclude_cmds() correctly.

15 years agoMerge branch 'jc/maint-am-keep' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:54:03 +0000 (13:54 -0800)]
Merge branch 'jc/maint-am-keep' into maint

* jc/maint-am-keep:
  Remove dead code from "git am"

15 years agoMerge branch 'rs/work-around-grep-opt-insanity' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:53:58 +0000 (13:53 -0800)]
Merge branch 'rs/work-around-grep-opt-insanity' into maint

* rs/work-around-grep-opt-insanity:
  Protect scripted Porcelains from GREP_OPTIONS insanity
  mergetool--lib: simplify guess_merge_tool()

15 years agoMerge branch 'rj/maint-cygwin-count-objects' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:53:54 +0000 (13:53 -0800)]
Merge branch 'rj/maint-cygwin-count-objects' into maint

* rj/maint-cygwin-count-objects:
  git-count-objects: Fix a disk-space under-estimate on Cygwin

15 years agoMerge branch 'mm/maint-hint-failed-merge' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:52:54 +0000 (13:52 -0800)]
Merge branch 'mm/maint-hint-failed-merge' into maint

* mm/maint-hint-failed-merge:
  user-manual: Document that "git merge" doesn't like uncommited changes.
  merge-recursive: point the user to commit when file would be overwritten.

15 years agoMerge branch 'th/maint-remote-update-help-string' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:52:31 +0000 (13:52 -0800)]
Merge branch 'th/maint-remote-update-help-string' into maint

* th/maint-remote-update-help-string:
  Update 'git remote update' usage string to match man page.

15 years agoMerge branch 'rj/maint-t9700' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:52:22 +0000 (13:52 -0800)]
Merge branch 'rj/maint-t9700' into maint

* rj/maint-t9700:
  t9700-perl-git.sh: Fix a test failure on Cygwin

15 years agoMerge branch 'ls/maint-mailinfo-no-inbody' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:52:16 +0000 (13:52 -0800)]
Merge branch 'ls/maint-mailinfo-no-inbody' into maint

* ls/maint-mailinfo-no-inbody:
  git am/mailinfo: Don't look at in-body headers when rebasing

15 years agoMerge branch 'mo/maint-crlf-doc' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:52:11 +0000 (13:52 -0800)]
Merge branch 'mo/maint-crlf-doc' into maint

* mo/maint-crlf-doc:
  core.autocrlf documentation: mention the crlf attribute

15 years agoMerge branch 'th/remote-usage' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:51:53 +0000 (13:51 -0800)]
Merge branch 'th/remote-usage' into maint

* th/remote-usage:
  git remote: Separate usage strings for subcommands

15 years agoMerge branch 'pb/maint-use-custom-perl' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:51:41 +0000 (13:51 -0800)]
Merge branch 'pb/maint-use-custom-perl' into maint

* pb/maint-use-custom-perl:
  Make sure $PERL_PATH is defined when the test suite is run.

15 years agoMerge branch 'mm/config-pathname-tilde-expand' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:51:36 +0000 (13:51 -0800)]
Merge branch 'mm/config-pathname-tilde-expand' into maint

* mm/config-pathname-tilde-expand:
  Documentation: avoid xmlto input error
  expand_user_path: expand ~ to $HOME, not to the actual homedir.
  Expand ~ and ~user in core.excludesfile, commit.template

15 years agoMerge branch 'bc/grep-i-F' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:51:26 +0000 (13:51 -0800)]
Merge branch 'bc/grep-i-F' into maint

* bc/grep-i-F:
  grep: Allow case insensitive search of fixed-strings

15 years agoMerge branch 'jk/maint-break-rename-reduce-memory' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:51:21 +0000 (13:51 -0800)]
Merge branch 'jk/maint-break-rename-reduce-memory' into maint

* jk/maint-break-rename-reduce-memory:
  diffcore-rename: reduce memory footprint by freeing blob data early
  diffcore-break: save cnt_data for other phases
  diffcore-break: free filespec data as we go

15 years agoMerge branch 'rj/maint-simplify-cygwin-makefile' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:51:16 +0000 (13:51 -0800)]
Merge branch 'rj/maint-simplify-cygwin-makefile' into maint

* rj/maint-simplify-cygwin-makefile:
  Makefile: merge two Cygwin configuration sections into one

15 years agoMerge branch 'rg/doc-workflow' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:50:41 +0000 (13:50 -0800)]
Merge branch 'rg/doc-workflow' into maint

* rg/doc-workflow:
  Add branch management for releases to gitworkflows

15 years agoMerge branch 'np/maint-sideband-favor-status' into maint
Junio C Hamano [Thu, 3 Dec 2009 21:50:24 +0000 (13:50 -0800)]
Merge branch 'np/maint-sideband-favor-status' into maint

* np/maint-sideband-favor-status:
  give priority to progress messages

15 years agogitweb: Describe (possible) gitweb.js minification in gitweb/README
Jakub Narebski [Wed, 2 Dec 2009 21:14:36 +0000 (22:14 +0100)]
gitweb: Describe (possible) gitweb.js minification in gitweb/README

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation: xmlto 0.0.18 does not know --stringparam
Junio C Hamano [Thu, 3 Dec 2009 19:12:32 +0000 (11:12 -0800)]
Documentation: xmlto 0.0.18 does not know --stringparam

Newer DocBook stylesheets want man.base.url.for.relative.links
parameter set when formatting manpages with external references
to turn them into full URLs, and leave a helpful "you should
set this parameter" message in the output.  Earlier we added
the MAN_BASE_URL make variable to specify the value for it.

When MAN_BASE_URL is not given, it ought to be safe to set the
parameter to empty; it would result in an empty leading path for
older stylesheets that ignore the parameter, and newer ones
would produce the same "relative URL" without the message.

Unfortunately, older xmlto (at least version 0.0.18 released in
early 2004 that comes with RHEL/CentOS 5) does not understand
the --stringparam command line option, so we cannot add the
parameter definition unconditionally to the command line.  Work
it around by passing the parameter only when set.

If you do not have a suitable URL prefix, you can pass a quoted empty
string to it, like so:

    $ make MAN_BASE_URL='""'

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoFix crasher on encountering SHA1-like non-note in notes tree
Johan Herland [Thu, 3 Dec 2009 03:53:54 +0000 (04:53 +0100)]
Fix crasher on encountering SHA1-like non-note in notes tree

When loading a notes tree, the code primarily looks for SHA1-like paths
whose total length (discounting directory separators) are 40 chars
(interpreted as valid note entries) or less (interpreted as subtree
entries that may in turn contain note entries when unpacked).

However, there is an additional condition that must hold for valid
subtree entries: They must be _tree_ objects (duh).

This patch adds an appropriate test for this condition, thereby fixing
the crash that occured when passing a non-tree object to the tree-walk
API.

The patch also adds another selftest verifying correct behaviour of
non-notes in note trees.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
Brandon Casey [Thu, 3 Dec 2009 17:52:46 +0000 (11:52 -0600)]
t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'

The '--no-chain-reply-to' option is a Getopt::Long boolean option. The
'--no-' prefix (as in --no-chain-reply-to) for boolean options is not
supported in Getopt::Long version 2.32 which was released with Perl 5.8.0.
This version only supports '--no' as in '--nochain-reply-to'.  More recent
versions of Getopt::Long, such as version 2.34, support either prefix. So
use the older form in the tests.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot4201: use ISO8859-1 rather than ISO-8859-1
Brandon Casey [Thu, 3 Dec 2009 17:52:45 +0000 (11:52 -0600)]
t4201: use ISO8859-1 rather than ISO-8859-1

Some ancient platforms do not have an extensive list of alternate names for
character encodings.  For example, Solaris 7 and IRIX 6.5 do not know that
ISO-8859-1 is the same as ISO8859-1.  Modern platforms do know this, so use
the older name.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge in 1.6.5.4
Junio C Hamano [Thu, 3 Dec 2009 08:37:56 +0000 (00:37 -0800)]
Merge in 1.6.5.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoGit 1.6.5.4 v1.6.5.4
Junio C Hamano [Thu, 3 Dec 2009 08:08:16 +0000 (00:08 -0800)]
Git 1.6.5.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoUnconditionally set man.base.url.for.relative.links
Junio C Hamano [Thu, 3 Dec 2009 08:06:52 +0000 (00:06 -0800)]
Unconditionally set man.base.url.for.relative.links

Even setting it to empty is better than leaving it unset as it
prevents the warning cruft from appearing in the output.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Thu, 3 Dec 2009 02:45:26 +0000 (02:45 +0000)]
Merge branch 'maint'

15 years agoDocumentation/Makefile: allow man.base.url.for.relative.link to be set from Make
Junio C Hamano [Thu, 3 Dec 2009 02:45:09 +0000 (02:45 +0000)]
Documentation/Makefile: allow man.base.url.for.relative.link to be set from Make

Signed-off-by: Junio C Hamano <junio@kernel.org>
15 years agoGit 1.6.6-rc1 v1.6.6-rc1
Junio C Hamano [Wed, 2 Dec 2009 18:50:17 +0000 (10:50 -0800)]
Git 1.6.6-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-pull.sh: Fix call to git-merge for new command format
Horst H. von Brand [Tue, 1 Dec 2009 22:44:11 +0000 (19:44 -0300)]
git-pull.sh: Fix call to git-merge for new command format

Now "git merge <msg> HEAD" is officially deprecated, we should
clean our own use as well.

Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Wed, 2 Dec 2009 18:30:12 +0000 (10:30 -0800)]
Merge branch 'maint'

* maint:
  Prepare for 1.6.5.4
  merge: do not add standard message when message is given with -m option
  Do not misidentify "git merge foo HEAD" as an old-style invocation

Conflicts:
RelNotes

15 years agoPrepare for 1.6.5.4
Junio C Hamano [Wed, 2 Dec 2009 18:29:00 +0000 (10:29 -0800)]
Prepare for 1.6.5.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agomerge: do not add standard message when message is given with -m option
Junio C Hamano [Wed, 2 Dec 2009 18:00:58 +0000 (10:00 -0800)]
merge: do not add standard message when message is given with -m option

Even if the user explicitly gave her own message to "git merge", the
command still added its standard merge message.  It resulted in a
useless repetition like this:

    % git merge -m "Merge early part of side branch" `git rev-parse side~2`
    % git show -s
    commit 37217141e7519629353738d5e4e677a15096206f
    Merge: e68e646 a1d2374
    Author: しらいし ななこ <nanako3@lavabit.com>
    Date:   Wed Dec 2 14:33:20 2009 +0900

Merge early part of side branch

Merge commit 'a1d2374f8f52f4e8a53171601a920b538a6cec23'

The gave her own message because she didn't want git to add the
standard message (if she wanted to, she wouldn't have given one,
or she would have prepared it using git-fmt-merge-msg command).

Noticed by Nanako Shiraishi

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDo not misidentify "git merge foo HEAD" as an old-style invocation
Junio C Hamano [Wed, 2 Dec 2009 17:59:35 +0000 (09:59 -0800)]
Do not misidentify "git merge foo HEAD" as an old-style invocation

This was misinterpreted as an ancient style "git merge <message> HEAD
<commit> <commit>..." that merges one (or more) <commit> into the current
branch and record the resulting commit with the given message.  Then a
later sanity check found that there is no <commit> specified and gave
a usage message.

Tested-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoUpdate draft release notes to 1.6.6 before -rc1
Junio C Hamano [Mon, 30 Nov 2009 23:54:08 +0000 (15:54 -0800)]
Update draft release notes to 1.6.6 before -rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Tue, 1 Dec 2009 20:47:04 +0000 (12:47 -0800)]
Merge branch 'maint'

* maint:
  help: Do not unnecessarily look for a repository
  Documentation: Fix a few i.e./e.g. mix-ups
  Documentation: Document --branch option in git clone synopsis

15 years agoMerge branch 'jc/deprecate-old-syntax-from-merge'
Junio C Hamano [Tue, 1 Dec 2009 20:47:01 +0000 (12:47 -0800)]
Merge branch 'jc/deprecate-old-syntax-from-merge'

* jc/deprecate-old-syntax-from-merge:
  git-merge: a deprecation notice of the ancient command line syntax

15 years agogit-merge: a deprecation notice of the ancient command line syntax
Junio C Hamano [Tue, 1 Dec 2009 00:23:50 +0000 (16:23 -0800)]
git-merge: a deprecation notice of the ancient command line syntax

The ancient form of git merge command used in the original sample script
has been copied from Linus and are still found everywhere, I think, and
people may still have it in their scripts, but on the other hand, it is so
unintuitive that even people reasonably familiar with git are surprised by
accidentally triggering the support to parse this ancient form.

Gently nudge people to upgrade their script to more recent and readable
style for eventual removal of the original syntax.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'bw/remote-get-ref-states-fix'
Junio C Hamano [Tue, 1 Dec 2009 20:26:45 +0000 (12:26 -0800)]
Merge branch 'bw/remote-get-ref-states-fix'

* bw/remote-get-ref-states-fix:
  get_ref_states: strdup entries and free util in stale list

15 years agoget_ref_states: strdup entries and free util in stale list
Bert Wesarg [Mon, 30 Nov 2009 23:57:27 +0000 (00:57 +0100)]
get_ref_states: strdup entries and free util in stale list

The entries in states->stale list is filled in handle_one_branch() that is
a call-back funcation to for_each_ref() using the callback parameter given
to it.  We need to strdup() the refnames (both the string list key and the
value stored in util) for more permanent storage and free them when we are
done.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agohelp: Do not unnecessarily look for a repository
David Aguilar [Tue, 1 Dec 2009 19:27:34 +0000 (11:27 -0800)]
help: Do not unnecessarily look for a repository

Although 'git help' actually doesn't need to be run inside a git
repository and uses no repository-specific information, it looks for a git
directory.  Searching for a git directory can be annoying in auto-mount
environments.  With this commit, 'git help' no longer searches for a
repository when run without any options.

7c3baa9 originally modified 'git help -a' to not require a repository.
This applies the same fix for 'git help'.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation: Fix a few i.e./e.g. mix-ups
Michael J Gruber [Tue, 1 Dec 2009 09:19:05 +0000 (10:19 +0100)]
Documentation: Fix a few i.e./e.g. mix-ups

A git bundle can be transported by several means (such as e-mail), not
only by snekaernet, so use e.g. instead of i.e.

The mix-up in git-bundle.txt is obvious.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'jn/gitweb-blame'
Junio C Hamano [Tue, 1 Dec 2009 19:28:15 +0000 (11:28 -0800)]
Merge branch 'jn/gitweb-blame'

* jn/gitweb-blame:
  gitweb: Add link to other blame implementation in blame views
  gitweb: Make linking to actions requiring JavaScript a feature
  gitweb.js: fix padLeftStr() and its usage
  gitweb.js: Harden setting blamed commit info in incremental blame
  gitweb.js: fix null object exception in initials calculation
  gitweb: Minify gitweb.js if JSMIN is defined
  gitweb: Create links leading to 'blame_incremental' using JavaScript
  gitweb: Colorize 'blame_incremental' view during processing
  gitweb: Incremental blame (using JavaScript)
  gitweb: Add optional "time to generate page" info in footer

Conflicts:
Makefile
gitweb/gitweb.css

15 years agogitweb: Add link to other blame implementation in blame views
Jakub Narebski [Tue, 1 Dec 2009 16:54:26 +0000 (17:54 +0100)]
gitweb: Add link to other blame implementation in blame views

Add link to 'blame_incremental' action (which requires JavaScript) in
'blame' view, and add link to 'blame' action in 'blame_incremental'
view.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogitweb: Make linking to actions requiring JavaScript a feature
Jakub Narebski [Thu, 26 Nov 2009 20:12:15 +0000 (21:12 +0100)]
gitweb: Make linking to actions requiring JavaScript a feature

Let gitweb turn some links (like 'blame' links) into linking to actions
which require JavaScript (like 'blame_incremental' action) only if
'javascript-actions' feature is enabled.

This means that links to such actions would be present only if both
JavaScript is enabled and 'javascript-actions' feature is enabled.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'fc/maint-format-patch-pathspec-dashes'
Junio C Hamano [Mon, 30 Nov 2009 22:46:09 +0000 (14:46 -0800)]
Merge branch 'fc/maint-format-patch-pathspec-dashes'

Conflicts:
t/t4014-format-patch.sh

15 years agoMerge branch 'mm/maint-merge-ff-error-message-fix'
Junio C Hamano [Mon, 30 Nov 2009 22:45:08 +0000 (14:45 -0800)]
Merge branch 'mm/maint-merge-ff-error-message-fix'

Conflicts:
merge-recursive.c

15 years agoMerge branch 'ap/maint-merge-strategy-list-fix'
Junio C Hamano [Mon, 30 Nov 2009 22:44:43 +0000 (14:44 -0800)]
Merge branch 'ap/maint-merge-strategy-list-fix'

15 years agoMerge branch 'jc/pretty-lf'
Junio C Hamano [Mon, 30 Nov 2009 22:44:22 +0000 (14:44 -0800)]
Merge branch 'jc/pretty-lf'

Conflicts:
pretty.c
t/t6006-rev-list-format.sh

15 years agoMerge branch 'cc/bisect-doc'
Junio C Hamano [Mon, 30 Nov 2009 22:43:51 +0000 (14:43 -0800)]
Merge branch 'cc/bisect-doc'

15 years agoMerge branch 'em/commit-claim'
Junio C Hamano [Mon, 30 Nov 2009 22:43:26 +0000 (14:43 -0800)]
Merge branch 'em/commit-claim'

15 years agoMerge branch 'jc/mailinfo-remove-brackets'
Junio C Hamano [Mon, 30 Nov 2009 22:43:24 +0000 (14:43 -0800)]
Merge branch 'jc/mailinfo-remove-brackets'

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

15 years agoMerge branch 'fc/send-email-envelope'
Junio C Hamano [Mon, 30 Nov 2009 22:42:50 +0000 (14:42 -0800)]
Merge branch 'fc/send-email-envelope'

15 years agoMerge branch 'uk/maint-shortlog-encoding'
Junio C Hamano [Mon, 30 Nov 2009 22:42:28 +0000 (14:42 -0800)]
Merge branch 'uk/maint-shortlog-encoding'

Conflicts:
builtin-shortlog.c

15 years agoMerge branch 'ns/send-email-no-chain-reply-to'
Junio C Hamano [Mon, 30 Nov 2009 22:35:18 +0000 (14:35 -0800)]
Merge branch 'ns/send-email-no-chain-reply-to'

15 years agoMerge branch 'jc/maint-am-keep'
Junio C Hamano [Mon, 30 Nov 2009 22:35:07 +0000 (14:35 -0800)]
Merge branch 'jc/maint-am-keep'

15 years agoMerge branch 'bw/diff-color-hunk-header'
Junio C Hamano [Mon, 30 Nov 2009 22:34:45 +0000 (14:34 -0800)]
Merge branch 'bw/diff-color-hunk-header'

15 years agoDocumentation: Document --branch option in git clone synopsis
David Soria Parra [Mon, 30 Nov 2009 13:27:52 +0000 (14:27 +0100)]
Documentation: Document --branch option in git clone synopsis

Document the --branch option as [-b <name>] in git clones synopsis.

Signed-off-by: David Soria Parra <dsp@php.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobuiltin-merge: show user-friendly error messages for fast-forward too.
Matthieu Moy [Sun, 29 Nov 2009 12:18:33 +0000 (13:18 +0100)]
builtin-merge: show user-friendly error messages for fast-forward too.

fadd069d03 (merge-recursive: give less scary messages when merge did not
start, Sep 7 2009) introduced some friendlier error message for merge
failure, but the messages were shown only for non-fast forward merges.
This patch uses the same for fast-forward.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agomerge-recursive: make the error-message generation an extern function
Matthieu Moy [Sun, 29 Nov 2009 12:18:32 +0000 (13:18 +0100)]
merge-recursive: make the error-message generation an extern function

The construction of the struct unpack_trees_error_msgs was done within
git_merge_trees(), which prevented using the same messages easily from
another function.

[jc: backported for 1.6.5 maint before advice_commit_before_merge]

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot/README: Document GIT_TEST_INSTALLED and GIT_TEST_EXEC_PATH
Matthew Ogilvie [Mon, 30 Nov 2009 06:19:28 +0000 (23:19 -0700)]
t/README: Document GIT_TEST_INSTALLED and GIT_TEST_EXEC_PATH

These were added without documentation in 2009-03-16 (6720721).

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot3409 t4107 t7406 t9150: use dashless commands
Matthew Ogilvie [Sat, 28 Nov 2009 18:38:55 +0000 (11:38 -0700)]
t3409 t4107 t7406 t9150: use dashless commands

This is needed to allow test suite to run against a standard
install bin directory instead of GIT_EXEC_PATH.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobuiltin-merge.c: call exclude_cmds() correctly.
Avery Pennarun [Thu, 26 Nov 2009 02:23:54 +0000 (21:23 -0500)]
builtin-merge.c: call exclude_cmds() correctly.

We need to call exclude_cmds() after the loop, not during the loop, because
excluding a command from the array can change the indexes of objects in the
array.  The result is that, depending on file ordering, some commands
weren't excluded as they should have been.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot2300: use documented technique to invoke git-sh-setup
Matthew Ogilvie [Sat, 28 Nov 2009 18:38:54 +0000 (11:38 -0700)]
t2300: use documented technique to invoke git-sh-setup

This is needed to allow the test suite to run against a standard
install bin directory instead of GIT_EXEC_PATH.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoprepare send-email for smoother change of --chain-reply-to default
Nanako Shiraishi [Sun, 29 Nov 2009 03:24:48 +0000 (12:24 +0900)]
prepare send-email for smoother change of --chain-reply-to default

Give a warning message when send-email uses chain-reply-to to thread the
messages because of the current default, not because the user explicitly
asked to, either from the command line or from the configuration.

This way, by the time 1.7.0 switches the default, everybody will be ready.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoUpdate draft release notes to 1.6.6 before merging topics for -rc1
Junio C Hamano [Sat, 28 Nov 2009 19:13:59 +0000 (11:13 -0800)]
Update draft release notes to 1.6.6 before merging topics for -rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMakefile: do not clean arm directory
Jonathan Nieder [Sat, 28 Nov 2009 11:41:28 +0000 (05:41 -0600)]
Makefile: do not clean arm directory

The ARM SHA-1 implementation was removed by commit 30ae47b
(remove ARM and Mozilla SHA1 implementations, 2009-08-17).  Prune
its directory from the list of object files to delete in 'make
clean'.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoGive the hunk comment its own color
Bert Wesarg [Fri, 27 Nov 2009 06:55:18 +0000 (07:55 +0100)]
Give the hunk comment its own color

Inspired by the coloring of quilt.

Introduce a separate color and paint the hunk comment part, i.e. the name
of the function, in a separate color "diff.func" (defaults to plain).

Whitespace between hunk header and hunk comment is printed in plain color.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agosend-email: automatic envelope sender
Felipe Contreras [Thu, 26 Nov 2009 19:04:29 +0000 (21:04 +0200)]
send-email: automatic envelope sender

This adds the option to specify the envelope sender as "auto" which
would pick the 'from' address. This is good because now we can specify
the address only in one place in $HOME/.gitconfig and change it easily.

[jc: added tests]

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoemit_line(): don't emit an empty <SET><RESET> followed by a newline
Junio C Hamano [Sat, 28 Nov 2009 06:04:10 +0000 (22:04 -0800)]
emit_line(): don't emit an empty <SET><RESET> followed by a newline

When emit_line() is called with an empty line (but non-zero length, as we
send line terminating LF or CRLF to the function), it used to emit
<SET><RESET> followed by a newline.  Stop the wastefulness.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoRemove dead code from "git am"
Junio C Hamano [Fri, 27 Nov 2009 23:06:37 +0000 (15:06 -0800)]
Remove dead code from "git am"

Ever since the initial implementation, "git am" had kept a dead code that
never triggered due to a typo in the variable name.  Worse yet, the code,
if it weren't for the typo, would have attempted to add "[PATCH] " at the
beginning of the Subject: header when "git am" is run with its "-k"
option.  However, because "git am -k" tells mailinfo to keep such prefix
when parsing the input, the "[PATCH] " added by this dead code would have
really been unnecessary duplicate.

Embarrassing is that we kept _maintaining_ the codepath without anybody
noticing for four years.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Fri, 27 Nov 2009 08:56:05 +0000 (00:56 -0800)]
Merge branch 'maint'

* maint:
  builtin-apply.c: pay attention to -p<n> when determining the name

15 years agoAdd a notice that only certain functions can print color escape codes
Johannes Sixt [Fri, 27 Nov 2009 07:42:25 +0000 (08:42 +0100)]
Add a notice that only certain functions can print color escape codes

We emulate color escape codes on Windows by overriding printf, fprintf,
and fputs. Warn developers that these are the only functions that can be
used to print them.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoformat-patch: add test for parsing of "--"
Felipe Contreras [Thu, 26 Nov 2009 19:12:00 +0000 (21:12 +0200)]
format-patch: add test for parsing of "--"

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoformat-patch: fix parsing of "--" on the command line
Felipe Contreras [Thu, 26 Nov 2009 19:11:59 +0000 (21:11 +0200)]
format-patch: fix parsing of "--" on the command line

When given a pathspec that does not match any path in the current work
tree with an explicit "--":

    git format-patch <commit> -- <path>

the command still complains that <path> does not exist in the current work
tree and the user needs to explicitly specify "--" and errors out.  This
is because it incorrectly removes "--" from the command line arguments
that is later passed to setup_revisions().

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobuiltin-apply.c: pay attention to -p<n> when determining the name
Junio C Hamano [Wed, 25 Nov 2009 10:56:54 +0000 (02:56 -0800)]
builtin-apply.c: pay attention to -p<n> when determining the name

The patch structure has def_name component that is used to validate the
sanity of a "diff --git" patch by checking pathnames that appear on the
patch header lines for consistency.  The git_header_name() function is
used to compute this out of "diff --git a/... b/..." line, but the code
always stripped one level of prefix (i.e. "a/" and "b/"), without paying
attention to -p<n> option.  Code in find_name() function that parses other
lines in the patch header (e.g. "--- a/..." and "+++ b/..." lines) however
did strip the correct number of leading paths prefixes, and the sanity
check between these computed values failed.

Teach git_header_name() to honor -p<n> option like find_name() function
does.

Found and reported by Steven J. Murdoch who also wrote tests.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogitworkflows: Consistently back-quote git commands
Björn Gustavsson [Thu, 26 Nov 2009 21:49:50 +0000 (22:49 +0100)]
gitworkflows: Consistently back-quote git commands

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>