Commit graph

22145 commits

Author SHA1 Message Date
Junio C Hamano a6018bbdca 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
2010-04-13 18:21:29 -07:00
Johannes Gilger 5b16360330 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>
2010-04-13 18:15:08 -07:00
Shawn O. Pearce 03e8b541b3 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>
2010-04-13 13:04:50 -07:00
Jay Soffian f78683f3a8 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>
2010-04-13 12:27:19 -07:00
Jonathan Nieder 63a2f6139c 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>
2010-04-12 22:10:50 -07:00
Shawn O. Pearce e451d06bf3 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>
2010-04-12 21:45:17 -07:00
Shawn O. Pearce 28de5b6b40 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>
2010-04-12 21:45:13 -07:00
Shawn O. Pearce 628511a588 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>
2010-04-12 21:45:08 -07:00
Shawn O. Pearce 2e0052a5eb 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>
2010-04-12 21:45:03 -07:00
Nicolas Pitre 7734d7f2f6 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>
2010-04-12 15:30:58 -07:00
Nicolas Pitre 7ce4721ad8 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>
2010-04-12 09:51:42 -07:00
Nicolas Pitre 776ea3707a 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>
2010-04-12 09:51:38 -07:00
Marc Branchaud adda3c3beb 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>
2010-04-12 09:50:09 -07:00
Junio C Hamano 4553d58f37 Merge branch 'jl/maint-submodule-gitfile-awareness'
* jl/maint-submodule-gitfile-awareness:
  Windows: start_command: Support non-NULL dir in struct child_process
2010-04-11 13:54:28 -07:00
Johannes Sixt f9a2743c35 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>
2010-04-11 13:48:46 -07:00
Junio C Hamano 7b575f3c38 Sync with 1.7.0.5 2010-04-11 13:46:08 -07:00
Junio C Hamano fb10369848 Merge branch 'jc/doc-submit-gmail'
* jc/doc-submit-gmail:
  SubmittingPatches: update GMail section
2010-04-11 13:44:05 -07:00
Junio C Hamano fcd424011b Git 1.7.0.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-11 13:42:33 -07:00
Junio C Hamano c512b03555 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
2010-04-11 13:39:47 -07:00
Junio C Hamano d8c416b251 blame documentation: -M/-C notice copied lines as well as moved ones
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-11 12:17:42 -07:00
Stephen Boyd fe90c93bee t3507: Make test executable
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-11 12:13:13 -07:00
Jonathan Nieder ce8b54d676 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>
2010-04-10 21:36:07 -07:00
Jonathan Nieder a76c944bbe 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>
2010-04-10 21:30:59 -07:00
Jonathan Nieder fe454b1315 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>
2010-04-10 21:24:43 -07:00
Henrik Grubbström ec775c41dc 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>
2010-04-10 18:36:00 -07:00
Henrik Grubbström 969f9d7322 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>
2010-04-10 18:36:00 -07:00
Henrik Grubbström 426c27b7c0 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>
2010-04-10 18:35:59 -07:00
Junio C Hamano b9aa901856 Git 1.7.1-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-10 13:05:16 -07:00
Junio C Hamano b92cbb62de 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
2010-04-10 13:02:22 -07:00
Brian Gernhardt 69cf7bfd13 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>
2010-04-10 13:01:23 -07:00
Brian Gernhardt 79ca070ce5 Document send-email --smtp-domain
Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-10 13:01:21 -07:00
Brian Gernhardt 59a8630338 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>
2010-04-10 13:01:20 -07:00
Brian Gernhardt 68ce93307f 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>
2010-04-10 13:01:17 -07:00
Junio C Hamano 055e1e2969 Merge branch 'jl/maint-submodule-gitfile-awareness'
* jl/maint-submodule-gitfile-awareness:
  Teach diff --submodule and status to handle .git files in submodules
2010-04-10 12:13:46 -07:00
Jens Lehmann eee49b6ce4 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>
2010-04-10 11:51:56 -07:00
Junio C Hamano 2381e39e5f 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>
2010-04-10 00:43:59 -07:00
Junio C Hamano 1b908b6fb4 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>
2010-04-10 00:43:59 -07:00
Junio C Hamano 6cb3f6b282 wt-status: collect ignored files
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-10 00:43:59 -07:00
Junio C Hamano f5b26b1d14 wt-status: plug memory leak while collecting untracked files
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-10 00:43:59 -07:00
Junio C Hamano e28a243b00 wt-status: remove unused workdir_untracked member
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-10 00:43:59 -07:00
Junio C Hamano 3b0c19663e Merge branch 'maint'
* maint:
  Let check_preimage() use memset() to initialize "struct checkout"
  fetch/push: fix usage strings
2010-04-09 22:43:18 -07:00
Jens Lehmann 54fd955c21 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>
2010-04-09 22:42:57 -07:00
Junio C Hamano 408dee5222 Merge branch 'ef/maint-empty-commit-log' into maint
* ef/maint-empty-commit-log:
  rev-list: fix --pretty=oneline with empty message
2010-04-09 22:38:53 -07:00
Junio C Hamano daaf2e8892 Merge branch 'jc/conflict-marker-size' into maint
* jc/conflict-marker-size:
  diff --check: honor conflict-marker-size attribute
2010-04-09 22:38:34 -07:00
Junio C Hamano 326bea47cb 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()
2010-04-09 22:38:16 -07:00
Junio C Hamano fe7e37235d Merge branch 'mg/maint-send-email-lazy-editor' into maint
* mg/maint-send-email-lazy-editor:
  send-email: lazily assign editor variable
2010-04-09 22:23:04 -07:00
Junio C Hamano 2e5a40f0b5 Merge branch 'rr/imap-send-unconfuse-from-line' into maint
* rr/imap-send-unconfuse-from-line:
  imap-send: Remove limitation on message body
2010-04-09 22:22:44 -07:00
Junio C Hamano 581b26c82d Merge branch 'rb/maint-python-path' into maint
* rb/maint-python-path:
  Correct references to /usr/bin/python which does not exist on FreeBSD
2010-04-09 22:22:19 -07:00
Junio C Hamano 5d4bd79d80 Merge branch 'gh/maint-stash-show-error-message' into maint
* gh/maint-stash-show-error-message:
  Improve error messages from 'git stash show'
2010-04-09 22:22:14 -07:00
Junio C Hamano e80014a13e Merge branch 'mg/mailmap-update' into maint
* mg/mailmap-update:
  .mailmap: Entries for Alex Bennée, Deskin Miller, Vitaly "_Vi" Shukela
2010-04-09 22:22:06 -07:00