]> asedeno.scripts.mit.edu Git - git.git/log
git.git
14 years agot1010-mktree: Adjust expected result to code and documentation
Michael J Gruber [Thu, 15 Apr 2010 09:34:07 +0000 (11:34 +0200)]
t1010-mktree: Adjust expected result to code and documentation

The last two tests here were always supposed to fail in the sense
that, according to code and documentation, mktree should read non-recursive
ls-tree output, but not recursive one, and therefore explicitely refuses
to deal with slashes.

Adjust the test (must_fail) so that it succeeds when mktree dies on
slashes.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agocombined diff: correctly handle truncated file
Thomas Rast [Thu, 15 Apr 2010 12:59:37 +0000 (14:59 +0200)]
combined diff: correctly handle truncated file

Consider an evil merge of two commits A and B, both of which have a
file 'foo', but the merge result does not have that file.

The combined-diff code learned in 4462731 (combine-diff: do not punt
on removed or added files., 2006-02-06) to concisely show only the
removal, since that is the evil part and the previous contents are
presumably uninteresting.

However, to diagnose an empty merge result, it overloaded the variable
that holds the file's length.  This means that the check also triggers
for truncated files.  Consequently, such files were not shown in the
diff at all despite the merge being clearly evil.

Fix this by adding a new variable that distinguishes whether the file
was deleted (which is the case 4462731 handled) or truncated.  In the
truncated case, we show the full combined diff again, which is rather
spammy but at least does not hide the evilness.

Reported-by: David Martínez Martí <desarrollo@gestiweb.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitk: Display dirty submodules correctly
Jens Lehmann [Fri, 9 Apr 2010 20:16:42 +0000 (22:16 +0200)]
gitk: Display dirty submodules correctly

Since recently "git diff --submodule" prints out extra lines when the
submodule contains untracked or modified files. Show all those lines of
one submodule under the same header.

Also for newly added or removed submodules the submodule name contained
trailing garbage because the extraction of the name was not done right.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
14 years agoautoconf: Check if <paths.h> exists and set HAVE_PATHS_H
Jakub Narebski [Thu, 15 Apr 2010 12:27:49 +0000 (05:27 -0700)]
autoconf: Check if <paths.h> exists and set HAVE_PATHS_H

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoexec_cmd.c: replace hard-coded path list with one from <paths.h>
Chris Webb [Tue, 13 Apr 2010 09:07:13 +0000 (10:07 +0100)]
exec_cmd.c: replace hard-coded path list with one from <paths.h>

The default executable path list used by exec_cmd.c is hard-coded to
be "/usr/local/bin:/usr/bin:/bin".  Use an appropriate value for the
system from <paths.h> when available.

Add HAVE_PATHS_H make variables and enable it on Linux, FreeBSD,
NetBSD, OpenBSD and GNU where it is known to exist for now. Somebody
else may want to do an autoconf support later.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocument new "already-merged" rule for branch -d
Jonathan Nieder [Thu, 15 Apr 2010 07:25:38 +0000 (02:25 -0500)]
Document new "already-merged" rule for branch -d

v1.7.0-rc0~18^2 (branch -d: base the "already-merged" safety on the
branch it merges with, 2009-12-29) taught ‘git branch’ a new heuristic
for when it is safe to delete a branch without forcing the issue.  It
is safe to delete a branch "topic" without second thought if:

 - the branch "topic" is set up to pull from a (remote-tracking,
   usually) branch and is fully merged in that "upstream" branch, or

 - there is no branch.topic.merge configuration and branch "topic" is
   fully merged in the current HEAD.

Update the man page to acknowledge the new rules.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoAdd .depend directories to .gitignore
Jonathan Nieder [Thu, 15 Apr 2010 07:35:20 +0000 (02:35 -0500)]
Add .depend directories to .gitignore

The makefile snippets that would land in these directories are already
being ignored.  Ignore the directories instead so they don’t show up
in ‘git clean -n’ output.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot7006: guard cleanup with test_expect_success
Jonathan Nieder [Thu, 15 Apr 2010 00:38:07 +0000 (19:38 -0500)]
t7006: guard cleanup with test_expect_success

Most of these tests are removing files, environment variables, and
configuration that might interfere outside the test.  Putting these
clean-up commands in the test (in the same spirit as v1.7.1-rc0~59,
2010-03-20) means that errors during setup will be caught quickly and
non-error text will be suppressed without -v.

While at it, apply some other minor fixes:

 - do not rely on the shell to export variables defined with the same
   command as a function call

 - avoid whitespace immediately after the > redirection operator, for
   consistency with the style of other tests

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocument gc.<pattern>.reflogexpire variables
Junio C Hamano [Wed, 14 Apr 2010 20:12:34 +0000 (13:12 -0700)]
Document gc.<pattern>.reflogexpire variables

3cb22b8 (Per-ref reflog expiry configuration, 2008-06-15) added support
for setting the expiry parameters differently for different reflog, but
it was never documented.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoam -3: recover the diagnostic messages for corrupt patches
Junio C Hamano [Fri, 9 Apr 2010 23:58:28 +0000 (16:58 -0700)]
am -3: recover the diagnostic messages for corrupt patches

"git am -3" first tries to apply the patch without any extra trick, and
applies it to a synthesized tree for 3-way merge after the first attempt
fails.  "git apply" exits with status 1 for a patch that is well-formed
but is not applicable (and it dies on other errors with non-zereo, non-1
status) and has an optimization to fall back to the 3-way merge only in
the case.

An earlier patch 3ddd170 (am: suppress apply errors when using 3-way,
2009-06-16) squelched diagnostic messages from the first attempt, not to
be shown to the end user.  This worked reasonably well if the reason the
first application failed was because the patch was made against a wrong
version.

When the patch is corrupt (e.g. line-wrapped or leading whitespaces got
dropped), however, because the second patch application is not even
attempted, the error message from the first application is never shown
and is forever lost.  This message is necessary to locate where the patch
is corrupt and fix it up.

We could fix this issue by reverting 3dd170, or keeping the error message
to somewhere and showing it, but because this is an error codepath, the
easiest is to disable the optimization.  The second patch application is
attempted even when the input is corrupt, and it will notice, diagnose,
and stop with an error message.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agodiff: add --word-diff option that generalizes --color-words
Thomas Rast [Wed, 14 Apr 2010 15:59:06 +0000 (17:59 +0200)]
diff: add --word-diff option that generalizes --color-words

This teaches the --color-words engine a more general interface that
supports two new modes:

* --word-diff=plain, inspired by the 'wdiff' utility (most similar to
  'wdiff -n <old> <new>'): uses delimiters [-removed-] and {+added+}

* --word-diff=porcelain, which generates an ad-hoc machine readable
  format:
  - each diff unit is prefixed by [-+ ] and terminated by newline as
    in unified diff
  - newlines in the input are output as a line consisting only of a
    tilde '~'

Both of these formats still support color if it is enabled, using it
to highlight the differences.  --color-words becomes a synonym for
--word-diff=color, which is the color-only format.  Also adds some
compatibility/convenience options.

Thanks to Junio C Hamano and Miles Bader for good ideas.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Wed, 14 Apr 2010 01:21:29 +0000 (18:21 -0700)]
Merge branch 'maint'

* maint:
  Documentation/config.txt: default gc.aggressiveWindow is 250, not 10
  Docs: Add -X option to git-merge's synopsis.

Conflicts:
Documentation/merge-options.txt

14 years agopretty: Initialize notes if %N is used
Johannes Gilger [Tue, 13 Apr 2010 20:31:12 +0000 (22:31 +0200)]
pretty: Initialize notes if %N is used

When using git log --pretty='%N' without an explicit --show-notes, git
would segfault. This patches fixes this behaviour by loading the needed
notes datastructures if --pretty is used and the format contains %N.
When --pretty='%N' is used together with --no-notes, %N won't be
expanded.

This is an extension to a proposed patch by Jeff King.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agodescribe: Break annotated tag ties by tagger date
Shawn O. Pearce [Mon, 12 Apr 2010 23:25:29 +0000 (16:25 -0700)]
describe: Break annotated tag ties by tagger date

If more than one annotated tag points at the same commit, use the
tag whose tagger field has a more recent date stamp.  This resolves
non-deterministic cases where the maintainer has done:

  $ git tag -a -m "2.1-rc1" v2.1-rc1  deadbeef
  $ git tag -a -m "2.1"     v2.1      deadbeef

If the tag is an older-style annotated tag with no tagger date, we
assume a date stamp at the UNIX epoch. This will cause us to prefer
an annotated tag that has a valid date.

We could also try to consider the tag object chain, favoring a tag
that "includes" another one:

  $ git tag -a -m "2.1-rc0" v2.1-rc1  deadbeef
  $ git tag -a -m "2.1"     v2.1      v2.1-rc1

However traversing the tag's object chain looking for inclusion
is much more complicated.  Its already very likely that even in
these cases the v2.1 tag will have a more recent tagger date than
v2.1-rc1, so with this change describe should still resolve this
by selecting the more recent v2.1.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation/config.txt: default gc.aggressiveWindow is 250, not 10
Jay Soffian [Tue, 13 Apr 2010 16:52:55 +0000 (12:52 -0400)]
Documentation/config.txt: default gc.aggressiveWindow is 250, not 10

The default for gc.aggressiveWindow has been 250 since 1c192f3
(gc --aggressive: make it really aggressive, 2007-12-06).

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot5800: testgit helper requires Python support
Jonathan Nieder [Mon, 12 Apr 2010 14:24:28 +0000 (09:24 -0500)]
t5800: testgit helper requires Python support

git remote-testgit is written in Python.  In a NO_PYTHON build, tests
using it would fail, so skip them.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotag.c: Parse tagger date (if present)
Shawn O. Pearce [Mon, 12 Apr 2010 23:25:28 +0000 (16:25 -0700)]
tag.c: Parse tagger date (if present)

Just like with committer dates, we parse the tagger date into the
struct tag so its available for further downstream processing.
However since the tagger header was not introduced until Git 0.99.1
we must consider it optional.  For tags missing this header we use
the default date of 0.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotag.c: Refactor parse_tag_buffer to be saner to program
Shawn O. Pearce [Mon, 12 Apr 2010 23:25:27 +0000 (16:25 -0700)]
tag.c: Refactor parse_tag_buffer to be saner to program

This code was horribly ugly to follow.  The structure of the headers
in an annotated tag object must follow a prescribed order, and most
of these are required.  Simplify the entire parsing logic by going
through the headers in the order they are supposed to appear in,
acting on each header as its identified in the buffer.

This change has the same behavior as the older version, its just
easier to read and maintain.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotag.h: Remove unused signature field
Shawn O. Pearce [Mon, 12 Apr 2010 23:25:26 +0000 (16:25 -0700)]
tag.h: Remove unused signature field

Its documented as unused.  So lets just drop it from the structure
since we haven't ever used it.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotag.c: Correct indentation
Shawn O. Pearce [Mon, 12 Apr 2010 23:25:25 +0000 (16:25 -0700)]
tag.c: Correct indentation

These lines were incorrectly indented with spaces, violating our
coding style.  Its annoying to read with 4 position tab stops, so
fix the indentation to be correct.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoindex-pack: smarter memory usage when appending objects
Nicolas Pitre [Mon, 12 Apr 2010 20:50:35 +0000 (16:50 -0400)]
index-pack: smarter memory usage when appending objects

In the same spirit as commit 9892bebafe, let's avoid allocating the full
buffer for the deflated data in write_compressed() in order to write it.
Let's deflate and write the data in chunks instead to reduce memory
usage.

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoindex-pack: rationalize unpack_entry_data()
Nicolas Pitre [Mon, 12 Apr 2010 16:12:06 +0000 (12:12 -0400)]
index-pack: rationalize unpack_entry_data()

Rework the loop to remove duplicated calls to use() and fill(), and
to make the code easier to read.

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoindex-pack: smarter memory usage when resolving deltas
Nicolas Pitre [Mon, 12 Apr 2010 16:11:07 +0000 (12:11 -0400)]
index-pack: smarter memory usage when resolving deltas

In the same spirit as commit 9892bebafe, let's avoid allocating the full
buffer for the deflated data in get_data_from_pack() in order to inflate
it.  Let's read and inflate the data in chunks instead to reduce memory
usage.

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocs: Add -X option to git-merge's synopsis.
Marc Branchaud [Mon, 12 Apr 2010 16:28:13 +0000 (12:28 -0400)]
Docs: Add -X option to git-merge's synopsis.

Also move -X's description next to -s's in merge-options.txt.

This makes it easier to learn how to specify merge strategy options.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'jl/maint-submodule-gitfile-awareness'
Junio C Hamano [Sun, 11 Apr 2010 20:54:28 +0000 (13:54 -0700)]
Merge branch 'jl/maint-submodule-gitfile-awareness'

* jl/maint-submodule-gitfile-awareness:
  Windows: start_command: Support non-NULL dir in struct child_process

14 years agoWindows: start_command: Support non-NULL dir in struct child_process
Johannes Sixt [Sun, 11 Apr 2010 20:40:12 +0000 (22:40 +0200)]
Windows: start_command: Support non-NULL dir in struct child_process

A caller of start_command can set the member 'dir' to a directory to
request that the child process starts with that directory as CWD. The first
user of this feature was added recently in eee49b6 (Teach diff --submodule
and status to handle .git files in submodules).

On Windows, we have been lazy and had not implemented support for this
feature, yet. This fixes the shortcoming.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoSync with 1.7.0.5
Junio C Hamano [Sun, 11 Apr 2010 20:44:17 +0000 (13:44 -0700)]
Sync with 1.7.0.5

14 years agoMerge branch 'jc/doc-submit-gmail'
Junio C Hamano [Sun, 11 Apr 2010 20:44:05 +0000 (13:44 -0700)]
Merge branch 'jc/doc-submit-gmail'

* jc/doc-submit-gmail:
  SubmittingPatches: update GMail section

14 years agoGit 1.7.0.5 v1.7.0.5
Junio C Hamano [Sun, 11 Apr 2010 20:41:43 +0000 (13:41 -0700)]
Git 1.7.0.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'rc/maint-reflog-msg-for-forced-branch' into maint
Junio C Hamano [Sun, 11 Apr 2010 20:39:47 +0000 (13:39 -0700)]
Merge branch 'rc/maint-reflog-msg-for-forced-branch' into maint

* rc/maint-reflog-msg-for-forced-branch:
  branch: say "Reset to" in reflog entries for 'git branch -f' operations

14 years agoblame documentation: -M/-C notice copied lines as well as moved ones
Junio C Hamano [Sun, 11 Apr 2010 19:17:42 +0000 (12:17 -0700)]
blame documentation: -M/-C notice copied lines as well as moved ones

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot3507: Make test executable
Stephen Boyd [Sun, 11 Apr 2010 08:43:46 +0000 (01:43 -0700)]
t3507: Make test executable

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot7400: clarify submodule update tests
Jonathan Nieder [Sat, 10 Apr 2010 05:39:41 +0000 (00:39 -0500)]
t7400: clarify submodule update tests

In particular, add a missing && to the update --init test.

The goal is to make it clearer what happened when one of these
tests fails.  The update --init test is currently (consistently)
failing on a few unusual machines.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot7400: clarify 'submodule add' tests
Jonathan Nieder [Sat, 10 Apr 2010 05:39:04 +0000 (00:39 -0500)]
t7400: clarify 'submodule add' tests

A new reader may not realize what properties the $submodurl
repository needs to have.

One of the tests is checking that ‘submodule add -b foo’ creates
a ‘foo’ branch.  Put this test in context by checking that
without -b, no ‘foo’ branch is created.

While at it, make sure each added submodule is a reasonable
repository, with clean index, no stray files, and so on.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot7400: split setup into multiple tests
Jonathan Nieder [Sat, 10 Apr 2010 05:38:37 +0000 (00:38 -0500)]
t7400: split setup into multiple tests

The setup in t7400-submodule-basic does a number of different
things to support different tests.  Splitting it up makes the
test a little easier to read and should provide an opportunity
to move each piece of setup closer to the tests that require it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoattr: Expand macros immediately when encountered.
Henrik Grubbström [Tue, 6 Apr 2010 12:46:44 +0000 (14:46 +0200)]
attr: Expand macros immediately when encountered.

When using macros it is otherwise hard to know whether an
attribute set by the macro should override an already set
attribute. Consider the following .gitattributes file:

[attr]mybinary binary -ident
* ident
foo.bin mybinary
bar.bin mybinary ident

Without this patch both foo.bin and bar.bin will have
the ident attribute set, which is probably not what
the user expects. With this patch foo.bin will have an
unset ident attribute, while bar.bin will have it set.

Signed-off-by: Henrik Grubbström <grubba@grubba.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoattr: Allow multiple changes to an attribute on the same line.
Henrik Grubbström [Tue, 6 Apr 2010 12:46:43 +0000 (14:46 +0200)]
attr: Allow multiple changes to an attribute on the same line.

When using macros it isn't inconceivable to have an attribute
being set by a macro, and then being reset explicitly.

Signed-off-by: Henrik Grubbström <grubba@grubba.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoattr: Fixed debug output for macro expansion.
Henrik Grubbström [Tue, 6 Apr 2010 12:46:42 +0000 (14:46 +0200)]
attr: Fixed debug output for macro expansion.

When debug_set() was called during macro expansion, it
received a pointer to a struct git_attr rather than a
string.

Signed-off-by: Henrik Grubbström <grubba@grubba.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoGit 1.7.1-rc1 v1.7.1-rc1
Junio C Hamano [Sat, 10 Apr 2010 20:05:16 +0000 (13:05 -0700)]
Git 1.7.1-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'mr/gitweb-jsmin'
Junio C Hamano [Sat, 10 Apr 2010 20:02:22 +0000 (13:02 -0700)]
Merge branch 'mr/gitweb-jsmin'

* mr/gitweb-jsmin:
  gitweb: update INSTALL to use shorter make target
  gitweb: add documentation to INSTALL regarding gitweb.js
  instaweb: add minification awareness
  Gitweb: add autoconfigure support for minifiers
  Gitweb: add support for minifying gitweb.css
  Gitweb: add ignore and clean rules for minified files

14 years agosend-email: Cleanup smtp-domain and add config
Brian Gernhardt [Sat, 10 Apr 2010 14:53:56 +0000 (10:53 -0400)]
send-email: Cleanup smtp-domain and add config

The way the code stored --smtp-domain was unlike its handling of other
similar options.  Bring it in line with the others by:

- Renaming $mail_domain to $smtp_domain to match the command line
  option. Also move its declaration from near the top of the file to
  near other option variables.

- Removing $mail_domain_default.  The variable was used once and only
  served to move the default away from where it gets used.

- Adding a sendemail.smtpdomain config option.  smtp-domain was the
  only SMTP configuration option that couldn't be set in the user's
  .gitconfig.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocument send-email --smtp-domain
Brian Gernhardt [Sat, 10 Apr 2010 14:53:55 +0000 (10:53 -0400)]
Document send-email --smtp-domain

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agosend-email: Don't use FQDNs without a '.'
Brian Gernhardt [Sat, 10 Apr 2010 14:53:54 +0000 (10:53 -0400)]
send-email: Don't use FQDNs without a '.'

Although Net::Domain::domainname attempts to be very thorough, the
host's configuration can still refuse to give a FQDN.  Check to see if
what we receive contains a dot as a basic sanity check.

Since the same condition is used twice and getting complex, let's move
it to a new function.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agosend-email: Cleanup { style
Brian Gernhardt [Sat, 10 Apr 2010 14:53:53 +0000 (10:53 -0400)]
send-email: Cleanup { style

As Jakub Narebski pointed out on the list, Perl code usually prefers

  sub func {
  }

over

  sub func
  {
  }

git-send-email.perl is somewhat inconsistent in its style, with 23
subroutines using the first style and 6 using the second.  Convert the
few odd subroutines so that the code matches normal Perl style.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'jl/maint-submodule-gitfile-awareness'
Junio C Hamano [Sat, 10 Apr 2010 19:13:46 +0000 (12:13 -0700)]
Merge branch 'jl/maint-submodule-gitfile-awareness'

* jl/maint-submodule-gitfile-awareness:
  Teach diff --submodule and status to handle .git files in submodules

14 years agoTeach diff --submodule and status to handle .git files in submodules
Jens Lehmann [Sat, 10 Apr 2010 17:01:12 +0000 (19:01 +0200)]
Teach diff --submodule and status to handle .git files in submodules

The simple test for an existing .git directory gives an incorrect result
if .git is a file that records "gitdir: overthere". So for submodules that
use a .git file, "git status" and the diff family - when the "--submodule"
option is given - did assume the submodule was not populated at all when
a .git file was used, thus generating wrong output or no output at all.

This is fixed by using read_gitfile_gently() to get the correct location
of the .git directory. While at it, is_submodule_modified() was cleaned up
to use the "dir" member of "struct child_process" instead of setting the
GIT_WORK_TREE and GIT_DIR environment variables.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agostatus: --ignored option shows ignored files
Junio C Hamano [Sat, 10 Apr 2010 07:33:17 +0000 (00:33 -0700)]
status: --ignored option shows ignored files

There is no stronger reason behind the choice of "!!" than just I happened
to have typed them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agowt-status: rename and restructure status-print-untracked
Junio C Hamano [Sat, 10 Apr 2010 07:19:46 +0000 (00:19 -0700)]
wt-status: rename and restructure status-print-untracked

I will be reusing this to show ignored stuff in the next patch.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agowt-status: collect ignored files
Junio C Hamano [Sat, 10 Apr 2010 07:11:53 +0000 (00:11 -0700)]
wt-status: collect ignored files

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agowt-status: plug memory leak while collecting untracked files
Junio C Hamano [Sat, 10 Apr 2010 06:58:27 +0000 (23:58 -0700)]
wt-status: plug memory leak while collecting untracked files

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agowt-status: remove unused workdir_untracked member
Junio C Hamano [Sat, 10 Apr 2010 06:34:40 +0000 (23:34 -0700)]
wt-status: remove unused workdir_untracked member

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Sat, 10 Apr 2010 05:43:18 +0000 (22:43 -0700)]
Merge branch 'maint'

* maint:
  Let check_preimage() use memset() to initialize "struct checkout"
  fetch/push: fix usage strings

14 years agoLet check_preimage() use memset() to initialize "struct checkout"
Jens Lehmann [Fri, 9 Apr 2010 20:08:35 +0000 (22:08 +0200)]
Let check_preimage() use memset() to initialize "struct checkout"

Every code site except check_preimage() uses either memset() or declares
a static instance of "struct checkout" to achieve proper initialization.
Lets use memset() instead of explicit initialization of all members here
too to be on the safe side in case this structure is expanded someday.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'ef/maint-empty-commit-log' into maint
Junio C Hamano [Sat, 10 Apr 2010 05:38:53 +0000 (22:38 -0700)]
Merge branch 'ef/maint-empty-commit-log' into maint

* ef/maint-empty-commit-log:
  rev-list: fix --pretty=oneline with empty message

14 years agoMerge branch 'jc/conflict-marker-size' into maint
Junio C Hamano [Sat, 10 Apr 2010 05:38:34 +0000 (22:38 -0700)]
Merge branch 'jc/conflict-marker-size' into maint

* jc/conflict-marker-size:
  diff --check: honor conflict-marker-size attribute

14 years agoMerge branch 'sp/maint-http-backend-die-triggers-die-recursively' into maint
Junio C Hamano [Sat, 10 Apr 2010 05:38:16 +0000 (22:38 -0700)]
Merge branch 'sp/maint-http-backend-die-triggers-die-recursively' into maint

* sp/maint-http-backend-die-triggers-die-recursively:
  http-backend: Don't infinite loop during die()

14 years agoMerge branch 'mg/maint-send-email-lazy-editor' into maint
Junio C Hamano [Sat, 10 Apr 2010 05:23:04 +0000 (22:23 -0700)]
Merge branch 'mg/maint-send-email-lazy-editor' into maint

* mg/maint-send-email-lazy-editor:
  send-email: lazily assign editor variable

14 years agoMerge branch 'rr/imap-send-unconfuse-from-line' into maint
Junio C Hamano [Sat, 10 Apr 2010 05:22:44 +0000 (22:22 -0700)]
Merge branch 'rr/imap-send-unconfuse-from-line' into maint

* rr/imap-send-unconfuse-from-line:
  imap-send: Remove limitation on message body

14 years agoMerge branch 'rb/maint-python-path' into maint
Junio C Hamano [Sat, 10 Apr 2010 05:22:19 +0000 (22:22 -0700)]
Merge branch 'rb/maint-python-path' into maint

* rb/maint-python-path:
  Correct references to /usr/bin/python which does not exist on FreeBSD

14 years agoMerge branch 'gh/maint-stash-show-error-message' into maint
Junio C Hamano [Sat, 10 Apr 2010 05:22:14 +0000 (22:22 -0700)]
Merge branch 'gh/maint-stash-show-error-message' into maint

* gh/maint-stash-show-error-message:
  Improve error messages from 'git stash show'

14 years agoMerge branch 'mg/mailmap-update' into maint
Junio C Hamano [Sat, 10 Apr 2010 05:22:06 +0000 (22:22 -0700)]
Merge branch 'mg/mailmap-update' into maint

* mg/mailmap-update:
  .mailmap: Entries for Alex Bennée, Deskin Miller, Vitaly "_Vi" Shukela

14 years agoMerge branch 'bc/maint-daemon-sans-ss-family' into maint
Junio C Hamano [Sat, 10 Apr 2010 05:22:00 +0000 (22:22 -0700)]
Merge branch 'bc/maint-daemon-sans-ss-family' into maint

* bc/maint-daemon-sans-ss-family:
  daemon.c: avoid accessing ss_family member of struct sockaddr_storage

14 years agofetch/push: fix usage strings
Tay Ray Chuan [Sat, 10 Apr 2010 02:50:19 +0000 (10:50 +0800)]
fetch/push: fix usage strings

 - use "<options>" instead of just "options".
 - use "[<repository> [<refspec>...]]" to indicate that <repository> and
   <refspec> are optional, and that <refspec> cannot be specified
   without specifying <repository>.

Note that when called without specifying <repository> (eg. "git fetch
-f"), it is accurate to say that the "git fetch [<options>]
[<repository> ...]" case takes precedence over "git fetch [<options>]
<group>".

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoremote-curl: ensure that URLs have a trailing slash
Tay Ray Chuan [Thu, 8 Apr 2010 02:15:18 +0000 (10:15 +0800)]
remote-curl: ensure that URLs have a trailing slash

Previously, we blindly assumed that URLs passed to the remote-curl
helper did not end with a trailing slash.

Use the convenience function end_url_with_slash() from http.[ch] to
ensure that URLs have a trailing slash on invocation of the remote-curl
helper, and use the URL as one with a trailing slash throughout.

It is possible for users to pass a URL with a trailing slash to
remote-curl, by, say, setting it in remote.<name>.url in their git
config. The resulting requests have an empty path component (//) and may
break implementations of the http git protocol.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agohttp: make end_url_with_slash() public
Tay Ray Chuan [Thu, 8 Apr 2010 02:15:17 +0000 (10:15 +0800)]
http: make end_url_with_slash() public

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot5541-http-push: add test for URLs with trailing slash
Tay Ray Chuan [Thu, 8 Apr 2010 02:15:16 +0000 (10:15 +0800)]
t5541-http-push: add test for URLs with trailing slash

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMakefile: Simplify handling of python scripts
Brian Gernhardt [Fri, 9 Apr 2010 15:57:45 +0000 (11:57 -0400)]
Makefile: Simplify handling of python scripts

The sed script intended to add a standard opening to python scripts
was non-compatible and overly complex.  Simplifying it down to a set
of one-liners removes the compatibility issues of newlines.  Moving
the environment alterations from the Makefile to the python scripts
makes also makes the scripts easier to run in-place.

Specifically, the new sed script:

 - Alters the shebang line to use the configured Python.
 - Alters any os.getenv("GITPYTHONLIB") calls to use @@INSTLIBDIR@@ as the
   default.  This will replace any existing default or add a default if
   none is provided.
 - Replaces the @@INSTLIBDIR@@ placeholder with the directory git installs
   its python libraries to.

The last two steps could be combined into a single step, but is left
separate in case someone has another need for @@INSTLIBDIR@@ in their
script.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'rc/maint-reflog-msg-for-forced-branch'
Junio C Hamano [Sat, 10 Apr 2010 03:42:10 +0000 (20:42 -0700)]
Merge branch 'rc/maint-reflog-msg-for-forced-branch'

* rc/maint-reflog-msg-for-forced-branch:
  branch: say "Reset to" in reflog entries for 'git branch -f' operations

Conflicts:
builtin-branch.c

14 years agobranch: say "Reset to" in reflog entries for 'git branch -f' operations
Tay Ray Chuan [Fri, 9 Apr 2010 12:38:18 +0000 (20:38 +0800)]
branch: say "Reset to" in reflog entries for 'git branch -f' operations

In 5f856dd (fix reflog entries for "git-branch"), it is mentioned that
'git branch -f' is intended to be equivalent to 'git reset'. Since we
usually say "reset to <commit>" in the git-reset Documentation and
elsewhere, it would make sense to say "Reset to" here as well, instead
of "Reset from" previously.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge early parts of jk/cached-textconv
Junio C Hamano [Fri, 9 Apr 2010 06:31:27 +0000 (23:31 -0700)]
Merge early parts of jk/cached-textconv

14 years agodiff.c: work around pointer constness warnings
Junio C Hamano [Fri, 9 Apr 2010 06:30:49 +0000 (23:30 -0700)]
diff.c: work around pointer constness warnings

The textconv leak fix introduced two invocations of free() to release
memory pointed by "const char *", which get annoying compiler warning.

14 years agoMerge branch 'maint'
Junio C Hamano [Fri, 9 Apr 2010 06:27:23 +0000 (23:27 -0700)]
Merge branch 'maint'

* maint:
  docs: clarify "branch -l"

14 years agolog.decorate: only ignore it under "log --pretty=raw"
Junio C Hamano [Thu, 8 Apr 2010 17:17:17 +0000 (10:17 -0700)]
log.decorate: only ignore it under "log --pretty=raw"

Unlike notes that are often multi-line and disrupting to be placed in many
output formats, a decoration is designed to be a small token that can be
tacked after an existing line of the output where a commit object name sits.
Disabling log.decorate for something like "log --oneline" would defeat the
purpose of the configuration.

We _might_ want to change it further in the future to force scripts that
do not want to be broken by random end user configurations to explicitly
say "log --no-decorate", but that would be an incompatible change that
needs the usual multi-release-cycle deprecation process.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoscript with rev-list instead of log
Jeff King [Thu, 8 Apr 2010 19:42:37 +0000 (15:42 -0400)]
script with rev-list instead of log

Because log.decorate now shows decorations for --pretty=oneline,
we must explicitly turn it off when scripting. Otherwise,
users with log.decorate set will get cruft like:

  $ git stash
  Saved working directory and index state WIP on master:
    2c1f7f5 (HEAD, master) commit subject

Instead of adding --no-decorate to the log command line,
let's just use the rev-list plumbing interface instead,
which does the right thing.

git-submodule has a similar call. Since it just counts the
commit lines, nothing is broken, but let's switch it, too,
for the sake of consistency and cleanliness.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agols-remote: fall-back to default remotes when no remote specified
Tay Ray Chuan [Thu, 8 Apr 2010 17:21:13 +0000 (01:21 +0800)]
ls-remote: fall-back to default remotes when no remote specified

Instead of breaking execution when no remote (as specified in the
variable dest) is specified when git-ls-remote is invoked, continue on
and let remote_get() handle it.

This way, we are able to use the default remotes (eg. "origin",
branch.<name>.remote), as git-fetch, git-push, and other users of
remote_get(), do.

If no suitable remote is found, exit with a message describing the
issue, instead of just the usage text, as we do previously.

Add several tests to check that git-ls-remote handles the
no-remote-specified situation.

Also add a test that "git ls-remote <pattern>" does not work; we are
unable to guess the remote in that situation, as are git-fetch and
git-push.

In that test, we are testing for messages coming from two separate
processes, but we should be OK, because the second message is triggered
by closing the fd which must happen after the first message is printed.
(analysis by Jeff King.)

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoThread-safe xmalloc and xrealloc needs a recursive mutex
Johannes Sixt [Thu, 8 Apr 2010 07:15:39 +0000 (09:15 +0200)]
Thread-safe xmalloc and xrealloc needs a recursive mutex

The mutex used to protect object access (read_mutex) may need to be
acquired recursively.  Introduce init_recursive_mutex() helper function
in thread-utils.c that constructs a mutex with the PHREAD_MUTEX_RECURSIVE
attribute.

pthread_mutex_init() emulation on Win32 is already recursive as it is
implemented on top of the CRITICAL_SECTION type, which is recursive.

    http://msdn.microsoft.com/en-us/library/ms682530%28VS.85%29.aspx

Add do-nothing compatibility wrappers for pthread_mutexattr* functions.

Initial-version-by: Fredrik Kuivinen <frekui@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agodocs: clarify "branch -l"
Jeff King [Thu, 8 Apr 2010 19:49:08 +0000 (15:49 -0400)]
docs: clarify "branch -l"

This option is mostly useless these days because we turn on
reflogs by default in non-bare repos.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoapply: Allow blank *trailing* context lines to match beyond EOF
Björn Gustavsson [Thu, 8 Apr 2010 04:14:31 +0000 (06:14 +0200)]
apply: Allow blank *trailing* context lines to match beyond EOF

In 51667147be, "git apply --whitespace=fix" was extended to
allow a blank context line to match beyond the end of the file,
but only if the context line was in the leading part of the
hunk (i.e. the hunk inserted additional contents at the end
of the file).

Drop the restriction that the context line must be in the
leading part of the hunk, thus allowing a file to be changed
from:

 a
 (blank line)

to:

 b
 a
 (blank line)

Note that the blank line will be kept, because "--whitespace=fix"
only removes trailing blank lines that a hunk would add, never
trailing blank lines in the context.

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoSubmittingPatches: update GMail section
Junio C Hamano [Wed, 7 Apr 2010 22:59:17 +0000 (15:59 -0700)]
SubmittingPatches: update GMail section

Even if you use imap-send to throw your drafts in the outbox, using their
web interface will mangle your patches.  Clarify that the imap-send is
meant to be used together with a real MUA that can use IMAP drafts, and
remove instructions related to the web interface, which is irrelevant.

Add description of send-email as an alternative.

Use --cover-letter, and do not use -C nor --no-color, on the example
command line for format-patch.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'mg/notes-reflog'
Junio C Hamano [Wed, 7 Apr 2010 22:34:09 +0000 (15:34 -0700)]
Merge branch 'mg/notes-reflog'

* mg/notes-reflog:
  refs.c: Write reflogs for notes just like for branch heads
  t3301-notes: Test the creation of reflog entries

14 years agoMerge branch 'jn/mailinfo-scissors'
Junio C Hamano [Wed, 7 Apr 2010 22:34:06 +0000 (15:34 -0700)]
Merge branch 'jn/mailinfo-scissors'

* jn/mailinfo-scissors:
  Teach mailinfo %< as an alternative scissors mark

14 years agoAdd option to git-commit to allow empty log messages
Ævar Arnfjörð Bjarmason [Tue, 6 Apr 2010 08:40:35 +0000 (08:40 +0000)]
Add option to git-commit to allow empty log messages

Change git-commit(1) to accept the --allow-empty-message option
to allow a commit with an empty message.  This is analogous to the
existing --allow-empty option which allows a commit that records
no changes.  As these are mainly for interoperating with foreign SCM
systems, and are not meant for normal use, ensure that "git commit -h"
does not talk about them.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agofix typos and grammar in 1.7.1 draft release notes
Jeff King [Wed, 7 Apr 2010 20:57:11 +0000 (16:57 -0400)]
fix typos and grammar in 1.7.1 draft release notes

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoreflog --expire-unreachable: avoid merge-base computation
Junio C Hamano [Wed, 7 Apr 2010 18:09:12 +0000 (11:09 -0700)]
reflog --expire-unreachable: avoid merge-base computation

The option tells the command to expire older reflog entries that refer to
commits that are no longer reachable from the tip of the ref the reflog is
associated with.  To avoid repeated merge_base() invocations, we used to
mark commits that are known to be reachable by walking the history from
the tip until we hit commits that are older than expire-total (which is
the timestamp before which all the reflog entries are expired).

However, it is a different matter if a commit is _not_ known to be
reachable and the commit is known to be unreachable.  Because you can
rewind a ref to an ancient commit and then reset it back to the original
tip, a recent reflog entry can point at a commit that older than the
expire-total timestamp and we shouldn't expire it.  For that reason, we
had to run merge-base computation when a commit is _not_ known to be
reachable.

This introduces a lazy/on-demand traversal of the history to mark
reachable commits in steps.  As before, we mark commits that are newer
than expire-total to optimize the normal case before walking reflog, but
we dig deeper from the commits the initial step left off when we encounter
a commit that is not known to be reachable.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agonotes.h: declare bit field as unsigned to silence compiler complaints
Brandon Casey [Tue, 6 Apr 2010 15:11:44 +0000 (10:11 -0500)]
notes.h: declare bit field as unsigned to silence compiler complaints

The IRIX MIPSPro compiler complains like this:

   cc-1107 c99: WARNING File = notes.h, Line = 215
     A signed bit field has a length of 1 bit.

           int suppress_default_notes:1;
               ^

'unsigned' is what was intended, so lets make it so.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agowar on "sleep" in tests
Junio C Hamano [Wed, 7 Apr 2010 00:08:54 +0000 (17:08 -0700)]
war on "sleep" in tests

In many places in test suite we have "sleep"s that do not have to be
there.

 - I do not simply see the point of the one in t3500.  It may be making
   sure that the timestamp order of commits generated during the test is
   stable, in which case test_tick is the right ingredient to use without
   wasting tester's time.

 - The one in t4011 is to make sure that the plumbing diff-index notices
   the stat-dirtyness of a removed then identically recreated symlink.
   Keeping the old symlink around to make sure that a newly created
   symlink gets different ino would be sufficient for that purpose.

 - The one in t7600 is to make sure that "git merge" does not get confused
   by stat-dirty "file" in the working tree.  Again, keeping the old file
   around and creating an identical copy to ensure a different ino would
   be sufficient for that purpose.

The "racy git" tests in t0010 are inherently about mtime between the index
itself and index entries.  The "sleep" in that test must stay as they are.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoGit 1.7.1-rc0 v1.7.1-rc0
Junio C Hamano [Tue, 6 Apr 2010 22:00:01 +0000 (15:00 -0700)]
Git 1.7.1-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'da/maint-python-startup'
Junio C Hamano [Tue, 6 Apr 2010 21:50:47 +0000 (14:50 -0700)]
Merge branch 'da/maint-python-startup'

* da/maint-python-startup:
  Makefile: Remove usage of deprecated Python "has_key" method

14 years agoMerge branch 'ic/bash-completion-rpm'
Junio C Hamano [Tue, 6 Apr 2010 21:50:47 +0000 (14:50 -0700)]
Merge branch 'ic/bash-completion-rpm'

* ic/bash-completion-rpm:
  RPM spec: include bash completion support

14 years agoMerge branch 'sb/fmt-merge-msg'
Junio C Hamano [Tue, 6 Apr 2010 21:50:46 +0000 (14:50 -0700)]
Merge branch 'sb/fmt-merge-msg'

* sb/fmt-merge-msg:
  fmt-merge-msg: hide summary option
  fmt-merge-msg: remove custom string_list implementation
  string-list: add unsorted_string_list_lookup()
  fmt-merge-msg: use pretty.c routines
  t6200: test fmt-merge-msg more
  t6200: modernize with test_tick
  fmt-merge-msg: be quiet if nothing to merge

14 years agoMerge branch 'jc/conflict-marker-size'
Junio C Hamano [Tue, 6 Apr 2010 21:50:46 +0000 (14:50 -0700)]
Merge branch 'jc/conflict-marker-size'

* jc/conflict-marker-size:
  diff --check: honor conflict-marker-size attribute

14 years agoMerge branch 'ef/maint-empty-commit-log'
Junio C Hamano [Tue, 6 Apr 2010 21:50:46 +0000 (14:50 -0700)]
Merge branch 'ef/maint-empty-commit-log'

* ef/maint-empty-commit-log:
  rev-list: fix --pretty=oneline with empty message

14 years agoMerge branch 'sg/bash-completion'
Junio C Hamano [Tue, 6 Apr 2010 21:50:45 +0000 (14:50 -0700)]
Merge branch 'sg/bash-completion'

* sg/bash-completion:
  bash: completion for gitk aliases
  bash: support user-supplied completion scripts for aliases
  bash: support user-supplied completion scripts for user's git commands
  bash: improve aliased command recognition

14 years agolog --pretty/--oneline: ignore log.decorate
Junio C Hamano [Tue, 6 Apr 2010 21:48:55 +0000 (14:48 -0700)]
log --pretty/--oneline: ignore log.decorate

Many scripts, most notably gitk, rely on output from the log family of
command not to be molested by random user configuration.  This is
especially true when --pretty=raw is given.

Just like we disable notes output unless the command line explicitly
asks for --show-notes, disable the decoration code unless --decorate is
given explicitly from the command line and --pretty or --oneline is
given.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoAdd `%B' in format strings for raw commit body in `git log' and friends
Eli Barzilay [Thu, 25 Mar 2010 02:51:52 +0000 (22:51 -0400)]
Add `%B' in format strings for raw commit body in `git log' and friends

Also update the documentation text and add a test.

Signed-off-by: Eli Barzilay <eli@barzilay.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoRevert "Link against libiconv on IRIX"
Junio C Hamano [Mon, 5 Apr 2010 17:16:11 +0000 (10:16 -0700)]
Revert "Link against libiconv on IRIX"

Brandon Casey reports:

    Subject: Re: [PATCH] Link against libiconv on IRIX
    Date: Mon, 05 Apr 2010 11:45:32 -0500
    Message-Id: <1UypQMCHLT57SnjSQIM66RTkLalsvavG8xXoQJv4rEQ@cipher.nrlssc.navy.mil>

    This breaks compilation on IRIX 6.5.29m for me since there
    is no separate libiconv.so.

    What version of IRIX are you using?

    On my system, even the iconv utility doesn't link against
    a libiconv shared object.  It seems the iconv functionality is in libc.

       # ldd /usr/bin/iconv
       libc.so.1  =>    /usr/lib32/libc.so.1

    Could it be that you are using a third party iconv library?
    I've experienced this on another system and the problem was related
    to curl.  In that case, curl was linked against an external iconv and
    not the native library, so if I tried to build with curl support, I had
    to also build against the external iconv library.

While we wait for an improved solution, revert the regression caused by
21704227904b51197976c61c595b52d807677533.

14 years agoRename ONE_FILESYSTEM to DISCOVERY_ACROSS_FILESYSTEM
Junio C Hamano [Sun, 4 Apr 2010 21:49:31 +0000 (14:49 -0700)]
Rename ONE_FILESYSTEM to DISCOVERY_ACROSS_FILESYSTEM

If a missing ONE_FILESYSTEM defaults to true, the only users who set this
variable set it to false to tell git not to limit the discovery to one
filesystem; there are too many negations in one sentence to make a simple
panda brain dizzy.

Use the variable GIT_DISCOVERY_ACROSS_FILESYSTEM that changes the
behaviour from the default "limit to one filesystem" to "cross the
boundary as I ask you to"; makes the semantics much more straight
forward.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoremote-helpers: add tests for testgit helper
Sverre Rabbelier [Mon, 29 Mar 2010 16:48:29 +0000 (11:48 -0500)]
remote-helpers: add tests for testgit helper

[jc: with test fixes from J6t]

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agowhitespace: tests for git-apply --whitespace=fix with tab-in-indent
Chris Webb [Fri, 2 Apr 2010 23:37:37 +0000 (00:37 +0100)]
whitespace: tests for git-apply --whitespace=fix with tab-in-indent

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agowhitespace: add tab-in-indent support for --whitespace=fix
Chris Webb [Fri, 2 Apr 2010 23:37:30 +0000 (00:37 +0100)]
whitespace: add tab-in-indent support for --whitespace=fix

If tab-in-indent is set, --whitespace=fix will ensure that any stray tabs in
the initial indent are expanded to the correct number of space characters.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>