Code

git.git
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 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 '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 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 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 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"

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

* 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 'wp/pretty-enhancement'
Junio C Hamano [Sun, 13 Jun 2010 18:21:00 +0000 (11:21 -0700)]
Merge branch 'wp/pretty-enhancement'

* wp/pretty-enhancement:
  pretty: initialize new cmt_fmt_map to 0
  pretty: add aliases for pretty formats
  pretty: add infrastructure for commit format aliases
  pretty: make it easier to add new formats

14 years agoMerge branch 'ab/test-cleanup'
Junio C Hamano [Sun, 13 Jun 2010 18:20:57 +0000 (11:20 -0700)]
Merge branch 'ab/test-cleanup'

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

14 years agoMerge branch 'jn/maint-amend-missing-name'
Junio C Hamano [Sun, 13 Jun 2010 18:20:52 +0000 (11:20 -0700)]
Merge branch 'jn/maint-amend-missing-name'

* jn/maint-amend-missing-name:
  commit --amend: cope with missing display name

14 years agoMerge branch 'rs/diff-no-minimal'
Junio C Hamano [Sun, 13 Jun 2010 18:20:46 +0000 (11:20 -0700)]
Merge branch 'rs/diff-no-minimal'

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

14 years agoMerge branch 'maint'
Junio C Hamano [Sun, 13 Jun 2010 17:47:17 +0000 (10:47 -0700)]
Merge branch 'maint'

* maint:
  add-interactive: Clarify “remaining hunks in the file”

14 years agoadd-interactive: Clarify “remaining hunks in the file”
Jonathan Nieder [Sun, 13 Jun 2010 03:32:51 +0000 (22:32 -0500)]
add-interactive: Clarify “remaining hunks in the file”

The "a" and "d" commands to ‘add --patch’ (accept/reject rest of file)
interact with "j", "g", and "/" (skip some hunks) in a perhaps
confusing way: after accepting or rejecting all _later_ hunks in the
file, they return to the earlier, skipped hunks and prompt the user
about them again.

This behavior can be very useful in practice.  One can still accept or
reject _all_ undecided hunks in a file by using the "g" command to
move to hunk #1 first.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb: Fix typo in hash key name in %opts in git_header_html
Jakub Narebski [Sat, 12 Jun 2010 22:35:59 +0000 (00:35 +0200)]
gitweb: Fix typo in hash key name in %opts in git_header_html

The name of the key has to be the same in call site handle_errors_html
and in called subroutine that uses it, i.e. git_header_html.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Sat, 12 Jun 2010 05:05:58 +0000 (22:05 -0700)]
Merge branch 'maint'

* maint:
  t/README: document --root option
  Makefile: default pager on AIX to "more"

14 years agot/README: document --root option
Thomas Rast [Thu, 10 Jun 2010 18:24:46 +0000 (20:24 +0200)]
t/README: document --root option

We've had this option since f423ef5 (tests: allow user to specify
trash directory location, 2009-08-09).  Make it easier to look up :-)

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMakefile: default pager on AIX to "more"
Jeff King [Thu, 10 Jun 2010 08:59:52 +0000 (04:59 -0400)]
Makefile: default pager on AIX to "more"

AIX doesn't ship with "less" by default, and their "more" is
more featureful than average, so the latter is a more
sensible choice.  People who really want less can set the
compile-time option themselves, or users can set $PAGER.

Signed-off-by: Jeff King <peff@peff.net>
Tested-by: Tor Arntsen <tor@spacetec.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: demonstrate an incorrect conflict with submodule
Johannes Sixt [Tue, 8 Jun 2010 11:34:12 +0000 (13:34 +0200)]
merge-recursive: demonstrate an incorrect conflict with submodule

When one side of a merge turns a directory into a submodule, and the other
side does not touch that directory (but has other non-conflicting changes),
then a merge should succeed. But currently, it does not; it rather fails
with a file/directory conflict.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMakefile: default pager on AIX to "more"
Jeff King [Thu, 10 Jun 2010 08:59:52 +0000 (04:59 -0400)]
Makefile: default pager on AIX to "more"

AIX doesn't ship with "less" by default, and their "more" is
more featureful than average, so the latter is a more
sensible choice.  People who really want less can set the
compile-time option themselves, or users can set $PAGER.

Signed-off-by: Jeff King <peff@peff.net>
Tested-by: Tor Arntsen <tor@spacetec.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Tue, 8 Jun 2010 05:15:31 +0000 (22:15 -0700)]
Merge branch 'maint'

* maint:
  Change C99 comments to old-style C comments

14 years agoChange C99 comments to old-style C comments
Tor Arntsen [Fri, 4 Jun 2010 09:32:11 +0000 (11:32 +0200)]
Change C99 comments to old-style C comments

Signed-off-by: Tor Arntsen <tor@spacetec.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Mon, 7 Jun 2010 22:46:01 +0000 (15:46 -0700)]
Merge branch 'maint'

* maint:
  commit.txt: clarify how --author argument is used

14 years agocommit.txt: clarify how --author argument is used
Jay Soffian [Sun, 6 Jun 2010 23:31:34 +0000 (19:31 -0400)]
commit.txt: clarify how --author argument is used

commit --author was added by 146ea06 (git commit --author=$name: look $name up
in existing commits), but its documentation was sorely lacking compared to its
excellent commit message. This commit tries to improve the documentation.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Mon, 7 Jun 2010 01:42:12 +0000 (18:42 -0700)]
Merge branch 'maint'

* maint:
  setup: document prefix

14 years agosetup: document prefix
Clemens Buchacher [Sat, 5 Jun 2010 08:04:20 +0000 (10:04 +0200)]
setup: document prefix

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit svn: fix empty directory creation
Michael J. Kiwala [Tue, 1 Jun 2010 21:24:57 +0000 (16:24 -0500)]
git svn: fix empty directory creation

Avoid attempts to stat() the contents of '', which could happen
when the root directory is empty.  Additionally, remove the
unnecessary '_' stat optimization since it was confusing and
possibly throwing off the non-existent case.

[ew: fixed indentation, rewrote commit message]

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Michael J. Kiwala <mkiwala@genome.wustl.edu>
14 years agoMerge branch 'maint'
Junio C Hamano [Wed, 2 Jun 2010 17:17:26 +0000 (10:17 -0700)]
Merge branch 'maint'

* maint:
  git-compat-util.h: use apparently more common __sgi macro to detect SGI IRIX
  Documentation: A...B shortcut for checkout and rebase
  Documentation/pretty-{formats,options}: better reference for "format:<string>"

14 years agogit-compat-util.h: use apparently more common __sgi macro to detect SGI IRIX
Gary V. Vaughan [Wed, 2 Jun 2010 01:55:36 +0000 (20:55 -0500)]
git-compat-util.h: use apparently more common __sgi macro to detect SGI IRIX

IRIX 6.5.26m does not define the 'sgi' macro, but it does define an '__sgi'
macro.  Since later IRIX versions (6.5.29m) define both macros, and since
an underscore prefixed macro is preferred anyway, use '__sgi' to detect
compilation on SGI IRIX.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation: A...B shortcut for checkout and rebase
Michael J Gruber [Tue, 1 Jun 2010 15:16:42 +0000 (17:16 +0200)]
Documentation: A...B shortcut for checkout and rebase

Describe the A...B shortcuts for checkout and rebase [-i] which were
introduced in these commits:

619a64e ("checkout A...B" switches to the merge base between A and B, 2009-10-18)
61dfa1b ("rebase --onto A...B" replays history on the merge base between A and B, 2009-11-20)
230a456 (rebase -i: teach --onto A...B syntax, 2010-01-07)

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation/pretty-{formats,options}: better reference for "format:<string>"
Nazri Ramliy [Tue, 1 Jun 2010 17:54:46 +0000 (01:54 +0800)]
Documentation/pretty-{formats,options}: better reference for "format:<string>"

In "git help log" (and friends) it's not easy to find the possible
placeholder for <string> for the "--pretty=format:<string>" option
to git log.

This patch makes the placeholder easier to find by adding a reference
to the "PRETTY FORMATS" section and repeating the "format:<string>"
phrase.

Signed-off-by: Nazri Ramliy <ayiehere@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Tue, 1 Jun 2010 01:14:23 +0000 (18:14 -0700)]
Merge branch 'maint'

* maint:
  Documentation/SubmittingPatches: Fix typo in GMail section
  Documentation/config: describe status.submodulesummary

14 years agoMerge branch 'maint-1.7.0' into maint
Junio C Hamano [Tue, 1 Jun 2010 01:14:17 +0000 (18:14 -0700)]
Merge branch 'maint-1.7.0' into maint

* maint-1.7.0:
  Documentation/config: describe status.submodulesummary

14 years agogitignore.5: Clarify matching rules
Jonathan Nieder [Fri, 5 Mar 2010 15:56:39 +0000 (09:56 -0600)]
gitignore.5: Clarify matching rules

Patterns containing a / are implicitly anchored to the directory
containing the relevant .gitignore file.

Patterns not containing a / are textual matches against the path
name relative to the directory containing .gitignore.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation/SubmittingPatches: Fix typo in GMail section
Tim Henigan [Wed, 26 May 2010 12:36:10 +0000 (08:36 -0400)]
Documentation/SubmittingPatches: Fix typo in GMail section

Commit e498257d introduced a typo while improving the GMail section
of SubmittingPatches.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Acked-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation/config: describe status.submodulesummary
Michael J Gruber [Thu, 20 May 2010 15:55:42 +0000 (17:55 +0200)]
Documentation/config: describe status.submodulesummary

ac8d5af (builtin-status: submodule summary support, 2008-04-12)
intoduced this variable and described it in git-status[1].

Include this description in git-config[1], as well.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Fri, 28 May 2010 23:59:42 +0000 (16:59 -0700)]
Merge branch 'maint'

* maint:
  Makefile: reenable install with NO_CURL
  completion: --set-upstream option for git-branch
  get_cwd_relative(): do not misinterpret suffix as subdirectory

14 years agoMerge branch 'maint-1.7.0' into maint
Junio C Hamano [Fri, 28 May 2010 23:59:36 +0000 (16:59 -0700)]
Merge branch 'maint-1.7.0' into maint

* maint-1.7.0:
  Makefile: reenable install with NO_CURL

14 years agoMakefile: reenable install with NO_CURL
Michael J Gruber [Wed, 26 May 2010 14:24:34 +0000 (16:24 +0200)]
Makefile: reenable install with NO_CURL

Setting NO_CURL leaves some variables like REMOTE_CURL_ALIASES
empty, which creates no fun when for-looping over
$(REMOTE_CURL_ALIASES) unconditionally. Make it conditional.

Reported-by: Paul Walker <PWalker752@aol.com>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agofsck: fix bogus commit header check
Jonathan Nieder [Wed, 26 May 2010 21:50:34 +0000 (16:50 -0500)]
fsck: fix bogus commit header check

daae1922 (fsck: check ident lines in commit objects, 2010-04-24)
taught fsck to expect commit objects to have the form

  tree <object name>
  <parents>
  author <valid ident string>
  committer <valid ident string>

  log message

The check is overly strict: for example, it errors out with the
message “expected blank line” for perfectly valid commits with an
"encoding ISO-8859-1" line.

Later it might make sense to teach fsck about the rest of the header
and warn about unrecognized header lines, but for simplicity, let’s
accept arbitrary trailing lines for now.

Reported-by: Tuncer Ayaz <tuncer.ayaz@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agocompletion: --set-upstream option for git-branch
Michael J Gruber [Wed, 26 May 2010 08:46:41 +0000 (10:46 +0200)]
completion: --set-upstream option for git-branch

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoget_cwd_relative(): do not misinterpret suffix as subdirectory
Clemens Buchacher [Sat, 22 May 2010 11:13:05 +0000 (13:13 +0200)]
get_cwd_relative(): do not misinterpret suffix as subdirectory

If the current working directory is the same as the work tree path
plus a suffix, e.g. 'work' and 'work-xyz', then the suffix '-xyz'
would be interpreted as a subdirectory of 'work'.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agodiff: Support visibility modifiers in the PHP hunk header regexp
Björn Steinbrink [Sun, 23 May 2010 18:05:40 +0000 (20:05 +0200)]
diff: Support visibility modifiers in the PHP hunk header regexp

Starting with PHP5, class methods can have a visibility modifier, which
caused the methods not to be matched by the existing regexp, so extend
the regexp to match those modifiers. And while we're at it, allow the
"static" modifier as well.

Since the "static" modifier can appear either before or after the
visibility modifier, let's just allow any number of modifiers to appear
in any order, as that simplifies the regexp and shouldn't cause any
false positives.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Tue, 25 May 2010 20:13:43 +0000 (13:13 -0700)]
Merge branch 'maint'

* maint:
  Documentation/SubmittingPatches: clarify GMail section and SMTP
  show-branch: use DEFAULT_ABBREV instead of 7
  t7502-commit: fix spelling
  test get_git_work_tree() return value for NULL

14 years agoDocumentation/SubmittingPatches: clarify GMail section and SMTP
Michael J Gruber [Tue, 25 May 2010 08:30:13 +0000 (10:30 +0200)]
Documentation/SubmittingPatches: clarify GMail section and SMTP

We keep getting mangled submissions from GMail's web interface. Try to
be more proactive in SubmittingPatches by

- pointing to MUA specific instructions early on,
- structuring the GMail section more clearly,
- putting send-email/SMTP before imap-send/IMAP.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agopull: do nothing on --dry-run
Jeff King [Tue, 25 May 2010 06:07:25 +0000 (02:07 -0400)]
pull: do nothing on --dry-run

Pull was never meant to take --dry-run at all. However, it
passes unknown arguments to git-fetch, which does do a
dry-run. Unfortunately, pull then attempts to merge whatever
cruft was in FETCH_HEAD (which the dry-run fetch will not
have written to).

Even though we never advertise --dry-run as something that
should work, it is still worth being defensive because:

  1. Other commands (including fetch) take --dry-run, so a
     user might try it.

  2. Rather than simply producing an error, it actually
     changes the repository in totally unexpected ways.

This patch makes "pull --dry-run" equivalent to "fetch
--dry-run".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoshow-branch: use DEFAULT_ABBREV instead of 7
Tay Ray Chuan [Mon, 24 May 2010 08:50:44 +0000 (16:50 +0800)]
show-branch: use DEFAULT_ABBREV instead of 7

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot7502-commit: fix spelling
Tay Ray Chuan [Mon, 24 May 2010 08:51:17 +0000 (16:51 +0800)]
t7502-commit: fix spelling

s/subdirecotry/subdirectory/

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotest get_git_work_tree() return value for NULL
Clemens Buchacher [Sat, 22 May 2010 12:21:27 +0000 (14:21 +0200)]
test get_git_work_tree() return value for NULL

If we are in a git directory, get_git_work_tree() can return NULL.
While trying to determine whether or not the given paths are outside
the work tree, the following command would read from it anyways and
trigger a segmentation fault.

 git diff / /

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoremove over-eager caching in sha1_file_name
Jeff King [Sat, 22 May 2010 06:59:42 +0000 (02:59 -0400)]
remove over-eager caching in sha1_file_name

This function takes a sha1 and produces a loose object
filename. It caches the location of the object directory so
that it can fill the sha1 information directly without
allocating a new buffer (and in its original incarnation,
without calling getenv(), though these days we cache that
with the code in environment.c).

This cached base directory can become stale, however, if in
a single process git changes the location of the object
directory (e.g., by running setup_work_tree, which will
chdir to the new worktree).

In most cases this isn't a problem, because we tend to set
up the git repository location and do any chdir()s before
actually looking up any objects, so the first lookup will
cache the correct location. In the case of reset --hard,
however, we do something like:

  1. look up the commit object

  2. notice we are doing --hard, run setup_work_tree

  3. look up the tree object to reset

Step (3) fails because our cache object directory value is
bogus.

This patch simply removes the caching. We use a static
buffer instead of allocating one each time (the original
version treated the malloc'd buffer as a static, so there is
no change in calling semantics).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-submodule foreach: Add $toplevel variable
Ævar Arnfjörð Bjarmason [Fri, 21 May 2010 16:10:10 +0000 (16:10 +0000)]
git-submodule foreach: Add $toplevel variable

Add a $toplevel variable accessible to `git submodule foreach`, it
contains the absolute path of the top level directory (where
.gitmodules is).

This makes it possible to e.g. read data in .gitmodules from within
foreach commands. I'm using this to configure the branch names I want
to track for each submodule:

    git submodule foreach 'git checkout $(git config --file $toplevel/.gitmodules submodule.$name.branch) && git pull'

For a little history: This patch is borne out of my continuing fight
of trying to have Git track the branches of submodules, not just their
commits.

Obviously that's not how they work (they only track commits), but I'm
just interested in being able to do:

    git submodule foreach 'git pull'

Of course that won't work because the submodule is in a disconnected
head, so I first have to connect it, but connect it *to what*.

For a while I was happy with this because as fate had it, it just so
happened to do what I meant:

    git submodule foreach 'git checkout $(git describe --all --always) && git pull'

But then that broke down, if there's a tag and a branch the tag will
win out, and I can't git pull a branch:

    $ git branch -a
    * master
      remotes/origin/HEAD -> origin/master
      remotes/origin/master
    $ git tag -l
    release-0.0.6
    $ git describe --always --all
    release-0.0.6

So I figured that I might as well start tracking the branches I want
in .gitmodules itself:

    [submodule "yaml-mode"]
        path = yaml-mode
        url = git://github.com/yoshiki/yaml-mode.git
        branch = master

So now I can just do (as stated above):

    git submodule foreach 'git checkout $(git config --file $toplevel/.gitmodules submodule.$name.branch) && git pull'

Maybe there's a less painful way to do *that* (I'd love to hear about
it). But regardless of that I think it's a good idea to be able to
know what the top-level is from git submodule foreach.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogrep: support NUL chars in search strings for -F
René Scharfe [Sat, 22 May 2010 21:43:43 +0000 (23:43 +0200)]
grep: support NUL chars in search strings for -F

Search patterns in a file specified with -f can contain NUL characters.
The current code ignores all characters on a line after a NUL.

Pass the actual length of the line all the way from the pattern file to
fixmatch() and use it for case-sensitive fixed string matching.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogrep: use REG_STARTEND for all matching if available
René Scharfe [Sat, 22 May 2010 21:35:07 +0000 (23:35 +0200)]
grep: use REG_STARTEND for all matching if available

Refactor REG_STARTEND handling inlook_ahead() into a new helper,
regmatch(), and use it for line matching, too.  This allows regex
matching beyond NUL characters if regexec() supports the flag.  NUL
characters themselves are not matched in any way, though.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogrep: continue case insensitive fixed string search after NUL chars
René Scharfe [Sat, 22 May 2010 21:34:06 +0000 (23:34 +0200)]
grep: continue case insensitive fixed string search after NUL chars

Functions for C strings, like strcasestr(), can't see beyond NUL
characters.  Check if there is such an obstacle on the line and try
again behind it.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogrep: use memmem() for fixed string search
René Scharfe [Sat, 22 May 2010 21:32:43 +0000 (23:32 +0200)]
grep: use memmem() for fixed string search

Allow searching beyond NUL characters by using memmem() instead of
strstr().

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogrep: --name-only over binary
René Scharfe [Sat, 22 May 2010 21:30:48 +0000 (23:30 +0200)]
grep: --name-only over binary

As with the option -c/--count, git grep with the option -l/--name-only
should work the same with binary files as with text files because
there is no danger of messing up the terminal with control characters
from the contents of matching files.  GNU grep does the same.

Move the check for ->name_only before the one for binary_match_only,
thus making the latter irrelevant for git grep -l.

Reported-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogrep: --count over binary
René Scharfe [Sat, 22 May 2010 21:29:35 +0000 (23:29 +0200)]
grep: --count over binary

The intent of showing the message "Binary file xyz matches" for
binary files is to avoid annoying users by potentially messing up
their terminals by printing control characters.  In --count mode,
this precaution isn't necessary.

Display counts of matches if -c/--count was specified, even if -a
was not given.  GNU grep does the same.

Moving the check for ->count before the code for handling binary
file also avoids printing context lines if --count and -[ABC] were
used together, so we can remove the part of the comment that
mentions this behaviour.  Again, GNU grep does the same.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogrep: grep: refactor handling of binary mode options
René Scharfe [Sat, 22 May 2010 21:28:17 +0000 (23:28 +0200)]
grep: grep: refactor handling of binary mode options

Turn the switch inside-out and add labels for each possible value
of ->binary.  This makes the code easier to read and avoids calling
buffer_is_binary() if the option -a was given.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>