Commit graph

21521 commits

Author SHA1 Message Date
Junio C Hamano 3a27f415df Merge branch 'maint'
* maint:
  don't use default revision if a rev was specified
  for_each_recent_reflog_ent(): use strbuf, fix offset handling
  t/Makefile: remove test artifacts upon "make clean"
  blame: fix indent of line numbers
2010-03-13 21:31:42 -08: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 19a6477043 Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn:
  t9150,t9151: Add rewrite-root option to init
  git-svn: Fix merge detecting with rewrite-root
2010-03-13 12:02:54 -08:00
Tuomas Suutari 95109f2947 t9150,t9151: Add rewrite-root option to init
The rewrite-root option seems to be a bit problematic with merge
detecting, so it's better to have a merge detecting test with it
turned on.

Signed-off-by: Tuomas Suutari <tuomas.suutari@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2010-03-13 01:16:17 -08:00
Tuomas Suutari bf60fff8f1 git-svn: Fix merge detecting with rewrite-root
Detecting of merges from svn:mergeinfo or svk merge tickets failed
with rewrite-root option. This fixes it.

Signed-off-by: Tuomas Suutari <tuomas.suutari@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2010-03-13 01:16:17 -08:00
Junio C Hamano 809780b662 Merge branch 'maint'
* maint:
  t9400: Use test_cmp when appropriate
2010-03-12 22:13:22 -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 90a2bf9ca1 Merge branch 'sd/init-template'
* sd/init-template:
  wrap-for-bin: do not export an empty GIT_TEMPLATE_DIR
  t/t0001-init.sh: add test for 'init with init.templatedir set'
  init: having keywords without value is not a global error.
  Add a "TEMPLATE DIRECTORY" section to git-init[1].
  Add `init.templatedir` configuration variable.
2010-03-10 15:32:43 -08:00
Junio C Hamano c505a85015 Merge branch 'sh/am-keep-cr'
* sh/am-keep-cr:
  git-am: Add tests for `--keep-cr`, `--no-keep-cr` and `am.keepcr`
  git-am: Add am.keepcr and --no-keep-cr to override it
  git-am: Add command line parameter `--keep-cr` passing it to git-mailsplit
  documentation: 'git-mailsplit --keep-cr' is not hidden anymore
2010-03-10 15:32:34 -08:00
Junio C Hamano e25ccff140 Merge branch 'cp/add-u-pathspec'
* cp/add-u-pathspec:
  test for add with non-existent pathspec
  git add -u: die on unmatched pathspec
2010-03-10 15:32:02 -08:00
Junio C Hamano c88cd03edb Makefile: update check-docs target
When we added bunch of git-remote-* helper backends, we should have
done this to squelch complaints that they do not have their own
manual pages.  Also the entry for git-remote-helpers was not
properly marked as a non-command.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-10 15:31:34 -08:00
Junio C Hamano 2e0e8b68e3 Merge branch 'lt/deepen-builtin-source'
* lt/deepen-builtin-source:
  Move 'builtin-*' into a 'builtin/' subdirectory

Conflicts:
	Makefile
2010-03-10 15:25:18 -08:00
Junio C Hamano e007240cb9 Update draft release notes to 1.7.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-08 00:54:05 -08:00
Junio C Hamano c6830a3b7e Merge branch 'maint'
* maint:
  Merge accumulated fixes to prepare for 1.7.0.3

Conflicts:
	RelNotes
2010-03-08 00:52:01 -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 b7e7f6fb00 Merge branch 'mw/maint-gcc-warns-unused-write'
* mw/maint-gcc-warns-unused-write:
  run-command.c: fix build warnings on Ubuntu
2010-03-07 12:47:18 -08:00
Junio C Hamano 81ca93f1ce Merge branch 'as/maint-expire'
* as/maint-expire:
  reflog: honor gc.reflogexpire=never
  prune: honor --expire=never
2010-03-07 12:47:17 -08:00
Junio C Hamano 3fea3139c2 Merge branch 'ml/maint-grep-doc'
* 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-07 12:47:17 -08:00
Junio C Hamano f3604763ba Merge branch 'fn/maint-mkdtemp-compat'
* fn/maint-mkdtemp-compat:
  Fix gitmkdtemp: correct test for mktemp() return value
2010-03-07 12:47:17 -08:00
Junio C Hamano 9317dc4f05 Merge branch 'gb/maint-submodule-env'
* 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-07 12:47:17 -08:00
Junio C Hamano 27a2303105 Merge branch 'ne/pack-local-doc'
* 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-07 12:47:16 -08:00
Junio C Hamano 0d1f2a56b1 Merge branch 'mb/shortlog-nongit-stdin'
* mb/shortlog-nongit-stdin:
  shortlog: warn the user when there is no input
2010-03-07 12:47:16 -08:00
Junio C Hamano 796a01c41c Merge branch 'jk/maint-push-tracking-wo-remote'
* jk/maint-push-tracking-wo-remote:
  push: fix segfault for odd config
2010-03-07 12:47:16 -08:00
Junio C Hamano 512c916941 Merge branch 'jc/fetch-param'
* 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-07 12:47:16 -08:00
Junio C Hamano 92db3fb95c Merge branch 'il/loosen-remote-helper-names'
* il/loosen-remote-helper-names:
  Allow '+', '-' and '.' in remote helper names
2010-03-07 12:47:15 -08:00