Commit graph

41828 commits

Author SHA1 Message Date
Junio C Hamano a2ec9484c1 Merge branch 'jk/filter-branch-no-index'
A recent optimization to filter-branch in v2.7.0 introduced a
regression when --prune-empty filter is used, which has been
corrected.

* jk/filter-branch-no-index:
  filter-branch: resolve $commit^{tree} in no-index case
2016-01-28 16:10:12 -08:00
Junio C Hamano d10e2cb9d0 Third batch for 2.8 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-26 15:41:04 -08:00
Junio C Hamano 90ce285a42 Merge branch 'jk/symbolic-ref'
The low-level code that is used to create symbolic references has
been updated to share more code with the code that deals with
normal references.

* jk/symbolic-ref:
  lock_ref_sha1_basic: handle REF_NODEREF with invalid refs
  lock_ref_sha1_basic: always fill old_oid while holding lock
  checkout,clone: check return value of create_symref
  create_symref: write reflog while holding lock
  create_symref: use existing ref-lock code
  create_symref: modernize variable names
2016-01-26 15:40:30 -08:00
Junio C Hamano b2ed5ae80a Merge branch 'ak/format-patch-odir-config'
"git format-patch" learned to notice format.outputDirectory
configuration variable.  This allows "-o <dir>" option to be
omitted on the command line if you always use the same directory in
your workflow.

* ak/format-patch-odir-config:
  format-patch: introduce format.outputDirectory configuration
2016-01-26 15:40:30 -08:00
Junio C Hamano c7dd1c5818 Merge branch 'rp/p4-filetype-change'
* rp/p4-filetype-change:
  git-p4.py: add support for filetype change
2016-01-26 15:40:29 -08:00
Junio C Hamano 3c809405cb Merge branch 'js/close-packs-before-gc'
Many codepaths that run "gc --auto" before exiting kept packfiles
mapped and left the file descriptors to them open, which was not
friendly to systems that cannot remove files that are open.  They
now close the packs before doing so.

* js/close-packs-before-gc:
  receive-pack: release pack files before garbage-collecting
  merge: release pack files before garbage-collecting
  am: release pack files before garbage-collecting
  fetch: release pack files before garbage-collecting
2016-01-26 15:40:29 -08:00
Junio C Hamano eefc461ce3 Merge branch 'jk/ok-to-fail-gc-auto-in-rebase'
"git rebase", unlike all other callers of "gc --auto", did not
ignore the exit code from "gc --auto".

* jk/ok-to-fail-gc-auto-in-rebase:
  rebase: ignore failures from "gc --auto"
2016-01-26 15:40:29 -08:00
Junio C Hamano f9219c0b32 Merge branch 'js/pull-rebase-i'
"git pull --rebase" has been extended to allow invoking
"rebase -i".

* js/pull-rebase-i:
  completion: add missing branch.*.rebase values
  remote: handle the config setting branch.*.rebase=interactive
  pull: allow interactive rebase with --rebase=interactive
2016-01-26 15:40:28 -08:00
Junio C Hamano e572fef9d4 Merge branch 'ep/shell-command-substitution-style'
A shell script style update to change `command substitution` into
$(command substitution).  Coverts contrib/ and much of the t/
directory contents.

* ep/shell-command-substitution-style: (92 commits)
  t9901-git-web--browse.sh: use the $( ... ) construct for command substitution
  t9501-gitweb-standalone-http-status.sh: use the $( ... ) construct for command substitution
  t9350-fast-export.sh: use the $( ... ) construct for command substitution
  t9300-fast-import.sh: use the $( ... ) construct for command substitution
  t9150-svk-mergetickets.sh: use the $( ... ) construct for command substitution
  t9145-git-svn-master-branch.sh: use the $( ... ) construct for command substitution
  t9138-git-svn-authors-prog.sh: use the $( ... ) construct for command substitution
  t9137-git-svn-dcommit-clobber-series.sh: use the $( ... ) construct for command substitution
  t9132-git-svn-broken-symlink.sh: use the $( ... ) construct for command substitution
  t9130-git-svn-authors-file.sh: use the $( ... ) construct for command substitution
  t9129-git-svn-i18n-commitencoding.sh: use the $( ... ) construct for command substitution
  t9119-git-svn-info.sh: use the $( ... ) construct for command substitution
  t9118-git-svn-funky-branch-names.sh: use the $( ... ) construct for command substitution
  t9114-git-svn-dcommit-merge.sh: use the $( ... ) construct for command substitution
  t9110-git-svn-use-svm-props.sh: use the $( ... ) construct for command substitution
  t9109-git-svn-multi-glob.sh: use the $( ... ) construct for command substitution
  t9108-git-svn-glob.sh: use the $( ... ) construct for command substitution
  t9107-git-svn-migrate.sh: use the $( ... ) construct for command substitution
  t9105-git-svn-commit-diff.sh: use the $( ... ) construct for command substitution
  t9104-git-svn-follow-parent.sh: use the $( ... ) construct for command substitution
  ...
2016-01-22 13:08:46 -08:00
Junio C Hamano a039a79e9d Merge branch 'rm/subtree-unwrap-tags'
"git subtree" (in contrib/) records the tag object name in the
commit log message when a subtree is added using a tag, without
peeling it down to the underlying commit.  The tag needs to be
peeled when "git subtree split" wants to work on the commit, but
the command forgot to do so.

* rm/subtree-unwrap-tags:
  contrib/subtree: unwrap tag refs
2016-01-22 13:08:45 -08:00
Junio C Hamano 3ee1e0fe11 Second batch for 2.8 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-20 11:54:46 -08:00
Junio C Hamano 52bae62f78 Merge branch 'tg/grep-no-index-fallback'
"git grep" by default does not fall back to its "--no-index"
behaviour outside a directory under Git's control (otherwise the
user may by mistake end up running a huge recursive search); with a
new configuration (set in $HOME/.gitconfig--by definition this
cannot be set in the config file per project), this safety can be
disabled.

* tg/grep-no-index-fallback:
  builtin/grep: add grep.fallbackToNoIndex config
  t7810: correct --no-index test
2016-01-20 11:43:39 -08:00
Junio C Hamano 569ff48deb Merge branch 'ho/gitweb-squelch-undef-warning'
Asking gitweb for a nonexistent commit left a warning in the server
log.

Somebody may want to follow this up with a new test, perhaps?
IIRC, we do test that no Perl warnings are given to the server log,
so this should have been caught if our test coverage were good.

* ho/gitweb-squelch-undef-warning:
  gitweb: squelch "uninitialized value" warning
2016-01-20 11:43:36 -08:00
Junio C Hamano 7a63c9e3da Merge branch 'js/fopen-harder'
Some codepaths used fopen(3) when opening a fixed path in $GIT_DIR
(e.g. COMMIT_EDITMSG) that is meant to be left after the command is
done.  This however did not work well if the repository is set to
be shared with core.sharedRepository and the umask of the previous
user is tighter.  They have been made to work better by calling
unlink(2) and retrying after fopen(3) fails with EPERM.

* js/fopen-harder:
  Handle more file writes correctly in shared repos
  commit: allow editing the commit message even in shared repos
2016-01-20 11:43:35 -08:00
Junio C Hamano 85705cfb57 Merge branch 'ss/clone-depth-single-doc'
Documentation for "git fetch --depth" has been updated for clarity.

* ss/clone-depth-single-doc:
  docs: clarify that --depth for git-fetch works with newly initialized repos
  docs: say "commits" in the --depth option wording for git-clone
  docs: clarify that passing --depth to git-clone implies --single-branch
2016-01-20 11:43:35 -08:00
Junio C Hamano 76b620d816 Merge branch 'nd/exclusion-regression-fix'
The ignore mechanism saw a few regressions around untracked file
listing and sparse checkout selection areas in 2.7.0; the change
that is responsible for the regression has been reverted.

* nd/exclusion-regression-fix:
  Revert "dir.c: don't exclude whole dir prematurely if neg pattern may match"
2016-01-20 11:43:33 -08:00
Junio C Hamano ceef512e79 Merge branch 'dk/reflog-walk-with-non-commit'
"git reflog" incorrectly assumed that all objects that used to be
at the tip of a ref must be commits, which caused it to segfault.

* dk/reflog-walk-with-non-commit:
  reflog-walk: don't segfault on non-commit sha1's in the reflog
2016-01-20 11:43:32 -08:00
Junio C Hamano 1576f78342 Merge branch 'sg/t6050-failing-editor-test-fix'
* sg/t6050-failing-editor-test-fix:
  t6050-replace: make failing editor test more robust
2016-01-20 11:43:31 -08:00
Junio C Hamano 108cb77c86 Merge branch 'ew/for-each-ref-doc'
* ew/for-each-ref-doc:
  for-each-ref: document `creatordate` and `creator` fields
2016-01-20 11:43:30 -08:00
Junio C Hamano d512c864c3 Merge branch 'dw/signoff-doc'
The documentation has been updated to hint the connection between
the '--signoff' option and DCO.

* dw/signoff-doc:
  Expand documentation describing --signoff
2016-01-20 11:43:29 -08:00
Junio C Hamano a736764a7b Merge branch 'jk/clang-pedantic'
A few unportable C construct have been spotted by clang compiler
and have been fixed.

* jk/clang-pedantic:
  bswap: add NO_UNALIGNED_LOADS define
  avoid shifting signed integers 31 bits
2016-01-20 11:43:29 -08:00
Junio C Hamano 63aeeba993 Merge branch 'ew/send-email-mutt-alias-fix'
"git send-email" was confused by escaped quotes stored in the alias
files saved by "mutt", which has been corrected.

* ew/send-email-mutt-alias-fix:
  git-send-email: do not double-escape quotes from mutt
2016-01-20 11:43:28 -08:00
Junio C Hamano 7e3e80a881 Merge branch 'ss/user-manual'
Drop a few old "todo" items by deciding that the change one of them
suggests is not such a good idea, and doing the change the other
one suggested to do.

* ss/user-manual:
  user-manual: add addition gitweb information
  user-manual: add section documenting shallow clones
  glossary: define the term shallow clone
  user-manual: remove temporary branch entry from todo list
2016-01-20 11:43:28 -08:00
Junio C Hamano 5135d1c3d2 Merge branch 'nd/clear-gitenv-upon-use-of-alias'
d95138e6 (setup: set env $GIT_WORK_TREE when work tree is set, like
$GIT_DIR, 2015-06-26) attempted to work around a glitch in alias
handling by overwriting GIT_WORK_TREE environment variable to
affect subprocesses when set_git_work_tree() gets called, which
resulted in a rather unpleasant regression to "clone" and "init".
Try to address the same issue by always restoring the environment
and respawning the real underlying command when handling alias.

* nd/clear-gitenv-upon-use-of-alias:
  run-command: don't warn on SIGPIPE deaths
  git.c: make sure we do not leak GIT_* to alias scripts
  setup.c: re-fix d95138e (setup: set env $GIT_WORK_TREE when ..
  git.c: make it clear save_env() is for alias handling only
2016-01-20 11:43:26 -08:00
Junio C Hamano cc14ea8cf4 Merge branch 'nd/ita-cleanup'
Paths that have been told the index about with "add -N" are not
quite yet in the index, but a few commands behaved as if they
already are in a harmful way.

* nd/ita-cleanup:
  grep: make it clear i-t-a entries are ignored
  add and use a convenience macro ce_intent_to_add()
  blame: remove obsolete comment
2016-01-20 11:43:25 -08:00
Junio C Hamano 7a450b48e7 Merge branch 'nd/dir-exclude-cleanup'
The "exclude_list" structure has the usual "alloc, nr" pair of
fields to be used by ALLOC_GROW(), but clear_exclude_list() forgot
to reset 'alloc' to 0 when it cleared 'nr'to discard the managed
array.

* nd/dir-exclude-cleanup:
  dir.c: clean the entire struct in clear_exclude_list()
2016-01-20 11:43:24 -08:00
Junio C Hamano 4fd1359158 Merge branch 'jk/pack-revindex'
In-core storage of the reverse index for .pack files (which lets
you go from a pack offset to an object name) has been streamlined.

* jk/pack-revindex:
  pack-revindex: store entries directly in packed_git
  pack-revindex: drop hash table
2016-01-20 11:43:23 -08:00
Junio C Hamano b4e8e0ed2d Merge branch 'mh/notes-allow-reading-treeish'
Some "git notes" operations, e.g. "git log --notes=<note>", should
be able to read notes from any tree-ish that is shaped like a notes
tree, but the notes infrastructure required that the argument must
be a ref under refs/notes/.  Loosen it to require a valid ref only
when the operation would update the notes (in which case we must
have a place to store the updated notes tree, iow, a ref).

* mh/notes-allow-reading-treeish:
  notes: allow treeish expressions as notes ref
2016-01-20 11:43:21 -08:00
Jeff King 1dc413ebe5 filter-branch: resolve $commit^{tree} in no-index case
Commit 348d4f2 (filter-branch: skip index read/write when
possible, 2015-11-06) taught filter-branch to optimize out
the final "git write-tree" when we know we haven't touched
the tree with any of our filters. It does by simply putting
the literal text "$commit^{tree}" into the "$tree" variable,
avoiding a useless rev-parse call.

However, when we pass this to git_commit_non_empty_tree(),
it gets confused; it resolves "$commit^{tree}" itself, and
compares our string to the 40-hex sha1, which obviously
doesn't match. As a result, "--prune-empty" (or any custom
filter using git_commit_non_empty_tree) will fail to drop
an empty commit (when filter-branch is used without a tree
or index filter).

Let's resolve $tree to the 40-hex ourselves, so that
git_commit_non_empty_tree can work. Unfortunately, this is a
bit slower due to the extra process overhead:

  $ cd t/perf && ./run 348d4f2 HEAD p7000-filter-branch.sh
  [...]
  Test                  348d4f2           HEAD
  --------------------------------------------------------------
  7000.2: noop filter   3.76(0.24+0.26)   4.54(0.28+0.24) +20.7%

We could try to make git_commit_non_empty_tree more clever.
However, the value of $tree here is technically
user-visible. The user can provide arbitrary shell code at
this stage, which could itself have a similar assumption to
what is in git_commit_non_empty_tree. So the conservative
choice to fix this regression is to take the 20% hit and
give the pre-348d4f2 behavior. We still end up much faster
than before the optimization:

  $ cd t/perf && ./run 348d4f2^ HEAD p7000-filter-branch.sh
  [...]
  Test                  348d4f2^          HEAD
  --------------------------------------------------------------
  7000.2: noop filter   9.51(4.32+0.40)   4.51(0.28+0.23) -52.6%

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-19 14:20:56 -08:00
Johannes Schindelin 17c4ddbbaf completion: add missing branch.*.rebase values
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-13 13:00:48 -08:00
Johannes Schindelin b5496d484d remote: handle the config setting branch.*.rebase=interactive
The config variable branch.<branchname>.rebase is not only used by `git
pull`, but also by `git remote` when showing details about a remote.
Therefore, it needs to be taught to accept the newly-introduced
`interactive` value of said variable.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-13 13:00:01 -08:00
Johannes Schindelin f5eb87b98d pull: allow interactive rebase with --rebase=interactive
A couple of years ago, I found the need to collaborate on topic
branches that were rebased all the time, and I really needed to see
what I was rebasing when pulling, so I introduced an
interactively-rebasing pull.

The way builtin pull works, this change also supports the value
'interactive' for the 'branch.<name>.rebase' config variable, which
is a neat thing because users can now configure given branches for
interactively-rebasing pulls without having to type out the complete
`--rebase=interactive` option every time they pull.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-13 12:59:15 -08:00
Jeff King 8c24f5b022 rebase: ignore failures from "gc --auto"
After rebasing, we call "gc --auto" to clean up if we
created a lot of loose objects. However, we do so inside an
&&-chain. If "gc --auto" fails (e.g., because a previous
background gc blocked us by leaving "gc.log" in place),
then:

  1. We will fail to clean up the state directory, leaving
     the user stuck in the rebase forever (even "git am
     --abort" doesn't work, because it calls "gc --auto"!).

  2. In some cases, we may return a bogus exit code from
     rebase, indicating failure when everything except the
     auto-gc succeeded.

We can fix this by ignoring the exit code of "gc --auto".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-13 12:04:53 -08:00
Johannes Schindelin d5621020c1 receive-pack: release pack files before garbage-collecting
Before auto-gc'ing, we need to make sure that the pack files are
released in case they need to be repacked and garbage-collected.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-13 11:36:28 -08:00
Johannes Schindelin dcacb1b2ee merge: release pack files before garbage-collecting
Before auto-gc'ing, we need to make sure that the pack files are
released in case they need to be repacked and garbage-collected.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-13 11:36:28 -08:00
Johannes Schindelin df617b529e am: release pack files before garbage-collecting
Before auto-gc'ing, we need to make sure that the pack files are
released in case they need to be repacked and garbage-collected.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-13 11:36:28 -08:00
Johannes Schindelin 0898c96281 fetch: release pack files before garbage-collecting
Before auto-gc'ing, we need to make sure that the pack files are
released in case they need to be repacked and garbage-collected.

This fixes https://github.com/git-for-windows/git/issues/500

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-13 11:36:27 -08:00
Alexander Kuleshov bc6bf2d764 format-patch: introduce format.outputDirectory configuration
We can pass -o/--output-directory to the format-patch command to store
patches in some place other than the working directory. This patch
introduces format.outputDirectory configuration option for same
purpose.

The case of usage of this configuration option can be convenience
to not pass every time -o/--output-directory if an user has pattern
to store all patches in the /patches directory for example.

The format.outputDirectory has lower priority than command line
option, so if user will set format.outputDirectory and pass the
command line option, a result will be stored in a directory that
passed to command line option.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Signed-off-by: Stephen P. Smith <ischis2@cox.net>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-13 10:55:01 -08:00
Romain Picard a02b8bc4d7 git-p4.py: add support for filetype change
After changing the type of a file in the git repository, it is not possible to
"git p4 publish" the commit to perforce. This is due to the fact that the git
"T" status is not handled in git-p4.py. This can typically occur when replacing
an existing file with a symbolic link.

The "T" modifier is now supported in git-p4.py. When a file type has changed,
inform perforce with the "p4 edit -f auto" command.

Signed-off-by: Romain Picard <romain.picard@oakbits.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-13 09:06:54 -08:00
Jeff King 2859dcd4c8 lock_ref_sha1_basic: handle REF_NODEREF with invalid refs
We sometimes call lock_ref_sha1_basic with REF_NODEREF
to operate directly on a symbolic ref. This is used, for
example, to move to a detached HEAD, or when updating
the contents of HEAD via checkout or symbolic-ref.

However, the first step of the function is to resolve the
refname to get the "old" sha1, and we do so without telling
resolve_ref_unsafe() that we are only interested in the
symref. As a result, we may detect a problem there not with
the symref itself, but with something it points to.

The real-world example I found (and what is used in the test
suite) is a HEAD pointing to a ref that cannot exist,
because it would cause a directory/file conflict with other
existing refs.  This situation is somewhat broken, of
course, as trying to _commit_ on that HEAD would fail. But
it's not explicitly forbidden, and we should be able to move
away from it. However, neither "git checkout" nor "git
symbolic-ref" can do so. We try to take the lock on HEAD,
which is pointing to a non-existent ref. We bail from
resolve_ref_unsafe() with errno set to EISDIR, and the lock
code thinks we are attempting to create a d/f conflict.

Of course we're not. The problem is that the lock code has
no idea what level we were at when we got EISDIR, so trying
to diagnose or remove empty directories for HEAD is not
useful.

To make things even more complicated, we only get EISDIR in
the loose-ref case. If the refs are packed, the resolution
may "succeed", giving us the pointed-to ref in "refname",
but a null oid. Later, we say "ah, the null oid means we are
creating; let's make sure there is room for it", but
mistakenly check against the _resolved_ refname, not the
original.

We can fix this by making two tweaks:

  1. Call resolve_ref_unsafe() with RESOLVE_REF_NO_RECURSE
     when REF_NODEREF is set. This means any errors
     we get will be from the orig_refname, and we can act
     accordingly.

     We already do this in the REF_DELETING case, but we
     should do it for update, too.

  2. If we do get a "refname" return from
     resolve_ref_unsafe(), even with RESOLVE_REF_NO_RECURSE
     it may be the name of the ref pointed-to by a symref.
     We already normalize this back to orig_refname before
     taking the lockfile, but we need to do so before the
     null_oid check.

While we're rearranging the REF_NODEREF handling, we can
also bump the initialization of lflags to the top of the
function, where we are setting up other flags. This saves us
from having yet another conditional block on REF_NODEREF
just to set it later.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-13 09:05:42 -08:00
Jeff King 6294dcb49f lock_ref_sha1_basic: always fill old_oid while holding lock
Our basic strategy for taking a ref lock is:

  1. Create $ref.lock to take the lock

  2. Read the ref again while holding the lock (during which
     time we know that nobody else can be updating it).

  3. Compare the value we read to the expected "old_sha1"

The value we read in step (2) is returned to the caller via
the lock->old_oid field, who may use it for other purposes
(such as writing a reflog).

If we have no "old_sha1" (i.e., we are unconditionally
taking the lock), then we obviously must omit step 3. But we
_also_ omit step 2. This seems like a nice optimization, but
it means that the caller sees only whatever was left in
lock->old_oid from previous calls to resolve_ref_unsafe(),
which happened outside of the lock.

We can demonstrate this race pretty easily. Imagine you have
three commits, $one, $two, and $three. One script just flips
between $one and $two, without providing an old-sha1:

  while true; do
    git update-ref -m one refs/heads/foo $one
    git update-ref -m two refs/heads/foo $two
  done

Meanwhile, another script tries to set the value to $three,
also not using an old-sha1:

  while true; do
    git update-ref -m three refs/heads/foo $three
  done

If these run simultaneously, we'll see a lot of lock
contention, but each of the writes will succeed some of the
time. The reflog may record movements between any of the
three refs, but we would expect it to provide a consistent
log: the "from" field of each log entry should be the same
as the "to" field of the previous one.

But if we check this:

  perl -alne '
    print "mismatch on line $."
            if defined $last && $F[0] ne $last;
    $last = $F[1];
  ' .git/logs/refs/heads/foo

we'll see many mismatches. Why?

Because sometimes, in the time between lock_ref_sha1_basic
filling lock->old_oid via resolve_ref_unsafe() and it taking
the lock, there may be a complete write by another process.
And the "from" field in our reflog entry will be wrong, and
will refer to an older value.

This is probably quite rare in practice. It requires writers
which do not provide an old-sha1 value, and it is a very
quick race. However, it is easy to fix: we simply perform
step (2), the read-under-lock, whether we have an old-sha1
or not. Then the value we hand back to the caller is always
atomic.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-13 09:05:30 -08:00
Junio C Hamano fc10eb5b87 Sync with maint
* maint:
  l10n: ko.po: Add Korean translation
2016-01-12 15:21:00 -08:00
Junio C Hamano c9906e47c0 First batch for post 2.7 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-12 15:20:51 -08:00
Junio C Hamano bdd1cc2092 Merge branch 'vl/grep-configurable-threads'
"git grep" can now be configured (or told from the command line)
how many threads to use when searching in the working tree files.

* vl/grep-configurable-threads:
  grep: add --threads=<num> option and grep.threads configuration
  grep: slight refactoring to the code that disables threading
  grep: allow threading even on a single-core machine
2016-01-12 15:16:55 -08:00
Junio C Hamano 72d25911eb Merge branch 'ea/blame-progress'
"git blame" learned to produce the progress eye-candy when it takes
too much time before emitting the first line of the result.

* ea/blame-progress:
  blame: add support for --[no-]progress option
2016-01-12 15:16:54 -08:00
Junio C Hamano 187c0d3d9e Merge branch 'sb/submodule-parallel-fetch'
Add a framework to spawn a group of processes in parallel, and use
it to run "git fetch --recurse-submodules" in parallel.

Rerolled and this seems to be a lot cleaner.  The merge of the
earlier one to 'next' has been reverted.

* sb/submodule-parallel-fetch:
  submodules: allow parallel fetching, add tests and documentation
  fetch_populated_submodules: use new parallel job processing
  run-command: add an asynchronous parallel child processor
  sigchain: add command to pop all common signals
  strbuf: add strbuf_read_once to read without blocking
  xread: poll on non blocking fds
  submodule.c: write "Fetching submodule <foo>" to stderr
2016-01-12 15:16:54 -08:00
Junio C Hamano 7b9d1b9556 Merge branch 'ps/push-delete-option'
"branch --delete" has "branch -d" but "push --delete" does not.

* ps/push-delete-option:
  push: add '-d' as shorthand for '--delete'
  push: add '--delete' flag to synopsis
2016-01-12 15:16:54 -08:00
Junio C Hamano ce7da1d281 Merge branch 'ep/make-phoney'
A slight update to the Makefile.

* ep/make-phoney:
  Makefile: add missing phony target
2016-01-12 15:16:53 -08:00
Junio C Hamano d82d093456 Merge branch 'nd/stop-setenv-work-tree'
An earlier change in 2.5.x-era broke users' hooks and aliases by
exporting GIT_WORK_TREE to point at the root of the working tree,
interfering when they tried to use a different working tree without
setting GIT_WORK_TREE environment themselves.

* nd/stop-setenv-work-tree:
  Revert "setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR"
2016-01-12 15:16:53 -08:00
Mike Hommey ee76f92fe8 notes: allow treeish expressions as notes ref
init_notes() is the main point of entry to the notes API. It ensures
that the input can be used as ref, because it needs a ref to update to
store notes tree after modifying it.

There however are many use cases where notes tree is only read, e.g.
"git log --notes=...".  Any notes-shaped treeish could be used for such
purpose, but it is not allowed due to existing restriction.

Allow treeish expressions to be used in the case the notes tree is going
to be used without write "permissions".  Add a flag to distinguish
whether the notes tree is intended to be used read-only, or will be
updated.

With this change, operations that use notes read-only can be fed any
notes-shaped tree-ish can be used, e.g. git log --notes=notes@{1}.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-12 15:10:01 -08:00