Commit graph

3977 commits

Author SHA1 Message Date
Junio C Hamano d249515f29 Merge branch 'fg/autocrlf'
* fg/autocrlf:
  autocrlf: Make it work also for un-normalized repositories
2010-06-21 06:02:47 -07:00
Junio C Hamano d4f8f74bc6 Merge branch 'jn/document-rebase-i-p-limitation'
* jn/document-rebase-i-p-limitation:
  rebase -i -p: document shortcomings
2010-06-21 06:02:47 -07:00
Junio C Hamano 1a5296cb92 Merge branch 'tc/commit-abbrev-fix'
* tc/commit-abbrev-fix:
  commit::print_summary(): don't use format_commit_message()
  t7502-commit: add summary output tests for empty and merge commits
  t7502-commit: add tests for summary output
2010-06-21 06:02:46 -07:00
Junio C Hamano 632d3f4b5b Merge branch 'gs/usage-to-stdout'
* gs/usage-to-stdout:
  parseopt: wrap rev-parse --parseopt usage for eval consumption
  print the usage string on stdout instead of stderr

Conflicts:
	parse-options.h
2010-06-21 06:02:45 -07:00
Junio C Hamano 762655010d Merge branch 'js/async-thread'
* js/async-thread:
  fast-import: die_nicely() back to vsnprintf (reverts part of ebaa79f)
  Enable threaded async procedures whenever pthreads is available
  Dying in an async procedure should only exit the thread, not the process.
  Reimplement async procedures using pthreads
  Windows: more pthreads functions
  Fix signature of fcntl() compatibility dummy
  Make report() from usage.c public as vreportf() and use it.
  Modernize t5530-upload-pack-error.

Conflicts:
	http-backend.c
2010-06-21 06:02:45 -07:00
Junio C Hamano 8d676d85f7 Merge branch 'gv/portable'
* gv/portable:
  test-lib: use DIFF definition from GIT-BUILD-OPTIONS
  build: propagate $DIFF to scripts
  Makefile: Tru64 portability fix
  Makefile: HP-UX 10.20 portability fixes
  Makefile: HPUX11 portability fixes
  Makefile: SunOS 5.6 portability fix
  inline declaration does not work on AIX
  Allow disabling "inline"
  Some platforms lack socklen_t type
  Make NO_{INET_NTOP,INET_PTON} configured independently
  Makefile: some platforms do not have hstrerror anywhere
  git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition
  test_cmp: do not use "diff -u" on platforms that lack one
  fixup: do not unconditionally disable "diff -u"
  tests: use "test_cmp", not "diff", when verifying the result
  Do not use "diff" found on PATH while building and installing
  enums: omit trailing comma for portability
  Makefile: -lpthread may still be necessary when libc has only pthread stubs
  Rewrite dynamic structure initializations to runtime assignment
  Makefile: pass CPPFLAGS through to fllow customization

Conflicts:
	Makefile
	wt-status.h
2010-06-21 06:02:44 -07:00
Junio C Hamano 919e06b228 Merge branch 'bc/portable'
* bc/portable:
  Remove python 2.5'isms
  Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONS
  t/aggregate-results: accomodate systems with small max argument list length
  t/t7006: ignore return status of shell's unset builtin
  t/t5150: remove space from sed script
  git-request-pull.sh: remove -e switch to shell interpreter which breaks ksh
  t/t5800: skip if python version is older than 2.5
2010-06-21 06:02:42 -07:00
Junio C Hamano 5bebcd4ecb Merge branch 'em/checkout-orphan'
* em/checkout-orphan:
  log_ref_setup: don't return stack-allocated array
  bash completion: add --orphan to 'git checkout'
  t3200: test -l with core.logAllRefUpdates options
  checkout --orphan: respect -l option always
  refs: split log_ref_write logic into log_ref_setup
  Documentation: alter checkout --orphan description
2010-06-21 06:02:41 -07:00
Junio C Hamano 5977744d04 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
2010-06-18 11:16:57 -07:00
Junio C Hamano e09151281d Merge branch 'cb/ls-files-cdup'
* cb/ls-files-cdup:
  ls-files: allow relative pathspec
  quote.c: separate quoting and relative path generation
2010-06-18 11:16:56 -07:00
Junio C Hamano f159bdd48d Merge branch 'jc/t9129-any-utf8'
* jc/t9129-any-utf8:
  t9129: fix UTF-8 locale detection
2010-06-18 11:16:56 -07:00
Junio C Hamano 0f0169d153 Merge branch 'jn/rebase-cmdline-fix'
* jn/rebase-cmdline-fix:
  rebase: improve error message when upstream argument is missing
2010-06-18 11:16:56 -07:00
Junio C Hamano 18fd805583 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
2010-06-18 11:16:56 -07:00
Junio C Hamano 880bd9d080 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
2010-06-18 11:16:55 -07:00
Junio C Hamano 7c1b228d26 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
2010-06-18 11:16:55 -07:00
Junio C Hamano bcacc0ebdb Merge branch 'jk/url-decode'
* jk/url-decode:
  decode file:// and ssh:// URLs
  make url-related functions reusable
2010-06-18 11:16:55 -07:00
Junio C Hamano 1c5d6b2a40 Merge branch 'jn/remote-set-branches'
* jn/remote-set-branches:
  Add git remote set-branches

Conflicts:
	builtin/remote.c
2010-06-18 11:16:55 -07:00
Junio C Hamano 199d4c0d43 Merge branch 'rc/ls-remote-default'
* rc/ls-remote-default:
  ls-remote: print URL when no repo is specified
2010-06-18 11:16:54 -07:00
Junio C Hamano 6c6f87842b Merge branch 'hg/id-munging'
* hg/id-munging:
  convert: Keep foreign $Id$ on checkout.
  convert: Safer handling of $Id$ contraction.
2010-06-18 11:16:54 -07:00
Junio C Hamano 8642abc764 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
2010-06-18 11:16:54 -07:00
Brandon Casey 23b093ee08 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>
2010-06-13 20:02:50 -07:00
Junio C Hamano a5080d8e10 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
2010-06-13 11:22:42 -07:00
Junio C Hamano 2d4fef9b86 Merge branch 'mg/notes-dry-run'
* mg/notes-dry-run:
  notes: dry-run and verbose options for prune
2010-06-13 11:22:39 -07:00
Junio C Hamano 004ae6cbd0 Merge branch 'jn/fsck-ident'
* jn/fsck-ident:
  fsck: fix bogus commit header check
2010-06-13 11:22:09 -07:00
Junio C Hamano 08b56871ff Merge branch 'ab/submodule-foreach-toplevel'
* ab/submodule-foreach-toplevel:
  git-submodule foreach: Add $toplevel variable
2010-06-13 11:21:49 -07:00
Junio C Hamano 534930807c 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
2010-06-13 11:21:44 -07:00
Junio C Hamano a26df4cd2f Merge branch 'jn/gitweb-syntax-highlight'
* jn/gitweb-syntax-highlight:
  gitweb: Refactor syntax highlighting support
  gitweb: Syntax highlighting support
2010-06-13 11:21:37 -07:00
Junio C Hamano 40e9b27dec 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"
2010-06-13 11:21:11 -07:00
Junio C Hamano 95e42a64a9 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
2010-06-13 11:21:06 -07:00
Junio C Hamano ce987457ca 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
2010-06-13 11:21:00 -07:00
Junio C Hamano a9f80f3dd4 Merge branch 'ab/test-cleanup'
* ab/test-cleanup:
  Turn setup code in t2007-checkout-symlink.sh into a test
  Move t6000lib.sh to lib-*
2010-06-13 11:20:57 -07:00
Junio C Hamano de8c359786 Merge branch 'jn/maint-amend-missing-name'
* jn/maint-amend-missing-name:
  commit --amend: cope with missing display name
2010-06-13 11:20:52 -07:00
Tay Ray Chuan a45e1a87ad commit::print_summary(): don't use format_commit_message()
This attempts to fix a regression in git-commit, where non-abbreviated
SHA-1s were printed in the summary.

One possible fix would be to set ctx.abbrev to DEFAULT_ABBREV in the
`if` block, where format_commit_message() is used.

Instead, we do away with the format_commit_message() codeblock
altogether, replacing it with a re-run of log_tree_commit().

We re-run log_tree_commit() with rev.always_show_header set, to force
the invocation of show_log(). The effect of this flag can be seen from
this excerpt from log-tree.c:560, the only area that
rev.always_show_header is checked:

	shown = log_tree_diff(opt, commit, &log);
	if (!shown && opt->loginfo && opt->always_show_header) {
		log.parent = NULL;
		show_log(opt);
		shown = 1;
	}

We also set rev.use_terminator, so that a newline is appended at the end
of the log message. Note that callers in builtin/log.c that also set
rev.always_show_header don't have to set rev.use_terminator, but still
get a newline, because they are wrapped in a pager.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-13 09:38:43 -07:00
Thomas Rast 47e9cd28f8 parseopt: wrap rev-parse --parseopt usage for eval consumption
9c7304e (print the usage string on stdout instead of stderr,
2010-05-17) broke rev-parse --parseopt: when run with -h, the usage
notice on stdout ended up in the shell eval.

Wrap the usage in a cat <<\EOF ... EOF block when printing to stdout.
I do not expect any usage lines to ever start with EOF so this
shouldn't be an undue burden.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-13 09:38:14 -07:00
Junio C Hamano 3499cb1ae7 Merge branch 'maint'
* maint:
  t/README: document --root option
  Makefile: default pager on AIX to "more"
2010-06-11 22:05:58 -07:00
Thomas Rast 0d4dbcd35e 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>
2010-06-11 13:49:28 -07:00
Junio C Hamano 5e87eae97d test-lib: use DIFF definition from GIT-BUILD-OPTIONS
Otherwise running individual tests from t/ directory may lack the definition
of $DIFF, $GIT_TEST_CMP and friends.

Noticed and initial patch provided by Thomas Rast, alternative solution
suggested by Brandon Casey, which this patch implements.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Thomas Rast <trast@student.ethz.ch>
2010-06-11 13:45:05 -07:00
Johannes Sixt 7d82b06d2b 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>
2010-06-11 09:01:07 -07:00
Jonathan Nieder cddb42d2c5 rebase -i -p: document shortcomings
The rebase --preserve-merges facility presents a list of commits
in its instruction sheet and uses a separate table to keep
track of their parents.  Unfortunately, in practice this means
that with -p after most attempts to rearrange patches, some
commits have the "wrong" parent and the resulting history is
rarely what the caller expected.

Yes, it would be nice to fix that.  But first, add a warning to the
manual to help the uninitiated understand what is going on.

Reported-by: Jiří Paleček <jpalecek@web.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-11 08:44:13 -07:00
Christian Couder 296c6bb21a diff: fix "git show -C -C" output when renaming a binary file
A bug was introduced in 3e97c7c6af
(No diff -b/-w output for all-whitespace changes, Nov 19 2009)
that made the lines:

  diff --git a/bar b/sub/bar
  similarity index 100%
  rename from bar
  rename to sub/bar

disappear from "git show -C -C" output when file bar is a binary
file.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-06 15:14:27 -07:00
Clemens Buchacher efad1a5615 ls-files: allow relative pathspec
git ls-files used to error out if given paths which point outside the current
working directory, such as '../'. We now allow such paths and the output is
analogous to git grep -l.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-05 09:14:31 -07:00
Michael J Gruber 46077fa5d4 Documentation+t5708: document and test status -s -b
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-03 15:02:12 -07:00
Erick Mattos b209995775 t3200: test -l with core.logAllRefUpdates options
By default reflogs are always created for new local branches by
"checkout -b".  But by setting core.logAllRefUpdates to false this will
not be true anymore.

In that case you only create the reflogs when you use -l switch with
"checkout -b".

Added missing tests to check expected behaviors.

Signed-off-by: Erick Mattos <erick.mattos@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-03 14:46:19 -07:00
Erick Mattos 3631bf77f7 checkout --orphan: respect -l option always
Added changes to satisfy a corner case: creating reflogs by using -l
when core.logAllRefUpdates is set to false.

Signed-off-by: Erick Mattos <erick.mattos@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-03 14:46:14 -07:00
Junio C Hamano 2de03ebe06 t9129: fix UTF-8 locale detection
The UTF-8 prerequisite test checked explicitly for en_US.utf8 in the
output from "locale -a", but the tests that are actually protected by the
prerequisite were asking LC_ALL=en_US.UTF-8 from the system.

This inconsistency leads the tests to fail on platforms that do not know
both en_US.UTF-8 and en_US.utf8 (thanks you, Yann Droneaud, for bringing
this up with an initial patch).

Instead, pick a locale with ".UTF-8" (with or without hyphen, spelled in
either upper or lowercase) in its name from "locale -a" output, and use it
for running the test.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-02 12:15:48 -07:00
Brandon Casey 6508eedf67 t/aggregate-results: accomodate systems with small max argument list length
IRIX 6.5 has a default maximum argument list length of 20480.  The file
glob that is passed to aggregate-results currently exceeds this length, and
so the script cannot run successfully.  Work around this issue by passing
the file names in via the standard input rather than the argument list.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-02 09:36:49 -07:00
Brandon Casey c289c315c2 t/t7006: ignore return status of shell's unset builtin
The unset builtin of Solaris's xpg4/sh returns non-zero if it is passed a
variable name which was not previously set.  Since the unset is not likely
to fail, ignore its return status, but add a semicolon as a clue that the
'&&' was deliberately left off.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-02 09:33:36 -07:00
Brandon Casey 6f89384fe0 t/t5150: remove space from sed script
Solaris's xpg4/sed and IRIX's sed fail to parse these negated matching
expressions when the '!' is separated from the command that follows.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-02 09:30:35 -07:00
Brandon Casey 2bf1033478 t/t5800: skip if python version is older than 2.5
This test script depends on the git-remote-testgit python script.  This
python script makes use of the hashlib module which was released in python
version 2.5.  So, add a new pre-requisite named PYTHON_2_5_OR_NEWER to
test-lib.sh and check for it in t5800.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-02 09:26:35 -07:00
Giuseppe Scrivano 9c7304e3e3 print the usage string on stdout instead of stderr
When -h is used, print usage messages on stdout.  If a command is invoked with
wrong arguments then print the usage messages on stderr.

Signed-off-by: Giuseppe Scrivano <gscrivano@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 18:06:41 -07:00