Code

git.git
14 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 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 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>
15 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

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

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

15 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

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

15 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

15 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

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

15 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

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

15 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>
15 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>
15 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>
15 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>
15 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>
15 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()

15 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

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

15 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

15 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

15 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

15 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

15 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

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

15 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

15 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

15 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

15 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

15 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

15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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()

15 years agoMerge branch 'jh/notes' (early part)
Junio C Hamano [Sat, 21 Nov 2009 07:53:55 +0000 (23:53 -0800)]
Merge branch 'jh/notes' (early part)

* 'jh/notes' (early part):
  Add selftests verifying concatenation of multiple notes for the same commit
  Refactor notes code to concatenate multiple notes annotating the same object
  Add selftests verifying that we can parse notes trees with various fanouts
  Teach the notes lookup code to parse notes trees with various fanout schemes
  Teach notes code to free its internal data structures on request
  Add '%N'-format for pretty-printing commit notes
  Add flags to get_commit_notes() to control the format of the note string
  t3302-notes-index-expensive: Speed up create_repo()
  fast-import: Add support for importing commit notes
  Teach "-m <msg>" and "-F <file>" to "git notes edit"
  Add an expensive test for git-notes
  Speed up git notes lookup
  Add a script to edit/inspect notes
  Introduce commit notes

Conflicts:
.gitignore
Documentation/pretty-formats.txt
pretty.c

15 years agoMerge branch 'sp/smart-http'
Junio C Hamano [Sat, 21 Nov 2009 07:51:23 +0000 (23:51 -0800)]
Merge branch 'sp/smart-http'

* sp/smart-http: (37 commits)
  http-backend: Let gcc check the format of more printf-type functions.
  http-backend: Fix access beyond end of string.
  http-backend: Fix bad treatment of uintmax_t in Content-Length
  t5551-http-fetch: Work around broken Accept header in libcurl
  t5551-http-fetch: Work around some libcurl versions
  http-backend: Protect GIT_PROJECT_ROOT from /../ requests
  Git-aware CGI to provide dumb HTTP transport
  http-backend: Test configuration options
  http-backend: Use http.getanyfile to disable dumb HTTP serving
  test smart http fetch and push
  http tests: use /dumb/ URL prefix
  set httpd port before sourcing lib-httpd
  t5540-http-push: remove redundant fetches
  Smart HTTP fetch: gzip requests
  Smart fetch over HTTP: client side
  Smart push over HTTP: client side
  Discover refs via smart HTTP server when available
  http-backend: more explict LocationMatch
  http-backend: add example for gitweb on same URL
  http-backend: use mod_alias instead of mod_rewrite
  ...

Conflicts:
.gitignore
remote-curl.c

15 years agoMerge branch 'bw/autoconf-more'
Junio C Hamano [Sat, 21 Nov 2009 07:48:57 +0000 (23:48 -0800)]
Merge branch 'bw/autoconf-more'

* bw/autoconf-more:
  configure: add settings for gitconfig, editor and pager
  configure: add macro to set arbitrary make variables

15 years agoMerge branch 'jn/editor-pager'
Junio C Hamano [Sat, 21 Nov 2009 07:48:52 +0000 (23:48 -0800)]
Merge branch 'jn/editor-pager'

* jn/editor-pager:
  Provide a build time default-pager setting
  Provide a build time default-editor setting
  am -i, git-svn: use "git var GIT_PAGER"
  add -i, send-email, svn, p4, etc: use "git var GIT_EDITOR"
  Teach git var about GIT_PAGER
  Teach git var about GIT_EDITOR
  Suppress warnings from "git var -l"
  Do not use VISUAL editor on dumb terminals
  Handle more shell metacharacters in editor names

15 years agoMerge branch 'rj/cygwin-msvc'
Junio C Hamano [Sat, 21 Nov 2009 07:48:11 +0000 (23:48 -0800)]
Merge branch 'rj/cygwin-msvc'

* rj/cygwin-msvc:
  MSVC: Add support for building with NO_MMAP
  Makefile: keep MSVC and Cygwin configuration separate

15 years agoMerge branch 'rj/maint-simplify-cygwin-makefile'
Junio C Hamano [Sat, 21 Nov 2009 07:47:43 +0000 (23:47 -0800)]
Merge branch 'rj/maint-simplify-cygwin-makefile'

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

15 years agoMerge branch 'bg/format-patch-doc-update'
Junio C Hamano [Sat, 21 Nov 2009 07:47:10 +0000 (23:47 -0800)]
Merge branch 'bg/format-patch-doc-update'

* bg/format-patch-doc-update:
  format-patch: Add "--no-stat" as a synonym for "-p"
  format-patch documentation: Fix formatting
  format-patch documentation: Remove diff options that are not useful
  format-patch: Always generate a patch

15 years agoMerge branch 'tr/filter-branch'
Junio C Hamano [Sat, 21 Nov 2009 07:46:14 +0000 (23:46 -0800)]
Merge branch 'tr/filter-branch'

* tr/filter-branch:
  filter-branch: nearest-ancestor rewriting outside subdir filter
  filter-branch: stop special-casing $filter_subdir argument

15 years agoMerge branch 'sc/protocol-doc'
Junio C Hamano [Sat, 21 Nov 2009 07:46:12 +0000 (23:46 -0800)]
Merge branch 'sc/protocol-doc'

* sc/protocol-doc:
  Update packfile transfer protocol documentation

15 years agoMerge branch 'jl/submodule-add-noname'
Junio C Hamano [Sat, 21 Nov 2009 07:46:07 +0000 (23:46 -0800)]
Merge branch 'jl/submodule-add-noname'

* jl/submodule-add-noname:
  git submodule add: make the <path> parameter optional

15 years agoMerge branch 'sb/ls-tree-parseopt'
Junio C Hamano [Sat, 21 Nov 2009 07:46:03 +0000 (23:46 -0800)]
Merge branch 'sb/ls-tree-parseopt'

* sb/ls-tree-parseopt:
  ls-tree: migrate to parse-options
  t3101: test more ls-tree options

15 years agoMerge branch 'rg/doc-workflow'
Junio C Hamano [Sat, 21 Nov 2009 07:45:49 +0000 (23:45 -0800)]
Merge branch 'rg/doc-workflow'

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

15 years agoMerge branch 'jn/gitweb-log-history'
Junio C Hamano [Sat, 21 Nov 2009 07:45:39 +0000 (23:45 -0800)]
Merge branch 'jn/gitweb-log-history'

* jn/gitweb-log-history:
  gitweb: Make 'history' view (re)use git_log_generic()
  gitweb: Refactor common parts of 'log' and 'shortlog' views
  gitweb: Refactor 'log' action generation, adding git_log_body()

15 years agoMerge branch 'jn/help-everywhere'
Junio C Hamano [Sat, 21 Nov 2009 07:44:52 +0000 (23:44 -0800)]
Merge branch 'jn/help-everywhere'

* jn/help-everywhere: (23 commits)
  diff --no-index: make the usage string less scary
  merge-{recursive,subtree}: use usagef() to print usage
  Introduce usagef() that takes a printf-style format
  Let 'git <command> -h' show usage without a git dir
  Show usage string for 'git http-push -h'
  Let 'git http-fetch -h' show usage outside any git repository
  Show usage string for 'git stripspace -h'
  Show usage string for 'git unpack-file -h'
  Show usage string for 'git show-index -h'
  Show usage string for 'git rev-parse -h'
  Show usage string for 'git merge-one-file -h'
  Show usage string for 'git mailsplit -h'
  Show usage string for 'git imap-send -h'
  Show usage string for 'git get-tar-commit-id -h'
  Show usage string for 'git fast-import -h'
  Show usage string for 'git check-ref-format -h'
  http-fetch: add missing initialization of argv0_path
  Show usage string for 'git show-ref -h'
  Show usage string for 'git merge-ours -h'
  Show usage string for 'git commit-tree -h'
  ...

Conflicts:
imap-send.c

15 years agoMerge branch 'jp/fetch-cull-many-refs'
Junio C Hamano [Sat, 21 Nov 2009 07:44:35 +0000 (23:44 -0800)]
Merge branch 'jp/fetch-cull-many-refs'

* jp/fetch-cull-many-refs:
  remote: fix use-after-free error detected by glibc in ref_remove_duplicates
  fetch: Speed up fetch of large numbers of refs
  remote: Make ref_remove_duplicates faster for large numbers of refs

15 years agoAdd branch management for releases to gitworkflows
Raman Gupta [Thu, 12 Nov 2009 19:46:04 +0000 (14:46 -0500)]
Add branch management for releases to gitworkflows

The current man page does a reasonable job at describing branch management
during the development process, but it does not contain any guidance as to
how the branches are affected by releases.

Add a basic introduction to the branch management undertaken during a
git.git release, so that a reader may gain some insight into how the
integration, maintenance, and topic branches are affected during the
release transition, and is thus able to better design the process for their
own project.

Other release activities such as reviews, testing, and creating
distributions are currently out of scope.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit am/mailinfo: Don't look at in-body headers when rebasing
Lukas Sandström [Fri, 20 Nov 2009 16:12:47 +0000 (17:12 +0100)]
git am/mailinfo: Don't look at in-body headers when rebasing

When we are rebasing we know that the header lines in the
patch are good and that we don't need to pick up any headers
from the body of the patch.

This makes it possible to rebase commits whose commit message
start with "From" or "Date".

Test vectors by Jeff King.

Signed-off-by: Lukas Sandström <luksan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit remote: Separate usage strings for subcommands
Tim Henigan [Fri, 20 Nov 2009 23:43:13 +0000 (18:43 -0500)]
git remote: Separate usage strings for subcommands

When the usage string for a subcommand must be printed,
only print the information relevant to that command.

This commit also removes the complete options list from
the first line of the subcommand usage string. Instead,
individual options are documented in the detailed
description following the general usage line.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agodiffcore-rename: reduce memory footprint by freeing blob data early
Junio C Hamano [Sat, 21 Nov 2009 06:13:47 +0000 (22:13 -0800)]
diffcore-rename: reduce memory footprint by freeing blob data early

After running one round of estimate_similarity(), filespecs on either
side will have populated their cnt_data fields, and we do not need
the blob text anymore.  We used to retain the blob data to optimize
for smaller projects (not freeing the blob data here would mean that
the final output phase would not have to re-read it), but we are
efficient enough without such optimization for smaller projects anyway,
and freeing memory early will help larger projects.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation: talk a little bit about GIT_NO_REPLACE_OBJECTS
Christian Couder [Thu, 19 Nov 2009 06:13:16 +0000 (07:13 +0100)]
Documentation: talk a little bit about GIT_NO_REPLACE_OBJECTS

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation: fix typos and spelling in replace documentation
Christian Couder [Thu, 19 Nov 2009 06:13:15 +0000 (07:13 +0100)]
Documentation: fix typos and spelling in replace documentation

This patch fix a missing "s" at the end of an occurence of
"--no-replace-objects" and, while at it, it also improves spelling
and rendering.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoreplace: use a GIT_NO_REPLACE_OBJECTS env variable
Christian Couder [Wed, 18 Nov 2009 06:50:58 +0000 (07:50 +0100)]
replace: use a GIT_NO_REPLACE_OBJECTS env variable

This has the same effect as --no-replace-objects option; git ignores the
replace refs.  When --no-replace-objects option is passed to git, this
environment variable is set to "1" and exported to subprocesses in order
to propagate the same setting.

It is useful for example for scripts, as the git commands used in them can
now be aware that they must not read replace refs.

Tested-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agodescribe: do not use unannotated tag even if exact match
Thomas Rast [Wed, 18 Nov 2009 13:32:26 +0000 (14:32 +0100)]
describe: do not use unannotated tag even if exact match

4d23660 (describe: when failing, tell the user about options that
work, 2009-10-28) forgot to update the shortcut path where the code
detected and used a possible exact match.  This means that an
unannotated tag on HEAD would be used by 'git describe'.

Guard this code path against the new circumstances, where unannotated
tags can be present in ->util even if we're not actually planning to
use them.

While there, also add some tests for --all.

Reported by 'yashi' on IRC.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agosubmodule.c: Squelch a "use before assignment" warning
David Aguilar [Fri, 20 Nov 2009 11:33:53 +0000 (03:33 -0800)]
submodule.c: Squelch a "use before assignment" warning

i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493) compiler
(and probably others) mistakenly thinks variable 'right' is used
before assigned.  Work around it by giving it a fake initialization.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMake --stdin option to "log" family read also pathspecs
Junio C Hamano [Fri, 20 Nov 2009 10:50:21 +0000 (02:50 -0800)]
Make --stdin option to "log" family read also pathspecs

Similar to the command line arguments, after giving zero or more revs, you can
feed a line "--" and then feed pathspecs one at a time.

With this

(
echo ^maint
echo --
echo Documentation
) | git log --stat --oneline --stdin master -- t

lists commits that touch Documentation/ or t/ between maint and master.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agosetup_revisions(): do not call get_pathspec() too early
Junio C Hamano [Fri, 20 Nov 2009 10:33:28 +0000 (02:33 -0800)]
setup_revisions(): do not call get_pathspec() too early

This is necessary because we will later allow pathspecs to be fed from the
standard input, and pathspecs taken from the command line (and converted
via get_pathspec() already) in revs->prune_data too early gets in the way
when we want to append from the standard input.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoTeach --stdin option to "log" family
Junio C Hamano [Tue, 3 Nov 2009 14:59:18 +0000 (06:59 -0800)]
Teach --stdin option to "log" family

Move the logic to read revs from standard input that rev-list knows about
from it to revision machinery, so that all the users of setup_revisions()
can feed the list of revs from the standard input when "--stdin" is used
on the command line.

Allow some users of the revision machinery that want different semantics
from the "--stdin" option to disable it by setting an option in the
rev_info structure.

This also cleans up the kludge made to bundle.c via cut and paste.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoread_revision_from_stdin(): use strbuf
Junio C Hamano [Fri, 20 Nov 2009 10:00:40 +0000 (02:00 -0800)]
read_revision_from_stdin(): use strbuf

It is so 2005 (and Linus ;-) to have a fixed 1000-byte buffer that
reads from the user.  Let's use strbuf to unlimit the input length.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-count-objects: Fix a disk-space under-estimate on Cygwin
Ramsay Jones [Thu, 19 Nov 2009 18:46:24 +0000 (18:46 +0000)]
git-count-objects: Fix a disk-space under-estimate on Cygwin

Cygwin has st_blocks in struct stat, but at least on NTFS, the field
counts in blocks of st_blksize bytes, not in 512-byte blocks.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation: undocument gc'd function graph_release()
Greg Price [Thu, 19 Nov 2009 20:58:29 +0000 (15:58 -0500)]
Documentation: undocument gc'd function graph_release()

graph_release() was removed in 064bfbd.  Cut it from the API
documentation and a comment.

Signed-off-by: Greg Price <price@ksplice.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot9700-perl-git.sh: Fix a test failure on Cygwin
Ramsay Jones [Thu, 19 Nov 2009 18:41:20 +0000 (18:41 +0000)]
t9700-perl-git.sh: Fix a test failure on Cygwin

The t/t9700/test.pl script uses method invocation syntax when
using the Cwd module to determine the current working directory.
This fails on cygwin, since cygwin perl specifically checks for
any arguments to the cwd() function and croak()'s with the message
"Usage: Cwd::cwd()". (In perl v5.8.8 distribution, see the file
perl-5.8.8/cygwin/cygwin.c lines 139-157)

In order to avoid the problem, we replace the method invocation
syntax with a simple function call.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoexpand_user_path: expand ~ to $HOME, not to the actual homedir.
Matthieu Moy [Thu, 19 Nov 2009 15:21:15 +0000 (16:21 +0100)]
expand_user_path: expand ~ to $HOME, not to the actual homedir.

In 395de250d (Expand ~ and ~user in core.excludesfile, commit.template),
we introduced the mechanism. But expanding ~ using getpw is not what
people overriding $HOME would usually expect. In particular, git looks
for the user's .gitconfig using $HOME, so it's better to be consistent.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'np/maint-sideband-favor-status'
Junio C Hamano [Wed, 18 Nov 2009 06:03:20 +0000 (22:03 -0800)]
Merge branch 'np/maint-sideband-favor-status'

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