Commit graph

37536 commits

Author SHA1 Message Date
Junio C Hamano 825fd93767 Merge branch 'rs/child-process-init'
Code clean-up.

* rs/child-process-init:
  run-command: inline prepare_run_command_v_opt()
  run-command: call run_command_v_opt_cd_env() instead of duplicating it
  run-command: introduce child_process_init()
  run-command: introduce CHILD_PROCESS_INIT
2014-09-11 10:33:27 -07:00
Junio C Hamano 49feda62bd Merge branch 'jk/contrib-subtree-make-all'
* jk/contrib-subtree-make-all:
  subtree: make "all" default target of Makefile
2014-09-11 10:33:27 -07:00
Junio C Hamano 554913daf4 Merge branch 'ta/config-set-2'
Update git_config() users with callback functions for a very narrow
scope with calls to config-set API that lets us query a single
variable.

* ta/config-set-2:
  builtin/apply.c: replace `git_config()` with `git_config_get_string_const()`
  merge-recursive.c: replace `git_config()` with `git_config_get_int()`
  ll-merge.c: refactor `read_merge_config()` to use `git_config_string()`
  fast-import.c: replace `git_config()` with `git_config_get_*()` family
  branch.c: replace `git_config()` with `git_config_get_string()
  alias.c: replace `git_config()` with `git_config_get_string()`
  imap-send.c: replace `git_config()` with `git_config_get_*()` family
  pager.c: replace `git_config()` with `git_config_get_value()`
  builtin/gc.c: replace `git_config()` with `git_config_get_*()` family
  rerere.c: replace `git_config()` with `git_config_get_*()` family
  fetchpack.c: replace `git_config()` with `git_config_get_*()` family
  archive.c: replace `git_config()` with `git_config_get_bool()` family
  read-cache.c: replace `git_config()` with `git_config_get_*()` family
  http-backend.c: replace `git_config()` with `git_config_get_bool()` family
  daemon.c: replace `git_config()` with `git_config_get_bool()` family
2014-09-11 10:33:26 -07:00
Junio C Hamano 7f346e9d73 Merge branch 'ta/config-set-1'
Use the new caching config-set API in git_config() calls.

* ta/config-set-1:
  add tests for `git_config_get_string_const()`
  add a test for semantic errors in config files
  rewrite git_config() to use the config-set API
  config: add `git_die_config()` to the config-set API
  change `git_config()` return value to void
  add line number and file name info to `config_set`
  config.c: fix accuracy of line number in errors
  config.c: mark error and warnings strings for translation
2014-09-11 10:33:25 -07:00
Junio C Hamano 0c72b98f31 Update draft release notes to 2.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-09 13:06:26 -07:00
Junio C Hamano 346fad5bb3 Merge branch 'sp/pack-protocol-doc-on-shallow'
* sp/pack-protocol-doc-on-shallow:
  Document LF appearing in shallow command during send-pack/receive-pack
2014-09-09 12:54:09 -07:00
Junio C Hamano c0ad561a46 Merge branch 'tf/imap-send-create'
* tf/imap-send-create:
  imap-send: create target mailbox if it is missing
  imap-send: clarify CRAM-MD5 vs LOGIN documentation
2014-09-09 12:54:09 -07:00
Junio C Hamano 64014894cf Merge branch 'jk/prompt-stash-could-be-packed'
The prompt script checked $GIT_DIR/ref/stash file to see if there
is a stash, which was a no-no.

* jk/prompt-stash-could-be-packed:
  git-prompt: do not look for refs/stash in $GIT_DIR
2014-09-09 12:54:08 -07:00
Junio C Hamano 3ef87bd872 Merge branch 'tb/pretty-format-cd-date-format'
Documentation update.

* tb/pretty-format-cd-date-format:
  pretty: note that %cd respects the --date= option
2014-09-09 12:54:08 -07:00
Junio C Hamano 73353e0f65 Merge branch 'rs/inline-compat-path-macros'
* rs/inline-compat-path-macros:
  turn path macros into inline function
2014-09-09 12:54:07 -07:00
Junio C Hamano 8015a60715 Merge branch 'rs/clean-menu-item-defn'
* rs/clean-menu-item-defn:
  clean: use f(void) instead of f() to declare a pointer to a function without arguments
2014-09-09 12:54:06 -07:00
Junio C Hamano 55b6dffd13 Merge branch 'jc/config-mak-document-darwin-vs-macosx'
* jc/config-mak-document-darwin-vs-macosx:
  config.mak.uname: add hint on uname_R for MacOS X
  config.mak.uname: set NO_APPLE_COMMON_CRYPTO on older systems
2014-09-09 12:54:05 -07:00
Junio C Hamano 08668f1802 Merge branch 'sb/mailsplit-dead-code-removal'
* sb/mailsplit-dead-code-removal:
  mailsplit.c: remove dead code
2014-09-09 12:54:04 -07:00
Junio C Hamano 067f86fe12 Merge branch 'so/rebase-doc'
May need further updates to the description to explain what makes
various modes of operation to decide that the request can become a
"no-op".

* so/rebase-doc:
  Documentation/git-rebase.txt: -f forces a rebase that would otherwise be a no-op
2014-09-09 12:54:04 -07:00
Junio C Hamano 715b63ceb3 Merge branch 'sb/prepare-revision-walk-error-check'
* sb/prepare-revision-walk-error-check:
  prepare_revision_walk(): check for return value in all places
2014-09-09 12:54:03 -07:00
Junio C Hamano 929df991c2 Merge branch 'sb/blame-msg-i18n'
* sb/blame-msg-i18n:
  builtin/blame.c: add translation to warning about failed revision walk
2014-09-09 12:54:03 -07:00
Junio C Hamano 1764e8124e Merge branch 'nd/strbuf-utf8-replace'
* nd/strbuf-utf8-replace:
  utf8.c: fix strbuf_utf8_replace() consuming data beyond input string
2014-09-09 12:54:02 -07:00
Junio C Hamano 27fbcf8267 Merge branch 'sb/plug-leaks'
* sb/plug-leaks:
  clone.c: don't leak memory in cmd_clone
  remote.c: don't leak the base branch name in format_tracking_info
2014-09-09 12:54:02 -07:00
Junio C Hamano a75e759e59 Merge branch 'rs/refresh-beyond-symlink'
"git add x" where x that used to be a directory has become a
symbolic link to a directory misbehaved.

* rs/refresh-beyond-symlink:
  read-cache: check for leading symlinks when refreshing index
2014-09-09 12:54:01 -07:00
Junio C Hamano 4645b014c5 Merge branch 'la/init-doc'
* la/init-doc:
  Documentation: git-init: flesh out example
  Documentation: git-init: template directory: reword and cross-reference
  Documentation: git-init: reword parenthetical statements
  Documentation: git-init: --separate-git-dir: clarify
  Documentation: git-init: template directory: reword
  Documentation: git-init: list items facelift
  Documentation: git-init: typographical fixes
2014-09-09 12:54:00 -07:00
Junio C Hamano 753aaf3aab Merge branch 'jk/stash-list-p'
Teach "git stash list -p" to show the difference between the base
commit version and the working tree version, which is in line with
what "git show" gives.

* jk/stash-list-p:
  stash: default listing to working-tree diff
2014-09-09 12:54:00 -07:00
Junio C Hamano 1bada2b0cc Merge branch 'mm/log-branch-desc-plug-leak'
* mm/log-branch-desc-plug-leak:
  builtin/log.c: fix minor memory leak
2014-09-09 12:53:59 -07:00
Junio C Hamano 7b4164063e Merge branch 'lf/bundle-exclusion'
"git bundle create" with date-range specification were meant to
exclude tags outside the range

* lf/bundle-exclusion:
  bundle: fix exclusion of annotated tags
2014-09-09 12:53:59 -07:00
Junio C Hamano ead51a75d5 Merge branch 'jc/apply-ws-prefix'
Applying a patch not generated by Git in a subdirectory used to
check the whitespace breakage using the attributes for incorrect
paths. Also whitespace checks were performed even for paths
excluded via "git apply --exclude=<path>" mechanism.

* jc/apply-ws-prefix:
  apply: omit ws check for excluded paths
  apply: hoist use_patch() helper for path exclusion up
  apply: use the right attribute for paths in non-Git patches
2014-09-09 12:53:58 -07:00
Junio C Hamano 93424a0fd8 Merge branch 'jk/command-line-config-empty-string'
"git -c section.var command" and "git -c section.var= command"
should pass the configuration differently (the former should be
a boolean true, the latter should be an empty string).

* jk/command-line-config-empty-string:
  config: teach "git -c" to recognize an empty string
2014-09-09 12:53:57 -07:00
Junio C Hamano 713c6f3ab0 Merge branch 'bc/imap-send-doc'
* bc/imap-send-doc:
  imap-send doc: omit confusing "to use imap-send" modifier
2014-09-09 12:53:55 -07:00
Junio C Hamano 50b335b783 Merge branch 'jc/not-mingw-cygwin'
We have been using NOT_{MINGW,CYGWIN} test prerequisites long
before Peff invented support for negated prerequisites e.g. !MINGW
and we still add more uses of the former.  Convert them to the
latter to avoid confusion.

* jc/not-mingw-cygwin:
  test prerequisites: enumerate with commas
  test prerequisites: eradicate NOT_FOO
2014-09-09 12:53:54 -07:00
Junio C Hamano 85f083786f Start the post-2.1 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-02 13:30:13 -07:00
Junio C Hamano f655651e09 Merge branch 'rs/strbuf-getcwd'
Reduce the use of fixed sized buffer passed to getcwd() calls
by introducing xgetcwd() helper.

* rs/strbuf-getcwd:
  use strbuf_add_absolute_path() to add absolute paths
  abspath: convert absolute_path() to strbuf
  use xgetcwd() to set $GIT_DIR
  use xgetcwd() to get the current directory or die
  wrapper: add xgetcwd()
  abspath: convert real_path_internal() to strbuf
  abspath: use strbuf_getcwd() to remember original working directory
  setup: convert setup_git_directory_gently_1 et al. to strbuf
  unix-sockets: use strbuf_getcwd()
  strbuf: add strbuf_getcwd()
2014-09-02 13:28:44 -07:00
Junio C Hamano 51eeaea210 Merge branch 'ta/pretty-parse-config'
* ta/pretty-parse-config:
  pretty.c: make git_pretty_formats_config return -1 on git_config_string failure
2014-09-02 13:27:40 -07:00
Junio C Hamano 4740891e47 Merge branch 'bc/archive-pax-header-mode'
Implementations of "tar" that do not understand an extended pax
header would extract the contents of it in a regular file; make
sure the permission bits of this file follows the same tar.umask
configuration setting.

* bc/archive-pax-header-mode:
  archive: honor tar.umask even for pax headers
2014-09-02 13:27:13 -07:00
Junio C Hamano 0e28161700 Merge branch 'pr/remotes-in-hashmap'
Optimize remotes configuration look-up in a repository with very
many remotes defined.

* pr/remotes-in-hashmap:
  use a hashmap to make remotes faster
2014-09-02 13:26:38 -07:00
Junio C Hamano 44ceb79f84 Merge branch 'jk/pretty-empty-format'
"git log --pretty/format=" with an empty format string did not mean
the more obvious "No output whatsoever" but "Use default format",
which was counterintuitive.

* jk/pretty-empty-format:
  pretty: make empty userformats truly empty
  pretty: treat "--format=" as an empty userformat
  revision: drop useless string offset when parsing "--pretty"
2014-09-02 13:25:04 -07:00
Junio C Hamano 56f214e071 Merge branch 'ta/config-set'
Add in-core caching layer to let us avoid reading the same
configuration files number of times.

* ta/config-set:
  test-config: add tests for the config_set API
  add `config_set` API for caching config-like files
2014-09-02 13:24:18 -07:00
Junio C Hamano e8e4ce72cd Merge branch 'rs/init-no-duplicate-real-path'
* rs/init-no-duplicate-real-path:
  init: avoid superfluous real_path() calls
2014-09-02 13:24:05 -07:00
Junio C Hamano 1d8a6f6929 Merge branch 'mm/config-edit-global'
Start "git config --edit --global" from a skeletal per-user
configuration file contents, instead of a total blank, when the
user does not already have any.  This immediately reduces the need
for a later "Have you forgotten setting core.user?" and we can add
more to the template as we gain more experience.

* mm/config-edit-global:
  commit: advertise config --global --edit on guessed identity
  home_config_paths(): let the caller ignore xdg path
  config --global --edit: create a template file if needed
2014-09-02 13:23:20 -07:00
Junio C Hamano c518279c0e Merge branch 'jc/reopen-lock-file'
There are cases where you lock and open to write a file, close it to
show the updated contents to external processes, and then have to
update the file again while still holding the lock, but the lockfile
API lacked support for such an access pattern.

* jc/reopen-lock-file:
  lockfile: allow reopening a closed but still locked file
2014-09-02 13:20:13 -07:00
Junio C Hamano 96db324a73 Merge git://github.com/git-l10n/git-po
* git://github.com/git-l10n/git-po:
  po/TEAMS: add new members to German translation team
  l10n: de.po: translate 38 new messages
2014-08-29 10:18:22 -07:00
Ralf Thielow 782ac539ea po/TEAMS: add new members to German translation team
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-08-29 07:08:17 +02:00
Ralf Thielow d35ea4dec6 l10n: de.po: translate 38 new messages
Translate 38 new messages came from git.pot update in fe05e19
(l10n: git.pot: v2.1.0 round 1 (38 new, 9 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-08-29 07:07:59 +02:00
Shawn Pearce 5d146f7a0f Document LF appearing in shallow command during send-pack/receive-pack
The implementation sends an LF, but the protocol documentation was
missing this detail.

Signed-off-by: Shawn Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-28 15:13:55 -07:00
Junio C Hamano 4109c28e05 Merge branch 'jk/diff-tree-t-fix'
Fix (rarely used) "git diff-tree -t" regression in 2.0.

* jk/diff-tree-t-fix:
  intersect_paths: respect mode in git's tree-sort
2014-08-26 11:16:26 -07:00
Junio C Hamano a3d54f9a1f Merge branch 'jk/pack-shallow-always-without-bitmap'
Reachability bitmaps do not work with shallow operations.
Fixes regression in 2.0.

* jk/pack-shallow-always-without-bitmap:
  pack-objects: turn off bitmaps when we see --shallow lines
2014-08-26 11:16:25 -07:00
Junio C Hamano 212d781c96 Merge branch 'jk/fix-profile-feedback-build'
Fix profile-feedback build broken in 2.1 for tarball releases.

* jk/fix-profile-feedback-build:
  Makefile: make perf tests optional for profile build
2014-08-26 11:16:25 -07:00
René Scharfe 9610decf4d use strbuf_add_absolute_path() to add absolute paths
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-26 11:06:06 -07:00
René Scharfe 679eebe24d abspath: convert absolute_path() to strbuf
Move most of the code of absolute_path() into the new function
strbuf_add_absolute_path() and in the process transform it to use
struct strbuf and xgetcwd() instead of a PATH_MAX-sized buffer,
which can be too small on some file systems.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-26 11:06:06 -07:00
René Scharfe 4d3ab44d26 use xgetcwd() to set $GIT_DIR
Instead of dying of a segmentation fault if getcwd() returns NULL, use
xgetcwd() to make sure to write a useful error message and then exit
in an orderly fashion.

Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-26 11:06:06 -07:00
René Scharfe 56b9f6e738 use xgetcwd() to get the current directory or die
Convert several calls of getcwd() and die() to use xgetcwd() instead.
This way we get rid of fixed-size buffers (which can be too small
depending on the used file system) and gain consistent error messages.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-26 11:06:06 -07:00
René Scharfe aa14e980ff wrapper: add xgetcwd()
Add the helper function xgetcwd(), which returns the current directory
or dies.  The returned string has to be free()d after use.

Helped-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-26 11:06:05 -07:00
René Scharfe 2fdb9ce067 abspath: convert real_path_internal() to strbuf
Use strbuf instead of fixed-sized buffers in real_path() in order to
avoid the size limitations of the latter.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-26 11:06:05 -07:00