gitweb.git
hook: use correct logical variableKaartic Sivaraam Mon, 14 Aug 2017 08:46:46 +0000 (14:16 +0530)

hook: use correct logical variable

Sign-off added should be that of the "committer", not that of the
"commit's author"; that is how the rest of Git adds sign-off using
sequencer.c::append_signoff().

Use the correct logical variable that identifies the committer.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

hook: add a simple first exampleKaartic Sivaraam Tue, 11 Jul 2017 14:30:54 +0000 (20:00 +0530)

hook: add a simple first example

Add a simple example that replaces an outdated example
that was removed. This ensures that there's at the least
a simple example that illustrates what could be done
using the hook just by enabling it.

Also, update the documentation.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

hook: add sign-off using "interpret-trailers"Kaartic Sivaraam Tue, 11 Jul 2017 14:11:10 +0000 (19:41 +0530)

hook: add sign-off using "interpret-trailers"

The sample hook to prepare the commit message before
a commit allows users to opt-in to add the sign-off
to the commit message. The sign-off is added at a place
that isn't consistent with the "-s" option of "git commit".
Further, it could go out of view in certain cases.

Add the sign-off in a way similar to "-s" option of
"git commit" using git's interpret-trailers command.

It works well in all cases except when the user invokes
"git commit" without any arguments. In that case manually
add a new line after the first line to ensure it's consistent
with the output of "-s" option.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

hook: name the positional variablesKaartic Sivaraam Tue, 11 Jul 2017 14:11:09 +0000 (19:41 +0530)

hook: name the positional variables

It's always nice to have named variables instead of
positional variables as they communicate their purpose
well.

Appropriately name the positional variables of the hook
to make it easier to see what's going on.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

hook: cleanup scriptKaartic Sivaraam Tue, 11 Jul 2017 14:11:08 +0000 (19:41 +0530)

hook: cleanup script

Prepare the 'preare-commit-msg' sample script for
upcoming changes. Preparation includes removal of
an example that has outlived it's purpose. The example
is the one that comments the "Conflicts:" part of a
merge commit message. It isn't relevant anymore as
it's done by default since 261f315b ("merge & sequencer:
turn "Conflicts:" hint into a comment", 2014-08-28).

Further update the relevant comments from the sample script
and update the documentation.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fifteenth batch for 2.14Junio C Hamano Fri, 7 Jul 2017 01:26:13 +0000 (18:26 -0700)

Fifteenth batch for 2.14

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ab/strbuf-addftime-tzname-boolify'Junio C Hamano Fri, 7 Jul 2017 01:14:47 +0000 (18:14 -0700)

Merge branch 'ab/strbuf-addftime-tzname-boolify'

strbuf_addftime() is further getting tweaked.

* ab/strbuf-addftime-tzname-boolify:
strbuf: change an always NULL/"" strbuf_addftime() param to bool
strbuf.h comment: discuss strbuf_addftime() arguments in order

Merge branch 'xz/send-email-batch-size'Junio C Hamano Fri, 7 Jul 2017 01:14:46 +0000 (18:14 -0700)

Merge branch 'xz/send-email-batch-size'

"git send-email" learned to overcome some SMTP server limitation
that does not allow many pieces of e-mails to be sent over a single
session.

* xz/send-email-batch-size:
send-email: --batch-size to work around some SMTP server limit

Merge branch 'js/t5534-rev-parse-gives-multi-line-outpu... Junio C Hamano Fri, 7 Jul 2017 01:14:46 +0000 (18:14 -0700)

Merge branch 'js/t5534-rev-parse-gives-multi-line-output-fix'

A few tests that tried to verify the contents of push certificates
did not use 'git rev-parse' to formulate the line to look for in
the certificate correctly.

* js/t5534-rev-parse-gives-multi-line-output-fix:
t5534: fix misleading grep invocation

Merge branch 'sb/merge-recursive-code-cleanup'Junio C Hamano Fri, 7 Jul 2017 01:14:45 +0000 (18:14 -0700)

Merge branch 'sb/merge-recursive-code-cleanup'

Code clean-up.

* sb/merge-recursive-code-cleanup:
merge-recursive: use DIFF_XDL_SET macro

Merge branch 'rs/apply-avoid-over-reading'Junio C Hamano Fri, 7 Jul 2017 01:14:45 +0000 (18:14 -0700)

Merge branch 'rs/apply-avoid-over-reading'

Code clean-up to fix possible buffer over-reading.

* rs/apply-avoid-over-reading:
apply: use starts_with() in gitdiff_verify_name()

Merge branch 'ab/sha1dc-maint'Junio C Hamano Fri, 7 Jul 2017 01:14:44 +0000 (18:14 -0700)

Merge branch 'ab/sha1dc-maint'

Update the sha1dc again to fix portability glitches.

* ab/sha1dc-maint:
sha1dc: update from upstream

Merge branch 'jc/utf8-fprintf'Junio C Hamano Fri, 7 Jul 2017 01:14:44 +0000 (18:14 -0700)

Merge branch 'jc/utf8-fprintf'

Code cleanup.

* jc/utf8-fprintf:
submodule--helper: do not call utf8_fprintf() unnecessarily

Merge branch 'js/fsck-name-object'Junio C Hamano Fri, 7 Jul 2017 01:14:43 +0000 (18:14 -0700)

Merge branch 'js/fsck-name-object'

Test fix.

* js/fsck-name-object:
t1450: use egrep for regexp "alternation"

Merge branch 'aw/contrib-subtree-doc-asciidoctor'Junio C Hamano Fri, 7 Jul 2017 01:14:42 +0000 (18:14 -0700)

Merge branch 'aw/contrib-subtree-doc-asciidoctor'

The Makefile rule in contrib/subtree for building documentation
learned to honour USE_ASCIIDOCTOR just like the main documentation
set does.

* aw/contrib-subtree-doc-asciidoctor:
subtree: honour USE_ASCIIDOCTOR when set

Fourteenth batch for 2.14Junio C Hamano Wed, 5 Jul 2017 20:33:51 +0000 (13:33 -0700)

Fourteenth batch for 2.14

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jt/unify-object-info'Junio C Hamano Wed, 5 Jul 2017 20:32:57 +0000 (13:32 -0700)

Merge branch 'jt/unify-object-info'

Code clean-ups.

* jt/unify-object-info:
sha1_file: refactor has_sha1_file_with_flags
sha1_file: do not access pack if unneeded
sha1_file: teach sha1_object_info_extended more flags
sha1_file: refactor read_object
sha1_file: move delta base cache code up
sha1_file: rename LOOKUP_REPLACE_OBJECT
sha1_file: rename LOOKUP_UNKNOWN_OBJECT
sha1_file: teach packed_object_info about typename

Merge branch 'cc/shared-index-permfix'Junio C Hamano Wed, 5 Jul 2017 20:32:57 +0000 (13:32 -0700)

Merge branch 'cc/shared-index-permfix'

The split index code did not honor core.sharedrepository setting
correctly.

* cc/shared-index-permfix:
t1700: make sure split-index respects core.sharedrepository
t1301: move modebits() to test-lib-functions.sh
read-cache: use shared perms when writing shared index

Merge branch 'rs/sha1-name-readdir-optim'Junio C Hamano Wed, 5 Jul 2017 20:32:56 +0000 (13:32 -0700)

Merge branch 'rs/sha1-name-readdir-optim'

Optimize "what are the object names already taken in an alternate
object database?" query that is used to derive the length of prefix
an object name is uniquely abbreviated to.

* rs/sha1-name-readdir-optim:
sha1_file: guard against invalid loose subdirectory numbers
sha1_file: let for_each_file_in_obj_subdir() handle subdir names
p4205: add perf test script for pretty log formats
sha1_name: cache readdir(3) results in find_short_object_filename()

Merge branch 'bw/repo-object'Junio C Hamano Wed, 5 Jul 2017 20:32:55 +0000 (13:32 -0700)

Merge branch 'bw/repo-object'

Introduce a "repository" object to eventually make it easier to
work in multiple repositories (the primary focus is to work with
the superproject and its submodules) in a single process.

* bw/repo-object:
ls-files: use repository object
repository: enable initialization of submodules
submodule: convert is_submodule_initialized to work on a repository
submodule: add repo_read_gitmodules
submodule-config: store the_submodule_cache in the_repository
repository: add index_state to struct repo
config: read config from a repository object
path: add repo_worktree_path and strbuf_repo_worktree_path
path: add repo_git_path and strbuf_repo_git_path
path: worktree_git_path() should not use file relocation
path: convert do_git_path to take a 'struct repository'
path: convert strbuf_git_common_path to take a 'struct repository'
path: always pass in commondir to update_common_dir
path: create path.h
environment: store worktree in the_repository
environment: place key repository state in the_repository
repository: introduce the repository object
environment: remove namespace_len variable
setup: add comment indicating a hack
setup: don't perform lazy initialization of repository state

t5534: fix misleading grep invocationJohannes Schindelin Wed, 5 Jul 2017 11:37:49 +0000 (13:37 +0200)

t5534: fix misleading grep invocation

It seems to be a little-known feature of `grep` (and it certainly came
as a surprise to this here developer who believed to know the Unix tools
pretty well) that multiple patterns can be passed in the same
command-line argument simply by separating them by newlines. Watch, and
learn:

$ printf '1\n2\n3\n' | grep "$(printf '1\n3\n')"
1
3

That behavior also extends to patterns passed via `-e`, and it is not
modified by passing the option `-E` (but trying this with -P issues the
error "grep: the -P option only supports a single pattern").

It seems that there are more old Unix hands who are surprised by this
behavior, as grep invocations of the form

grep "$(git rev-parse A B) C" file

were introduced in a85b377d041 (push: the beginning of "git push
--signed", 2014-09-12), and later faithfully copy-edited in b9459019bbb
(push: heed user.signingkey for signed pushes, 2014-10-22).

Please note that the output of `git rev-parse A B` separates the object
IDs via *newlines*, not via spaces, and those newlines are preserved
because the interpolation is enclosed in double quotes.

As a consequence, these tests try to validate that the file contains
either A's object ID, or B's object ID followed by C, or both. Clearly,
however, what the test wanted to see is that there is a line that
contains all of them.

This is clearly unintended, and the grep invocations in question really
match too many lines.

Fix the test by avoiding the newlines in the patterns.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: --batch-size to work around some SMTP serve... xiaoqiang zhao Sun, 21 May 2017 12:59:50 +0000 (20:59 +0800)

send-email: --batch-size to work around some SMTP server limit

Some email servers (e.g. smtp.163.com) limit the number emails to be
sent per session (connection) and this will lead to a faliure when
sending many messages.

Teach send-email to disconnect after sending a number of messages
(configurable via the --batch-size=<num> option), wait for a few
seconds (configurable via the --relogin-delay=<seconds> option) and
reconnect, to work around such a limit.

Also add two configuration variables to give these options the default.

Note:

We will use this as a band-aid for now, but in the longer term, we
should look at and react to the SMTP error code from the server;
Xianqiang reports that 450 and 451 are returned by problematic
servers.

cf. https://public-inbox.org/git/7993e188.d18d.15c3560bcaf.Coremail.zxq_yx_007@163.com/

Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1dc: update from upstreamÆvar Arnfjörð Bjarmason Sat, 1 Jul 2017 22:05:45 +0000 (22:05 +0000)

sha1dc: update from upstream

Update sha1dc from the latest version by the upstream maintainer[1].

See commit 6b851e536b ("sha1dc: update from upstream", 2017-06-06) for
the last update.

This solves the Big Endian detection on Solaris reported against
v2.13.2[2], hopefully without any regressions. A version of this has
been tested on two Solaris SPARC installations, Cygwin (by jturney on
cygwin@Freenode), and on numerous more boring systems (mainly
linux/x86_64). See [3] for a discussion of the implementation and
platform-specific issues.

See commit a0103914c2 ("sha1dc: update from upstream", 2017-05-20) and
6b851e536b ("sha1dc: update from upstream", 2017-06-06) for previous
attempts in the 2.13 series to address various compile-time feature
detection in this library.

1. https://github.com/cr-marcstevens/sha1collisiondetection/commit/19d97bf5af05312267c2e874ee6bcf584d9e9681
2. <CAKKM46tHq13XiW5C8sux3=PZ1VHSu_npG8ExfWwcPD7rkZkyRQ@mail.gmail.com>
(https://public-inbox.org/git/CAKKM46tHq13XiW5C8sux3=PZ1VHSu_npG8ExfWwcPD7rkZkyRQ@mail.gmail.com/)
3. https://github.com/cr-marcstevens/sha1collisiondetection/pull/34

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

strbuf: change an always NULL/"" strbuf_addftime()... Ævar Arnfjörð Bjarmason Sat, 1 Jul 2017 13:15:47 +0000 (13:15 +0000)

strbuf: change an always NULL/"" strbuf_addftime() param to bool

strbuf_addftime() allows callers to pass a time zone name for
expanding %Z. The only current caller either passes the empty string
or NULL, in which case %Z is handed over verbatim to strftime(3).
Replace that string parameter with a flag controlling whether to
remove %Z from the format specification. This simplifies the code.

Commit-message-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

apply: use starts_with() in gitdiff_verify_name()René Scharfe Sat, 1 Jul 2017 09:10:07 +0000 (11:10 +0200)

apply: use starts_with() in gitdiff_verify_name()

Avoid running over the end of line -- a C string whose length is not
known to this function -- by using starts_with() instead of memcmp(3)
for checking if it starts with "/dev/null". Also simply include the
newline in the string constant to compare against. Drop a comment that
just states the obvious.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thirteenth batch for 2.14Junio C Hamano Fri, 30 Jun 2017 20:47:49 +0000 (13:47 -0700)

Thirteenth batch for 2.14

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'vs/typofixes'Junio C Hamano Fri, 30 Jun 2017 20:45:25 +0000 (13:45 -0700)

Merge branch 'vs/typofixes'

Many typofixes.

* vs/typofixes:
Spelling fixes

Merge branch 'rs/apply-validate-input'Junio C Hamano Fri, 30 Jun 2017 20:45:24 +0000 (13:45 -0700)

Merge branch 'rs/apply-validate-input'

Tighten error checks for invalid "git apply" input.

* rs/apply-validate-input:
apply: check git diffs for mutually exclusive header lines
apply: check git diffs for invalid file modes
apply: check git diffs for missing old filenames

Merge branch 'jc/pack-bitmap-unaligned'Junio C Hamano Fri, 30 Jun 2017 20:45:24 +0000 (13:45 -0700)

Merge branch 'jc/pack-bitmap-unaligned'

An unaligned 32-bit access in pack-bitmap code ahs been corrected.

* jc/pack-bitmap-unaligned:
pack-bitmap: don't perform unaligned memory access

Merge branch 'ah/doc-pretty-color-auto-prefix'Junio C Hamano Fri, 30 Jun 2017 20:45:23 +0000 (13:45 -0700)

Merge branch 'ah/doc-pretty-color-auto-prefix'

Doc update.

* ah/doc-pretty-color-auto-prefix:
doc: clarify syntax for %C(auto,...) in pretty formats

Merge branch 'ks/submodule-add-doc'Junio C Hamano Fri, 30 Jun 2017 20:45:22 +0000 (13:45 -0700)

Merge branch 'ks/submodule-add-doc'

Doc update.

* ks/submodule-add-doc:
Documentation/git-submodule: cleanup "add" section

Merge branch 'ks/status-initial-commit'Junio C Hamano Fri, 30 Jun 2017 20:45:22 +0000 (13:45 -0700)

Merge branch 'ks/status-initial-commit'

"git status" has long shown essentially the same message as "git
commit"; the message it gives while preparing for the root commit,
i.e. "Initial commit", was hard to understand for some new users.
Now it says "No commits yet" to stress more on the current status
(rather than the commit the user is preparing for, which is more in
line with the focus of "git commit").

* ks/status-initial-commit:
status: contextually notify user about an initial commit

Merge branch 'ab/die-errors-in-threaded'Junio C Hamano Fri, 30 Jun 2017 20:45:21 +0000 (13:45 -0700)

Merge branch 'ab/die-errors-in-threaded'

Traditionally, the default die() routine had a code to prevent it
from getting called multiple times, which interacted badly when a
threaded program used it (one downside is that the real error may
be hidden and instead the only error message given to the user may
end up being "die recursion detected", which is not very useful).

* ab/die-errors-in-threaded:
die(): stop hiding errors due to overzealous recursion guard

Merge branch 'pw/rebase-i-regression-fix-tests'Junio C Hamano Fri, 30 Jun 2017 20:45:21 +0000 (13:45 -0700)

Merge branch 'pw/rebase-i-regression-fix-tests'

Fix a recent regression to "git rebase -i" and add tests that would
have caught it and others.

* pw/rebase-i-regression-fix-tests:
t3420: fix under GETTEXT_POISON build
rebase: add more regression tests for console output
rebase: add regression tests for console output
rebase -i: add test for reflog message
sequencer: print autostash messages to stderr

merge-recursive: use DIFF_XDL_SET macroStefan Beller Thu, 29 Jun 2017 22:19:32 +0000 (15:19 -0700)

merge-recursive: use DIFF_XDL_SET macro

Instead of implementing this on our own, just use a convenience macro.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodule--helper: do not call utf8_fprintf() unnecessarilyJunio C Hamano Wed, 28 Jun 2017 20:38:48 +0000 (13:38 -0700)

submodule--helper: do not call utf8_fprintf() unnecessarily

The helper function utf8_fprintf(fp, ...) has exactly the same
effect to the output stream fp as fprintf(fp, ...) does, and the
only difference is that its return value counts in display columns
consumed (assuming that the payload is encoded in UTF-8), as opposed
to number of bytes.

There is no reason to call it unless the caller cares about its
return value.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1450: use egrep for regexp "alternation"Junio C Hamano Wed, 28 Jun 2017 17:17:04 +0000 (10:17 -0700)

t1450: use egrep for regexp "alternation"

GNU grep allows "\(A\|B\)" as alternation in BRE, but this is an
extension not understood by some other implementations of grep
(Michael Kebe reported an breakage on Solaris).

Rewrite the offending test to ERE and use egrep instead.

Noticed-by: Michael Kebe <michael.kebe@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

subtree: honour USE_ASCIIDOCTOR when setA. Wilcox Wed, 28 Jun 2017 02:49:16 +0000 (21:49 -0500)

subtree: honour USE_ASCIIDOCTOR when set

Defining USE_ASCIIDOCTOR=1 when building Git uses asciidoctor over
asciidoc when generating DocBook and man page documentation. However,
the contrib/subtree module does not presently honour that flag.

This causes a build failure when asciidoc is not present on the build
system. Instead, adapt the main Documentation/Makefile logic to use
asciidoctor when requested.

Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

apply: check git diffs for mutually exclusive header... René Scharfe Tue, 27 Jun 2017 17:03:39 +0000 (19:03 +0200)

apply: check git diffs for mutually exclusive header lines

A file can either be added, removed, copied, or renamed, but no two of
these actions can be done by the same patch. Some of these combinations
provoke error messages due to missing file names, and some are only
caught by an assertion. Check git patches already as they are parsed
and report conflicting lines on sight.

Found by Vegard Nossum using AFL.

Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

apply: check git diffs for invalid file modesRené Scharfe Tue, 27 Jun 2017 17:03:47 +0000 (19:03 +0200)

apply: check git diffs for invalid file modes

An empty string as mode specification is accepted silently by git apply,
as Vegard Nossum found out using AFL. It's interpreted as zero. Reject
such bogus file modes, and only accept ones consisting exclusively of
octal digits.

Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

apply: check git diffs for missing old filenamesRené Scharfe Tue, 27 Jun 2017 17:03:30 +0000 (19:03 +0200)

apply: check git diffs for missing old filenames

2c93286a (fix "git apply --index ..." not to deref NULL) added a check
for git patches missing a +++ line, preventing a segfault. Check for
missing --- lines as well, and add a test for each case.

Found by Vegard Nossum using AFL.

Original-patch-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Spelling fixesVille Skyttä Sun, 25 Jun 2017 10:20:41 +0000 (13:20 +0300)

Spelling fixes

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Twelfth batch for 2.14Junio C Hamano Mon, 26 Jun 2017 21:12:46 +0000 (14:12 -0700)

Twelfth batch for 2.14

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'mb/reword-autocomplete-message'Junio C Hamano Mon, 26 Jun 2017 21:09:33 +0000 (14:09 -0700)

Merge branch 'mb/reword-autocomplete-message'

Message update.

* mb/reword-autocomplete-message:
auto-correct: tweak phrasing

Merge branch 'ks/t7508-indent-fix'Junio C Hamano Mon, 26 Jun 2017 21:09:32 +0000 (14:09 -0700)

Merge branch 'ks/t7508-indent-fix'

Cosmetic update to a test.

* ks/t7508-indent-fix:
t7508: fix a broken indentation

Merge branch 'jk/add-p-commentchar-fix'Junio C Hamano Mon, 26 Jun 2017 21:09:31 +0000 (14:09 -0700)

Merge branch 'jk/add-p-commentchar-fix'

"git add -p" were updated in 2.12 timeframe to cope with custom
core.commentchar but the implementation was buggy and a
metacharacter like $ and * did not work.

* jk/add-p-commentchar-fix:
add--interactive: quote commentChar regex
add--interactive: handle EOF in prompt_yesno

Merge branch 'dt/raise-core-packed-git-limit'Junio C Hamano Mon, 26 Jun 2017 21:09:30 +0000 (14:09 -0700)

Merge branch 'dt/raise-core-packed-git-limit'

Doc update for a topic already in 'master'.

* dt/raise-core-packed-git-limit:
docs: update 64-bit core.packedGitLimit default

Merge branch 'mh/packed-ref-store-prep'Junio C Hamano Mon, 26 Jun 2017 21:09:29 +0000 (14:09 -0700)

Merge branch 'mh/packed-ref-store-prep'

Bugfix for a topic that is (only) in 'master'.

* mh/packed-ref-store-prep:
for_each_bisect_ref(): don't trim refnames
lock_packed_refs(): fix cache validity check

Merge branch 'lb/status-stash-count'Junio C Hamano Mon, 26 Jun 2017 21:09:29 +0000 (14:09 -0700)

Merge branch 'lb/status-stash-count'

"git status" learned to optionally give how many stash entries the
user has in its output.

* lb/status-stash-count:
glossary: define 'stash entry'
status: add optional stash count information
stash: update documentation to use 'stash entry'

pack-bitmap: don't perform unaligned memory accessJames Clarke Mon, 26 Jun 2017 15:16:12 +0000 (16:16 +0100)

pack-bitmap: don't perform unaligned memory access

The preceding bitmap entries have a 1-byte XOR-offset and 1-byte flags,
so their size is not a multiple of 4. Thus the name-hash cache is only
guaranteed to be 2-byte aligned and so we must use get_be32 rather than
indexing the array directly.

Signed-off-by: James Clarke <jrtc27@jrtc27.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_file: refactor has_sha1_file_with_flagsJonathan Tan Thu, 22 Jun 2017 00:40:24 +0000 (17:40 -0700)

sha1_file: refactor has_sha1_file_with_flags

has_sha1_file_with_flags() implements many mechanisms in common with
sha1_object_info_extended(). Make has_sha1_file_with_flags() a
convenience function for sha1_object_info_extended() instead.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_file: do not access pack if unneededJonathan Tan Thu, 22 Jun 2017 00:40:23 +0000 (17:40 -0700)

sha1_file: do not access pack if unneeded

Currently, regardless of the contents of the "struct object_info" passed
to sha1_object_info_extended(), that function always accesses the
packfile whenever it returns information about a packed object, since it
needs to populate "u.packed".

Add the ability to pass NULL, and use NULL-ness of the argument to
activate an optimization in which sha1_object_info_extended() does not
needlessly access the packfile. A subsequent patch will make use of this
optimization.

A similar optimization is not made for the cached and loose cases as it
would not cause a significant performance improvement.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_file: teach sha1_object_info_extended more flagsJonathan Tan Thu, 22 Jun 2017 00:40:22 +0000 (17:40 -0700)

sha1_file: teach sha1_object_info_extended more flags

Improve sha1_object_info_extended() by supporting additional
flags. This allows has_sha1_file_with_flags() to be modified to use
sha1_object_info_extended() in a subsequent patch.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1700: make sure split-index respects core.sharedrepositoryChristian Couder Sun, 25 Jun 2017 04:34:29 +0000 (06:34 +0200)

t1700: make sure split-index respects core.sharedrepository

Add a few tests to check that both the split-index file and the
shared-index file are created using the right permissions when
core.sharedrepository is set.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1301: move modebits() to test-lib-functions.shChristian Couder Sun, 25 Jun 2017 04:34:28 +0000 (06:34 +0200)

t1301: move modebits() to test-lib-functions.sh

As the modebits() function can be useful outside t1301,
let's move it into test-lib-functions.sh, and while at
it let's rename it test_modebits().

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read-cache: use shared perms when writing shared indexChristian Couder Sun, 25 Jun 2017 04:34:27 +0000 (06:34 +0200)

read-cache: use shared perms when writing shared index

Since f6ecc62dbf (write_shared_index(): use tempfile module, 2015-08-10)
write_shared_index() has been using mks_tempfile() to create the
temporary file that will become the shared index.

But even before that, it looks like the functions used to create this
file didn't call adjust_shared_perm(), which means that the shared
index file has always been created with 600 permissions regardless
of the shared permission settings.

Because of that, on repositories created with `git init --shared=all`
and using the split index feature, one gets an error like:

fatal: .git/sharedindex.a52f910b489bc462f187ab572ba0086f7b5157de: index file open failed: Permission denied

when another user performs any operation that reads the shared index.

Call adjust_shared_perm() on the temporary file created by
mks_tempfile() ourselves to adjust the permission bits.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 2.13.2Junio C Hamano Sat, 24 Jun 2017 22:34:14 +0000 (15:34 -0700)

Sync with 2.13.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 2.13.2 v2.13.2Junio C Hamano Sat, 24 Jun 2017 22:31:36 +0000 (15:31 -0700)

Git 2.13.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'sn/reset-doc-typofix' into maintJunio C Hamano Sat, 24 Jun 2017 22:29:35 +0000 (15:29 -0700)

Merge branch 'sn/reset-doc-typofix' into maint

Doc update.

* sn/reset-doc-typofix:
doc: git-reset: fix a trivial typo

Merge branch 'sg/doc-pretty-formats' into maintJunio C Hamano Sat, 24 Jun 2017 22:29:35 +0000 (15:29 -0700)

Merge branch 'sg/doc-pretty-formats' into maint

Doc update.

* sg/doc-pretty-formats:
docs/pretty-formats: stress that %- removes all preceding line-feeds

Merge branch 'sd/t3200-branch-m-test' into maintJunio C Hamano Sat, 24 Jun 2017 22:29:34 +0000 (15:29 -0700)

Merge branch 'sd/t3200-branch-m-test' into maint

New test.

* sd/t3200-branch-m-test:
t3200: add test for single parameter passed to -m option

Merge branch 'sg/revision-parser-skip-prefix' into... Junio C Hamano Sat, 24 Jun 2017 22:29:34 +0000 (15:29 -0700)

Merge branch 'sg/revision-parser-skip-prefix' into maint

Code clean-up.

* sg/revision-parser-skip-prefix:
revision.c: use skip_prefix() in handle_revision_pseudo_opt()
revision.c: use skip_prefix() in handle_revision_opt()
revision.c: stricter parsing of '--early-output'
revision.c: stricter parsing of '--no-{min,max}-parents'
revision.h: turn rev_info.early_output back into an unsigned int

Merge branch 'km/test-mailinfo-b-failure' into maintJunio C Hamano Sat, 24 Jun 2017 22:29:33 +0000 (15:29 -0700)

Merge branch 'km/test-mailinfo-b-failure' into maint

New tests.

* km/test-mailinfo-b-failure:
t5100: add some more mailinfo tests

Merge branch 'sb/submodule-rm-absorb' into maintJunio C Hamano Sat, 24 Jun 2017 22:29:32 +0000 (15:29 -0700)

Merge branch 'sb/submodule-rm-absorb' into maint

Doc update to a recently graduated topic.

* sb/submodule-rm-absorb:
Documentation/git-rm: correct submodule description

Merge branch 'jc/diff-tree-stale-comment' into maintJunio C Hamano Sat, 24 Jun 2017 22:29:31 +0000 (15:29 -0700)

Merge branch 'jc/diff-tree-stale-comment' into maint

Comment fix.

* jc/diff-tree-stale-comment:
diff-tree: update stale in-code comments

Merge branch 'ps/stash-push-pathspec-fix' into maintJunio C Hamano Sat, 24 Jun 2017 22:29:30 +0000 (15:29 -0700)

Merge branch 'ps/stash-push-pathspec-fix' into maint

"git stash push <pathspec>" did not work from a subdirectory at all.
Bugfix for a topic in v2.13

* ps/stash-push-pathspec-fix:
git-stash: fix pushing stash with pathspec from subdir

Merge branch 'ls/github' into maintJunio C Hamano Sat, 24 Jun 2017 22:29:29 +0000 (15:29 -0700)

Merge branch 'ls/github' into maint

Help contributors that visit us at GitHub.

* ls/github:
Configure Git contribution guidelines for github.com

Merge branch 'jk/pack-idx-corruption-safety' into maintJunio C Hamano Sat, 24 Jun 2017 22:29:29 +0000 (15:29 -0700)

Merge branch 'jk/pack-idx-corruption-safety' into maint

A flaky test has been corrected.

* jk/pack-idx-corruption-safety:
t5313: make extended-table test more deterministic

Merge branch 'jk/diff-blob' into maintJunio C Hamano Sat, 24 Jun 2017 22:29:28 +0000 (15:29 -0700)

Merge branch 'jk/diff-blob' into maint

The result from "git diff" that compares two blobs, e.g. "git diff
$commit1:$path $commit2:$path", used to be shown with the full
object name as given on the command line, but it is more natural to
use the $path in the output and use it to look up .gitattributes.

* jk/diff-blob:
diff: use blob path for blob/file diffs
diff: use pending "path" if it is available
diff: use the word "path" instead of "name" for blobs
diff: pass whole pending entry in blobinfo
handle_revision_arg: record paths for pending objects
handle_revision_arg: record modes for "a..b" endpoints
t4063: add tests of direct blob diffs
get_sha1_with_context: dynamically allocate oc->path
get_sha1_with_context: always initialize oc->symlink_path
sha1_name: consistently refer to object_context as "oc"
handle_revision_arg: add handle_dotdot() helper
handle_revision_arg: hoist ".." check out of range parsing
handle_revision_arg: stop using "dotdot" as a generic pointer
handle_revision_arg: simplify commit reference lookups
handle_revision_arg: reset "dotdot" consistently

Merge branch 'jc/name-rev-lw-tag' into maintJunio C Hamano Sat, 24 Jun 2017 22:29:27 +0000 (15:29 -0700)

Merge branch 'jc/name-rev-lw-tag' into maint

"git describe --contains" penalized light-weight tags so much that
they were almost never considered. Instead, give them about the
same chance to be considered as an annotated tag that is the same
age as the underlying commit would.

* jc/name-rev-lw-tag:
name-rev: favor describing with tags and use committer date to tiebreak
name-rev: refactor logic to see if a new candidate is a better name

Eleventh batch for 2.14Junio C Hamano Sat, 24 Jun 2017 21:34:11 +0000 (14:34 -0700)

Eleventh batch for 2.14

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ab/free-and-null'Junio C Hamano Sat, 24 Jun 2017 21:28:41 +0000 (14:28 -0700)

Merge branch 'ab/free-and-null'

A common pattern to free a piece of memory and assign NULL to the
pointer that used to point at it has been replaced with a new
FREE_AND_NULL() macro.

* ab/free-and-null:
*.[ch] refactoring: make use of the FREE_AND_NULL() macro
coccinelle: make use of the "expression" FREE_AND_NULL() rule
coccinelle: add a rule to make "expression" code use FREE_AND_NULL()
coccinelle: make use of the "type" FREE_AND_NULL() rule
coccinelle: add a rule to make "type" code use FREE_AND_NULL()
git-compat-util: add a FREE_AND_NULL() wrapper around free(ptr); ptr = NULL

Merge branch 'jk/warn-add-gitlink'Junio C Hamano Sat, 24 Jun 2017 21:28:41 +0000 (14:28 -0700)

Merge branch 'jk/warn-add-gitlink'

Using "git add d/i/r" when d/i/r is the top of the working tree of
a separate repository would create a gitlink in the index, which
would appear as a not-quite-initialized submodule to others. We
learned to give warnings when this happens.

* jk/warn-add-gitlink:
t: move "git add submodule" into test blocks
add: warn when adding an embedded repository

Merge branch 'bw/config-h'Junio C Hamano Sat, 24 Jun 2017 21:28:40 +0000 (14:28 -0700)

Merge branch 'bw/config-h'

Fix configuration codepath to pay proper attention to commondir
that is used in multi-worktree situation, and isolate config API
into its own header file.

* bw/config-h:
config: don't implicitly use gitdir or commondir
config: respect commondir
setup: teach discover_git_directory to respect the commondir
config: don't include config.h by default
config: remove git_config_iter
config: create config.h

Merge branch 'bw/ls-files-sans-the-index'Junio C Hamano Sat, 24 Jun 2017 21:28:40 +0000 (14:28 -0700)

Merge branch 'bw/ls-files-sans-the-index'

Code clean-up.

* bw/ls-files-sans-the-index:
ls-files: factor out tag calculation
ls-files: factor out debug info into a function
ls-files: convert show_files to take an index
ls-files: convert show_ce_entry to take an index
ls-files: convert prune_cache to take an index
ls-files: convert ce_excluded to take an index
ls-files: convert show_ru_info to take an index
ls-files: convert show_other_files to take an index
ls-files: convert show_killed_files to take an index
ls-files: convert write_eolinfo to take an index
ls-files: convert overlay_tree_on_cache to take an index
tree: convert read_tree to take an index parameter
convert: convert renormalize_buffer to take an index
convert: convert convert_to_git to take an index
convert: convert convert_to_git_filter_fd to take an index
convert: convert crlf_to_git to take an index
convert: convert get_cached_convert_stats_ascii to take an index

Merge branch 'js/alias-early-config'Junio C Hamano Sat, 24 Jun 2017 21:28:39 +0000 (14:28 -0700)

Merge branch 'js/alias-early-config'

The code to pick up and execute command alias definition from the
configuration used to switch to the top of the working tree and
then come back when the expanded alias was executed, which was
unnecessarilyl complex. Attempt to simplify the logic by using the
early-config mechanism that does not chdir around.

* js/alias-early-config:
alias: use the early config machinery to expand aliases
t7006: demonstrate a problem with aliases in subdirectories
t1308: relax the test verifying that empty alias values are disallowed
help: use early config when autocorrecting aliases
config: report correct line number upon error
discover_git_directory(): avoid setting invalid git_dir

Merge branch 'sn/reset-doc-typofix'Junio C Hamano Sat, 24 Jun 2017 21:28:39 +0000 (14:28 -0700)

Merge branch 'sn/reset-doc-typofix'

Doc update.

* sn/reset-doc-typofix:
doc: git-reset: fix a trivial typo

Merge branch 'sg/doc-pretty-formats'Junio C Hamano Sat, 24 Jun 2017 21:28:39 +0000 (14:28 -0700)

Merge branch 'sg/doc-pretty-formats'

Doc update.

* sg/doc-pretty-formats:
docs/pretty-formats: stress that %- removes all preceding line-feeds

Merge branch 'rs/pretty-add-again'Junio C Hamano Sat, 24 Jun 2017 21:28:38 +0000 (14:28 -0700)

Merge branch 'rs/pretty-add-again'

The pretty-format specifiers like '%h', '%t', etc. had an
optimization that no longer works correctly. In preparation/hope
of getting it correctly implemented, first discard the optimization
that is broken.

* rs/pretty-add-again:
pretty: recalculate duplicate short hashes

Merge branch 'jk/diff-highlight-module'Junio C Hamano Sat, 24 Jun 2017 21:28:37 +0000 (14:28 -0700)

Merge branch 'jk/diff-highlight-module'

The 'diff-highlight' program (in contrib/) has been restructured
for easier reuse by an external project 'diff-so-fancy'.

* jk/diff-highlight-module:
diff-highlight: split code into module

Merge branch 'ah/doc-gitattributes-empty-index'Junio C Hamano Sat, 24 Jun 2017 21:28:37 +0000 (14:28 -0700)

Merge branch 'ah/doc-gitattributes-empty-index'

An example in documentation that does not work in multi worktree
configuration has been corrected.

* ah/doc-gitattributes-empty-index:
doc: do not use `rm .git/index` when normalizing line endings

Merge branch 'ab/wildmatch-glob-slash-test'Junio C Hamano Sat, 24 Jun 2017 21:28:37 +0000 (14:28 -0700)

Merge branch 'ab/wildmatch-glob-slash-test'

A new test to show the interaction between the pattern [^a-z]
(which matches '/') and a slash in a path has been added. The
pattern should not match the slash with "pathmatch", but should
with "wildmatch".

* ab/wildmatch-glob-slash-test:
wildmatch test: cover a blind spot in "/" matching

Merge branch 'ab/pcre-v2'Junio C Hamano Sat, 24 Jun 2017 21:28:36 +0000 (14:28 -0700)

Merge branch 'ab/pcre-v2'

Hotfix for a topic already in 'master'.

* ab/pcre-v2:
grep: fix erroneously copy/pasted variable in check/assert pattern

Merge branch 'da/mergetools-meld-output-opt-on-macos'Junio C Hamano Sat, 24 Jun 2017 21:28:36 +0000 (14:28 -0700)

Merge branch 'da/mergetools-meld-output-opt-on-macos'

"git mergetool" learned to work around a wrapper MacOS X adds
around underlying meld.

* da/mergetools-meld-output-opt-on-macos:
mergetools/meld: improve compatibiilty with Meld on macOS X

Merge branch 'nd/split-index-unshare'Junio C Hamano Sat, 24 Jun 2017 19:04:25 +0000 (12:04 -0700)

Merge branch 'nd/split-index-unshare'

* nd/split-index-unshare:
Revert "split-index: add and use unshare_split_index()"

Revert "split-index: add and use unshare_split_index()"Junio C Hamano Sat, 24 Jun 2017 19:02:39 +0000 (12:02 -0700)

Revert "split-index: add and use unshare_split_index()"

This reverts commit f9d7abec2ad2f9eb3d8873169cc28c34273df082;
see public-inbox.org/git/CAP8UFD0bOfzY-_hBDKddOcJdPUpP2KEVaX_SrCgvAMYAHtseiQ@mail.gmail.com

doc: clarify syntax for %C(auto,...) in pretty formatsAndreas Heiduk Sat, 24 Jun 2017 07:22:58 +0000 (09:22 +0200)

doc: clarify syntax for %C(auto,...) in pretty formats

The manual correctly describes the syntax with `auto,` but the
trailing `,` is hard to spot in a terminal. The HTML format does not
have this problem. Adding an example helps both worlds.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

strbuf.h comment: discuss strbuf_addftime() arguments... Ævar Arnfjörð Bjarmason Sat, 24 Jun 2017 12:14:51 +0000 (12:14 +0000)

strbuf.h comment: discuss strbuf_addftime() arguments in order

Change the comment documenting the strbuf_addftime() function to
discuss the parameters in the order in which they appear, which makes
this easier to read than discussing them out of order.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_file: guard against invalid loose subdirectory... René Scharfe Sat, 24 Jun 2017 14:09:39 +0000 (16:09 +0200)

sha1_file: guard against invalid loose subdirectory numbers

Loose object subdirectories have hexadecimal names based on the first
byte of the hash of contained objects, thus their numerical
representation can range from 0 (0x00) to 255 (0xff). Change the type
of the corresponding variable in for_each_file_in_obj_subdir() and
associated callback functions to unsigned int and add a range check.

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>

sha1_file: let for_each_file_in_obj_subdir() handle... René Scharfe Sat, 24 Jun 2017 12:12:30 +0000 (14:12 +0200)

sha1_file: let for_each_file_in_obj_subdir() handle subdir names

The function for_each_file_in_obj_subdir() takes a object subdirectory
number and expects the name of the same subdirectory to be included in
the path strbuf. Avoid this redundancy by letting the function append
the hexadecimal subdirectory name itself. This makes it a bit easier
and safer to use the function -- it becomes impossible to specify
different subdirectories in subdir_nr and path.

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>

p4205: add perf test script for pretty log formatsRené Scharfe Sat, 24 Jun 2017 12:12:07 +0000 (14:12 +0200)

p4205: add perf test script for pretty log formats

Add simple performance tests for expanded log format placeholders.

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>

ls-files: use repository objectBrandon Williams Thu, 22 Jun 2017 18:43:48 +0000 (11:43 -0700)

ls-files: use repository object

Convert ls-files to use a repository struct and recurse submodules
inprocess.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

repository: enable initialization of submodulesBrandon Williams Thu, 22 Jun 2017 18:43:47 +0000 (11:43 -0700)

repository: enable initialization of submodules

Introduce 'repo_submodule_init()' which performs initialization of a
'struct repository' as a submodule of another 'struct repository'.

The resulting submodule 'struct repository' can be in one of three states:

1. The submodule is initialized and has a worktree.

2. The submodule is initialized but does not have a worktree. This
would occur when the submodule's gitdir is present in the
superproject's 'gitdir/modules/' directory yet the submodule has not
been checked out in superproject's worktree.

3. The submodule remains uninitialized due to an error in the
initialization process or there is no matching submodule at the
provided path in the superproject.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodule: convert is_submodule_initialized to work... Brandon Williams Thu, 22 Jun 2017 18:43:46 +0000 (11:43 -0700)

submodule: convert is_submodule_initialized to work on a repository

Convert 'is_submodule_initialized()' to take a repository object and
while we're at it, lets rename the function to 'is_submodule_active()'
and remove the NEEDSWORK comment.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodule: add repo_read_gitmodulesBrandon Williams Thu, 22 Jun 2017 18:43:45 +0000 (11:43 -0700)

submodule: add repo_read_gitmodules

Teach the repo object to be able to populate the submodule_cache by
reading the repository's gitmodules file.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodule-config: store the_submodule_cache in the_repo... Brandon Williams Thu, 22 Jun 2017 18:43:44 +0000 (11:43 -0700)

submodule-config: store the_submodule_cache in the_repository

Refactor how 'the_submodule_cache' is handled so that it can be stored
inside of a repository object. Also migrate 'the_submodule_cache' to be
stored in 'the_repository'.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

repository: add index_state to struct repoBrandon Williams Thu, 22 Jun 2017 18:43:43 +0000 (11:43 -0700)

repository: add index_state to struct repo

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config: read config from a repository objectBrandon Williams Thu, 22 Jun 2017 18:43:42 +0000 (11:43 -0700)

config: read config from a repository object

Teach the config machinery to read config information from a repository
object. This involves storing a 'struct config_set' inside the
repository object and adding a number of functions (repo_config*) to be
able to query a repository's config.

The current config API enables lazy-loading of the config. This means
that when 'git_config_get_int()' is called, if the_config_set hasn't
been populated yet, then it will be populated and properly initialized by
reading the necessary config files (system wide .gitconfig, user's home
.gitconfig, and the repository's config). To maintain this paradigm,
the new API to read from a repository object's config will also perform
this lazy-initialization.

Since both APIs (git_config_get* and repo_config_get*) have the same
semantics we can migrate the default config to be stored within
'the_repository' and just have the 'git_config_get*' family of functions
redirect to the 'repo_config_get*' functions.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

path: add repo_worktree_path and strbuf_repo_worktree_pathBrandon Williams Thu, 22 Jun 2017 18:43:41 +0000 (11:43 -0700)

path: add repo_worktree_path and strbuf_repo_worktree_path

Introduce 'repo_worktree_path' and 'strbuf_repo_worktree_path' which
take a repository struct and constructs a path relative to the
repository's worktree.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

path: add repo_git_path and strbuf_repo_git_pathBrandon Williams Thu, 22 Jun 2017 18:43:40 +0000 (11:43 -0700)

path: add repo_git_path and strbuf_repo_git_path

Introduce 'repo_git_path' and 'strbuf_repo_git_path' which take a
repository struct and constructs a path into the repository's git
directory.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>