Commit graph

24461 commits

Author SHA1 Message Date
Anders Kaseorg b393515f8e Mark gitk script executable
The executable bit on gitk-git/gitk was lost (accidentally it seems) by
commit 62ba5143ec.  Put it back, so that
gitk can be run directly from a git.git checkout.

Note that the script is already executable in gitk.git, just not in
git.git.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-08 23:34:02 -08:00
Ramsay Jones e17aa8a9dc t9157-*.sh: Add an svn version check
Acked-by: Eric Wong <normalperson@yhbt.net>
Acked-by: Steven Walter <stevenrwalter@gmail.com>
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
2011-01-07 22:14:36 +00:00
StephenB 9cfdbf9bef git svn: fix the final example in man page
'git-remote add' creates a remote.origin.fetch entry in the config, we
want to replace this entry rather than add another one (which will
cause 'git fetch' to error).

This adds 'git config --remove-section remote.origin' after the fetch
for encouraging users to only use "git svn" for future updates.

[ew: rewording of commit message for present tense]

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: StephenB <mail4stb@gmail.com>
2011-01-07 21:50:11 +00:00
Brandon Casey bc2d159421 t3032: limit sed branch labels to 8 characters
POSIX leaves as unspecified the handling of labels greater than 8
characters.  Apparently, Sun decided to treat them as errors.  Make sed on
Solaris happy by trimming the length of labels to 8 characters.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-06 12:34:52 -08:00
Brandon Casey ed40ec551d t0001,t1510,t3301: use sane_unset which always returns with status 0
On some shells (like /usr/xpg4/bin/sh on Solaris), unset will exit
non-zero when passed the name of a variable that has not been set.  Use
sane_unset instead so that the return value of unset can be ignored while
the && linkage of the test script can be preserved.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-06 12:22:36 -08:00
Brandon Casey e83c267f71 trace.c: ensure NULL is not passed to printf
GNU printf, and many others, will print the string "(null)" if a NULL
pointer is passed as the argument to a "%s" format specifier.  Some
implementations (like on Solaris) do not detect a NULL pointer and will
produce a segfault in this case.

So, fix this by ensuring that pointer variables do not contain the value
NULL.  Assign the string "(null)" to the variables are NULL.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-06 12:21:49 -08:00
Junio C Hamano 685e9d9145 Git 1.7.4-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-05 14:57:19 -08:00
Junio C Hamano 8594495cd6 Merge branch 'maint' to sync with 1.7.3.5 2011-01-05 14:50:33 -08:00
Junio C Hamano 6e97ef31ce Git 1.7.3.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-05 14:49:19 -08:00
Junio C Hamano bf9b46c16d Merge branch 'jn/svn-fe' (early part)
* 'jn/svn-fe' (early part):
  vcs-svn: Error out for v3 dumps

Conflicts:
	t/t9010-svn-fe.sh
2011-01-05 13:34:43 -08:00
Junio C Hamano d3cae60efc Merge branch 'ao/t9001-fix'
* ao/t9001-fix:
  t/t9001-send-email.sh: fix '&&' chain in some tests
2011-01-05 13:31:25 -08:00
Junio C Hamano 9e98354ab9 Merge branch 'pw/convert-pathname-substitution'
* pw/convert-pathname-substitution:
  t0021: avoid getting filter killed with SIGPIPE
  convert filter: supply path to external driver
2011-01-05 13:31:01 -08:00
Junio C Hamano 0c30ed0cb5 Merge branch 'mg/cvsimport'
* mg/cvsimport:
  cvsimport: handle the parsing of uppercase config options
  cvsimport: partial whitespace cleanup
2011-01-05 13:30:29 -08:00
Sylvain Rabot 3ca7353cab gitweb: remove unnecessary test when closing file descriptor
It happens that closing file descriptor fails whereas the blob is
perfectly readable.  According to perlman the reasons could be:

   If the file handle came from a piped open, "close" will additionally
   return false if one of the other system calls involved fails, or if the
   program exits with non-zero status.  (If the only problem was that the
   program exited non-zero, $! will be set to 0.)  Closing a pipe also waits
   for the process executing on the pipe to complete, in case you want to
   look at the output of the pipe afterwards, and implicitly puts the exit
   status value of that command into $?.

   Prematurely closing the read end of a pipe (i.e. before the process writ-
   ing to it at the other end has closed it) will result in a SIGPIPE being
   delivered to the writer.  If the other end can't handle that, be sure to
   read all the data before closing the pipe.

In this case we don't mind that close fails.

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-04 15:59:26 -08:00
Sylvain Rabot 3ce19eb857 gitweb: add extensions to highlight feature map
added: sql, php5, phps, bash, zsh, ksh, mk, make

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-04 15:58:57 -08:00
Antonio Ospite cc7e81674b t/t9001-send-email.sh: fix '&&' chain in some tests
t/README recommends chaining test assertions.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-04 15:46:29 -08:00
Ramsay Jones 3aa3047106 lib-git-svn.sh: Move web-server handling code into separate function
This library file is currently sourced by 57 test files, of which
only four may (optionally) start a web-server in order to access
the svn repo via an http url, rather than a file url.

In addition to isolating the current web-server handling code from
the majority of tests, in a new prepare_httpd function, we also
add some more error checking and reporting code to validate the
apache installation. Only those tests which attempt to start the
web-server, by calling start_httpd, will execute this code.

Note that it is important for start_httpd to return an error
indication, if prepare_httpd fails, so that the failure to use
the web-server, as requested by the user, should not go unnoticed.
(Unless the svnrepo variable is set to an http url at the end of
start_httpd, the remaining tests will use file urls, without
comment.)

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-04 15:31:04 -08:00
Michael J Gruber 60d5985dab cvsimport: handle the parsing of uppercase config options
The current code leads to

  fatal: bad config value for 'cvsimport.r' in .git/config

for a standard use case with cvsimport.r set.

cvsimport sets internal variables by checking the config for each
possible command line option. The problem is that config items are case
insensitive, so config.r and config.R are the same. The ugly error is
due to that fact that cvsimport expects a bool for -R (and thus
config.R) but a remote name for -r (and thus config.r).

Fix this by making cvsimport expect long names for uppercase options.

config options for cvsimport have been undocumented so far, though
present in the code and advertised in several tutorials. So one may read
"enhance" for "fix". Similarly, the names for the options are
"documented" in the code, waitiing for their lowercase equivalents to be
transformed into long config options, as well.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-04 13:31:03 -08:00
Junio C Hamano f2665ec9fa Merge branch 'maint'
* maint:
  gitweb: skip logo in atom feed when there is none
  t9001: Fix test prerequisites
2011-01-04 11:23:45 -08:00
Jonathan Nieder 081f84ee9e daemon: support <directory> arguments again
Ever since v1.7.4-rc0~125^2~8 (daemon: use run-command api for async
serving, 2010-11-04), git daemon spawns child processes instead of
forking to serve requests.  The child processes learn that they are
being run for this purpose from the presence of the --serve command
line flag.

When running with <ok_path> arguments, the --serve flag is treated
as one of the path arguments and the special child behavior does
not kick in.  So the child becomes an ordinary git daemon process,
notices that all the addresses it needs are in use, and exits with
the message "fatal: unable to allocate any listen sockets on port
9418".

Fix it by putting --serve at the beginning of the command line,
where the flag cannot be mistaken for a path argument.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-04 11:23:42 -08:00
Ralf Wildenhues 469bfc962d Fix typos in the documentation
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-04 11:23:42 -08:00
Jonathan Nieder 6822052427 gitweb: make logo optional
Some sites may not want to have a logo at all.

While at it, use $cgi->img to simplify this code.  (CGI.pm learned
most HTML4 tags by version 2.79, so this should be portable to perl
5.8, though I haven't tested.)

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-04 10:49:32 -08:00
Jonathan Nieder 9d9f5e72dc gitweb: skip logo in atom feed when there is none
With v1.5.0-rc0~169 (gitweb: Fix Atom feed <logo>: it is $logo,
not $logo_url, 2006-12-04), the logo URI to be written to Atom
feeds was corrected but the case of no logo forgotten.

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-04 10:48:37 -08:00
Robin H. Johnson 57da204264 t9001: Fix test prerequisites
Add in missing Perl prerequisites for new tests of send-email.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-29 13:39:05 -08:00
Junio C Hamano 01b97a4cb6 Git 1.7.4-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-28 13:53:24 -08:00
Junio C Hamano 2cd900fcf5 Merge branch 'maint'
* maint:
  Prepare for 1.7.3.5
  Fix false positives in t3404 due to SHELL=/bin/false
  close file on error in read_mmfile()

Conflicts:
	RelNotes
2010-12-28 13:50:11 -08:00
Junio C Hamano 17367939eb Prepare for 1.7.3.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-28 13:48:54 -08:00
Junio C Hamano a121d53fa6 Merge branch 'jk/commit-die-on-bogus-ident' into maint
* jk/commit-die-on-bogus-ident:
  commit: die before asking to edit the log message
  ident: die on bogus date format
2010-12-28 13:45:12 -08:00
Junio C Hamano 359f34f6cc Merge branch 'ks/blame-worktree-textconv-cached' into maint
* ks/blame-worktree-textconv-cached:
  fill_textconv(): Don't get/put cache if sha1 is not valid
  t/t8006: Demonstrate blame is broken when cachetextconv is on
2010-12-28 13:44:58 -08:00
Junio C Hamano 58c58c8624 Merge branch 'jc/maint-rebase-rewrite-last-skip' into maint
* jc/maint-rebase-rewrite-last-skip:
  rebase --skip: correctly wrap-up when skipping the last patch
2010-12-28 13:43:10 -08:00
Junio C Hamano 2f73969570 Merge branch 'jc/maint-am-abort-safely' into maint
* jc/maint-am-abort-safely:
  am --abort: keep unrelated commits since the last failure and warn
2010-12-28 13:42:55 -08:00
Junio C Hamano 0ec9ee3bcf Merge branch 'kb/maint-status-cquote' into maint
* kb/maint-status-cquote:
  status: Quote paths with spaces in short format
2010-12-28 13:23:20 -08:00
Brandon Casey d2559f734b t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
The '--no-chain-reply-to' option is a Getopt::Long boolean option. The
'--no-' prefix (as in --no-chain-reply-to) for boolean options is not
supported in Getopt::Long version 2.32 which was released with Perl 5.8.0.
This version only supports '--no' as in '--nochain-reply-to'.  More recent
versions of Getopt::Long, such as version 2.34, support either prefix. So
use the older form in the tests.

See also:

907a0b1e04
84eeb687de
3fee1fe871

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-28 11:27:12 -08:00
Junio C Hamano 5765870d53 Merge branch 'jc/maint-rebase-rewrite-last-skip'
* jc/maint-rebase-rewrite-last-skip:
  rebase --skip: correctly wrap-up when skipping the last patch
2010-12-28 11:26:59 -08:00
Junio C Hamano f3bb8b4b84 Merge branch 'nd/setup'
* nd/setup: (47 commits)
  setup_work_tree: adjust relative $GIT_WORK_TREE after moving cwd
  git.txt: correct where --work-tree path is relative to
  Revert "Documentation: always respect core.worktree if set"
  t0001: test git init when run via an alias
  Remove all logic from get_git_work_tree()
  setup: rework setup_explicit_git_dir()
  setup: clean up setup_discovered_git_dir()
  t1020-subdirectory: test alias expansion in a subdirectory
  setup: clean up setup_bare_git_dir()
  setup: limit get_git_work_tree()'s to explicit setup case only
  Use git_config_early() instead of git_config() during repo setup
  Add git_config_early()
  git-rev-parse.txt: clarify --git-dir
  t1510: setup case #31
  t1510: setup case #30
  t1510: setup case #29
  t1510: setup case #28
  t1510: setup case #27
  t1510: setup case #26
  t1510: setup case #25
  ...
2010-12-28 11:26:55 -08:00
Robin H. Johnson 5cd3e10737 Fix false positives in t3404 due to SHELL=/bin/false
If the user's shell in NSS passwd is /bin/false (eg as found during Gentoo's
package building), the git-rebase exec tests will fail, because they call
$SHELL around the command, and in the existing testcase, $SHELL was not being
cleared sufficently.

This lead to false positive failures of t3404 on systems where the package
build user was locked down as noted above.

Signed-off-by: "Robin H. Johnson" <robbat2@gentoo.org>
X-Gentoo-Bug: 349083
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=349083
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-28 11:22:16 -08:00
Junio C Hamano a25e47377d userdiff/perl: catch BEGIN/END/... and POD as headers
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-27 09:19:38 -08:00
Jonathan Nieder 71a5d4bc0e diff: funcname and word patterns for perl
The default function name discovery already works quite well for Perl
code... with the exception of here-documents (or rather their ending).

 sub foo {
	print <<END
 here-document
 END
	return 1;
 }

The default funcname pattern treats the unindented END line as a
function declaration and puts it in the @@ line of diff and "grep
--show-function" output.

With a little knowledge of perl syntax, we can do better.  You can
try it out by adding "*.perl diff=perl" to the gitattributes file.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-27 08:47:21 -08:00
Nguyễn Thái Ngọc Duy 0ed7481347 setup_work_tree: adjust relative $GIT_WORK_TREE after moving cwd
When setup_work_tree() is called, it moves cwd to $GIT_WORK_TREE and
makes internal copy of $GIT_WORK_TREE absolute. The environt variable,
if set by user, remains unchanged. If the variable is relative, it is
no longer correct because its base dir has changed.

Instead of making $GIT_WORK_TREE absolute too, we just say "." and let
subsequent git processes handle it.

Reported-by: Michel Briand <michelbriand@free.fr>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-27 08:34:19 -08:00
Junio C Hamano 26517dea24 Merge branch 'rs/maint-diff-fd-leak' into maint
* rs/maint-diff-fd-leak:
  close file on error in read_mmfile()
2010-12-26 11:18:39 -08:00
René Scharfe 5fd898141c close file on error in read_mmfile()
Reported in http://qa.debian.org/daca/cppcheck/sid/git_1.7.2.3-2.2.html
and in http://thread.gmane.org/gmane.comp.version-control.git/123042.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-26 11:17:18 -08:00
Junio C Hamano 73e7b2ef6c Merge branch 'rj/maint-difftool-cygwin-workaround'
* rj/maint-difftool-cygwin-workaround:
  difftool: Fix failure on Cygwin
2010-12-23 12:51:11 -08:00
Junio C Hamano 4e3a1b24ad Merge branch 'maint'
* maint:
  test-lib.sh/test_decode_color(): use octal not hex in awk script
2010-12-22 20:33:12 -08:00
Brandon Casey 19128d6cd8 Makefile: add NO_FNMATCH_CASEFOLD to IRIX sections
IRIX's fnmatch() does not support the GNU FNM_CASEFOLD extension, so set
NO_FNMATCH_CASEFOLD so that the internal fnmatch implementation will be
used.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-22 19:56:02 -08:00
Brandon Casey c2ed29b49b test-lib.sh/test_decode_color(): use octal not hex in awk script
POSIX awk seems to explicitly not support hexadecimal escape sequences.

From http://pubs.opengroup.org/onlinepubs/009695399/:

   Regular expressions in awk have been extended somewhat...
   One sequence that is not supported is hexadecimal value escapes
   beginning with '\x'.

This affects the awk on IRIX 6.5, and causes t4015.56 to fail.
Use octal instead.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-22 19:46:52 -08:00
Junio C Hamano ef88ad2387 rebase --skip: correctly wrap-up when skipping the last patch
When "rebase --skip" is used to skip the last patch in the series, the
code to wrap up the rewrite by copying the notes from old to new commits
and also by running the post-rewrite hook was bypassed.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-22 16:50:28 -08:00
Junio C Hamano 4290f69067 t0021: avoid getting filter killed with SIGPIPE
The fake filter did not read from the standard input at all,
which caused the calling side to die with SIGPIPE, depending
on the timing.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-22 15:18:47 -08:00
Junio C Hamano 48e0ad033f Merge branch 'rj/maint-test-fixes'
* rj/maint-test-fixes:
  t9501-*.sh: Fix a test failure on Cygwin
  lib-git-svn.sh: Add check for mis-configured web server variables
  lib-git-svn.sh: Avoid setting web server variables unnecessarily
  t9142: Move call to start_httpd into the setup test
  t3600-rm.sh: Don't pass a non-existent prereq to test #15
2010-12-22 14:41:26 -08:00
Junio C Hamano cfa775c10e Merge branch 'jc/maint-am-abort-safely'
* jc/maint-am-abort-safely:
  am --abort: keep unrelated commits since the last failure and warn
2010-12-22 14:41:19 -08:00
Junio C Hamano 3ea3860758 Merge branch 'jk/commit-die-on-bogus-ident'
* jk/commit-die-on-bogus-ident:
  commit: die before asking to edit the log message
  ident: die on bogus date format

Conflicts:
	builtin/commit.c
2010-12-22 14:41:14 -08:00