Code

git.git
14 years agoMerge branch 'jk/maint-sha1-file-name-fix' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:40:41 +0000 (05:40 -0700)]
Merge branch 'jk/maint-sha1-file-name-fix' into maint

* jk/maint-sha1-file-name-fix:
  remove over-eager caching in sha1_file_name

14 years agoMerge branch 'jk/maint-pull-dry-run-noop' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:40:33 +0000 (05:40 -0700)]
Merge branch 'jk/maint-pull-dry-run-noop' into maint

* jk/maint-pull-dry-run-noop:
  pull: do nothing on --dry-run

14 years agoMerge branch 'bw/diff-metainfo-color' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:40:10 +0000 (05:40 -0700)]
Merge branch 'bw/diff-metainfo-color' into maint

* bw/diff-metainfo-color:
  diff: fix coloring of extended diff headers

14 years agoMerge branch 'cb/assume-unchanged-fix' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:39:23 +0000 (05:39 -0700)]
Merge branch 'cb/assume-unchanged-fix' into maint

* cb/assume-unchanged-fix:
  Documentation: git-add does not update files marked "assume unchanged"
  do not overwrite files marked "assume unchanged"

14 years agoMerge branch 'jn/notes-doc' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:39:16 +0000 (05:39 -0700)]
Merge branch 'jn/notes-doc' into maint

* jn/notes-doc:
  Documentation/notes: nitpicks
  Documentation/notes: clean up description of rewriting configuration
  Documentation/notes: simplify treatment of default display refs
  Documentation/log: add a CONFIGURATION section
  Documentation/notes: simplify treatment of default notes ref
  Documentation/notes: add configuration section
  Documentation/notes: describe content of notes blobs
  Documentation/notes: document format of notes trees

14 years agoMerge branch 'ab/test-cleanup' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:39:02 +0000 (05:39 -0700)]
Merge branch 'ab/test-cleanup' into maint

* ab/test-cleanup:
  Turn setup code in t2007-checkout-symlink.sh into a test
  Move t6000lib.sh to lib-*

14 years agoMerge branch 'rs/diff-no-minimal' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:38:50 +0000 (05:38 -0700)]
Merge branch 'rs/diff-no-minimal' into maint

* rs/diff-no-minimal:
  git diff too slow for a file

14 years agoMerge branch 'bg/apply-blank-trailing-context' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:38:36 +0000 (05:38 -0700)]
Merge branch 'bg/apply-blank-trailing-context' into maint

* bg/apply-blank-trailing-context:
  apply: Allow blank *trailing* context lines to match beyond EOF

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

* maint:
  gitweb/Makefile: fix typo in gitweb.min.css rule

Conflicts:
gitweb/Makefile

14 years agogit-cvsserver: fix error for invalid password formats
Ævar Arnfjörð Bjarmason [Sat, 19 Jun 2010 16:06:58 +0000 (16:06 +0000)]
git-cvsserver: fix error for invalid password formats

Change the error message to report the erroneous password
character. $1 was never set in the previos version, it was a leftover
from older code that used a regex for the test.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-cvsserver: typo in a comment: bas -> has
Ævar Arnfjörð Bjarmason [Sat, 19 Jun 2010 16:06:57 +0000 (16:06 +0000)]
git-cvsserver: typo in a comment: bas -> has

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agolog --decorate: Colorize commit decorations
Nazri Ramliy [Sat, 19 Jun 2010 01:37:35 +0000 (09:37 +0800)]
log --decorate: Colorize commit decorations

This makes the decorations stand out more and easier to distinguish
and spot because they are colored differently depending on their type.

Signed-off-by: Nazri Ramliy <ayiehere@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agolog-tree.c: Use struct name_decoration's type for classifying decoration
Nazri Ramliy [Sat, 19 Jun 2010 01:37:34 +0000 (09:37 +0800)]
log-tree.c: Use struct name_decoration's type for classifying decoration

The "tag: " prefix is no longer prepended to the name of the decoration.
It is now printed conditionally by show_decorations if the decoration
type is DECORATION_REF_TAG.

Signed-off-by: Nazri Ramliy <ayiehere@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agocommit.h: add 'type' to struct name_decoration
Nazri Ramliy [Sat, 19 Jun 2010 01:37:33 +0000 (09:37 +0800)]
commit.h: add 'type' to struct name_decoration

This allows for semantically better handling of decoration type.

Signed-off-by: Nazri Ramliy <ayiehere@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb/Makefile: fix typo in gitweb.min.css rule
Jay Soffian [Fri, 18 Jun 2010 21:01:25 +0000 (17:01 -0400)]
gitweb/Makefile: fix typo in gitweb.min.css rule

This typo has been in place since the rule was originally added by
0e6ce21 (Gitweb: add support for minifying gitweb.css).

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot/t8007: test textconv support for cat-file
Clément Poulain [Wed, 9 Jun 2010 17:02:09 +0000 (19:02 +0200)]
t/t8007: test textconv support for cat-file

Test the correct functionning of textconv with cat-file <sha1:blob>
and cat-file HEAD^ <file>. Test the case when no driver is specified

Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr>
Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotextconv: support for cat_file
Clément Poulain [Tue, 15 Jun 2010 15:50:28 +0000 (17:50 +0200)]
textconv: support for cat_file

Make the textconv_object function public, and add --textconv option to cat-file
to perform conversion on blob objects. Using --textconv implies that we are
working on a blob.
As files drivers need to be initialized, a new config is required in addition
to git_default_config. Therefore git_cat_file_config() is introduced

Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr>
Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate draft release notes to 1.7.2
Junio C Hamano [Fri, 18 Jun 2010 18:27:01 +0000 (11:27 -0700)]
Update draft release notes to 1.7.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'cc/maint-diff-CC-binary'
Junio C Hamano [Fri, 18 Jun 2010 18:16:57 +0000 (11:16 -0700)]
Merge branch 'cc/maint-diff-CC-binary'

* cc/maint-diff-CC-binary:
  diff: fix "git show -C -C" output when renaming a binary file

Conflicts:
diff.c

14 years agoMerge branch 'by/diff-graph'
Junio C Hamano [Fri, 18 Jun 2010 18:16:57 +0000 (11:16 -0700)]
Merge branch 'by/diff-graph'

* by/diff-graph:
  Make --color-words work well with --graph
  graph.c: register a callback for graph output
  Emit a whole line in one go
  diff.c: Output the text graph padding before each diff line
  Output the graph columns at the end of the commit message
  Add a prefix output callback to diff output

Conflicts:
diff.c

14 years agoMerge branch 'cb/ls-files-cdup'
Junio C Hamano [Fri, 18 Jun 2010 18:16:56 +0000 (11:16 -0700)]
Merge branch 'cb/ls-files-cdup'

* cb/ls-files-cdup:
  ls-files: allow relative pathspec
  quote.c: separate quoting and relative path generation

14 years agoMerge branch 'jc/t9129-any-utf8'
Junio C Hamano [Fri, 18 Jun 2010 18:16:56 +0000 (11:16 -0700)]
Merge branch 'jc/t9129-any-utf8'

* jc/t9129-any-utf8:
  t9129: fix UTF-8 locale detection

14 years agoMerge branch 'rr/am-help'
Junio C Hamano [Fri, 18 Jun 2010 18:16:56 +0000 (11:16 -0700)]
Merge branch 'rr/am-help'

* rr/am-help:
  git am: Remove stray error message from sed
  git am: Display some help text when patch is empty
  git am: Set cmdline globally

14 years agoMerge branch 'jn/rebase-cmdline-fix'
Junio C Hamano [Fri, 18 Jun 2010 18:16:56 +0000 (11:16 -0700)]
Merge branch 'jn/rebase-cmdline-fix'

* jn/rebase-cmdline-fix:
  rebase: improve error message when upstream argument is missing

14 years agoMerge branch 'ps/gitweb--browse-chrome'
Junio C Hamano [Fri, 18 Jun 2010 18:16:56 +0000 (11:16 -0700)]
Merge branch 'ps/gitweb--browse-chrome'

* ps/gitweb--browse-chrome:
  git-web--browse: Add support for google chrome and chromium

14 years agoMerge branch 'jk/am-skip-hint'
Junio C Hamano [Fri, 18 Jun 2010 18:16:56 +0000 (11:16 -0700)]
Merge branch 'jk/am-skip-hint'

* jk/am-skip-hint:
  git-am: suggest what to do with superfluous patches

14 years agoMerge branch 'jh/diff-index-line-abbrev'
Junio C Hamano [Fri, 18 Jun 2010 18:16:56 +0000 (11:16 -0700)]
Merge branch 'jh/diff-index-line-abbrev'

* jh/diff-index-line-abbrev:
  diff.c: Ensure "index $from..$to" line contains unambiguous SHA1s

Conflicts:
diff.c

14 years agoMerge branch 'ab/maint-perl-use-instlibdir'
Junio C Hamano [Fri, 18 Jun 2010 18:16:55 +0000 (11:16 -0700)]
Merge branch 'ab/maint-perl-use-instlibdir'

* ab/maint-perl-use-instlibdir:
  Makefile: remove redundant munging of @@INSTLIBDIR@@

14 years agoMerge branch 'ec/diff-noprefix-config'
Junio C Hamano [Fri, 18 Jun 2010 18:16:55 +0000 (11:16 -0700)]
Merge branch 'ec/diff-noprefix-config'

* ec/diff-noprefix-config:
  diff: add configuration option for disabling diff prefixes.

14 years agoMerge branch 'mg/status-b'
Junio C Hamano [Fri, 18 Jun 2010 18:16:55 +0000 (11:16 -0700)]
Merge branch 'mg/status-b'

* mg/status-b:
  Documentation+t5708: document and test status -s -b
  Show branch information in short output of git status

14 years agoMerge branch 'jn/gitweb-plackup'
Junio C Hamano [Fri, 18 Jun 2010 18:16:55 +0000 (11:16 -0700)]
Merge branch 'jn/gitweb-plackup'

* jn/gitweb-plackup:
  git-instaweb: Add support for running gitweb via 'plackup'
  git-instaweb: Wait for server to start before running web browser
  git-instaweb: Remove pidfile after stopping web server
  git-instaweb: Configure it to work with new gitweb structure
  git-instaweb: Put httpd logs in a "$httpd_only" subdirectory
  gitweb: Set default destination directory for installing gitweb in Makefile
  gitweb: Move static files into seperate subdirectory

14 years agoMerge branch 'jk/url-decode'
Junio C Hamano [Fri, 18 Jun 2010 18:16:55 +0000 (11:16 -0700)]
Merge branch 'jk/url-decode'

* jk/url-decode:
  decode file:// and ssh:// URLs
  make url-related functions reusable

14 years agoMerge branch 'jn/remote-set-branches'
Junio C Hamano [Fri, 18 Jun 2010 18:16:55 +0000 (11:16 -0700)]
Merge branch 'jn/remote-set-branches'

* jn/remote-set-branches:
  Add git remote set-branches

Conflicts:
builtin/remote.c

14 years agoMerge branch 'rc/ls-remote-default'
Junio C Hamano [Fri, 18 Jun 2010 18:16:54 +0000 (11:16 -0700)]
Merge branch 'rc/ls-remote-default'

* rc/ls-remote-default:
  ls-remote: print URL when no repo is specified

14 years agoMerge branch 'hg/id-munging'
Junio C Hamano [Fri, 18 Jun 2010 18:16:54 +0000 (11:16 -0700)]
Merge branch 'hg/id-munging'

* hg/id-munging:
  convert: Keep foreign $Id$ on checkout.
  convert: Safer handling of $Id$ contraction.

14 years agoMerge branch 'tc/merge-m-log'
Junio C Hamano [Fri, 18 Jun 2010 18:16:54 +0000 (11:16 -0700)]
Merge branch 'tc/merge-m-log'

* tc/merge-m-log:
  merge: --log appends shortlog to message if specified
  fmt-merge-msg: add function to append shortlog only
  fmt-merge-msg: refactor merge title formatting
  fmt-merge-msg: minor refactor of fmt_merge_msg()
  merge: rename variable
  merge: update comment
  t7604-merge-custom-message: show that --log doesn't append to -m
  t7604-merge-custom-message: shift expected output creation

Conflicts:
builtin.h

14 years agoMerge branch 'ph/clone-message-reword'
Junio C Hamano [Fri, 18 Jun 2010 18:16:53 +0000 (11:16 -0700)]
Merge branch 'ph/clone-message-reword'

* ph/clone-message-reword:
  clone: reword messages to match the end-user perception

14 years agot/t8006: test textconv support for blame
Axel Bonnet [Mon, 7 Jun 2010 15:23:38 +0000 (17:23 +0200)]
t/t8006: test textconv support for blame

Test the correct functionning of textconv with blame <file> and blame HEAD^ <file>.
Test the case when no driver is specified.

Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr>
Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agosha1_name: add get_sha1_with_context()
Clément Poulain [Wed, 9 Jun 2010 17:02:06 +0000 (19:02 +0200)]
sha1_name: add get_sha1_with_context()

Textconv is defined by the diff driver, which is associated with a pathname,
not a blob. This fonction permits to know the context for the sha1 you're
looking for, especially his pathname

Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr>
Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotextconv: support for blame
Axel Bonnet [Tue, 15 Jun 2010 13:58:48 +0000 (15:58 +0200)]
textconv: support for blame

This patches enables to perform textconv with blame if a textconv driver is
available fos the file.

The main task is performed by the textconv_object function which prepares
diff_filespec and if possible converts the file using diff textconv API.
Only regular files are converted, so the mode of diff_filespec is faked.

Textconv conversion is enabled by default (equivalent to the option
--textconv), since blaming binary files is useless in most cases.
The option --no-textconv is used to disable textconv conversion.

The declarations of several functions are modified to give access to a
diff_options, in order to know whether the textconv option is activated or not.

Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr>
Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agobash-completion: Fix __git_ps1 to work with "set -u"
Andrew Sayers [Thu, 17 Jun 2010 21:32:16 +0000 (22:32 +0100)]
bash-completion: Fix __git_ps1 to work with "set -u"

Define several variables in __git_ps1 to avoid errors under "set -u" semantics.

__git_ps1 seems to have been missed when the rest of the file was fixed in
25a31f8.

Signed-off-by: Andrew Sayers <andrew-git@pileofstuff.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoGit.pm: better error message
Philippe Bruhat (BooK) [Thu, 17 Jun 2010 23:47:31 +0000 (01:47 +0200)]
Git.pm: better error message

Provide the bad directory name alongside with $!

Note: $! is set if there is "No such file or directory",
but isn't set if the file exists but is not a directory.

Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agosend-email: ask about and declare 8bit mails
Thomas Rast [Thu, 17 Jun 2010 20:10:39 +0000 (22:10 +0200)]
send-email: ask about and declare 8bit mails

git-send-email passes on an 8bit mail as-is even if it does not
declare a content-type.  Because the user can edit email between
format-patch and send-email, such invalid mails are unfortunately not
very hard to come by.

Make git-send-email stop and ask about the encoding to use if it
encounters any such mail.  Also provide a configuration setting to
permanently configure an encoding.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agounpack-trees: Make index lookahead less pessimal
Brian Downing [Fri, 11 Jun 2010 02:59:07 +0000 (21:59 -0500)]
unpack-trees: Make index lookahead less pessimal

When traversing trees with an index, the current index pointer
(o->cache_bottom) occasionally has to be temporarily advanced forwards to
match the traversal order of the tree, which is not the same as the sort
order of the index.  The existing algorithm that did this (introduced in
730f72840cc50c523fe4cdd796ea2d2fc4571a28) would get "stuck" when the
cache_bottom was popped and then repeatedly check the same index entries
over and over.  This represents a serious performance regression for
large repositories compared to the old "broken" traversal order.

This commit makes a simple change to mitigate this.  Whenever
find_cache_pos sees that the current pos is also the cache_bottom, and
it has already been unpacked, it advances the cache_bottom as well as
the current pos.  This prevents the above "sticking" behavior without
dramatically changing the algorithm.

In addition, this commit moves the unpacked check above the
ce_in_traverse_path() check.  The simple bitmask check is cheaper, and
in the case described above will be firing quite a bit to advance the
cache_bottom after a tree pop.

This yields considerable performance improvements for large trees.
The following are the number of function calls for "git diff HEAD" on
the Linux kernel tree, with 33,307 files:

   Symbol               Calls Before   Calls After
   -------------------  ------------   -----------
   unpack_callback            35,332        35,332
   find_cache_pos             37,357        37,357
   ce_in_traverse_path     4,979,473        37,357
   do_compare_entry        6,828,181       251,925
   df_name_compare         6,828,181       251,925

And on a repository of 187,456 files:

   Symbol               Calls Before   Calls After
   -------------------  ------------   -----------
   unpack_callback           197,958       197,958
   find_cache_pos            208,460       208,460
   ce_in_traverse_path    37,308,336       208,460
   do_compare_entry      156,950,469     2,690,626
   df_name_compare       156,950,469     2,690,626

On the latter repository, user time for "git diff HEAD" was reduced from
5.58 to 0.42 seconds.  This is compared to 0.30 seconds before the
traversal order fix was implemented.

Signed-off-by: Brian Downing <bdowning@lavos.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate draft release notes to 1.7.2
Junio C Hamano [Thu, 17 Jun 2010 00:10:11 +0000 (17:10 -0700)]
Update draft release notes to 1.7.2

... to exclude items meant to go to 1.7.1.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge 'maint' updates in
Junio C Hamano [Thu, 17 Jun 2010 00:09:20 +0000 (17:09 -0700)]
Merge 'maint' updates in

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoPrepare draft release notes to 1.7.1.1
Junio C Hamano [Wed, 16 Jun 2010 23:56:53 +0000 (16:56 -0700)]
Prepare draft release notes to 1.7.1.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'tr/receive-pack-aliased-update-fix' into js/maint-receive-pack-symref...
Junio C Hamano [Wed, 16 Jun 2010 23:36:56 +0000 (16:36 -0700)]
Merge branch 'tr/receive-pack-aliased-update-fix' into js/maint-receive-pack-symref-alias

* tr/receive-pack-aliased-update-fix:
  check_aliased_update: strcpy() instead of strcat() to copy

14 years agoMerge branch 'cw/maint-exec-defpath' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:33:47 +0000 (16:33 -0700)]
Merge branch 'cw/maint-exec-defpath' into maint

* cw/maint-exec-defpath:
  autoconf: Check if <paths.h> exists and set HAVE_PATHS_H
  exec_cmd.c: replace hard-coded path list with one from <paths.h>

14 years agoMerge branch 'sc/http-late-auth' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:32:15 +0000 (16:32 -0700)]
Merge branch 'sc/http-late-auth' into maint

* sc/http-late-auth:
  Prompt for a username when an HTTP request 401s

14 years agoMerge branch 'by/blame-doc-m-c' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:23:51 +0000 (16:23 -0700)]
Merge branch 'by/blame-doc-m-c' into maint

* by/blame-doc-m-c:
  blame-options.txt: Add default value for `-M/-C` options.

14 years agoMerge branch 'cb/maint-stash-orphaned-file' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:23:48 +0000 (16:23 -0700)]
Merge branch 'cb/maint-stash-orphaned-file' into maint

* cb/maint-stash-orphaned-file:
  stash tests: stash can lose data in a file removed from the index
  stash: Don't overwrite files that have gone from the index

14 years agoMerge branch 'mg/advice-statushints' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:23:42 +0000 (16:23 -0700)]
Merge branch 'mg/advice-statushints' into maint

* mg/advice-statushints:
  wt-status: take advice.statusHints seriously
  t7508: test advice.statusHints

14 years agoMerge branch 'jn/maint-bundle' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:23:22 +0000 (16:23 -0700)]
Merge branch 'jn/maint-bundle' into maint

* jn/maint-bundle:
  fix "bundle --stdin" segfault
  t5704 (bundle): add tests for bundle --stdin

14 years agoMerge branch 'rr/doc-submitting' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:23:14 +0000 (16:23 -0700)]
Merge branch 'rr/doc-submitting' into maint

* rr/doc-submitting:
  SubmittingPatches: Add new section about what to base work on

14 years agoMerge branch 'jn/t7006-fixup' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:22:57 +0000 (16:22 -0700)]
Merge branch 'jn/t7006-fixup' into maint

* jn/t7006-fixup:
  t7006: guard cleanup with test_expect_success

14 years agoMerge branch 'jn/shortlog' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:22:51 +0000 (16:22 -0700)]
Merge branch 'jn/shortlog' into maint

* jn/shortlog:
  pretty: Respect --abbrev option
  shortlog: Document and test --format option
  t4201 (shortlog): Test output format with multiple authors
  t4201 (shortlog): guard setup with test_expect_success
  Documentation/shortlog: scripted users should not rely on implicit HEAD

14 years agoMerge branch 'np/index-pack-memsave' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:22:23 +0000 (16:22 -0700)]
Merge branch 'np/index-pack-memsave' into maint

* np/index-pack-memsave:
  index-pack: smarter memory usage when appending objects
  index-pack: rationalize unpack_entry_data()
  index-pack: smarter memory usage when resolving deltas

14 years agoMerge branch 'sp/maint-dumb-http-pack-reidx' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:21:30 +0000 (16:21 -0700)]
Merge branch 'sp/maint-dumb-http-pack-reidx' into maint

* sp/maint-dumb-http-pack-reidx:
  http.c::new_http_pack_request: do away with the temp variable filename
  http-fetch: Use temporary files for pack-*.idx until verified
  http-fetch: Use index-pack rather than verify-pack to check packs
  Allow parse_pack_index on temporary files
  Extract verify_pack_index for reuse from verify_pack
  Introduce close_pack_index to permit replacement
  http.c: Remove unnecessary strdup of sha1_to_hex result
  http.c: Don't store destination name in request structures
  http.c: Drop useless != NULL test in finish_http_pack_request
  http.c: Tiny refactoring of finish_http_pack_request
  t5550-http-fetch: Use subshell for repository operations
  http.c: Remove bad free of static block

14 years agoMerge branch 'jc/am-3-show-corrupted-patch' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:21:23 +0000 (16:21 -0700)]
Merge branch 'jc/am-3-show-corrupted-patch' into maint

* jc/am-3-show-corrupted-patch:
  am -3: recover the diagnostic messages for corrupt patches

14 years agoMerge branch 'sp/maint-describe-tiebreak-with-tagger-date' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:21:15 +0000 (16:21 -0700)]
Merge branch 'sp/maint-describe-tiebreak-with-tagger-date' into maint

* sp/maint-describe-tiebreak-with-tagger-date:
  describe: Break annotated tag ties by tagger date
  tag.c: Parse tagger date (if present)
  tag.c: Refactor parse_tag_buffer to be saner to program
  tag.h: Remove unused signature field
  tag.c: Correct indentation

14 years agoMerge branch 'np/malloc-threading' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:21:06 +0000 (16:21 -0700)]
Merge branch 'np/malloc-threading' into maint

* np/malloc-threading:
  Thread-safe xmalloc and xrealloc needs a recursive mutex
  Make xmalloc and xrealloc thread-safe

14 years agoMerge branch 'bg/send-email-smtpdomain' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:20:06 +0000 (16:20 -0700)]
Merge branch 'bg/send-email-smtpdomain' into maint

* bg/send-email-smtpdomain:
  send-email: Cleanup smtp-domain and add config
  Document send-email --smtp-domain
  send-email: Don't use FQDNs without a '.'
  send-email: Cleanup { style

14 years agoMerge branch 'rc/maint-curl-helper' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:19:43 +0000 (16:19 -0700)]
Merge branch 'rc/maint-curl-helper' into maint

* rc/maint-curl-helper:
  remote-curl: ensure that URLs have a trailing slash
  http: make end_url_with_slash() public
  t5541-http-push: add test for URLs with trailing slash

Conflicts:
remote-curl.c

14 years agoMerge branch 'hg/maint-attr-fix' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:17:54 +0000 (16:17 -0700)]
Merge branch 'hg/maint-attr-fix' into maint

* hg/maint-attr-fix:
  attr: Expand macros immediately when encountered.
  attr: Allow multiple changes to an attribute on the same line.
  attr: Fixed debug output for macro expansion.

14 years agoMerge branch 'mh/status-optionally-refresh' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:16:40 +0000 (16:16 -0700)]
Merge branch 'mh/status-optionally-refresh' into maint

* mh/status-optionally-refresh:
  t7508: add a test for "git status" in a read-only repository
  git status: refresh the index if possible
  t7508: add test for "git status" refreshing the index

14 years agopretty: Introduce ' ' modifier to add space if non-empty
Michael J Gruber [Mon, 14 Jun 2010 16:12:29 +0000 (18:12 +0200)]
pretty: Introduce ' ' modifier to add space if non-empty

We have the '+' modifiier which helps combine format specifiers which
may possibly be empty, e.g. '%s%+b%n'.

Introduce an analogous ' ' (space) modifier which adds a space before
non-empty items. This helps assemble "one line type" format specifiers.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agocommon_prefix: simplify and fix scanning for prefixes
Junio C Hamano [Tue, 15 Jun 2010 23:02:03 +0000 (01:02 +0200)]
common_prefix: simplify and fix scanning for prefixes

common_prefix() scans backwards from the far end of each 'next'
pathspec, starting from 'len', shortening the 'prefix' using 'path' as
a reference.

However, there is a small opportunity for an out-of-bounds access
because len is unconditionally set to prefix-1 after a "direct match"
test failed.  This means that if 'next' is shorter than prefix+2, we
read past it.

Instead of a minimal fix, simplify the loop: scan *forward* over the
'next' entry, remembering the last '/' where it matched the prefix
known so far.  This is far easier to read and also has the advantage
that we only scan over each entry once.

Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agocompletion: Add --signature and format.signature
Stephen Boyd [Wed, 16 Jun 2010 05:59:26 +0000 (22:59 -0700)]
completion: Add --signature and format.signature

Cc: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoformat-patch: Add a signature option (--signature)
Stephen Boyd [Wed, 16 Jun 2010 05:59:25 +0000 (22:59 -0700)]
format-patch: Add a signature option (--signature)

By default, git uses the version string as the signature for all
patches output by format-patch. Many employers (mine included)
require the use of a signature on all outgoing mails. In a
format-patch | send-email workflow there isn't an easy way to modify
the signature without breaking the pipe and manually replacing the
version string with the signature required. Instead of doing all that
work, add an option (--signature) and a config variable
(format.signature) to replace the default git version signature when
formatting patches.

This does modify the original behavior of format-patch a bit. First
off the version string is now placed in the cover letter by default.
Secondly, once the configuration variable format.signature is added
to the .config file there is no way to revert back to the default
git version signature. Instead, specifying the --no-signature option
will remove the signature from the patches entirely.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoam: use get_author_ident_from_commit instead of mailinfo when rebasing
Jay Soffian [Wed, 16 Jun 2010 07:12:40 +0000 (03:12 -0400)]
am: use get_author_ident_from_commit instead of mailinfo when rebasing

In certain situations, commit authorship can consist of an invalid
e-mail address. For example, this is the case when working with git svn
repos where the author email has had the svn repo UUID appended such as:

 author@example.com <author@example.com@deadbeef-dead-beef-dead-beefdeadbeef>

Given such an address, mailinfo extracts the authorship incorrectly as
it assumes a valid domain. However, when rebasing the original
authorship should be preserved irrespective of its validity as an email
address.

Using get_author_ident_from_commit instead of mailinfo when rebasing
preserves the original authorship.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agonotes: Initialize variable to appease Sun Studio
Ævar Arnfjörð Bjarmason [Mon, 14 Jun 2010 23:40:05 +0000 (23:40 +0000)]
notes: Initialize variable to appease Sun Studio

Sun Studio 12 Update 1 thinks that *t could be uninitialized,
ostensibly because it doesn't take rewrite_cmd into account in its
static analysis.

    builtin/notes.c: In function `notes_copy_from_stdin':
    builtin/notes.c:419: warning: 't' might be used uninitialized in this function

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb: Return or exit after done serving request
Jakub Narebski [Sun, 13 Jun 2010 10:09:32 +0000 (12:09 +0200)]
gitweb: Return or exit after done serving request

Check if there is a caller in top frame of gitweb, and either 'return'
if gitweb code is wrapped in subroutine, or 'exit' if it is not.

This should avoid

  gitweb.cgi: Subroutine git_SOMETHING redefined at gitweb.cgi line NNN

warnings in error_log when running gitweb with mod_perl (using
ModPerl::Registry handler)

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot3508 (cherry-pick): futureproof against unmerged files
Jonathan Nieder [Mon, 14 Jun 2010 05:28:50 +0000 (00:28 -0500)]
t3508 (cherry-pick): futureproof against unmerged files

Each of the tests in t3508 begins by navigating to a sane state:

git checkout master &&
git reset --hard $commit

If a previous test left unmerged files around, they are untouched and
the checkout fails, causing later tests to fail, too.  This is not a
problem in practice because no test except the final one produces
unmerged files.

But as a futureproofing measure, it is still best to avoid the problem
with 'checkout -f'.  In particular, this is needed for new tests to be
added to the end of the script.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMake :/ accept a regex rather than a fixed pattern
Linus Torvalds [Fri, 23 Apr 2010 15:20:20 +0000 (08:20 -0700)]
Make :/ accept a regex rather than a fixed pattern

This also makes it trigger anywhere in the commit message, rather than
just at the beginning. Which tends to be a lot more useful.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate draft release notes to 1.7.2
Junio C Hamano [Mon, 14 Jun 2010 16:53:02 +0000 (09:53 -0700)]
Update draft release notes to 1.7.2

It is loooong overdue.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Mon, 14 Jun 2010 17:05:09 +0000 (10:05 -0700)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  git svn: avoid unnecessary '/' in paths for SVN
  git-svn: strip off leading slashes on --trunk argument

14 years agogit svn: avoid unnecessary '/' in paths for SVN
Eric Wong [Mon, 14 Jun 2010 04:31:10 +0000 (04:31 +0000)]
git svn: avoid unnecessary '/' in paths for SVN

svn:// servers are more picky regarding redundant slashes
than file:// and http(s)://-backed respositories.  Since
the last commit, we avoid putting unnecessary slashes in
$GIT_CONFIG, but this doesn't help users who are already
set up that way.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
14 years agogit-svn: strip off leading slashes on --trunk argument
Jonathan Nieder [Sun, 13 Jun 2010 11:27:43 +0000 (06:27 -0500)]
git-svn: strip off leading slashes on --trunk argument

The following command

 git svn clone \
-r9500:10006 \
svn://svn.debian.org/svn/pkg-games/packages \
--trunk=/trunk/freedoom \
--branches=/branches/freedoom \
--tags=/tags/freedoom \
freedoom.git.2009091

produces strange results:

With v1.6.3.3 (and perhaps earlier versions), this would fetch up to
and including r9978 (the last revision of the no_iwad_alternatives
branch before it was deleted), check it out, and prematurely declare
success, leaving out some commits to the trunk (r9984, r9985, r10006)
from after the branch was merged.

With v1.6.5-rc0~74 (svn: allow branches outside of refs/remotes,
2009-08-11) and later, this fetches up to and including r9978 and then
attempts a post-fetch checkout and fails.

 r9978 = 25f0920175c395f0f22f54ae7a2318147f745274
 (refs/remotes/no_iwad_alternatives)
 fatal: refs/remotes/trunk: not a valid SHA1
 update-ref refs/heads/master refs/remotes/trunk: command returned error: 128

Checking .git/config reveals

 fetch = packages//trunk/freedoom:refs/remotes/trunk

And with both 1.6.3.3 and 1.7.1, using --trunk=trunk/freedom without
the leading slash (/) works fine.

Moral: git-svn needs to scrub an initial / from $_trunk and related
arguments it receives.  Make it so.

Reported-by: Jon Dowland <jmtd@debian.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
14 years agoMerge branch 'maint'
Junio C Hamano [Mon, 14 Jun 2010 04:02:16 +0000 (21:02 -0700)]
Merge branch 'maint'

* maint:
  git-mailinfo documentation: clarify -u/--encoding

14 years agogit-mailinfo documentation: clarify -u/--encoding
Zhang Le [Sun, 13 Jun 2010 18:49:47 +0000 (02:49 +0800)]
git-mailinfo documentation: clarify -u/--encoding

Instead of talking about hardcoded UTF-8, describe i18n.commitencoding
and the --encoding option, and state that they default to UTF-8.

Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoRemove python 2.5'isms
Brandon Casey [Thu, 10 Jun 2010 00:24:54 +0000 (19:24 -0500)]
Remove python 2.5'isms

The following python 2.5 features were worked around:

    * the sha module is used as a fallback when the hashlib module is
      not available
    * the 'any' built-in method was replaced with a 'for' loop
    * a conditional expression was replaced with an 'if' statement
    * the subprocess.check_call method was replaced by a call to
      subprocess.Popen followed by a call to subprocess.wait with a
      check of its return status

These changes allow the python infrastructure to be used with python 2.4
which is distributed with RedHat's RHEL 5, for example.

t5800 was updated to check for python >= 2.4 to reflect these changes.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMakefile: add PYTHON_PATH to GIT-BUILD-OPTIONS
Brandon Casey [Wed, 9 Jun 2010 21:23:59 +0000 (16:23 -0500)]
Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONS

The PYTHON_PATH environment variable is not set when running test scripts
manually i.e. when not using 'make test'.  Scripts which attempt to use
this variable will fail.  So add it to the list of variables written to
the GIT-BUILD-OPTIONS file so that the test suite will import it when
running the test scripts.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'ab/cvsserver'
Junio C Hamano [Sun, 13 Jun 2010 18:22:42 +0000 (11:22 -0700)]
Merge branch 'ab/cvsserver'

* ab/cvsserver:
  git-cvsserver: test for pserver authentication support
  git-cvsserver: document making a password without htpasswd
  git-cvsserver: Improved error handling for pserver
  git-cvsserver: indent & clean up authdb code
  git-cvsserver: use a password file cvsserver pserver
  git-cvsserver: authentication support for pserver

14 years agoMerge branch 'mg/notes-dry-run'
Junio C Hamano [Sun, 13 Jun 2010 18:22:39 +0000 (11:22 -0700)]
Merge branch 'mg/notes-dry-run'

* mg/notes-dry-run:
  notes: dry-run and verbose options for prune

14 years agoMerge branch 'mc/maint-zoneparse'
Junio C Hamano [Sun, 13 Jun 2010 18:22:30 +0000 (11:22 -0700)]
Merge branch 'mc/maint-zoneparse'

* mc/maint-zoneparse:
  Add "Z" as an alias for the timezone "UTC"

14 years agoMerge branch 'jk/diff-m-doc'
Junio C Hamano [Sun, 13 Jun 2010 18:22:27 +0000 (11:22 -0700)]
Merge branch 'jk/diff-m-doc'

* jk/diff-m-doc:
  docs: clarify meaning of -M for git-log

14 years agoMerge branch 'jn/maint-doc-ignore'
Junio C Hamano [Sun, 13 Jun 2010 18:22:15 +0000 (11:22 -0700)]
Merge branch 'jn/maint-doc-ignore'

* jn/maint-doc-ignore:
  gitignore.5: Clarify matching rules

14 years agoMerge branch 'jn/fsck-ident'
Junio C Hamano [Sun, 13 Jun 2010 18:22:09 +0000 (11:22 -0700)]
Merge branch 'jn/fsck-ident'

* jn/fsck-ident:
  fsck: fix bogus commit header check

14 years agoMerge branch 'bs/userdiff-php'
Junio C Hamano [Sun, 13 Jun 2010 18:22:05 +0000 (11:22 -0700)]
Merge branch 'bs/userdiff-php'

* bs/userdiff-php:
  diff: Support visibility modifiers in the PHP hunk header regexp

14 years agoMerge branch 'jk/maint-sha1-file-name-fix'
Junio C Hamano [Sun, 13 Jun 2010 18:22:00 +0000 (11:22 -0700)]
Merge branch 'jk/maint-sha1-file-name-fix'

* jk/maint-sha1-file-name-fix:
  remove over-eager caching in sha1_file_name

14 years agoMerge branch 'jk/maint-pull-dry-run-noop'
Junio C Hamano [Sun, 13 Jun 2010 18:21:55 +0000 (11:21 -0700)]
Merge branch 'jk/maint-pull-dry-run-noop'

* jk/maint-pull-dry-run-noop:
  pull: do nothing on --dry-run

14 years agoMerge branch 'ab/submodule-foreach-toplevel'
Junio C Hamano [Sun, 13 Jun 2010 18:21:49 +0000 (11:21 -0700)]
Merge branch 'ab/submodule-foreach-toplevel'

* ab/submodule-foreach-toplevel:
  git-submodule foreach: Add $toplevel variable

14 years agoMerge branch 'rs/grep-binary'
Junio C Hamano [Sun, 13 Jun 2010 18:21:44 +0000 (11:21 -0700)]
Merge branch 'rs/grep-binary'

* rs/grep-binary:
  grep: support NUL chars in search strings for -F
  grep: use REG_STARTEND for all matching if available
  grep: continue case insensitive fixed string search after NUL chars
  grep: use memmem() for fixed string search
  grep: --name-only over binary
  grep: --count over binary
  grep: grep: refactor handling of binary mode options
  grep: add test script for binary file handling

14 years agoMerge branch 'jn/gitweb-syntax-highlight'
Junio C Hamano [Sun, 13 Jun 2010 18:21:37 +0000 (11:21 -0700)]
Merge branch 'jn/gitweb-syntax-highlight'

* jn/gitweb-syntax-highlight:
  gitweb: Refactor syntax highlighting support
  gitweb: Syntax highlighting support

14 years agoMerge branch 'js/maint-windows'
Junio C Hamano [Sun, 13 Jun 2010 18:21:30 +0000 (11:21 -0700)]
Merge branch 'js/maint-windows'

* js/maint-windows:
  Recent MinGW has a C99 implementation of snprintf functions
  mingw: use _commit to implement fsync

14 years agoMerge branch 'bw/diff-metainfo-color'
Junio C Hamano [Sun, 13 Jun 2010 18:21:25 +0000 (11:21 -0700)]
Merge branch 'bw/diff-metainfo-color'

* bw/diff-metainfo-color:
  diff: fix coloring of extended diff headers

14 years agoMerge branch 'js/try-to-free-stackable'
Junio C Hamano [Sun, 13 Jun 2010 18:21:21 +0000 (11:21 -0700)]
Merge branch 'js/try-to-free-stackable'

* js/try-to-free-stackable:
  Do not call release_pack_memory in malloc wrappers when GIT_TRACE is used
  Have set_try_to_free_routine return the previous routine

14 years agoMerge branch 'jn/make-header-dependency'
Junio C Hamano [Sun, 13 Jun 2010 18:21:17 +0000 (11:21 -0700)]
Merge branch 'jn/make-header-dependency'

* jn/make-header-dependency:
  Makefile: let header dependency checker override COMPUTE_HEADER_DEPENDENCIES
  Makefile: fix header dependency checker to allow NO_CURL builds

14 years agoMerge branch 'cb/assume-unchanged-fix'
Junio C Hamano [Sun, 13 Jun 2010 18:21:11 +0000 (11:21 -0700)]
Merge branch 'cb/assume-unchanged-fix'

* cb/assume-unchanged-fix:
  Documentation: git-add does not update files marked "assume unchanged"
  do not overwrite files marked "assume unchanged"