git/git.git
11 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

11 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>
11 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

11 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>
11 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>
11 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

11 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

11 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'

11 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

11 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'

11 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'

11 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

11 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'

11 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

11 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'

11 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'

11 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'

11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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

11 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>
11 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>
11 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>
11 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>
11 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>
11 years agoshortlog: respect commit encoding
Uwe Kleine-König [Wed, 25 Nov 2009 19:33:28 +0000 (20:33 +0100)]
shortlog: respect commit encoding

Don't take the author name information without re-encoding from the raw
commit object buffer.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'rs/work-around-grep-opt-insanity'
Junio C Hamano [Wed, 25 Nov 2009 19:45:07 +0000 (11:45 -0800)]
Merge branch 'rs/work-around-grep-opt-insanity'

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

Conflicts:
git-instaweb.sh

11 years agoExplicitly truncate bswap operand to uint32_t
Benjamin Kramer [Wed, 18 Nov 2009 13:53:27 +0000 (14:53 +0100)]
Explicitly truncate bswap operand to uint32_t

There are some places in git where a long is passed to htonl/ntohl. llvm
doesn't support matching operands of different bitwidths intentionally.
This patch fixes the build with llvm-gcc (and clang) on x86_64.

Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogitweb.js: fix padLeftStr() and its usage
Stephen Boyd [Wed, 25 Nov 2009 03:51:40 +0000 (19:51 -0800)]
gitweb.js: fix padLeftStr() and its usage

It seems that in Firefox-3.5 inserting &nbsp; with javascript inserts the
literal &nbsp; instead of a space. Fix this by inserting the unicode
representation for &nbsp; instead.

Also fix the off-by-one error in the padding calculation that was
causing one less space to be inserted than was requested by the caller.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Cc: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogitweb.js: Harden setting blamed commit info in incremental blame
Jakub Narebski [Wed, 25 Nov 2009 00:45:15 +0000 (01:45 +0100)]
gitweb.js: Harden setting blamed commit info in incremental blame

Internet Explorer 8 stops at beginning of blame filling with the
following bug:

  "firstChild is null or not an object"

at this line:

  a_sha1.firstChild.data = commit.sha1.substr(0, 8);

It is (probably) caused by the fact that while a_sha1 element, which
looks like this:

  <a href=""> </a>

It has a firstChild which is a text node containing only whitespace
(single space character) in other web browsers (Firefox 3.5, Opera 10,
Google Chrome 3.0), IE8 clobbers DOM, removing trailing/leading
whitespace.

Protect against this bug by creating text element if it does not
exist.

Found-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot1200: fix a timing dependent error
Nanako Shiraishi [Tue, 24 Nov 2009 23:08:08 +0000 (08:08 +0900)]
t1200: fix a timing dependent error

The fourth test of show-branch in t1200 test was failing but only
sometimes. It only failed when two commits created in an earlier
test had different timestamps. When they were created within the
same second, the actual output matched the expected output.

Fix this by using test_tick to force reliable timestamps and update
the expected output so it does not to depend on the commits made in
the same sacond.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'rj/maint-cygwin-count-objects'
Junio C Hamano [Tue, 24 Nov 2009 23:42:55 +0000 (15:42 -0800)]
Merge branch 'rj/maint-cygwin-count-objects'

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

11 years agoDocumentation: update descriptions of revision options related to '--bisect'
Christian Couder [Tue, 24 Nov 2009 06:54:44 +0000 (07:54 +0100)]
Documentation: update descriptions of revision options related to '--bisect'

In commit ad3f9a7 (Add '--bisect' revision machinery argument) the
'--bisect' option was added to easily pass bisection refs to commands
using the revision machinery.

This patch updates the documentation of the related options to describe
the new behavior.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoEnable support for IPv6 on MinGW
Martin Storsjö [Mon, 23 Nov 2009 22:55:50 +0000 (00:55 +0200)]
Enable support for IPv6 on MinGW

The IPv6 support functions are loaded dynamically, to maintain backwards
compatibility with versions of Windows prior to XP, and fallback wrappers
are provided, implemented in terms of gethostbyname and gethostbyaddr.

Signed-off-by: Martin Storsjo <martin@martin.st>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoRefactor winsock initialization into a separate function
Martin Storsjö [Mon, 23 Nov 2009 22:55:12 +0000 (00:55 +0200)]
Refactor winsock initialization into a separate function

The winsock library must be initialized. Since gethostbyname() is the
first function that calls into winsock, it was overridden to do the
initialization. This refactoring helps the next patch, where other
functions can be called earlier.

Signed-off-by: Martin Storsjo <martin@martin.st>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'rs/color-escape-has-zero-width'
Junio C Hamano [Tue, 24 Nov 2009 06:33:30 +0000 (22:33 -0800)]
Merge branch 'rs/color-escape-has-zero-width'

* rs/color-escape-has-zero-width:
  strbuf_add_wrapped_text(): skip over colour codes

11 years agoMerge branch 'bg/apply-doc'
Junio C Hamano [Tue, 24 Nov 2009 06:32:39 +0000 (22:32 -0800)]
Merge branch 'bg/apply-doc'

* bg/apply-doc:
  Fix over-simplified documentation for 'git log -z'
  apply: Use the term "working tree" consistently
  apply: Format all options using back-quotes
  apply: apply works outside a repository
  Clarify and correct -z

11 years agoMerge branch 'mm/maint-hint-failed-merge'
Junio C Hamano [Tue, 24 Nov 2009 06:31:51 +0000 (22:31 -0800)]
Merge branch 'mm/maint-hint-failed-merge'

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

11 years agoMerge branch 'jc/log-stdin'
Junio C Hamano [Tue, 24 Nov 2009 06:30:08 +0000 (22:30 -0800)]
Merge branch 'jc/log-stdin'

* jc/log-stdin:
  Add trivial tests for --stdin option to log family
  Make --stdin option to "log" family read also pathspecs
  setup_revisions(): do not call get_pathspec() too early
  Teach --stdin option to "log" family
  read_revision_from_stdin(): use strbuf

Conflicts:
revision.c

11 years agoMerge branch 'mr/gitweb-snapshot'
Junio C Hamano [Tue, 24 Nov 2009 06:28:31 +0000 (22:28 -0800)]
Merge branch 'mr/gitweb-snapshot'

* mr/gitweb-snapshot:
  t/gitweb-lib: Split HTTP response with non-GNU sed
  gitweb: Smarter snapshot names
  gitweb: Document current snapshot rules via new tests
  t/gitweb-lib.sh: Split gitweb output into headers and body
  gitweb: check given hash before trying to create snapshot

11 years agot/gitweb-lib: Split HTTP response with non-GNU sed
Brian Gernhardt [Mon, 23 Nov 2009 17:33:42 +0000 (12:33 -0500)]
t/gitweb-lib: Split HTTP response with non-GNU sed

Recognizing \r in a regex is something GNU sed will do, but other sed
implementation's won't (e.g. BSD sed on OS X).  Instead of two sed
invocations, use a single Perl script to split output into headers
and body.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'cc/replace'
Junio C Hamano [Tue, 24 Nov 2009 06:24:01 +0000 (22:24 -0800)]
Merge branch 'cc/replace'

* cc/replace:
  Documentation: talk a little bit about GIT_NO_REPLACE_OBJECTS
  Documentation: fix typos and spelling in replace documentation
  replace: use a GIT_NO_REPLACE_OBJECTS env variable

11 years agoMerge branch 'maint'
Junio C Hamano [Tue, 24 Nov 2009 05:54:39 +0000 (21:54 -0800)]
Merge branch 'maint'

* maint:
  pack-objects: split implications of --all-progress from progress activation
  instaweb: restart server if already running
  prune-packed: only show progress when stderr is a tty

Conflicts:
builtin-pack-objects.c

11 years agopack-objects: split implications of --all-progress from progress activation
Nicolas Pitre [Mon, 23 Nov 2009 17:43:50 +0000 (12:43 -0500)]
pack-objects: split implications of --all-progress from progress activation

Currently the --all-progress flag is used to use force progress display
during the writing object phase even if output goes to stdout which is
primarily the case during a push operation.  This has the unfortunate
side effect of forcing progress display even if stderr is not a
terminal.

Let's introduce the --all-progress-implied argument which has the same
intent except for actually forcing the activation of any progress
display.  With this, progress display will be automatically inhibited
whenever stderr is not a terminal, or full progress display will be
included otherwise.  This should let people use 'git push' within a cron
job without filling their logs with useless percentage displays.

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Tested-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoinstaweb: restart server if already running
Stephen Boyd [Mon, 23 Nov 2009 07:09:12 +0000 (23:09 -0800)]
instaweb: restart server if already running

Running 'git instaweb' when an instaweb server is already running will
fail (at least when the port is the same) and overwrite the pid file
used to track the currently running server. This turns out to be
especially annoying when the user tries to stop the previously running
server with 'git instaweb --stop' and is instead greeted with an error
message because the pid file has been destroyed.

Instead of allowing a user to start two instaweb servers, stop the
currently running server first and then start the new one. This should
be fine because it was never really possible to start two instaweb
servers in the first place due to the pid file issue outlined above.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoprune-packed: only show progress when stderr is a tty
Jeff King [Tue, 24 Nov 2009 03:07:42 +0000 (22:07 -0500)]
prune-packed: only show progress when stderr is a tty

This matches the behavior of other git programs, and helps
keep cruft out of things like cron job output.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-curl.c: fix rpc_out()
Tay Ray Chuan [Tue, 24 Nov 2009 02:31:30 +0000 (10:31 +0800)]
remote-curl.c: fix rpc_out()

Remove the extraneous semicolon (';') at the end of the if statement
that allowed the code in its block to execute regardless of the
condition.

This fixes pushing to a smart http backend with chunked encoding.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoProtect scripted Porcelains from GREP_OPTIONS insanity
Junio C Hamano [Mon, 23 Nov 2009 23:56:32 +0000 (15:56 -0800)]
Protect scripted Porcelains from GREP_OPTIONS insanity

If the user has exported the GREP_OPTIONS environment variable, the output
from "grep" and "egrep" in scripted Porcelains may be different from what
they expect.  For example, we may want to count number of matching lines,
by "grep" piped to "wc -l", and GREP_OPTIONS=-C3 will break such use.

The approach taken by this change to address this issue is to protect only
our own use of grep/egrep.  Because we do not unset it at the beginning of
our scripts, hook scripts run from the scripted Porcelains are exposed to
the same insanity this environment variable causes when grep/egrep is used
to implement logic (e.g. "grep | wc -l"), and it is entirely up to the
hook scripts to protect themselves.

On the other hand, applypatch-msg hook may want to show offending words in
the proposed commit log message using grep to the end user, and the user
might want to set GREP_OPTIONS=--color to paint the match more visibly.
The approach to protect only our own use without unsetting the environment
variable globally will allow this use case.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agomergetool--lib: simplify guess_merge_tool()
René Scharfe [Mon, 23 Nov 2009 23:29:17 +0000 (00:29 +0100)]
mergetool--lib: simplify guess_merge_tool()

Use a case statement instead of calling grep to find out if the editor's
name contains the string "vim".  Remove the check for emacs, as this
branch did the same as the default one anyway.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agostrbuf_add_wrapped_text(): skip over colour codes
René Scharfe [Mon, 23 Nov 2009 22:40:03 +0000 (23:40 +0100)]
strbuf_add_wrapped_text(): skip over colour codes

Ignore display mode escape sequences (colour codes) for the purpose of
text wrapping because they don't have a visible width.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot4014-format-patch: do not assume 'test' is available as non-builtin
Johannes Sixt [Mon, 23 Nov 2009 09:35:53 +0000 (10:35 +0100)]
t4014-format-patch: do not assume 'test' is available as non-builtin

One test case used 'xargs test', which assumes that 'test' is available
as external program. At least on MinGW it is not.

Moreover, 'git format-patch' was invoked in a pipeline, but not as the
last command. Rewrite the test case to catch breakage in 'git format-patch'
as well.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoFix over-simplified documentation for 'git log -z'
Björn Gustavsson [Mon, 23 Nov 2009 07:40:24 +0000 (08:40 +0100)]
Fix over-simplified documentation for 'git log -z'

In commit 64485b4a, the documentation for 'git log -z' was
simplified too much. The -z option actually changes the behavior
of 'git log' in two ways: commits will be ended with a NUL
instead of a LF (correctly documented) and the --raw and
--numstat will have NUL as field terminators (omitted in
the documentation for 'git log').

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoAdd trivial tests for --stdin option to log family
Junio C Hamano [Mon, 23 Nov 2009 08:49:47 +0000 (00:49 -0800)]
Add trivial tests for --stdin option to log family

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'bg/fetch-multi'
Junio C Hamano [Mon, 23 Nov 2009 08:03:15 +0000 (00:03 -0800)]
Merge branch 'bg/fetch-multi'

* bg/fetch-multi:
  Re-implement 'git remote update' using 'git fetch'
  builtin-fetch: add --dry-run option
  builtin-fetch: add --prune option
  teach warn_dangling_symref to take a FILE argument
  remote: refactor some logic into get_stale_heads()
  Add missing test for 'git remote update --prune'
  Add the configuration option skipFetchAll
  Teach the --multiple option to 'git fetch'
  Teach the --all option to 'git fetch'

11 years agobisect: simplify calling visualizer using '--bisect' option
Christian Couder [Mon, 23 Nov 2009 04:16:14 +0000 (05:16 +0100)]
bisect: simplify calling visualizer using '--bisect' option

In commit ad3f9a7 (Add '--bisect' revision machinery argument) the
'--bisect' option was added to easily pass bisection refs to
commands using the revision machinery.

So it is now shorter and safer to use the new '--bisect' revision
machinery option, than to compute the refs that we must pass.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDisable CURLOPT_NOBODY before enabling CURLOPT_PUT and CURLOPT_POST
Martin Storsjö [Mon, 23 Nov 2009 03:03:28 +0000 (11:03 +0800)]
Disable CURLOPT_NOBODY before enabling CURLOPT_PUT and CURLOPT_POST

This works around a bug in curl versions up to 7.19.4, where disabling the
CURLOPT_NOBODY option sets the internal state incorrectly considering that
CURLOPT_PUT was enabled earlier.

The bug is discussed at http://curl.haxx.se/bug/view.cgi?id=2727981 and is
corrected in the latest version of curl in CVS.

This bug usually has no impact on git, but may surface if using multi-pass
authentication methods.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoconfig documentation: some configs are auto-set by git-init
Matthew Ogilvie [Mon, 23 Nov 2009 02:07:30 +0000 (19:07 -0700)]
config documentation: some configs are auto-set by git-init

Add documentation for core.ignorecase, and mention git-init
in core.filemode and core.symlinks.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocvsserver doc: database generally can not be reproduced consistently
Matthew Ogilvie [Mon, 23 Nov 2009 02:07:29 +0000 (19:07 -0700)]
cvsserver doc: database generally can not be reproduced consistently

A regenerated git-cvsserver database is at risk of having different
CVS revision numbers from an incrementally updated database.  Mention
this in the the documentation, and remove an erroneous statement
to the contrary.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoGit v1.6.6-rc0 v1.6.6-rc0
Junio C Hamano [Mon, 23 Nov 2009 03:16:01 +0000 (19:16 -0800)]
Git v1.6.6-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint'
Junio C Hamano [Mon, 23 Nov 2009 03:04:30 +0000 (19:04 -0800)]
Merge branch 'maint'

* maint:
  Documentation: undocument gc'd function graph_release()

11 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Mon, 23 Nov 2009 03:01:15 +0000 (19:01 -0800)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  git svn: strip leading path when making empty dirs
  git svn: always reuse existing remotes on fetch

11 years agogit svn: strip leading path when making empty dirs
Eric Wong [Mon, 23 Nov 2009 02:11:32 +0000 (18:11 -0800)]
git svn: strip leading path when making empty dirs

Since unhandled.log stores paths relative to the repository
root, we need to strip out leading path components if the
directories we're tracking are not the repository root.

Reported-by: Björn Steinbrink
Signed-off-by: Eric Wong <normalperson@yhbt.net>
11 years agoMerge branch 'th/maint-remote-update-help-string'
Junio C Hamano [Mon, 23 Nov 2009 00:41:54 +0000 (16:41 -0800)]
Merge branch 'th/maint-remote-update-help-string'

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

11 years agoMerge branch 'jn/faster-completion-startup'
Junio C Hamano [Mon, 23 Nov 2009 00:41:43 +0000 (16:41 -0800)]
Merge branch 'jn/faster-completion-startup'

* jn/faster-completion-startup:
  Speed up bash completion loading

11 years agoMerge branch 'rj/maint-t9700'
Junio C Hamano [Mon, 23 Nov 2009 00:40:52 +0000 (16:40 -0800)]
Merge branch 'rj/maint-t9700'

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

11 years agoMerge branch 'ls/maint-mailinfo-no-inbody'
Junio C Hamano [Mon, 23 Nov 2009 00:40:26 +0000 (16:40 -0800)]
Merge branch 'ls/maint-mailinfo-no-inbody'

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

11 years agoMerge branch 'mo/maint-crlf-doc'
Junio C Hamano [Mon, 23 Nov 2009 00:29:57 +0000 (16:29 -0800)]
Merge branch 'mo/maint-crlf-doc'

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

11 years agoMerge branch 'th/remote-usage'
Junio C Hamano [Mon, 23 Nov 2009 00:29:50 +0000 (16:29 -0800)]
Merge branch 'th/remote-usage'

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

11 years agoMerge branch 'pb/maint-use-custom-perl'
Junio C Hamano [Mon, 23 Nov 2009 00:28:46 +0000 (16:28 -0800)]
Merge branch 'pb/maint-use-custom-perl'

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

11 years agoMerge branch 'mm/config-pathname-tilde-expand'
Junio C Hamano [Mon, 23 Nov 2009 00:28:38 +0000 (16:28 -0800)]
Merge branch 'mm/config-pathname-tilde-expand'

* 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

11 years agoMerge branch 'bc/grep-i-F'
Junio C Hamano [Mon, 23 Nov 2009 00:28:29 +0000 (16:28 -0800)]
Merge branch 'bc/grep-i-F'

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

11 years agoMerge branch 'jk/maint-break-rename-reduce-memory'
Junio C Hamano [Mon, 23 Nov 2009 00:28:23 +0000 (16:28 -0800)]
Merge branch 'jk/maint-break-rename-reduce-memory'

* 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

11 years agoMerge branch 'tc/format-attribute'
Junio C Hamano [Mon, 23 Nov 2009 00:28:14 +0000 (16:28 -0800)]
Merge branch 'tc/format-attribute'

* tc/format-attribute:
  Check the format of more printf-type functions

11 years agoMerge branch 'tr/maint-merge-ours-clarification' (early part)
Junio C Hamano [Mon, 23 Nov 2009 00:28:06 +0000 (16:28 -0800)]
Merge branch 'tr/maint-merge-ours-clarification' (early part)

* 'tr/maint-merge-ours-clarification' (early part):
  rebase docs: clarify --merge and --strategy
  Documentation: clarify 'ours' merge strategy

11 years agolog --format: document %w
René Scharfe [Sun, 22 Nov 2009 16:15:31 +0000 (17:15 +0100)]
log --format: document %w

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agostrbuf_add_wrapped_text(): factor out strbuf_add_indented_text()
René Scharfe [Sun, 22 Nov 2009 16:15:29 +0000 (17:15 +0100)]
strbuf_add_wrapped_text(): factor out strbuf_add_indented_text()

Add a new helper function, strbuf_add_indented_text(), to indent text
without a width limit, and call it from strbuf_add_wrapped_text().  It
respects both indent (applied to the first line) and indent2 (applied to
the rest of the lines); indent2 was ignored by the indent-only path of
strbuf_add_wrapped_text() before the patch.

Two simple test cases are added, one exercising strbuf_add_wrapped_text()
and the other strbuf_add_indented_text().

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogrep: unset GREP_OPTIONS before spawning external grep
René Scharfe [Sun, 22 Nov 2009 15:58:09 +0000 (16:58 +0100)]
grep: unset GREP_OPTIONS before spawning external grep

While we're at it, also unset GREP_COLOR and GREP_COLORS in case colouring
is not enabled, to be on the safe side.  The presence of these variables
alone is not sufficient to trigger coloured output with GNU grep, but
other implementations may behave differently.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUser Manual: Write "Git" instead of "GIT"
Björn Gustavsson [Sun, 22 Nov 2009 09:47:04 +0000 (10:47 +0100)]
User Manual: Write "Git" instead of "GIT"

In the Table of Contents, there is a notable inconsistency:
first there is "GIT Glossary", followed by "Git Quick Reference"
on the very next line.

Running "grep -c" on user-manual.txt, I find 780 occurrrences of
"git", 37 occurrences of "Git", and 9 occurrences of "GIT".
In general, "git" is the preferred spelling, except at the
beginning of a sentence.

Therefore, change "GIT Glossary" to "Git Glossary" for consistency
with the rest of the document.

Looking at the other eight occurrences of "GIT" I found one other
occurrence that should be changed:

* The mention of "StGIT". Looking at the web pages for "Stacked Git"
  at http://www.procode.org/stgit, I only saw the spelling "StGit",
  except in http://wiki.procode.org/cgi-bin/wiki.cgi/StGIT_Tutorial,
  but that page was last updated in 2006.

The other seven occurrences should not be changed:

* Three occurrences were in the output of 'git show-branch' run
  on the git.git repository.

* One occurrence was in the output of 'git cat-file'.

* One occurrence was as part of the file name "GIT-VERSION-GEN".

* Two occurrences were in comments in scripts quoted in a description
  of Tony Luck's workflow.

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoFix truncated usage messages
Björn Gustavsson [Sun, 22 Nov 2009 21:19:53 +0000 (22:19 +0100)]
Fix truncated usage messages

The usage messages for some commands (such as 'git diff-tree')
are truncated because they don't fit in a fixed buffer of
1024 bytes.

It would be tempting to eliminate the buffer and the problem once
and for all by doing the output in three steps, but doing so could
(according to commit d048a96e) increase the likelyhood of messing
up the display.

So we just increase the size of the buffer.

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agouser-manual: Document that "git merge" doesn't like uncommited changes.
Matthieu Moy [Sun, 22 Nov 2009 22:26:18 +0000 (23:26 +0100)]
user-manual: Document that "git merge" doesn't like uncommited changes.

We explain the user why uncommited changes can be problematic with merge,
and point to "commit" and "stash" for the solution. While talking about
commited Vs uncommited changes, we also make it clear that the result of
a merge is normally commited.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agomerge-recursive: point the user to commit when file would be overwritten.
Matthieu Moy [Sun, 22 Nov 2009 22:26:17 +0000 (23:26 +0100)]
merge-recursive: point the user to commit when file would be overwritten.

The commit-before-pull is well accepted in the DVCS community, but is
confusing some new users. This should get them back in the right way when
the problem occurs.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit svn: always reuse existing remotes on fetch
Eric Wong [Sun, 22 Nov 2009 20:37:06 +0000 (12:37 -0800)]
git svn: always reuse existing remotes on fetch

The internal no_reuse_existing flag is set to allow initializing
multiple remotes with the same URL, common with SVM users.

Unfortunately, this flag caused misbehavior when used
with the -R command-line flag for fetching.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
11 years agot9001: test --envelope-sender option of send-email
Junio C Hamano [Sun, 22 Nov 2009 17:54:10 +0000 (09:54 -0800)]
t9001: test --envelope-sender option of send-email

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoapply: Use the term "working tree" consistently
Björn Gustavsson [Sun, 22 Nov 2009 19:53:29 +0000 (20:53 +0100)]
apply: Use the term "working tree" consistently

The documentation for 'git apply' uses both the terms
"work tree" and "working tree". Since the glossary uses
the term "working tree", change all occurrences of
"work tree" to "working tree".

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoapply: Format all options using back-quotes
Björn Gustavsson [Sun, 22 Nov 2009 19:43:53 +0000 (20:43 +0100)]
apply: Format all options using back-quotes

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoapply: apply works outside a repository
Björn Gustavsson [Sun, 22 Nov 2009 19:43:42 +0000 (20:43 +0100)]
apply: apply works outside a repository

The documentation for 'git apply' talks about applying a
patch/diff to the index and to the working tree, which seems
to imply that it will not work outside a git repository.

Actually 'git patch' works outside a repository (which can
be useful especially for applying binary or rename patches that
the standard "patch" utility cannot handle), so the documentation
should mention it.

Thanks to Junio for suggesting better wording.

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoClarify and correct -z
Björn Gustavsson [Sun, 22 Nov 2009 19:43:20 +0000 (20:43 +0100)]
Clarify and correct -z

The description for -z is too vague and general for the
apply, diff*, and log commands.

Change the description of -z for 'git log' to note that
commits will be separated by NULs.

Change the description of -z for 'git diff*' and 'git apply'
to note that it applies to the --numstat option, and for
'git diff*' also for --raw option.

Also correct the description of the "munging" of pathanmes that
takes place in the absence of -z for the 'git diff*' and
'git apply' commands, namely that apart from the characters mentioned,
double quotes will also be escaped and that the pathname will be
enclosed in double quotes if any characters are escaped.

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation: avoid xmlto input error
Junio C Hamano [Sat, 21 Nov 2009 08:37:26 +0000 (00:37 -0800)]
Documentation: avoid xmlto input error

Do not write literal "~/" or "~user" but use "{tilde}/" and "{tilde}user";
otherwise the text between them gets enclosed in
"<subscript>...</subscript>".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jc/fix-tree-walk' (early part)
Junio C Hamano [Sat, 21 Nov 2009 07:55:50 +0000 (23:55 -0800)]
Merge branch 'jc/fix-tree-walk' (early part)

* 'jc/fix-tree-walk' (early part):
  unpack_callback(): use unpack_failed() consistently
  unpack-trees: typofix
  diff-lib.c: fix misleading comments on oneway_diff()