Make 'git submodule update --force' always check out submodules.

Currently, it will only do a checkout if the sha1 registered in the containing
repository doesn't match the HEAD of the submodule, regardless of whether the
submodule is dirty.  As discussed on the mailing list, the '--force' flag is a
strong indicator that the state of the submodule is suspect, and should be reset
to HEAD.

Signed-off-by: Stefan Zager <szager@google.com>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_file.c: introduce get_max_fd_limit() helper

Not all platforms have getrlimit(), but there are other ways to see
the maximum number of files that a process can have open.  If
getrlimit() is unavailable, fall back to sysconf(_SC_OPEN_MAX) if
available, and use OPEN_MAX from <limits.h>.

Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat: some mkdir() do not like a slash at the end

Introduce a compatibility helper for platforms with such a mkdir().

Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Support for setitimer() on platforms lacking it

Implementation includes getitimer(), but for now it is static.
Supports ITIMER_REAL only.

We may need a separate compatibility header file for ITIMER_* and
struct itimerval, but add only the prototype in git-compat-util.h
for now, as the initial motivatin of this change, HP NonStop, has
ITIMER_* and struct timeval in <sys/time>.

Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'nd/am-i18n-fix' into pu

"git am" wasn't marked up for i18n properly.
Will merge to 'next', and eventually to maint-1.7.11 track.

* nd/am-i18n-fix:
  am: quote string for translation before passing to eval_gettextln
Merge branch 'sz/submodule-force-update' into pu

We may want a documentation update and a few tests.

Kicked back to 'pu'.

* sz/submodule-force-update:
  Make 'git submodule update --force' always check out submodules.
Merge branch 'jk/no-more-pre-exec-callback' into pu

(Originally merged to 'next' on 2012-07-23)

Will defer until the end of the 2012,
waiting for older "less" to go extinct.

* jk/no-more-pre-exec-callback:
  pager: drop "wait for output to run less" hack
Merge branch 'jc/maint-push-refs-all' into pu

Allows pushing and fetching refs/stash.
Need to send it out to the list for review.

* jc/maint-push-refs-all:
  get_fetch_map(): tighten checks on dest refs
  fetch/push: allow refs/*:refs/*
Merge branch 'pw/p4-use-client-spec-branch-detection' into pu

Will merge to 'next' and soon to 'master'.

* pw/p4-use-client-spec-branch-detection:
  git p4: make branch detection work with --use-client-spec
  git p4: do wildcard decoding in stripRepoPath
  git p4: set self.branchPrefixes in initialization
  git p4 test: add broken --use-client-spec --detect-branches tests
  git p4 test: move client_view() function to library
Merge branch 'kk/maint-for-each-ref-multi-sort' into pu

"git for-each-ref" did not currectly support more than one --sort
option.

Will merge to 'next'.

* kk/maint-for-each-ref-multi-sort:
  for-each-ref: Fix sort with multiple keys
  t6300: test sort with multiple keys
Merge branch 'tr/maint-parseopt-avoid-empty' into pu

A workaround to avoid doing _(""), which translates to magic string
in the .po files.

Will merge to 'next'.

* tr/maint-parseopt-avoid-empty:
  gettext: do not translate empty string
Merge branch 'nd/i18n-parseopt-help' into pu

A lot of i18n mark-up for the help text from "git <cmd> -h".

Will merge to 'next'.

* nd/i18n-parseopt-help: (66 commits)
  Use imperative form in help usage to describe an action
  Reduce translations by using same terminologies
  i18n: write-tree: mark parseopt strings for translation
  i18n: verify-tag: mark parseopt strings for translation
  i18n: verify-pack: mark parseopt strings for translation
  i18n: update-server-info: mark parseopt strings for translation
  i18n: update-ref: mark parseopt strings for translation
  i18n: update-index: mark parseopt strings for translation
  i18n: tag: mark parseopt strings for translation
  i18n: symbolic-ref: mark parseopt strings for translation
  i18n: show-ref: mark parseopt strings for translation
  i18n: show-branch: mark parseopt strings for translation
  i18n: shortlog: mark parseopt strings for translation
  i18n: rm: mark parseopt strings for translation
  i18n: revert, cherry-pick: mark parseopt strings for translation
  i18n: rev-parse: mark parseopt strings for translation
  i18n: reset: mark parseopt strings for translation
  i18n: rerere: mark parseopt strings for translation
  i18n: status: mark parseopt strings for translation
  i18n: replace: mark parseopt strings for translation
  ...

Conflicts:
	builtin/grep.c
	builtin/revert.c
Merge branch 'jk/config-warn-on-inaccessible-paths' into pu

When looking for $HOME/.gitconfig etc., it is OK if we cannot read
them because they do not exist, but unable to read existing ones
need to be diagnosed.

Will merge to 'next'.

* jk/config-warn-on-inaccessible-paths:
  warn_on_inaccessible(): a helper to warn on inaccessible paths
  attr: warn on inaccessible attribute files
  gitignore: report access errors of exclude files
  config: warn on inaccessible files
Merge branch 'nd/i18n-poison-test-updates' into pu

Updates to tests that can be broken with gettext-poison builds.

* nd/i18n-poison-test-updates:
  Fix tests under GETTEXT_POISON on parseopt
  Fix tests under GETTEXT_POISON on pack-object
  Fix tests under GETTEXT_POISON on git-apply
  Fix tests under GETTEXT_POISON on diffstat
  Fix tests under GETTEXT_POISON on git-stash
  Fix tests under GETTEXT_POISON on relative dates
Merge branch 'er/doc-fast-import-done' into pu

Parked in 'pu' in case ESR responds with "Sorry, forgot to sign-off".

* er/doc-fast-import-done:
  fast-import: document the --done option
Merge branch 'lt/commit-tree-guess-utf-8' into pu

Teaches "git commit" and "git commit-tree" the "we are told to use
utf-8 in log message, but this does not look like utf-8---attempt to
pass it through convert-from-latin1-to-utf8 and see if it makes
sense" heuristics "git mailinfo" already uses.

Will merge to 'next'.

* lt/commit-tree-guess-utf-8:
  commit/commit-tree: correct latin1 to utf-8
Merge branch 'jc/dotdot-is-parent-directory' into pu

* jc/dotdot-is-parent-directory:
  specifying ranges: we did not mean to make ".." an empty set

Conflicts:
	builtin/rev-parse.c
	revision.c
Merge branch 'jc/maint-mergetool-style-fix' into pu

* jc/maint-mergetool-style-fix:
  mergetool: style fixes
Merge branch 'fa/remote-svn' into pu

* fa/remote-svn:
  Add a test script for remote-svn
  remote-svn: add marks-file regeneration
  Add a svnrdump-simulator replaying a dump file for testing
  remote-svn: add incremental import
  remote-svn: Activate import/export-marks for fast-import
  Create a note for every imported commit containing svn metadata
  vcs-svn: add fast_export_note to create notes
  Allow reading svn dumps from files via file:// urls
  remote-svn, vcs-svn: Enable fetching to private refs
  When debug==1, start fast-import with "--stats" instead of "--quiet"
  Add documentation for the 'bidi-import' capability of remote-helpers
  Connect fast-import to the remote-helper via pipe, adding 'bidi-import' capability
  Add argv_array_detach and argv_array_free_detached
  Add svndump_init_fd to allow reading dumps from arbitrary FDs
  Add git-remote-testsvn to Makefile
  Implement a remote helper for svn in C
Merge branch 'fa/vcs-svn' into pu

* fa/vcs-svn:
  vcs-svn: remove repo_tree
  vcs-svn/svndump: rewrite handle_node(), begin|end_revision()
  vcs-svn/svndump: restructure node_ctx, rev_ctx handling
  svndump: move struct definitions to .h