Commit graph

22139 commits

Author SHA1 Message Date
Thomas Rast 157aaea5ff log_ref_setup: don't return stack-allocated array
859c301 (refs: split log_ref_write logic into log_ref_setup,
2010-05-21) refactors the stack allocation of the log_file array into
the new log_ref_setup() function, but passes it back to the caller.

Since the original intent seems to have been to split the work between
log_ref_setup and log_ref_write, make it the caller's responsibility
to allocate the buffer.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-12 09:34:17 -07:00
Erick Mattos 86e8e7a566 bash completion: add --orphan to 'git checkout'
Update git-completion.bash with new --orphan option to 'git checkout'.

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 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
Erick Mattos 859c30175f refs: split log_ref_write logic into log_ref_setup
Separation of the logic for testing and preparing the reflogs from
function log_ref_write to a new non static new function: log_ref_setup.

This allows to be performed from outside the first all reasonable checks
and procedures for writing reflogs.

Signed-off-by: Erick Mattos <erick.mattos@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-02 11:17:46 -07:00
Erick Mattos feb98d1342 Documentation: alter checkout --orphan description
The present text is a try to enhance description accuracy.  It is a
merge of the rewritten text made by native english speaker Chris Johnsen
and further changes of Junio.  It came from the last thread messages of
--orphan patch.

Signed-off-by: Erick Mattos <erick.mattos@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-02 11:16:48 -07:00
Junio C Hamano 770c54170a Merge branch 'by/blame-doc-m-c'
* by/blame-doc-m-c:
  blame-options.txt: Add default value for `-M/-C` options.
2010-05-21 04:02:24 -07:00
Junio C Hamano 82c531b3b6 Merge branch 'by/log-follow'
* by/log-follow:
  tests: rename duplicate t4205
  Make git log --follow find copies among unmodified files.
  Make diffcore_std only can run once before a diff_flush
  Add a macro DIFF_QUEUE_CLEAR.
2010-05-21 04:02:23 -07:00
Junio C Hamano 82e7ee7351 Merge branch 'mg/advice-statushints'
* mg/advice-statushints:
  wt-status: take advice.statusHints seriously
  t7508: test advice.statusHints

Conflicts:
	wt-status.c
2010-05-21 04:02:23 -07:00
Junio C Hamano b7ef48d5d5 Merge branch 'cb/maint-stash-orphaned-file'
* 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
2010-05-21 04:02:23 -07:00
Junio C Hamano dfe0171c4e Merge branch 'jn/maint-bundle'
* jn/maint-bundle:
  fix "bundle --stdin" segfault
  t5704 (bundle): add tests for bundle --stdin
2010-05-21 04:02:22 -07:00
Junio C Hamano 4d54494816 Merge branch 'pb/patch-id-plus'
* pb/patch-id-plus:
  patch-id: Add support for mbox format
  patch-id: extract parsing one diff out of generate_id_list
2010-05-21 04:02:22 -07:00
Junio C Hamano c00cf45fa3 Merge branch 'rr/doc-submitting'
* rr/doc-submitting:
  SubmittingPatches: Add new section about what to base work on
2010-05-21 04:02:22 -07:00
Junio C Hamano 42779124a2 Merge branch 'st/remote-tags-no-tags'
* st/remote-tags-no-tags:
  remote add: add a --[no-]tags option
  Honor "tagopt = --tags" configuration option
2010-05-21 04:02:22 -07:00
Junio C Hamano 4cbf42e151 Merge branch 'jn/fsck-ident'
* jn/fsck-ident:
  fsck: check ident lines in commit objects
2010-05-21 04:02:21 -07:00
Junio C Hamano 921296d3da Merge branch 'jn/gitweb-caching-prep'
* jn/gitweb-caching-prep:
  gitweb: Move generating page title to separate subroutine
  gitweb: Add custom error handler using die_error
  gitweb: Use nonlocal jump instead of 'exit' in die_error
  gitweb: href(..., -path_info => 0|1)
  Export more test-related variables when running external tests
2010-05-21 04:02:21 -07:00
Junio C Hamano 14b8512f87 Merge branch 'jn/gitweb-install'
* jn/gitweb-install:
  gitweb: Create install target for gitweb in Makefile
  gitweb: Improve installation instructions in gitweb/INSTALL
2010-05-21 04:02:21 -07:00
Junio C Hamano 71f1d729b3 Merge branch 'jn/gitweb-our-squelch'
* jn/gitweb-our-squelch:
  gitweb: Silence 'Variable VAR may be unavailable' warnings
2010-05-21 04:02:20 -07:00
Junio C Hamano 3b65270dcc Merge branch 'jn/request-pull'
* jn/request-pull:
  tests: chmod +x t5150
  adapt request-pull tests for new pull request format
  t5150: protect backslash with backslash in shell
  request-pull: protect against OPTIONS_KEEPDASHDASH from environment
  tests for request-pull
2010-05-21 04:02:20 -07:00
Junio C Hamano 8e3bc1456e Merge branch 'jn/shortlog'
* 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
2010-05-21 04:02:20 -07:00
Junio C Hamano f9a518e884 Merge branch 'jn/t7006-fixup'
* jn/t7006-fixup:
  t7006: guard cleanup with test_expect_success
2010-05-21 04:02:20 -07:00
Junio C Hamano 9215f76fb6 Merge branch 'js/maint-receive-pack-symref-alias'
* js/maint-receive-pack-symref-alias:
  t5516-fetch-push.sh: style cleanup
  receive-pack: detect aliased updates which can occur with symrefs
  receive-pack: switch global variable 'commands' to a parameter

Conflicts:
	t/t5516-fetch-push.sh
2010-05-21 04:02:19 -07:00
Junio C Hamano 035bf8d7c4 Merge branch 'sp/maint-dumb-http-pack-reidx'
* 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
2010-05-21 04:02:19 -07:00
Junio C Hamano 465ef577b5 Merge branch 'jn/submodule-basic-test'
* jn/submodule-basic-test:
  t7400: clarify submodule update tests
  t7400: clarify 'submodule add' tests
  t7400: split setup into multiple tests
2010-05-21 04:02:19 -07:00
Junio C Hamano e43e48cfb6 Merge branch 'np/index-pack-memsave'
* 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
2010-05-21 04:02:19 -07:00
Junio C Hamano edea184a58 Merge branch 'jc/am-3-show-corrupted-patch'
* jc/am-3-show-corrupted-patch:
  am -3: recover the diagnostic messages for corrupt patches
2010-05-21 04:02:18 -07:00
Junio C Hamano a660534e06 Merge branch 'jc/maint-no-reflog-expire-unreach-for-head'
* jc/maint-no-reflog-expire-unreach-for-head:
  reflog --expire-unreachable: special case entries in "HEAD" reflog
  more war on "sleep" in tests
  Document gc.<pattern>.reflogexpire variables

Conflicts:
	Documentation/config.txt
2010-05-21 04:02:18 -07:00
Junio C Hamano 455bda993c Merge branch 'cw/maint-exec-defpath'
* 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>
2010-05-21 04:02:17 -07:00
Junio C Hamano 1bdd46cd3a Merge branch 'tr/word-diff'
* tr/word-diff:
  diff: add --word-diff option that generalizes --color-words

Conflicts:
	diff.c
2010-05-21 04:02:17 -07:00
Junio C Hamano e22d62d915 Merge branch 'sp/maint-describe-tiebreak-with-tagger-date'
* 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
2010-05-21 04:02:17 -07:00
Junio C Hamano cd4ce1e8a8 Merge branch 'jc/status-show-ignored'
* jc/status-show-ignored:
  wt-status: fix 'fprintf' compilation warning
  status: --ignored option shows ignored files
  wt-status: rename and restructure status-print-untracked
  wt-status: collect ignored files
  wt-status: plug memory leak while collecting untracked files
  wt-status: remove unused workdir_untracked member
2010-05-21 04:02:16 -07:00
Junio C Hamano ea5f75a64a Merge branch 'np/malloc-threading'
* np/malloc-threading:
  Thread-safe xmalloc and xrealloc needs a recursive mutex
  Make xmalloc and xrealloc thread-safe
2010-05-21 04:02:16 -07:00
Junio C Hamano af655431f5 Merge branch 'sr/remote-helper-export'
* sr/remote-helper-export:
  t5800: testgit helper requires Python support
  Makefile: Simplify handling of python scripts
  remote-helpers: add tests for testgit helper
  remote-helpers: add testgit helper
  remote-helpers: add support for an export command
  remote-helpers: allow requesing the path to the .git directory
  fast-import: always create marks_file directories
  clone: also configure url for bare clones
  clone: pass the remote name to remote_get

Conflicts:
	Makefile
2010-05-21 04:02:15 -07:00
Junio C Hamano 78f17935a3 Merge branch 'ld/discovery-limit-to-fs' (early part)
* 'ld/discovery-limit-to-fs' (early part):
  Rename ONE_FILESYSTEM to DISCOVERY_ACROSS_FILESYSTEM
  GIT_ONE_FILESYSTEM: flip the default to stop at filesystem boundaries
  Add support for GIT_ONE_FILESYSTEM
  truncate cwd string before printing error message
  config.c: remove static keyword from git_env_bool()
2010-05-21 04:02:15 -07:00
Junio C Hamano 7f3ed824a4 Merge branch 'ar/config-from-command-line'
* ar/config-from-command-line:
  Complete prototype of git_config_from_parameters()
  Use strbufs instead of open-coded string manipulation
  Allow passing of configuration parameters in the command line
2010-05-21 04:02:14 -07:00
Junio C Hamano e2ab0227aa Merge branch 'em/checkout-orphan'
* em/checkout-orphan:
  git checkout: create unparented branch by --orphan
2010-05-21 04:02:14 -07:00
Thomas Rast b3d83d9f2e Complete prototype of git_config_from_parameters()
Add the missing argument list.  (Its lack triggered a compiler warning
for me.)

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-21 03:59:12 -07:00
Junio C Hamano 1be270cbdf Merge branch 'maint'
* maint:
  Fix checkout of large files to network shares on Windows XP
  start_command: close cmd->err descriptor when fork/spawn fails
  Fix "Out of memory? mmap failed" for files larger than 4GB on Windows
2010-05-21 03:13:07 -07:00
René Scharfe c8b296450e Fix checkout of large files to network shares on Windows XP
Bigger writes to network drives on Windows XP fail.  Cap them at 31MB to
allow them to succeed.  Callers need to be prepared for write() calls
that do less work than requested anyway.

On local drives, write() calls are translated to WriteFile() calls with
a cap of 64KB on Windows XP and 256KB on Vista.  Thus a cap of 31MB won't
affect the number of WriteFile() calls which do the actual work.  There's
still room for some other version of Windows to use a chunk size of 1MB
without increasing the number of system calls.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-20 16:12:13 -07:00
bert Dvornik fc012c2810 start_command: close cmd->err descriptor when fork/spawn fails
Fix the problem where the cmd->err passed into start_command wasn't
being properly closed when certain types of errors occurr.  (Compare
the affected code with the clean shutdown code later in the function.)

On Windows, this problem would be triggered if mingw_spawnvpe()
failed, which would happen if the command to be executed was malformed
(e.g. a text file that didn't start with a #! line).  If cmd->err was
a pipe, the failure to close it could result in a hang while the other
side was waiting (forever) for either input or pipe close, e.g. while
trying to shove the output into the side band.  On msysGit, this
problem was causing a hang in t5516-fetch-push.

[J6t: With a slight adjustment of the test case, the hang is also
observed on Linux.]

Signed-off-by: bert Dvornik <dvornik+git@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-20 16:11:29 -07:00
Ian McLean 60890cc60c Fix "Out of memory? mmap failed" for files larger than 4GB on Windows
The git_mmap implementation was broken for file sizes that wouldn't fit
into a size_t (32 bits).  This was caused by intermediate variables that
were only 32 bits wide when they should be 64 bits.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-20 16:11:06 -07:00
Junio C Hamano c06ee3193e Merge branch 'maint'
* maint:
  post-receive-email: document command-line mode
2010-05-19 21:28:51 -07:00
Jonathan Nieder cc24a1d809 post-receive-email: document command-line mode
According to the default hooks/post-receive file, the hook is called
with three arguments on stdin:

  <oldrev> <newrev> <refname>

In command-line mode, the arguments come in a different order, because
the email hook instead calls:

  generate_email $2 $3 $1

Add a comment to explain why, based on comments from the mailing list
and the commit message to v1.5.1~9.  Thanks to Andy for the
explanation.

Requested-by: martin f. krafft <madduck@debian.org>
Cc: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-19 20:45:30 -07:00
Junio C Hamano 636e87d705 Merge branch 'maint'
* maint:
  Documentation/gitdiffcore: fix order in pickaxe description
  Documentation: fix minor inconsistency
  Documentation: rebase -i ignores options passed to "git am"
  hash_object: correction for zero length file
2010-05-18 22:39:56 -07:00
Michael J Gruber d07ef71575 Documentation/gitdiffcore: fix order in pickaxe description
Reverse the order of "origin" and "result" so that the sentence
really describes an addition rather than a removal.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-18 21:55:11 -07:00
Michael J Gruber f3838ce16a Documentation: fix minor inconsistency
While we don't always write out commands in full (`git command`) we
should do it consistently in adjacent paragraphs.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-18 21:51:50 -07:00
Markus Heidelberg 56a05720b1 Documentation: rebase -i ignores options passed to "git am"
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-18 21:51:40 -07:00
Will Palmer 1c9eecff97 diff-options: make --patch a synonym for -p
Here we simply make --patch a synonym for -p, whose mnemonic was "patch"
all along.

Signed-off-by: Will Palmer <wmpalmer@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-18 21:50:03 -07:00
Michael J Gruber 67687feae5 for-each-ref: Field with abbreviated objectname
Introduce a :short modifier to objectname which outputs the abbreviated
object name.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-18 21:49:04 -07:00
Dmitry Potapov 08bda2085c hash_object: correction for zero length file
The check whether size is zero was done after if size <= SMALL_FILE_SIZE,
as result, zero size case was never triggered. Instead zero length file
was treated as any other small file. This did not caused any problem, but
if we have a special case for size equal to zero, it is better to make it
work and avoid redundant malloc().

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-18 21:46:36 -07:00