]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
8 years agorefs: cleanup comments regarding check_refname_component()
Jacob Keller [Wed, 22 Jul 2015 21:05:32 +0000 (14:05 -0700)] 
refs: cleanup comments regarding check_refname_component()

Correctly specify all characters which are rejected under the '4: a
bad character' disposition, which did not list all characters that
are treated as such.

Cleanup comment style for rejected refs by inserting a ", or" at the
end of each statement.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoGit 2.4.6 v2.4.6
Junio C Hamano [Wed, 15 Jul 2015 18:45:42 +0000 (11:45 -0700)] 
Git 2.4.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'mm/describe-doc' into maint
Junio C Hamano [Wed, 15 Jul 2015 18:41:26 +0000 (11:41 -0700)] 
Merge branch 'mm/describe-doc' into maint

Docfix.

* mm/describe-doc:
  Documentation/describe: improve one-line summary

8 years agoMerge branch 'jc/prompt-document-ps1-state-separator' into maint
Junio C Hamano [Wed, 15 Jul 2015 18:41:26 +0000 (11:41 -0700)] 
Merge branch 'jc/prompt-document-ps1-state-separator' into maint

Docfix.

* jc/prompt-document-ps1-state-separator:
  git-prompt.sh: document GIT_PS1_STATESEPARATOR

8 years agoMerge branch 'es/osx-header-pollutes-mask-macro' into maint
Junio C Hamano [Wed, 15 Jul 2015 18:41:24 +0000 (11:41 -0700)] 
Merge branch 'es/osx-header-pollutes-mask-macro' into maint

* es/osx-header-pollutes-mask-macro:
  ewah: use less generic macro name
  ewah/bitmap: silence warning about MASK macro redefinition

8 years agoMerge branch 'es/utf8-stupid-compiler-workaround' into maint
Junio C Hamano [Wed, 15 Jul 2015 18:41:23 +0000 (11:41 -0700)] 
Merge branch 'es/utf8-stupid-compiler-workaround' into maint

A compilation workaround.

* es/utf8-stupid-compiler-workaround:
  utf8: NO_ICONV: silence uninitialized variable warning

8 years agoMerge branch 'fk/doc-format-patch-vn' into maint
Junio C Hamano [Wed, 15 Jul 2015 18:41:22 +0000 (11:41 -0700)] 
Merge branch 'fk/doc-format-patch-vn' into maint

Docfix.

* fk/doc-format-patch-vn:
  doc: format-patch: fix typo

8 years agoMerge branch 'pt/t0302-needs-sanity' into maint
Junio C Hamano [Wed, 15 Jul 2015 18:41:21 +0000 (11:41 -0700)] 
Merge branch 'pt/t0302-needs-sanity' into maint

* pt/t0302-needs-sanity:
  t0302: "unreadable" test needs SANITY prereq

8 years agoMerge branch 'me/fetch-into-shallow-safety' into maint
Junio C Hamano [Wed, 15 Jul 2015 18:41:20 +0000 (11:41 -0700)] 
Merge branch 'me/fetch-into-shallow-safety' into maint

"git fetch --depth=<depth>" and "git clone --depth=<depth>" issued
a shallow transfer request even to an upload-pack that does not
support the capability.

* me/fetch-into-shallow-safety:
  fetch-pack: check for shallow if depth given

8 years agoMerge branch 'mh/fsck-reflog-entries' into maint
Junio C Hamano [Wed, 15 Jul 2015 18:41:19 +0000 (11:41 -0700)] 
Merge branch 'mh/fsck-reflog-entries' into maint

"git fsck" used to ignore missing or invalid objects recorded in reflog.

* mh/fsck-reflog-entries:
  fsck: report errors if reflog entries point at invalid objects
  fsck_handle_reflog_sha1(): new function

8 years agoMerge branch 'af/tcsh-completion-noclobber' into maint
Junio C Hamano [Wed, 15 Jul 2015 18:41:18 +0000 (11:41 -0700)] 
Merge branch 'af/tcsh-completion-noclobber' into maint

The tcsh completion writes a bash scriptlet but that would have
failed for users with noclobber set.

* af/tcsh-completion-noclobber:
  git-completion.tcsh: fix redirect with noclobber

8 years agoMerge branch 'pa/auto-gc-mac-osx' into maint
Junio C Hamano [Wed, 15 Jul 2015 18:41:17 +0000 (11:41 -0700)] 
Merge branch 'pa/auto-gc-mac-osx' into maint

Recent Mac OS X updates breaks the logic to detect that the machine
is on the AC power in the sample pre-auto-gc script.

* pa/auto-gc-mac-osx:
  hooks/pre-auto-gc: adjust power checking for newer OS X

8 years agoMerge branch 'jc/do-not-feed-tags-to-clear-commit-marks' into maint
Junio C Hamano [Wed, 15 Jul 2015 18:41:16 +0000 (11:41 -0700)] 
Merge branch 'jc/do-not-feed-tags-to-clear-commit-marks' into maint

"git format-patch --ignore-if-upstream A..B" did not like to be fed
tags as boundary commits.

* jc/do-not-feed-tags-to-clear-commit-marks:
  format-patch: do not feed tags to clear_commit_marks()

8 years agoMerge branch 'jk/stash-require-clean-index' into maint
Junio C Hamano [Fri, 26 Jun 2015 06:03:26 +0000 (23:03 -0700)] 
Merge branch 'jk/stash-require-clean-index' into maint

A hotfix for the topic already in 'master'.

* jk/stash-require-clean-index:
  Revert "stash: require a clean index to apply"

8 years agoMerge branch 'cb/array-size' into maint
Junio C Hamano [Fri, 26 Jun 2015 06:03:25 +0000 (23:03 -0700)] 
Merge branch 'cb/array-size' into maint

* cb/array-size:
  Fix definition of ARRAY_SIZE for non-gcc builds

8 years agoGit 2.4.5 v2.4.5
Junio C Hamano [Thu, 25 Jun 2015 18:03:05 +0000 (11:03 -0700)] 
Git 2.4.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'sg/merge-summary-config' into maint
Junio C Hamano [Thu, 25 Jun 2015 18:02:16 +0000 (11:02 -0700)] 
Merge branch 'sg/merge-summary-config' into maint

Doc updates.

* sg/merge-summary-config:
  Documentation: include 'merge.branchdesc' for merge and config as well

8 years agoMerge branch 'jk/make-fix-dependencies' into maint
Junio C Hamano [Thu, 25 Jun 2015 18:02:15 +0000 (11:02 -0700)] 
Merge branch 'jk/make-fix-dependencies' into maint

Build clean-up.

* jk/make-fix-dependencies:
  Makefile: silence perl/PM.stamp recipe
  Makefile: avoid timestamp updates to GIT-BUILD-OPTIONS
  Makefile: drop dependency between git-instaweb and gitweb

8 years agoMerge branch 'sb/pack-protocol-mention-smart-http' into maint
Junio C Hamano [Thu, 25 Jun 2015 18:02:14 +0000 (11:02 -0700)] 
Merge branch 'sb/pack-protocol-mention-smart-http' into maint

Doc updates.

* sb/pack-protocol-mention-smart-http:
  Documentation/technical/pack-protocol: mention http as possible protocol

8 years agoMerge branch 'jk/die-on-bogus-worktree-late' into maint
Junio C Hamano [Thu, 25 Jun 2015 18:02:13 +0000 (11:02 -0700)] 
Merge branch 'jk/die-on-bogus-worktree-late' into maint

The setup code used to die when core.bare and core.worktree are set
inconsistently, even for commands that do not need working tree.

* jk/die-on-bogus-worktree-late:
  setup_git_directory: delay core.bare/core.worktree errors

8 years agoMerge branch 'pt/pull-tags-error-diag' into maint
Junio C Hamano [Thu, 25 Jun 2015 18:02:12 +0000 (11:02 -0700)] 
Merge branch 'pt/pull-tags-error-diag' into maint

There was a dead code that used to handle "git pull --tags" and
show special-cased error message, which was made irrelevant when
the semantics of the option changed back in Git 1.9 days.

* pt/pull-tags-error-diag:
  pull: remove --tags error in no merge candidates case

8 years agoMerge branch 'jk/color-diff-plain-is-context' into maint
Junio C Hamano [Thu, 25 Jun 2015 18:02:11 +0000 (11:02 -0700)] 
Merge branch 'jk/color-diff-plain-is-context' into maint

"color.diff.plain" was a misnomer; give it 'color.diff.context' as
a more logical synonym.

* jk/color-diff-plain-is-context:
  diff.h: rename DIFF_PLAIN color slot to DIFF_CONTEXT
  diff: accept color.diff.context as a synonym for "plain"

8 years agoMerge branch 'jk/diagnose-config-mmap-failure' into maint
Junio C Hamano [Thu, 25 Jun 2015 18:02:10 +0000 (11:02 -0700)] 
Merge branch 'jk/diagnose-config-mmap-failure' into maint

The configuration reader/writer uses mmap(2) interface to access
the files; when we find a directory, it barfed with "Out of memory?".

* jk/diagnose-config-mmap-failure:
  xmmap(): drop "Out of memory?"
  config.c: rewrite ENODEV into EISDIR when mmap fails
  config.c: avoid xmmap error messages
  config.c: fix mmap leak when writing config
  read-cache.c: drop PROT_WRITE from mmap of index

8 years agoMerge branch 'jk/squelch-missing-link-warning-for-unreachable' into maint
Junio C Hamano [Thu, 25 Jun 2015 18:02:09 +0000 (11:02 -0700)] 
Merge branch 'jk/squelch-missing-link-warning-for-unreachable' into maint

Recent "git prune" traverses young unreachable objects to safekeep
old objects in the reachability chain from them, which sometimes
caused error messages that are unnecessarily alarming.

* jk/squelch-missing-link-warning-for-unreachable:
  suppress errors on missing UNINTERESTING links
  silence broken link warnings with revs->ignore_missing_links
  add quieter versions of parse_{tree,commit}

8 years agoMerge branch 'mm/rebase-i-post-rewrite-exec' into maint
Junio C Hamano [Thu, 25 Jun 2015 18:02:09 +0000 (11:02 -0700)] 
Merge branch 'mm/rebase-i-post-rewrite-exec' into maint

"git rebase -i" fired post-rewrite hook when it shouldn't (namely,
when it was told to stop sequencing with 'exec' insn).

* mm/rebase-i-post-rewrite-exec:
  t5407: use <<- to align the expected output
  rebase -i: fix post-rewrite hook with failed exec command
  rebase -i: demonstrate incorrect behavior of post-rewrite

8 years agoFix definition of ARRAY_SIZE for non-gcc builds
Charles Bailey [Wed, 24 Jun 2015 22:12:07 +0000 (23:12 +0100)] 
Fix definition of ARRAY_SIZE for non-gcc builds

The improved ARRAY_SIZE macro uses BARF_UNLESS_AN_ARRAY which expands
to a valid check for recent gcc versions and to 0 for older gcc
versions but is not defined on non-gcc builds.

Non-gcc builds need this macro to expand to 0 as well. The current outer
test (defined(__GNUC__) && (__GNUC__ >= 3)) is a strictly weaker
condition than the inner test (GIT_GNUC_PREREQ(3, 1)) so we can omit the
outer test and cause the BARF_UNLESS_AN_ARRAY macro to be defined
correctly on non-gcc builds as well as gcc builds with older versions.

Signed-off-by: Charles Bailey <cbailey32@bloomberg.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agofetch-pack: check for shallow if depth given
Mike Edgar [Wed, 17 Jun 2015 11:48:14 +0000 (07:48 -0400)] 
fetch-pack: check for shallow if depth given

When a repository is first fetched as a shallow clone, either by
git-clone or by fetching into an empty repo, the server's capabilities
are not currently consulted. The client will send shallow requests even
if the server does not understand them, and the resulting error may be
unhelpful to the user. This change pre-emptively checks so we can exit
with a helpful error if necessary.

Signed-off-by: Mike Edgar <adgar@google.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoGit 2.4.4 v2.4.4
Junio C Hamano [Tue, 16 Jun 2015 21:38:01 +0000 (14:38 -0700)] 
Git 2.4.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'jk/clone-dissociate' into maint
Junio C Hamano [Tue, 16 Jun 2015 21:33:52 +0000 (14:33 -0700)] 
Merge branch 'jk/clone-dissociate' into maint

Code clean-up.

* jk/clone-dissociate:
  clone: reorder --dissociate and --reference options
  clone: use OPT_STRING_LIST for --reference

8 years agoMerge branch 'sb/submodule-doc-intro' into maint
Junio C Hamano [Tue, 16 Jun 2015 21:33:52 +0000 (14:33 -0700)] 
Merge branch 'sb/submodule-doc-intro' into maint

* sb/submodule-doc-intro:
  submodule doc: reorder introductory paragraphs

8 years agoMerge branch 'sb/glossary-submodule' into maint
Junio C Hamano [Tue, 16 Jun 2015 21:33:51 +0000 (14:33 -0700)] 
Merge branch 'sb/glossary-submodule' into maint

* sb/glossary-submodule:
  glossary: add "remote", "submodule", "superproject"

8 years agoMerge branch 'ah/usage-strings' into maint
Junio C Hamano [Tue, 16 Jun 2015 21:33:50 +0000 (14:33 -0700)] 
Merge branch 'ah/usage-strings' into maint

A few usage string updates.

* ah/usage-strings:
  blame, log: format usage strings similarly to those in documentation

8 years agoMerge branch 'mc/commit-doc-grammofix' into maint
Junio C Hamano [Tue, 16 Jun 2015 21:33:49 +0000 (14:33 -0700)] 
Merge branch 'mc/commit-doc-grammofix' into maint

Doc grammar fix.

* mc/commit-doc-grammofix:
  Documentation/git-commit: grammofix

8 years agoMerge branch 'rs/janitorial' into maint
Junio C Hamano [Tue, 16 Jun 2015 21:33:47 +0000 (14:33 -0700)] 
Merge branch 'rs/janitorial' into maint

Code clean-up.

* rs/janitorial:
  dir: remove unused variable sb
  clean: remove unused variable buf
  use file_exists() to check if a file exists in the worktree

8 years agoMerge branch 'sb/test-bitmap-free-at-end' into maint
Junio C Hamano [Tue, 16 Jun 2015 21:33:47 +0000 (14:33 -0700)] 
Merge branch 'sb/test-bitmap-free-at-end' into maint

An earlier leakfix to bitmap testing code was incomplete.

* sb/test-bitmap-free-at-end:
  test_bitmap_walk: free bitmap with bitmap_free

8 years agoMerge branch 'dt/clean-pathspec-filter-then-lstat' into maint
Junio C Hamano [Tue, 16 Jun 2015 21:33:46 +0000 (14:33 -0700)] 
Merge branch 'dt/clean-pathspec-filter-then-lstat' into maint

"git clean pathspec..." tried to lstat(2) and complain even for
paths outside the given pathspec.

* dt/clean-pathspec-filter-then-lstat:
  clean: only lstat files in pathspec

8 years agoMerge branch 'jk/http-backend-deadlock' into maint
Junio C Hamano [Tue, 16 Jun 2015 21:33:45 +0000 (14:33 -0700)] 
Merge branch 'jk/http-backend-deadlock' into maint

Communication between the HTTP server and http_backend process can
lead to a dead-lock when relaying a large ref negotiation request.
Diagnose the situation better, and mitigate it by reading such a
request first into core (to a reasonable limit).

* jk/http-backend-deadlock:
  http-backend: spool ref negotiation requests to buffer
  t5551: factor out tag creation
  http-backend: fix die recursion with custom handler

8 years agoMerge branch 'jh/filter-empty-contents' into maint
Junio C Hamano [Tue, 16 Jun 2015 21:33:44 +0000 (14:33 -0700)] 
Merge branch 'jh/filter-empty-contents' into maint

The clean/smudge interface did not work well when filtering an
empty contents (failed and then passed the empty input through).
It can be argued that a filter that produces anything but empty for
an empty input is nonsense, but if the user wants to do strange
things, then why not?

* jh/filter-empty-contents:
  sha1_file: pass empty buffer to index empty file

8 years agoMerge branch 'jk/stash-options' into maint
Junio C Hamano [Tue, 16 Jun 2015 21:33:43 +0000 (14:33 -0700)] 
Merge branch 'jk/stash-options' into maint

Make "git stash something --help" error out, so that users can
safely say "git stash drop --help".

* jk/stash-options:
  stash: recognize "--help" for subcommands
  stash: complain about unknown flags

8 years agoMerge branch 'mm/log-format-raw-doc' into maint
Junio C Hamano [Tue, 16 Jun 2015 21:33:42 +0000 (14:33 -0700)] 
Merge branch 'mm/log-format-raw-doc' into maint

Clarify that "log --raw" and "log --format=raw" are unrelated
concepts.

* mm/log-format-raw-doc:
  Documentation/log: clarify sha1 non-abbreviation in log --raw
  Documentation/log: clarify what --raw means

8 years agoMerge branch 'ep/do-not-feed-a-pointer-to-array-size' into maint
Junio C Hamano [Tue, 16 Jun 2015 21:33:41 +0000 (14:33 -0700)] 
Merge branch 'ep/do-not-feed-a-pointer-to-array-size' into maint

Catch a programmer mistake to feed a pointer not an array to
ARRAY_SIZE() macro, by using a couple of GCC extensions.

* ep/do-not-feed-a-pointer-to-array-size:
  git-compat-util.h: implement a different ARRAY_SIZE macro for for safely deriving the size of array

8 years agoDocumentation/describe: improve one-line summary
Matthieu Moy [Tue, 16 Jun 2015 13:16:38 +0000 (15:16 +0200)] 
Documentation/describe: improve one-line summary

git describe does not show 'the most recent tag that is reachable from a
commit', but a descriptive name based on this tag. Fix the description to
reflect that.

Suggested-by: Albert Netymk <albertnetymk@gmail.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoRevert "stash: require a clean index to apply"
Jeff King [Mon, 15 Jun 2015 18:27:22 +0000 (14:27 -0400)] 
Revert "stash: require a clean index to apply"

This reverts commit ed178ef13a26136d86ff4e33bb7b1afb5033f908.

That commit was an attempt to improve the safety of applying
a stash, because the application process may create
conflicted index entries, after which it is hard to restore
the original index state.

Unfortunately, this hurts some common workflows around "git
stash -k", like:

    git add -p       ;# (1) stage set of proposed changes
    git stash -k     ;# (2) get rid of everything else
    make test        ;# (3) make sure proposal is reasonable
    git stash apply  ;# (4) restore original working tree

If you "git commit" between steps (3) and (4), then this
just works. However, if these steps are part of a pre-commit
hook, you don't have that opportunity (you have to restore
the original state regardless of whether the tests passed or
failed).

It's possible that we could provide better tools for this
sort of workflow. In particular, even before ed178ef, it
could fail with a conflict if there were conflicting hunks
in the working tree and index (since the "stash -k" puts the
index version into the working tree, and we then attempt to
apply the differences between HEAD and the old working tree
on top of that). But the fact remains that people have been
using it happily for a while, and the safety provided by
ed178ef is simply not that great. Let's revert it for now.
In the long run, people can work on improving stash for this
sort of workflow, but the safety tradeoff is not worth it in
the meantime.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge tag 'l10n-2.4-maint-de-updates' of git://github.com/git-l10n/git-po into maint
Junio C Hamano [Sun, 14 Jun 2015 21:24:49 +0000 (14:24 -0700)] 
Merge tag 'l10n-2.4-maint-de-updates' of git://github.com/git-l10n/git-po into maint

l10n-2.4-maint-de-updates

* tag 'l10n-2.4-maint-de-updates' of git://github.com/git-l10n/git-po:
  l10n: de.po: translation fix for fall-back to 3way merge
  l10n: de.po: punctuation fixes
  l10n: de.po: grammar fix
  l10n: de.po: change error message from "sagen" to "Meinten Sie"

8 years agohooks/pre-auto-gc: adjust power checking for newer OS X
Panagiotis Astithas [Thu, 11 Jun 2015 14:37:25 +0000 (17:37 +0300)] 
hooks/pre-auto-gc: adjust power checking for newer OS X

The output of "pmset -g batt" changed at some point from "Currently
drawing from 'AC Power'" to the slightly different "Now drawing from
'AC Power'". Starting the match from "drawing" makes the check work
in both old and new versions of OS X.

Signed-off-by: Panagiotis Astithas <pastith@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agot0302: "unreadable" test needs SANITY prereq
Paul Tan [Fri, 12 Jun 2015 13:29:58 +0000 (21:29 +0800)] 
t0302: "unreadable" test needs SANITY prereq

The test expects that "chmod -r ~/.git-credentials" would make it
unreadable to the user, and thus needs the SANITY prerequisite.

Reported-by: Jean-Yves LENHOF <jean-yves@lenhof.eu.org>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agol10n: de.po: translation fix for fall-back to 3way merge
Michael J Gruber [Tue, 19 May 2015 08:51:34 +0000 (10:51 +0200)] 
l10n: de.po: translation fix for fall-back to 3way merge

The English version is correct, but misleading: It is not the 3way merge
that is being patched also, but that is being fallen back to also.

The German version translates the former meaning. Make it translate the
latter.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
8 years agol10n: de.po: punctuation fixes
Michael J Gruber [Tue, 19 May 2015 08:51:33 +0000 (10:51 +0200)] 
l10n: de.po: punctuation fixes

This respects the ellipsis style used in de.po.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
8 years agol10n: de.po: grammar fix
Michael J Gruber [Tue, 19 May 2015 08:51:32 +0000 (10:51 +0200)] 
l10n: de.po: grammar fix

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
8 years agol10n: de.po: change error message from "sagen" to "Meinten Sie"
Phillip Sz [Sat, 9 May 2015 11:28:55 +0000 (13:28 +0200)] 
l10n: de.po: change error message from "sagen" to "Meinten Sie"

We should not use "sagen" if someone has written something wrong.
Although it's "say" in English, we should not use it in German
and instead use our normal error message.

Signed-off-by: Phillip Sz <phillip.szelat@gmail.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
8 years agogit-prompt.sh: document GIT_PS1_STATESEPARATOR
Joe Cridge [Wed, 10 Jun 2015 17:19:24 +0000 (18:19 +0100)] 
git-prompt.sh: document GIT_PS1_STATESEPARATOR

The environment variable GIT_PS1_STATESEPARATOR can be used to set the
separator between the branch name and the state symbols in the prompt.

At present the variable is not mentioned in the inline documentation which
makes it difficult for the casual user to identify.

Signed-off-by: Joe Cridge <joe.cridge@me.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agodoc: format-patch: fix typo
Frans Klaver [Wed, 10 Jun 2015 21:01:14 +0000 (23:01 +0200)] 
doc: format-patch: fix typo

reroll count documentation states that v<n> will be pretended to the
filename. Judging by the examples that should have been 'prepended'.

Signed-off-by: Frans Klaver <fransklaver@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agogit-completion.tcsh: fix redirect with noclobber
Ariel Faigon [Tue, 9 Jun 2015 17:25:15 +0000 (10:25 -0700)] 
git-completion.tcsh: fix redirect with noclobber

tcsh users who happen to have 'set noclobber' elsewhere in their
~/.tcshrc or ~/.cshrc startup files get a 'File exist' error, and
the tcsh completion file doesn't get generated/updated.

Adding a `!` in the redirect works correctly for both clobber (default)
and 'set noclobber' users.

Reviewed-by: Christian Couder <christian.couder@gmail.com>
Signed-off-by: Ariel Faigon <github.2009@yendor.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agofsck: report errors if reflog entries point at invalid objects
Michael Haggerty [Mon, 8 Jun 2015 13:40:05 +0000 (15:40 +0200)] 
fsck: report errors if reflog entries point at invalid objects

Previously, if a reflog entry's old or new SHA-1 was not resolvable to
an object, that SHA-1 was silently ignored. Instead, report such cases
as errors.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agofsck_handle_reflog_sha1(): new function
Michael Haggerty [Mon, 8 Jun 2015 13:40:04 +0000 (15:40 +0200)] 
fsck_handle_reflog_sha1(): new function

New function, extracted from fsck_handle_reflog_ent(). The extra
is_null_sha1() test for the new reference is currently unnecessary, as
reflogs are deleted when the reference itself is deleted. But it
doesn't hurt, either.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoutf8: NO_ICONV: silence uninitialized variable warning
Eric Sunshine [Fri, 5 Jun 2015 06:42:16 +0000 (02:42 -0400)] 
utf8: NO_ICONV: silence uninitialized variable warning

The last argument of reencode_string_len() is an 'int *' which is
assigned the length of the converted string. When NO_ICONV is defined,
however, reencode_string_len() is stubbed out by the macro:

    #define reencode_string_len(a,b,c,d,e) NULL

which never assigns a value to the final argument. When called like
this:

    int n;
    char *s = reencode_string_len(..., &n);
    if (s)
        do_something(s, n);

some compilers complain that 'n' is used uninitialized within the
conditional.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoGit 2.4.3 v2.4.3
Junio C Hamano [Fri, 5 Jun 2015 19:15:57 +0000 (12:15 -0700)] 
Git 2.4.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'dl/branch-error-message' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:29 +0000 (12:00 -0700)] 
Merge branch 'dl/branch-error-message' into maint

Error messages from "git branch" called remote-tracking branches as
"remote branches".

* dl/branch-error-message:
  branch: do not call a "remote-tracking branch" a "remote branch"

8 years agoMerge branch 'jk/skip-http-tests-under-no-curl' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:28 +0000 (12:00 -0700)] 
Merge branch 'jk/skip-http-tests-under-no-curl' into maint

Test clean-up.

* jk/skip-http-tests-under-no-curl:
  tests: skip dav http-push tests under NO_EXPAT=NoThanks
  t/lib-httpd.sh: skip tests if NO_CURL is defined

8 years agoMerge branch 'ps/doc-packfile-vs-pack-file' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:27 +0000 (12:00 -0700)] 
Merge branch 'ps/doc-packfile-vs-pack-file' into maint

Doc consistency updates.

* ps/doc-packfile-vs-pack-file:
  doc: fix inconsistent spelling of "packfile"
  pack-protocol.txt: fix insconsistent spelling of "packfile"
  git-unpack-objects.txt: fix inconsistent spelling of "packfile"
  git-verify-pack.txt: fix inconsistent spelling of "packfile"

8 years agoMerge branch 'fg/document-commit-message-stripping' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:26 +0000 (12:00 -0700)] 
Merge branch 'fg/document-commit-message-stripping' into maint

* fg/document-commit-message-stripping:
  Documentation: clarify how "git commit" cleans up the edited log message

8 years agoMerge branch 'jk/rerere-forget-check-enabled' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:25 +0000 (12:00 -0700)] 
Merge branch 'jk/rerere-forget-check-enabled' into maint

"git rerere forget" in a repository without rerere enabled gave a
cryptic error message; it should be a silent no-op instead.

* jk/rerere-forget-check-enabled:
  rerere: exit silently on "forget" when rerere is disabled

8 years agoMerge branch 'pt/pull-log-n' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:24 +0000 (12:00 -0700)] 
Merge branch 'pt/pull-log-n' into maint

"git pull --log" and "git pull --no-log" worked as expected, but
"git pull --log=20" did not.

* pt/pull-log-n:
  pull: handle --log=<n>

8 years agoMerge branch 'pt/pull-ff-vs-merge-ff' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:23 +0000 (12:00 -0700)] 
Merge branch 'pt/pull-ff-vs-merge-ff' into maint

The pull.ff configuration was supposed to override the merge.ff
configuration, but it didn't.

* pt/pull-ff-vs-merge-ff:
  pull: parse pull.ff as a bool or string
  pull: make pull.ff=true override merge.ff

8 years agoMerge branch 'rs/plug-leak-in-pack-bitmaps' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:22 +0000 (12:00 -0700)] 
Merge branch 'rs/plug-leak-in-pack-bitmaps' into maint

The code to read pack-bitmap wanted to allocate a few hundred
pointers to a structure, but by mistake allocated and leaked memory
enough to hold that many actual structures.  Correct the allocation
size and also have it on stack, as it is small enough.

* rs/plug-leak-in-pack-bitmaps:
  pack-bitmaps: plug memory leak, fix allocation size for recent_bitmaps

8 years agoMerge branch 'ja/tutorial-asciidoctor-fix' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:22 +0000 (12:00 -0700)] 
Merge branch 'ja/tutorial-asciidoctor-fix' into maint

A literal block in the tutorial had lines with unequal lengths to
delimit it from the rest of the document, which choke GitHub's
AsciiDoc renderer.

* ja/tutorial-asciidoctor-fix:
  doc: fix unmatched code fences

8 years agoMerge branch 'jk/stripspace-asciidoctor-fix' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:20 +0000 (12:00 -0700)] 
Merge branch 'jk/stripspace-asciidoctor-fix' into maint

A literal block in the tutorial had lines with unequal lengths to
delimit it from the rest of the document, which choke GitHub's
AsciiDoc renderer.

* jk/stripspace-asciidoctor-fix:
  doc: fix unmatched code fences in git-stripspace

8 years agoMerge branch 'jk/asciidoc-markup-fix' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:19 +0000 (12:00 -0700)] 
Merge branch 'jk/asciidoc-markup-fix' into maint

Various documentation mark-up fixes to make the output more
consistent in general and also make AsciiDoctor (an alternative
formatter) happier.

* jk/asciidoc-markup-fix:
  doc: convert AsciiDoc {?foo} to ifdef::foo[]
  doc: put example URLs and emails inside literal backticks
  doc: drop backslash quoting of some curly braces
  doc: convert \--option to --option
  doc/add: reformat `--edit` option
  doc: fix length of underlined section-title
  doc: fix hanging "+"-continuation
  doc: fix unquoted use of "{type}"
  doc: fix misrendering due to `single quote'

8 years agoMerge branch 'ps/bundle-verify-arg' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:18 +0000 (12:00 -0700)] 
Merge branch 'ps/bundle-verify-arg' into maint

"git bundle verify" did not diagnose extra parameters on the
command line.

* ps/bundle-verify-arg:
  bundle: verify arguments more strictly

8 years agoMerge branch 'mh/write-refs-sooner-2.4' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:17 +0000 (12:00 -0700)] 
Merge branch 'mh/write-refs-sooner-2.4' into maint

Multi-ref transaction support we merged a few releases ago
unnecessarily kept many file descriptors open, risking to fail with
resource exhaustion.  This is for 2.4.x track.

* mh/write-refs-sooner-2.4:
  ref_transaction_commit(): fix atomicity and avoid fd exhaustion
  ref_transaction_commit(): remove the local flags variable
  ref_transaction_commit(): inline call to write_ref_sha1()
  rename_ref(): inline calls to write_ref_sha1() from this function
  commit_ref_update(): new function, extracted from write_ref_sha1()
  write_ref_to_lockfile(): new function, extracted from write_ref_sha1()
  t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZE
  update-ref: test handling large transactions properly
  ref_transaction_commit(): fix atomicity and avoid fd exhaustion
  ref_transaction_commit(): remove the local flags variable
  ref_transaction_commit(): inline call to write_ref_sha1()
  rename_ref(): inline calls to write_ref_sha1() from this function
  commit_ref_update(): new function, extracted from write_ref_sha1()
  write_ref_to_lockfile(): new function, extracted from write_ref_sha1()
  t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZE
  update-ref: test handling large transactions properly

8 years agoMerge branch 'mh/ref-directory-file' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:16 +0000 (12:00 -0700)] 
Merge branch 'mh/ref-directory-file' into maint

The ref API did not handle cases where 'refs/heads/xyzzy/frotz' is
removed at the same time as 'refs/heads/xyzzy' is added (or vice
versa) very well.

* mh/ref-directory-file:
  reflog_expire(): integrate lock_ref_sha1_basic() errors into ours
  ref_transaction_commit(): delete extra "the" from error message
  ref_transaction_commit(): provide better error messages
  rename_ref(): integrate lock_ref_sha1_basic() errors into ours
  lock_ref_sha1_basic(): improve diagnostics for ref D/F conflicts
  lock_ref_sha1_basic(): report errors via a "struct strbuf *err"
  verify_refname_available(): report errors via a "struct strbuf *err"
  verify_refname_available(): rename function
  refs: check for D/F conflicts among refs created in a transaction
  ref_transaction_commit(): use a string_list for detecting duplicates
  is_refname_available(): use dirname in first loop
  struct nonmatching_ref_data: store a refname instead of a ref_entry
  report_refname_conflict(): inline function
  entry_matches(): inline function
  is_refname_available(): convert local variable "dirname" to strbuf
  is_refname_available(): avoid shadowing "dir" variable
  is_refname_available(): revamp the comments
  t1404: new tests of ref D/F conflicts within transactions

8 years agoMerge branch 'mg/log-decorate-HEAD' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:15 +0000 (12:00 -0700)] 
Merge branch 'mg/log-decorate-HEAD' into maint

The "log --decorate" enhancement in Git 2.4 that shows the commit
at the tip of the current branch e.g. "HEAD -> master", did not
work with --decorate=full.

* mg/log-decorate-HEAD:
  log: do not shorten decoration names too early
  log: decorate HEAD with branch name under --decorate=full, too

8 years agoMerge branch 'sb/t1020-cleanup' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:14 +0000 (12:00 -0700)] 
Merge branch 'sb/t1020-cleanup' into maint

There was a commented-out (instead of being marked to expect
failure) test that documented a breakage that was fixed since the
test was written; turn it into a proper test.

* sb/t1020-cleanup:
  subdirectory tests: code cleanup, uncomment test

8 years agoMerge branch 'jc/gitignore-precedence' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:12 +0000 (12:00 -0700)] 
Merge branch 'jc/gitignore-precedence' into maint

core.excludesfile (defaulting to $XDG_HOME/git/ignore) is supposed
to be overridden by repository-specific .git/info/exclude file, but
the order was swapped from the beginning. This belatedly fixes it.

* jc/gitignore-precedence:
  ignore: info/exclude should trump core.excludesfile

8 years agoMerge branch 'bc/connect-plink' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:11 +0000 (12:00 -0700)] 
Merge branch 'bc/connect-plink' into maint

The connection initiation code for "ssh" transport tried to absorb
differences between the stock "ssh" and Putty-supplied "plink" and
its derivatives, but the logic to tell that we are using "plink"
variants were too loose and falsely triggered when "plink" appeared
anywhere in the path (e.g. "/home/me/bin/uplink/ssh").

* bc/connect-plink:
  connect: improve check for plink to reduce false positives
  t5601: fix quotation error leading to skipped tests
  connect: simplify SSH connection code path

8 years agoMerge branch 'ph/rebase-i-redo' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:10 +0000 (12:00 -0700)] 
Merge branch 'ph/rebase-i-redo' into maint

"git rebase -i" moved the "current" command from "todo" to "done" a
bit too prematurely, losing a step when a "pick" did not even start.

* ph/rebase-i-redo:
  rebase -i: redo tasks that die during cherry-pick

8 years agoMerge branch 'jk/add-e-kill-editor' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:09 +0000 (12:00 -0700)] 
Merge branch 'jk/add-e-kill-editor' into maint

"git add -e" did not allow the user to abort the operation by
killing the editor.

* jk/add-e-kill-editor:
  add: check return value of launch_editor

8 years agoMerge branch 'mh/clone-verbosity-fix' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:08 +0000 (12:00 -0700)] 
Merge branch 'mh/clone-verbosity-fix' into maint

Git 2.4 broke setting verbosity and progress levels on "git clone"
with native transports.

* mh/clone-verbosity-fix:
  clone: call transport_set_verbosity before anything else on the newly created transport

8 years agoMerge branch 'jk/sha1-file-reduce-useless-warnings' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:07 +0000 (12:00 -0700)] 
Merge branch 'jk/sha1-file-reduce-useless-warnings' into maint

* jk/sha1-file-reduce-useless-warnings:
  sha1_file: squelch "packfile cannot be accessed" warnings

8 years agoMerge branch 'tb/blame-resurrect-convert-to-git' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:06 +0000 (12:00 -0700)] 
Merge branch 'tb/blame-resurrect-convert-to-git' into maint

Some time ago, "git blame" (incorrectly) lost the convert_to_git()
call when synthesizing a fake "tip" commit that represents the
state in the working tree, which broke folks who record the history
with LF line ending to make their project portabile across
platforms while terminating lines in their working tree files with
CRLF for their platform.

* tb/blame-resurrect-convert-to-git:
  blame: CRLF in the working tree and LF in the repo

8 years agoMerge branch 'jc/plug-fmt-merge-msg-leak' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:05 +0000 (12:00 -0700)] 
Merge branch 'jc/plug-fmt-merge-msg-leak' into maint

* jc/plug-fmt-merge-msg-leak:
  fmt-merge-msg: plug small leak of commit buffer

8 years agoMerge branch 'pt/xdg-config-path' into maint
Junio C Hamano [Fri, 5 Jun 2015 19:00:03 +0000 (12:00 -0700)] 
Merge branch 'pt/xdg-config-path' into maint

Code clean-up for xdg configuration path support.

* pt/xdg-config-path:
  path.c: remove home_config_paths()
  git-config: replace use of home_config_paths()
  git-commit: replace use of home_config_paths()
  credential-store.c: replace home_config_paths() with xdg_config_home()
  dir.c: replace home_config_paths() with xdg_config_home()
  attr.c: replace home_config_paths() with xdg_config_home()
  path.c: implement xdg_config_home()
  t0302: "unreadable" test needs POSIXPERM
  t0302: test credential-store support for XDG_CONFIG_HOME
  git-credential-store: support XDG_CONFIG_HOME
  git-credential-store: support multiple credential files

8 years agoewah: use less generic macro name
Jeff King [Wed, 3 Jun 2015 06:39:37 +0000 (02:39 -0400)] 
ewah: use less generic macro name

The ewah/ewok.h header pollutes the global namespace with
"BITS_IN_WORD", without any specific notion that we are
talking about the bits in an eword_t. We can give this the
more specific name "BITS_IN_EWORD".

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoewah/bitmap: silence warning about MASK macro redefinition
Eric Sunshine [Wed, 3 Jun 2015 06:39:17 +0000 (02:39 -0400)] 
ewah/bitmap: silence warning about MASK macro redefinition

On PowerPC Mac OS X (10.5.8 "Leopard" with Xcode 3.1),
system header /usr/include/ppc/param.h[1] pollutes the
preprocessor namespace with a macro generically named MASK.
This conflicts with the same-named macro in ewah/bitmap.c.
We can avoid this conflict by using a more specific name.

[1]: Included indirectly via:
     git-compat-util.h ->
     sys/sysctl.h ->
     sys/ucred.h ->
     sys/param.h ->
     machine/param.h ->
     ppc/param.h

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoDocumentation/technical/pack-protocol: mention http as possible protocol
Stefan Beller [Tue, 2 Jun 2015 00:02:17 +0000 (17:02 -0700)] 
Documentation/technical/pack-protocol: mention http as possible protocol

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoformat-patch: do not feed tags to clear_commit_marks()
Junio C Hamano [Mon, 1 Jun 2015 17:44:21 +0000 (10:44 -0700)] 
format-patch: do not feed tags to clear_commit_marks()

"git format-patch --ignore-if-in-upstream A..B", when either A or B
is a tag, failed miserably.

This is because the code passes the tips it used for traversal to
clear_commit_marks(), after running a temporary revision traversal
to enumerate the commits on both branches to find if they have
commits that make equivalent changes.  The revision traversal
machinery knows how to enumerate commits reachable starting from a
tag, but clear_commit_marks() wants to take nothing but a commit.

In the longer term, it might be a more correct fix to teach
clear_commit_marks() to do the same "committish to commit"
dereferencing that is done in the revision traversal machinery,
but for now this fix should suffice.

Reported-by: Bruce Korb <bruce.korb@gmail.com>
Helped-by: Christian Couder <christian.couder@gmail.com>
Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agosuppress errors on missing UNINTERESTING links
Jeff King [Mon, 1 Jun 2015 09:56:40 +0000 (05:56 -0400)] 
suppress errors on missing UNINTERESTING links

When we are traversing commit parents along the
UNINTERESTING side of a revision walk, we do not care if
the parent turns out to be missing. That lets us limit
traversals using unreachable and possibly incomplete
sections of history. However, we do still print error
messages about the missing commits; this patch suppresses
the error, as well.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agosilence broken link warnings with revs->ignore_missing_links
Jeff King [Mon, 1 Jun 2015 09:56:37 +0000 (05:56 -0400)] 
silence broken link warnings with revs->ignore_missing_links

We set revs->ignore_missing_links to instruct the
revision-walking machinery that we know the history graph
may be incomplete. For example, we use it when walking
unreachable but recent objects; we want to add what we can,
but it's OK if the history is incomplete.

However, we still print error messages for the missing
objects, which can be confusing. This is not an error, but
just a normal situation when transitioning from a repository
last pruned by an older git (which can leave broken segments
of history) to a more recent one (where we try to preserve
whole reachable segments).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoadd quieter versions of parse_{tree,commit}
Jeff King [Mon, 1 Jun 2015 09:56:26 +0000 (05:56 -0400)] 
add quieter versions of parse_{tree,commit}

When we call parse_commit, it will complain to stderr if the
object does not exist or cannot be read. This means that we
may produce useless error messages if this situation is
expected (e.g., because the object is marked UNINTERESTING,
or because revs->ignore_missing_links is set).

We can fix this by adding a new "parse_X_gently" form that
takes a flag to suppress the messages. The existing
"parse_X" form is already gentle in the sense that it
returns an error rather than dying, and we could in theory
just add a "quiet" flag to it (with existing callers passing
"0"). But doing it this way means we do not have to disturb
existing callers.

Note also that the new flag is "quiet_on_missing", and not
just "quiet". We could add a flag to suppress _all_ errors,
but besides being a more invasive change (we would have to
pass the flag down to sub-functions, too), there is a good
reason not to: we would never want to use it. Missing a
linked object is expected in some circumstances, but it is
never expected to have a malformed commit, or to get a tree
when we wanted a commit.  We should always complain about
these corruptions.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoglossary: add "remote", "submodule", "superproject"
Stefan Beller [Fri, 29 May 2015 18:23:56 +0000 (11:23 -0700)] 
glossary: add "remote", "submodule", "superproject"

Noticed-by: Philip Oakley <philipoakley@iee.org>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agosetup_git_directory: delay core.bare/core.worktree errors
Jeff King [Fri, 29 May 2015 06:49:10 +0000 (02:49 -0400)] 
setup_git_directory: delay core.bare/core.worktree errors

If both core.bare and core.worktree are set, we complain
about the bogus config and die. Dying is good, because it
avoids commands running and doing damage in a potentially
incorrect setup. But dying _there_ is bad, because it means
that commands which do not even care about the work tree
cannot run. This can make repairing the situation harder:

  [setup]
  $ git config core.bare true
  $ git config core.worktree /some/path

  [OK, expected.]
  $ git status
  fatal: core.bare and core.worktree do not make sense

  [Hrm...]
  $ git config --unset core.worktree
  fatal: core.bare and core.worktree do not make sense

  [Nope...]
  $ git config --edit
  fatal: core.bare and core.worktree do not make sense

  [Gaaah.]
  $ git help config
  fatal: core.bare and core.worktree do not make sense

Instead, let's issue a warning about the bogus config when
we notice it (i.e., for all commands), but only die when the
command tries to use the work tree (by calling setup_work_tree).
So we now get:

  $ git status
  warning: core.bare and core.worktree do not make sense
  fatal: unable to set up work tree using invalid config

  $ git config --unset core.worktree
  warning: core.bare and core.worktree do not make sense

We have to update t1510 to accomodate this; it uses
symbolic-ref to check whether the configuration works or
not, but of course that command does not use the working
tree. Instead, we switch it to use `git status`, as it
requires a work-tree, does not need any special setup, and
is read-only (so a failure will not adversely affect further
tests).

In addition, we add a new test that checks the desired
behavior (i.e., that running "git config" with the bogus
config does in fact work).

Reported-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMakefile: silence perl/PM.stamp recipe
Jeff King [Fri, 29 May 2015 07:26:48 +0000 (03:26 -0400)] 
Makefile: silence perl/PM.stamp recipe

Every time we run "make", we update perl/PM.stamp, which
contains a list of all of the perl module files (if it's
updated, we need to rebuild perl/perl.mak, since the
Makefile will not otherwise know about the new files).

This means that every time "make" is run, we see:

      GEN perl/PM.stamp

in the output, even though it is not likely to have changed.
Let's make this recipe completely silent, as we do for other
auto-generated dependency files (e.g., GIT-CFLAGS).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMakefile: avoid timestamp updates to GIT-BUILD-OPTIONS
Jeff King [Fri, 29 May 2015 07:26:30 +0000 (03:26 -0400)] 
Makefile: avoid timestamp updates to GIT-BUILD-OPTIONS

We force the GIT-BUILD-OPTIONS recipe to run every time
"make" is invoked. We must do this to catch new options
which may have come from the command-line or environment.

However, we actually update the file's timestamp each time
the recipe is run, whether anything changed or not. As a
result, any files which depend on it (for example, all of
the perl scripts, which need to know whether NO_PERL was
set) will be re-built every time.

Let's do our usual trick of writing to a tempfile, then
doing a "cmp || mv" to update the file only when something
changed.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMakefile: drop dependency between git-instaweb and gitweb
Jeff King [Fri, 29 May 2015 07:25:45 +0000 (03:25 -0400)] 
Makefile: drop dependency between git-instaweb and gitweb

The rule for "git-instaweb" depends on "gitweb". This makes
no sense, because:

  1. git-instaweb has no build-time dependency on gitweb; it
     is a run-time dependency

  2. gitweb is a directory that we want to recursively make
     in. As a result, its recipe is marked .PHONY, which
     causes "make" to rebuild git-instaweb every time it is
     run.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agosubmodule doc: reorder introductory paragraphs
Stefan Beller [Wed, 27 May 2015 19:48:01 +0000 (12:48 -0700)] 
submodule doc: reorder introductory paragraphs

It's better to start the man page with a description of what
submodules actually are, instead of saying what they are not.

Reorder the paragraphs such that

 - the first short paragraph introduces the submodule concept,
 - the second paragraph highlights the usage of the submodule command,
 - the third paragraph giving background information, and finally
 - the fourth paragraph discusing alternatives such as subtrees and
   remotes, which we don't want to be confused with.

This ordering deepens the knowledge on submodules with each paragraph.
First the basic questions like "How/what" will be answered, while the
underlying concepts will be taught at a later time.

Making sure it is not confused with subtrees and remotes is not really
enhancing knowledge of submodules itself, but rather painting the big
picture of git concepts, so you could also argue to have it as the second
paragraph. Personally I think this may confuse readers, specially
newcomers though.

Additionally to reordering the paragraphs, they have been slightly
reworded.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoDocumentation: include 'merge.branchdesc' for merge and config as well
SZEDER Gábor [Wed, 27 May 2015 21:52:23 +0000 (23:52 +0200)] 
Documentation: include 'merge.branchdesc' for merge and config as well

'merge.branchdesc' is only mentioned in the docs of 'git fmt-merge-msg'.

The description of 'merge.log' is already duplicated between
'merge-config.txt' and 'git-fmt-merge-msg.txt'; instead of duplicating the
description of another config variable, extract the descriptions of both
of these variables from 'git-fmt-merge-msg.txt' into a separate file and
include it there and in 'merge-config.txt'.

Leave 'merge.summary' only in git-fmt-merge-msg.txt, as it is marked
as deprecated.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoxmmap(): drop "Out of memory?"
Junio C Hamano [Wed, 27 May 2015 20:30:29 +0000 (13:30 -0700)] 
xmmap(): drop "Out of memory?"

We show that message with die_errno(), but the OS is ought to know
why mmap(2) failed much better than we do.  There is no reason for
us to say "Out of memory?" here.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoconfig.c: rewrite ENODEV into EISDIR when mmap fails
Jeff King [Thu, 28 May 2015 08:03:01 +0000 (04:03 -0400)] 
config.c: rewrite ENODEV into EISDIR when mmap fails

If we try to mmap a directory, we'll get ENODEV. This
translates to "no such device" for the user, which is not
very helpful. Since we've just fstat()'d the file, we can
easily check whether the problem was a directory to give a
better message.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoconfig.c: avoid xmmap error messages
Jeff King [Thu, 28 May 2015 07:56:15 +0000 (03:56 -0400)] 
config.c: avoid xmmap error messages

The config-writing code uses xmmap to map the existing
config file, which will die if the map fails. This has two
downsides:

  1. The error message is not very helpful, as it lacks any
     context about the file we are mapping:

       $ mkdir foo
       $ git config --file=foo some.key value
       fatal: Out of memory? mmap failed: No such device

  2. We normally do not die in this code path; instead, we'd
     rather report the error and return an appropriate exit
     status (which is part of the public interface
     documented in git-config.1).

This patch introduces a "gentle" form of xmmap which lets us
produce our own error message. We do not want to use mmap
directly, because we would like to use the other
compatibility elements of xmmap (e.g., handling 0-length
maps portably).

The end result is:

    $ git.compile config --file=foo some.key value
    error: unable to mmap 'foo': No such device
    $ echo $?
    3

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoconfig.c: fix mmap leak when writing config
Jeff King [Thu, 28 May 2015 07:54:43 +0000 (03:54 -0400)] 
config.c: fix mmap leak when writing config

We mmap the existing config file, but fail to unmap it if we
hit an error. The function already has a shared exit path,
so we can fix this by moving the mmap pointer to the
function scope and clearing it in the shared exit.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>