Commit graph

21377 commits

Author SHA1 Message Date
Jonathan Nieder c40d92e4c7 Makefile: Fix CDPATH problem
If CDPATH is set, "cd" prints its destination to stdout, causing
the common (cd a && tar cf - .) | (cd b && tar xf -) idiom to fail.
For example:

 make -C templates DESTDIR='' install
 make[1]: Entering directory `/users/e477610/exptool/src/git-1.7.0.2/templates'
 install -d -m 755 '/home/e477610/exptool/share/git-core/templates'
 (cd blt && gtar cf - .) | \
	(cd '/home/e477610/exptool/share/git-core/templates' && umask 022 && gtar xof -)
 gtar: This does not look like a tar archive

Most git scripts already protect against use of CDPATH through
git-sh-setup, but the Makefile doesn’t.

Reported-by: Michael Cox <mhcox@bluezoosoftware.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-20 08:25:31 -07:00
Stephen Boyd 0d12e59f63 pull: replace unnecessary sed invocation
Getting the shortened branch name is as easy as using the shell's
parameter expansion.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-20 07:25:02 -07:00
Thomas Rast 7d182f52f1 Documentation: receive.denyCurrentBranch defaults to 'refuse'
acd2a45 (Refuse updating the current branch in a non-bare repository
via push, 2009-02-11) changed the default to refuse such a push, but
it forgot to update the docs.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-17 11:07:06 -07:00
Ian Ward Comfort d23e7570a7 bash: complete *_HEAD refs if present
We already complete HEAD, of course, and might as well complete the other
common refs mentioned in the rev-parse man page: FETCH_HEAD, ORIG_HEAD, and
MERGE_HEAD.

Signed-off-by: Ian Ward Comfort <icomfort@stanford.edu>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-17 11:03:44 -07:00
Michael J Gruber 7325283987 Documentation/git-read-tree: clarify 2-tree merge
Clarify the description of the 2-tree merge by defining the terms
which are used in the table, and by applying some small linguistic
changes.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-15 15:25:17 -07:00
Michael J Gruber 71928f7f11 Documentation/git-read-tree: fix table layout
Asciidoc takes the first non-space character in the first line of the
paragraph as a reference point for preformatted layout, so adjust to
that to make the table align.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-15 15:20:03 -07:00
Dave Olszewski 8fcaca3ff2 don't use default revision if a rev was specified
If a revision is specified, it happens not to have any commits, don't
use the default revision.  By doing so, surprising and undesired
behavior can happen, such as showing the reflog for HEAD when a branch
was specified.

[jc: squashed a test from René]

Signed-off-by: Dave Olszewski <cxreg@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-13 21:23:43 -08:00
René Scharfe 8ca7880356 for_each_recent_reflog_ent(): use strbuf, fix offset handling
As Vladimir reported, "git log -g refs/stash" surprisingly showed the reflog
of HEAD if the message in the reflog file was too long.  To fix this, convert
for_each_recent_reflog_ent() to use strbuf_getwholeline() instead of fgets(),
for safety and to avoid any size limits for reflog entries.

Also reverse the logic of the part of the function that only looks at file
tails.  It used to close the file if fgets() succeeded.  The following
fgets() call in the while loop was likely to fail in this case, too, so
passing an offset to for_each_recent_reflog_ent() never worked.  Change it to
error out if strbuf_getwholeline() fails instead.

Reported-by: Vladimir Panteleev <vladimir@thecybershadow.net>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-13 13:18:09 -08:00
Junio C Hamano 34b383e7cd t/Makefile: remove test artifacts upon "make clean"
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-13 12:41:20 -08:00
René Scharfe 00fb3d214c blame: fix indent of line numbers
Correct the calculation of the number of digits for line counts of the
form 10^n-1 (9, 99, ...) in lineno_width().  This makes blame stop
printing an extra space before the line numbers of files with that many
total lines.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-13 12:04:17 -08:00
Junio C Hamano 4a2284b999 t9400: Use test_cmp when appropriate
Consistently using test_cmp would make debugging test scripts far easier,
as output from them run under "-v" option becomes readable.

Besides, some platforms' "diff" implementations lack "-q" option.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-11 21:40:33 -08:00
Junio C Hamano 7ff8b790bb Merge accumulated fixes to prepare for 1.7.0.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-08 00:50:37 -08:00
Junio C Hamano 6eb3adff9e Merge branch 'mw/maint-gcc-warns-unused-write' into maint
* mw/maint-gcc-warns-unused-write:
  run-command.c: fix build warnings on Ubuntu
2010-03-08 00:36:02 -08:00
Junio C Hamano 990169b9b1 Merge branch 'fn/maint-mkdtemp-compat' into maint
* fn/maint-mkdtemp-compat:
  Fix gitmkdtemp: correct test for mktemp() return value
2010-03-08 00:36:02 -08:00
Junio C Hamano bd08ecc487 Merge branch 'gb/maint-submodule-env' into maint
* gb/maint-submodule-env:
  is_submodule_modified(): clear environment properly
  submodules: ensure clean environment when operating in a submodule
  shell setup: clear_local_git_env() function
  rev-parse: --local-env-vars option
  Refactor list of of repo-local env vars
2010-03-08 00:36:02 -08:00
Junio C Hamano 030bc0aa8b Merge branch 'as/maint-expire' into maint
* as/maint-expire:
  reflog: honor gc.reflogexpire=never
  prune: honor --expire=never
2010-03-08 00:36:01 -08:00
Junio C Hamano 193c7aaf5f Merge branch 'ml/maint-grep-doc' into maint
* ml/maint-grep-doc:
  grep docs: document --no-index option
  grep docs: --cached and <tree>... are incompatible
  grep docs: use AsciiDoc literals consistently
  grep docs: pluralize "Example" section
2010-03-08 00:36:01 -08:00
Junio C Hamano 57c118c268 Merge branch 'jk/maint-push-tracking-wo-remote' into maint
* jk/maint-push-tracking-wo-remote:
  push: fix segfault for odd config
2010-03-08 00:36:01 -08:00
Junio C Hamano 2dd96ea21f Merge branch 'jc/fetch-param' into maint
* jc/fetch-param:
  fetch --all/--multiple: keep all the fetched branch information
  builtin-fetch --all/--multi: propagate options correctly
  t5521: fix and modernize
2010-03-08 00:36:00 -08:00
Junio C Hamano 162b4643b6 Merge branch 'ne/pack-local-doc' into maint
* ne/pack-local-doc:
  pack-objects documentation: Fix --honor-pack-keep as well.
  pack-objects documentation: reword "objects that appear in the standard input"
  Documentation: pack-objects: Clarify --local's semantics.
2010-03-08 00:36:00 -08:00
Junio C Hamano 919451330b Merge branch 'jk/maint-add--interactive-delete' into maint
* jk/maint-add--interactive-delete:
  add-interactive: fix bogus diff header line ordering
2010-03-08 00:36:00 -08:00
Junio C Hamano 493e433277 Merge branch 'mm/mkstemps-mode-for-packfiles' into maint
* mm/mkstemps-mode-for-packfiles:
  Use git_mkstemp_mode instead of plain mkstemp to create object files
  git_mkstemps_mode: don't set errno to EINVAL on exit.
  Use git_mkstemp_mode and xmkstemp_mode in odb_mkstemp, not chmod later.
  git_mkstemp_mode, xmkstemp_mode: variants of gitmkstemps with mode argument.
  Move gitmkstemps to path.c
  Add a testcase for ACL with restrictive umask.
2010-03-08 00:36:00 -08:00
Junio C Hamano 6ae611fa8d Merge branch 'jc/maint-fix-mailinfo-strip' into maint
* jc/maint-fix-mailinfo-strip:
  mailinfo: do not strip leading spaces even for a header line
2010-03-08 00:35:59 -08:00
Junio C Hamano 1f54d693fd Merge branch 'jc/grep-author-all-match-implicit' into maint
* jc/grep-author-all-match-implicit:
  "log --author=me --grep=it" should find intersection, not union
2010-03-08 00:35:59 -08:00
Junio C Hamano 89cd4aa862 Merge branch 'jc/checkout-detached' into maint
* jc/checkout-detached:
  Reword "detached HEAD" notification
2010-03-08 00:35:59 -08:00
Junio C Hamano 4ac23f375f Merge branch 'maint-1.6.6' into maint
* maint-1.6.6:
2010-03-08 00:35:58 -08:00
Junio C Hamano c214f2c80c Merge branch 'jc/maint-fix-test-perm' into maint-1.6.6
* jc/maint-fix-test-perm:
  lib-patch-mode.sh: Fix permission
  t6000lib: Fix permission
2010-03-07 14:54:05 -08:00
Junio C Hamano 8499da0476 Merge branch 'sp/maint-push-sideband' into maint-1.6.6
* sp/maint-push-sideband:
  receive-pack: Send internal errors over side-band #2
  t5401: Use a bare repository for the remote peer
  receive-pack: Send hook output over side band #2
  receive-pack: Wrap status reports inside side-band-64k
  receive-pack: Refactor how capabilities are shown to the client
  send-pack: demultiplex a sideband stream with status data
  run-command: support custom fd-set in async
  run-command: Allow stderr to be a caller supplied pipe
2010-03-07 14:54:01 -08:00
Junio C Hamano 47b333f759 Merge branch 'hm/maint-imap-send-crlf' into maint-1.6.6
* hm/maint-imap-send-crlf:
  git-imap-send: Convert LF to CRLF before storing patch to draft box
2010-03-07 14:53:57 -08:00
Junio C Hamano b7380fa7a9 Merge branch 'gf/maint-sh-setup-nongit-ok' into maint-1.6.6
* gf/maint-sh-setup-nongit-ok:
  require_work_tree broken with NONGIT_OK
2010-03-07 14:53:53 -08:00
Junio C Hamano cb16bcc369 Merge branch 'jk/maint-rmdir-fix' into maint-1.6.6
* jk/maint-rmdir-fix:
  rm: fix bug in recursive subdirectory removal
2010-03-07 14:53:50 -08:00
Junio C Hamano 11a1a49a16 Merge branch 'rs/optim-text-wrap' into maint-1.6.6
* rs/optim-text-wrap:
  utf8.c: speculatively assume utf-8 in strbuf_add_wrapped_text()
  utf8.c: remove strbuf_write()
  utf8.c: remove print_spaces()
  utf8.c: remove print_wrapped_text()
2010-03-07 14:53:45 -08:00
Junio C Hamano 7b576f9910 Merge branch 'tr/maint-cherry-pick-list' into maint-1.6.6
* tr/maint-cherry-pick-list:
  cherry_pick_list: quit early if one side is empty
2010-03-07 14:53:40 -08:00
Junio C Hamano 7f43e75adc Merge branch 'cc/maint-bisect-paths' into maint-1.6.6
* cc/maint-bisect-paths:
  bisect: error out when passing bad path parameters
2010-03-07 14:53:35 -08:00
Junio C Hamano 97222d9634 Git 1.7.0.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-07 11:07:51 -08:00
Bert Wesarg 5565f47c40 unset GREP_OPTIONS in test-lib.sh
I used to set GREP_OPTIONS to exclude *.orig and *.rej files. But with this
the test t4252-am-options.sh fails because it calls grep with a .rej file:

    grep "@@ -1,3 +1,3 @@" file-2.rej

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-07 11:05:18 -08:00
Matthieu Moy 5d005922bc stash: suggest the correct command line for unknown options.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-06 20:00:42 -08:00
Stephen Boyd c9c8c56e07 t7406: Fix submodule init config tests
These tests have been broken since they were introduced in commits
ca2cedb (git-submodule: add support for --rebase., 2009-04-24) and
42b4917 (git-submodule: add support for --merge., 2009-06-03).
'git submodule init' expects the submodules to exist in the index.
In this case, the submodules don't exist and therefore looking for
the submodules will always fail. To make matters worse, git submodule
fails visibly to the user by saying:

error: pathspec 'rebasing' did not match any file(s) known to git.
Did you forget to 'git add'?

but doesn't return an error code. This allows the test to fail silently.
Fix it by adding the submodules first.

Cc: Johan Herland <johan@herland.net>
Cc: Peter Hutterer <peter.hutterer@who-t.net>
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-06 20:00:02 -08:00
Junio C Hamano 3609ad8ec2 Update draft release notes to 1.7.0.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-04 22:39:38 -08:00
Junio C Hamano 7d181222ea Merge branch 'jn/gitweb-config-error-die' into maint
* jn/gitweb-config-error-die:
  gitweb: Die if there are parsing errors in config file
2010-03-04 22:27:12 -08:00
Junio C Hamano 6914c661c3 Merge branch 'jn/maint-fix-pager' into maint
* jn/maint-fix-pager:
  tests: Fix race condition in t7006-pager
  t7006-pager: if stdout is not a terminal, make a new one
  tests: Add tests for automatic use of pager
  am: Fix launching of pager
  git svn: Fix launching of pager
  git.1: Clarify the behavior of the --paginate option
  Make 'git var GIT_PAGER' always print the configured pager
  Fix 'git var' usage synopsis
2010-03-04 22:27:04 -08:00
Junio C Hamano 712d352577 Merge branch 'tr/maint-cherry-pick-list' into maint
* tr/maint-cherry-pick-list:
  cherry_pick_list: quit early if one side is empty
2010-03-04 22:26:44 -08:00
Junio C Hamano 8cc3709df0 Merge branch 'ld/maint-diff-quiet-w' into maint
* ld/maint-diff-quiet-w:
  git-diff: add a test for git diff --quiet -w
  git diff --quiet -w: check and report the status
2010-03-04 22:26:39 -08:00
Junio C Hamano 868cfe0923 Merge branch 'rs/optim-text-wrap' into maint
* rs/optim-text-wrap:
  utf8.c: speculatively assume utf-8 in strbuf_add_wrapped_text()
  utf8.c: remove strbuf_write()
  utf8.c: remove print_spaces()
  utf8.c: remove print_wrapped_text()
2010-03-04 22:26:33 -08:00
Junio C Hamano 780fc9a0a6 Merge branch 'dp/read-not-mmap-small-loose-object' into maint
* dp/read-not-mmap-small-loose-object:
  hash-object: don't use mmap() for small files
2010-03-04 22:26:17 -08:00
Junio C Hamano 035aa7678b Merge branch 'np/compress-loose-object-memsave' into maint
* np/compress-loose-object-memsave:
  sha1_file: be paranoid when creating loose objects
  sha1_file: don't malloc the whole compressed result when writing out objects
2010-03-04 22:26:05 -08:00
Junio C Hamano 6c4ee2244a Merge branch 'jc/maint-status-preload' into maint
* jc/maint-status-preload:
  status: preload index to optimize lstat(2) calls
2010-03-04 22:25:45 -08:00
Junio C Hamano 801bad3ba4 Merge branch 'gf/maint-sh-setup-nongit-ok' into maint
* gf/maint-sh-setup-nongit-ok:
  require_work_tree broken with NONGIT_OK
2010-03-04 22:25:37 -08:00
Junio C Hamano ce5044df2a Merge branch 'cc/maint-bisect-paths' into maint
* cc/maint-bisect-paths:
  bisect: error out when passing bad path parameters
2010-03-04 22:25:23 -08:00
Junio C Hamano 507665e4f4 Merge branch 'maint-1.6.6' into maint
* maint-1.6.6:
  Remove extra '-' from git-am(1)
2010-03-04 22:24:25 -08:00