gitweb.git
t3200: verify "branch --list" sanity when rebasing... Eric Sunshine Tue, 3 Apr 2018 14:47:15 +0000 (20:17 +0530)

t3200: verify "branch --list" sanity when rebasing from detached HEAD

"git branch --list" shows an in-progress rebase as:

* (no branch, rebasing <branch>)
master
...

However, if the rebase is started from a detached HEAD, then there is no
<branch>, and it would attempt to print a NULL pointer. The previous
commit fixed this problem, so add a test to verify that the output is
sane in this situation.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch --list: print useful info whilst interactive... Kaartic Sivaraam Tue, 3 Apr 2018 04:31:00 +0000 (10:01 +0530)

branch --list: print useful info whilst interactive rebasing a detached HEAD

When rebasing interactively (rebase -i), "git branch --list" prints
a line indicating the current branch being rebased. This works well
when the interactive rebase is initiated when a local branch is
checked out.

This doesn't play well when the rebase is initiated on a detached
HEAD. When "git branch --list" tries to print information related
to the interactive rebase in this case it tries to print the name
of a branch using an uninitialized variable and thus tries to
print a "null pointer string". As a consequence, it does not provide
useful information while also inducing undefined behaviour.

So, print the point from which the rebase was started when interactive
rebasing a detached HEAD.

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

git-svn: search --authors-prog in PATH tooAndreas Heiduk Sun, 4 Mar 2018 11:22:36 +0000 (12:22 +0100)

git-svn: search --authors-prog in PATH too

In 36db1eddf9 ("git-svn: add --authors-prog option", 2009-05-14) the path
to authors-prog was made absolute because git-svn changes the current
directory in some situations. This makes sense if the program is part of
the repository but prevents searching via $PATH.

The old behaviour is still retained, but if the file does not exists, then
authors-prog is searched for in $PATH as any other command.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Eric Wong <e@80x24.org>

Git 2.17 v2.17.0Junio C Hamano Mon, 2 Apr 2018 17:13:35 +0000 (10:13 -0700)

Git 2.17

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

Merge tag 'l10n-2.17.0-rnd1' of git://github.com/git... Junio C Hamano Mon, 2 Apr 2018 17:12:38 +0000 (10:12 -0700)

Merge tag 'l10n-2.17.0-rnd1' of git://github.com/git-l10n/git-po

l10n for Git 2.17.0 round 1

* tag 'l10n-2.17.0-rnd1' of git://github.com/git-l10n/git-po:
l10n: de.po: translate 132 new messages
l10n: zh_CN: review for git v2.17.0 l10n round 1
l10n: zh_CN: for git v2.17.0 l10n round 1
l10n: ko.po: Update Korean translation
l10n: fr.po: v2.17.0 no fuzzy
l10n: sv.po: Update Swedish translation (3376t0f0u)
l10n: Update Catalan translation
l10n: fr.po v2.17.0 round 1
l10n: vi.po(3376t): Updated Vietnamese translation for v2.17
l10n: bg.po: Updated Bulgarian translation (3376t)
l10n: es.po: Update Spanish translation 2.17.0
l10n: git.pot: v2.17.0 round 1 (132 new, 44 removed)
l10n: es.po: fixes to Spanish translation

Merge branch 'pw/add-p-single'Junio C Hamano Mon, 2 Apr 2018 17:10:54 +0000 (10:10 -0700)

Merge branch 'pw/add-p-single'

Hotfix.

* pw/add-p-single:
add -p: fix 2.17.0-rc* regression due to moved code

add -p: fix 2.17.0-rc* regression due to moved codeÆvar Arnfjörð Bjarmason Sat, 31 Mar 2018 12:50:58 +0000 (12:50 +0000)

add -p: fix 2.17.0-rc* regression due to moved code

Fix a regression in 88f6ffc1c2 ("add -p: only bind search key if
there's more than one hunk", 2018-02-13) which is present in
2.17.0-rc*, but not 2.16.0.

In Perl, regex variables like $1 always refer to the last regex
match. When the aforementioned change added a new regex match between
the old match and the corresponding code that was expecting $1, the $1
variable would always be undef, since the newly inserted regex match
doesn't have any captures.

As a result the "/" feature to search for a string in a hunk by regex
completely broke, on git.git:

$ perl -pi -e 's/Git/Tig/g' README.md
$ ./git --exec-path=$PWD add -p
[..]
Stage this hunk [y,n,q,a,d,j,J,g,/,s,e,?]? s
Split into 4 hunks.
[...]
Stage this hunk [y,n,q,a,d,j,J,g,/,s,e,?]? /Many
Use of uninitialized value $1 in string eq at /home/avar/g/git/git-add--interactive line 1568, <STDIN> line 1.
search for regex? Many

I.e. the initial "/regex" command wouldn't work, and would always emit
a warning and ask again for a regex, now it works as intended again.

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

l10n: de.po: translate 132 new messagesRalf Thielow Fri, 16 Mar 2018 17:41:16 +0000 (18:41 +0100)

l10n: de.po: translate 132 new messages

Translate 132 new messages came from git.pot update in abc8de64d (l10n:
git.pot: v2.17.0 round 1 (132 new, 44 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>

config: move flockfile() closer to unlocked functionsJeff King Fri, 30 Mar 2018 19:26:15 +0000 (15:26 -0400)

config: move flockfile() closer to unlocked functions

Commit 260d408e32 (config: use getc_unlocked when reading
from file, 2015-04-16) taught git_config_from_file() to lock
the filehandle so that we could safely use the faster
unlocked functions to access the handle.

However, it split the logic into two places:

1. The master lock/unlock happens in git_config_from_file().

2. The decision to use the unlocked functions happens in
do_config_from_file().

That means that if anybody calls the latter function, they
will accidentally use the unlocked functions without holding
the lock. And indeed, git_config_from_stdin() does so.

In practice, this hasn't been a problem since this code
isn't generally multi-threaded (and even if some Git program
happened to have another thread running, it's unlikely to be
reading from stdin). But it's a good practice to make sure
we're always holding the lock before using the unlocked
functions.

Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs: use chdir_notify to update cached relative pathsJeff King Fri, 30 Mar 2018 18:35:12 +0000 (14:35 -0400)

refs: use chdir_notify to update cached relative paths

Commit f57f37e2e1 (files-backend: remove the use of
git_path(), 2017-03-26) introduced a regression when a
relative $GIT_DIR is used in a working tree:

- when we initialize the ref backend, we make a copy of
get_git_dir(), which may be relative

- later, we may call setup_work_tree() and chdir to the
root of the working tree

- further calls to the ref code will use the stored git
directory, but relative paths will now point to the
wrong place

The new test in t1501 demonstrates one such instance (the
bug causes us to write the ref update to the nonsense
"relative/relative/.git").

Since setup_work_tree() now uses chdir_notify, we can just
ask it update our relative paths when necessary.

Reported-by: Rafael Ascensao <rafa.almas@gmail.com>
Helped-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

set_work_tree: use chdir_notifyJeff King Fri, 30 Mar 2018 18:35:08 +0000 (14:35 -0400)

set_work_tree: use chdir_notify

When we change to the top of the working tree, we manually
re-adjust $GIT_DIR and call set_git_dir() again, in order to
update any relative git-dir we'd compute earlier.

Instead of the work-tree code having to know to call the
git-dir code, let's use the new chdir_notify interface.
There are two spots that need updating, with a few
subtleties in each:

1. the set_git_dir() code needs to chdir_notify_register()
so it can be told when to update its path.

Technically we could push this down into repo_set_gitdir(),
so that even repository structs besides the_repository
could benefit from this. But that opens up a lot of
complications:

- we'd still need to touch set_git_dir(), because it
does some other setup (like setting $GIT_DIR in the
environment)

- submodules using other repository structs get
cleaned up, which means we'd need to remove them
from the chdir_notify list

- it's unlikely to fix any bugs, since we shouldn't
generally chdir() in the middle of working on a
submodule

2. setup_work_tree now needs to call chdir_notify(), and
can lose its manual set_git_dir() call.

Note that at first glance it looks like this undoes the
absolute-to-relative optimization added by 044bbbcb63
(Make git_dir a path relative to work_tree in
setup_work_tree(), 2008-06-19). But for the most part
that optimization was just _undoing_ the
relative-to-absolute conversion which the function was
doing earlier (and which is now gone).

It is true that if you already have an absolute git_dir
that the setup_work_tree() function will no longer make
it relative as a side effect. But:

- we generally do have relative git-dir's due to the
way the discovery code works

- if we really care about making git-dir's relative
when possible, then we should be relativizing them
earlier (e.g., when we see an absolute $GIT_DIR we
could turn it relative, whether we are going to
chdir into a worktree or not). That would cover all
cases, including ones that 044bbbcb63 did not.

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

add chdir-notify APIJeff King Fri, 30 Mar 2018 18:35:04 +0000 (14:35 -0400)

add chdir-notify API

If one part of the code does a permanent chdir(), then this
invalidates any relative paths that may be held by other
parts of the code. For example, setup_work_tree() moves us
to the top of the working tree, which may invalidate a
previously stored relative gitdir.

We've hacked around this case by teaching setup_work_tree()
to re-run set_git_dir() with an adjusted path, but this
stomps all over the idea of module boundaries.
setup_work_tree() shouldn't have to know all of the places
that need to be fed an adjusted path. And indeed, there's at
least one other place (the refs code) which needs adjusting.

Let's provide an API to let code that stores relative paths
"subscribe" to updates to the current working directory.
This means that callers of chdir() don't need to know about
all subscribers ahead of time; they can simply consult a
dynamically built list.

Note that our helper function to reparent relative paths
uses the simple remove_leading_path(). We could in theory
use the much smarter relative_path(), but that led to some
problems as described in 41894ae3a3 (Use simpler
relative_path when set_git_dir, 2013-10-14). Since we're
aiming to replace the setup_work_tree() code here, let's
follow its lead.

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

trace.c: export trace_setup_keyNguyễn Thái Ngọc Duy Fri, 30 Mar 2018 18:34:59 +0000 (14:34 -0400)

trace.c: export trace_setup_key

This is so that we can print traces based on this key outside trace.c.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

set_git_dir: die when setenv() failsJeff King Fri, 30 Mar 2018 18:34:46 +0000 (14:34 -0400)

set_git_dir: die when setenv() fails

The set_git_dir() function returns an error if setenv()
fails, but there are zero callers who pay attention to this
return value. If this ever were to happen, it could cause
confusing results, as sub-processes would see a potentially
stale GIT_DIR (e.g., if it is relative and we chdir()-ed to
the root of the working tree).

We _could_ try to fix each caller, but there's really
nothing useful to do after this failure except die. Let's
just lump setenv() failure into the same category as malloc
failure: things that should never happen and cause us to
abort catastrophically.

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

Merge branch 'jh/partial-clone'Junio C Hamano Thu, 29 Mar 2018 22:39:59 +0000 (15:39 -0700)

Merge branch 'jh/partial-clone'

Hotfix.

* jh/partial-clone:
upload-pack: disable object filtering when disabled by config
unpack-trees: release oid_array after use in check_updates()

upload-pack: disable object filtering when disabled... Jonathan Nieder Wed, 28 Mar 2018 20:33:03 +0000 (13:33 -0700)

upload-pack: disable object filtering when disabled by config

When upload-pack gained partial clone support (v2.17.0-rc0~132^2~12,
2017-12-08), it was guarded by the uploadpack.allowFilter config item
to allow server operators to control when they start supporting it.

That config item didn't go far enough, though: it controls whether the
'filter' capability is advertised, but if a (custom) client ignores
the capability advertisement and passes a filter specification anyway,
the server would handle that despite allowFilter being false.

This is particularly significant if a security bug is discovered in
this new experimental partial clone code. Installations without
uploadpack.allowFilter ought not to be affected since they don't
intend to support partial clone, but they would be swept up into being
vulnerable.

Simplify and limit the attack surface by making uploadpack.allowFilter
disable the feature, not just the advertisement of it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

credential: ignore SIGPIPE when writing to credential... Erik E Brady Thu, 29 Mar 2018 18:00:56 +0000 (11:00 -0700)

credential: ignore SIGPIPE when writing to credential helpers

The credential subsystem can trigger SIGPIPE when writing to an
external helper if that helper closes its stdin before reading the
whole input. Normally this is rare, since helpers would need to read
that input to make a decision about how to respond, but:

1. It's reasonable to configure a helper which only handles "get"
while ignoring "store". Such a handler might not read stdin
for "store", thereby rapidly closing stdin upon helper exit.

2. A broken or misbehaving helper might exit immediately. That's an
error, but it's not reasonable for it to take down the parent Git
process with SIGPIPE.

Even with such a helper, seeing this problem should be rare. Getting
SIGPIPE requires the helper racily exiting before we've written the
fairly small credential output.

Signed-off-by: Erik E Brady <brady@cisco.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http: allow use of TLS 1.3Loganaden Velvindron Thu, 29 Mar 2018 10:14:18 +0000 (14:14 +0400)

http: allow use of TLS 1.3

Add a tlsv1.3 option to http.sslVersion in addition to the existing
tlsv1.[012] options. libcurl has supported this since 7.52.0.

This requires OpenSSL 1.1.1 with TLS 1.3 enabled or curl built with
recent versions of NSS or BoringSSL as the TLS backend.

Signed-off-by: Loganaden Velvindron <logan@hackers.mu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase --keep-empty: always use interactive rebasePhillip Wood Tue, 20 Mar 2018 11:10:57 +0000 (11:10 +0000)

rebase --keep-empty: always use interactive rebase

rebase --merge accepts --keep-empty but just ignores it, by using an
implicit interactive rebase the user still gets the rename detection
of a merge based rebase but with with --keep-empty support.

If rebase --keep-empty without --interactive or --merge stops for the
user to resolve merge conflicts then 'git rebase --continue' will
fail. This is because it uses a different code path that does not
create $git_dir/rebase-apply. As rebase --keep-empty was implemented
using cherry-pick it has never supported the am options and now that
interactive rebases support --signoff there is no loss of
functionality by using an implicit interactive rebase.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -p: error out if --signoff is givenPhillip Wood Tue, 20 Mar 2018 11:10:56 +0000 (11:10 +0000)

rebase -p: error out if --signoff is given

rebase --preserve-merges does not support --signoff so error out
rather than just silently ignoring it so that the user knows the
commits will not be signed off.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: extend --signoff supportPhillip Wood Tue, 20 Mar 2018 11:10:55 +0000 (11:10 +0000)

rebase: extend --signoff support

Allow --signoff to be used with --interactive and --merge. In
interactive mode only commits marked to be picked, edited or reworded
will be signed off.

The main motivation for this patch was to allow one to run 'git rebase
--exec "make check" --signoff' which is useful when preparing a patch
series for publication and is more convenient than doing the signoff
with another --exec command.

This change also allows --root without --onto to work with --signoff
as well (--root with --onto was already supported).

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'pw/rebase-keep-empty-fixes' into pw/rebas... Junio C Hamano Thu, 29 Mar 2018 18:08:09 +0000 (11:08 -0700)

Merge branch 'pw/rebase-keep-empty-fixes' into pw/rebase-signoff

* pw/rebase-keep-empty-fixes:
rebase: respect --no-keep-empty
rebase -i --keep-empty: don't prune empty commits
rebase --root: stop assuming squash_onto is unset
Git 2.16.2

rebase: respect --no-keep-emptyPhillip Wood Tue, 20 Mar 2018 10:03:15 +0000 (10:03 +0000)

rebase: respect --no-keep-empty

$OPT_SPEC has always allowed --no-keep-empty so lets start handling
it.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -i --keep-empty: don't prune empty commitsPhillip Wood Tue, 20 Mar 2018 10:03:14 +0000 (10:03 +0000)

rebase -i --keep-empty: don't prune empty commits

If there are empty commits on the left hand side of $upstream...HEAD
then the empty commits on the right hand side that we want to keep are
pruned by --cherry-pick. Fix this by using --cherry-mark instead of
--cherry-pick and keeping the commits that are empty or are not marked
as cherry-picks.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: zh_CN: review for git v2.17.0 l10n round 1Ray Chen Thu, 29 Mar 2018 07:09:20 +0000 (15:09 +0800)

l10n: zh_CN: review for git v2.17.0 l10n round 1

Signed-off-by: Ray Chen <oldsharp@gmail.com>

l10n: zh_CN: for git v2.17.0 l10n round 1Jiang Xin Thu, 22 Feb 2018 01:17:34 +0000 (09:17 +0800)

l10n: zh_CN: for git v2.17.0 l10n round 1

Translate 132 new messages (3376t0f0u) for git 2.17.0-rc0.

Reviewed-by: 依云 <lilydjwg@gmail.com>
Reviewed-by: Fangyi Zhou <fangyi.zhou@yuriko.moe>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

submodule: check for NULL return of get_submodule_ref_s... René Scharfe Wed, 28 Mar 2018 21:14:08 +0000 (23:14 +0200)

submodule: check for NULL return of get_submodule_ref_store()

If we can't find a ref store for a submodule then assume the latter
is not initialized (or was removed). Print a status line accordingly
instead of causing a segmentation fault by passing NULL as the first
parameter of refs_head_ref().

Reported-by: Jeremy Feusi <jeremy@feusi.co>
Reviewed-by: Stefan Beller <sbeller@google.com>
Initial-Test-By: Stefan Beller <sbeller@google.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 2.17-rc2 v2.17.0-rc2Junio C Hamano Wed, 28 Mar 2018 18:05:14 +0000 (11:05 -0700)

Git 2.17-rc2

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

Merge branch 'tg/stash-doc-typofix'Junio C Hamano Wed, 28 Mar 2018 18:04:25 +0000 (11:04 -0700)

Merge branch 'tg/stash-doc-typofix'

Hotfix.

* tg/stash-doc-typofix:
git-stash.txt: remove extra square bracket

Merge branch 'pc/submodule-helper'Junio C Hamano Wed, 28 Mar 2018 18:04:25 +0000 (11:04 -0700)

Merge branch 'pc/submodule-helper'

Hotfix.

* pc/submodule-helper:
submodule deinit: handle non existing pathspecs gracefully

Merge branch 'nd/parseopt-completion'Junio C Hamano Wed, 28 Mar 2018 18:04:24 +0000 (11:04 -0700)

Merge branch 'nd/parseopt-completion'

Hotfix for recently graduated topic that give help to completion
scripts from the Git subcommands that are being completed

* nd/parseopt-completion:
t9902: disable test on the list of merge-strategies under GETTEXT_POISON
completion: clear cached --options when sourcing the completion script

test: avoid pipes in git related commands for testPratik Karki Tue, 27 Mar 2018 17:31:37 +0000 (23:16 +0545)

test: avoid pipes in git related commands for test

Avoid using pipes downstream of Git commands since the exit codes
of commands upstream of pipes get swallowed, thus potentially
hiding failure of those commands. Instead, capture Git command
output to a file and apply the downstream command(s) to that file.

Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: ko.po: Update Korean translationChangwoo Ryu Mon, 19 Mar 2018 04:59:50 +0000 (13:59 +0900)

l10n: ko.po: Update Korean translation

Signed-off-by: Changwoo Ryu <cwryu@debian.org>
Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
Signed-off-by: Gwan-gyeong Mun <elongbug@gmail.com>
Reviewed-by: Changwoo Ryu <cwryu@debian.org>

submodule deinit: handle non existing pathspecs gracefullyStefan Beller Tue, 27 Mar 2018 23:28:24 +0000 (16:28 -0700)

submodule deinit: handle non existing pathspecs gracefully

This fixes a regression introduced in 2e612731b5 (submodule: port
submodule subcommand 'deinit' from shell to C, 2018-01-15), when
handling pathspecs that do not exist gracefully. This restores the
historic behavior of reporting the pathspec as unknown and returning
instead of reporting a bug.

Reported-by: Peter Oberndorfer <kumbayo84@arcor.de>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-stash.txt: remove extra square bracketThomas Gummerer Mon, 26 Mar 2018 21:11:47 +0000 (22:11 +0100)

git-stash.txt: remove extra square bracket

In 1ada5020b3 ("stash: use stash_push for no verb form", 2017-02-28),
when the pathspec argument was introduced in 'git stash', that was also
documented. However I forgot to remove an extra square bracket after
the '--message' argument, even though the square bracket should have
been after the pathspec argument (where it was also added).

Remove the extra square bracket after the '--message' argument, to show
that the pathspec argument should be used with the 'push' verb.

While the pathspec argument can be used without the push verb, that's a
special case described later in the man page, and removing the first extra
square bracket instead of the second one makes the synopis easier to
understand.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

doc hash-function-transition: clarify what SHAttered... Ævar Arnfjörð Bjarmason Mon, 26 Mar 2018 18:27:08 +0000 (18:27 +0000)

doc hash-function-transition: clarify what SHAttered means

Attempt to clarify what the SHAttered attack means in practice for
Git. The previous version of the text made no mention whatsoever of
Git already having a mitigation for this specific attack, which the
SHAttered researchers claim will detect cryptanalytic collision
attacks.

I may have gotten some of the nuances wrong, but as far as I know this
new text accurately summarizes the current situation with SHA-1 in
git. I.e. git doesn't really use SHA-1 anymore, it uses
Hardened-SHA-1 (they just so happen to produce the same outputs
99.99999999999...% of the time).

Thus the previous text was incorrect in asserting that:

[...]As a result [of SHAttered], SHA-1 cannot be considered
cryptographically secure any more[...]

That's not the case. We have a mitigation against SHAttered, *however*
we consider it prudent to move to work towards a NewHash should future
vulnerabilities in either SHA-1 or Hardened-SHA-1 emerge.

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

doc hash-function-transition: clarify how older gits... Ævar Arnfjörð Bjarmason Mon, 26 Mar 2018 18:27:07 +0000 (18:27 +0000)

doc hash-function-transition: clarify how older gits die on NewHash

Change the "Repository format extension" to accurately describe what
happens with different versions of Git when they encounter NewHash
repositories, instead of only saying what happens with versions v2.7.0
and later.

See ab9cb76f66 ("Repository format version check.", 2005-11-25) and
00a09d57eb ("introduce "extensions" form of
core.repositoryformatversion", 2015-06-23) for the relevant changes to
the setup code where these variables are checked.

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

test_must_be_empty: simplify file existence checkSZEDER Gábor Mon, 26 Mar 2018 13:11:24 +0000 (15:11 +0200)

test_must_be_empty: simplify file existence check

Commit 11395a3b4b (test_must_be_empty: make sure the file exists, not
just empty, 2018-02-27) basically duplicated the 'test_path_is_file'
helper function in 'test_must_be_empty'.

Just call 'test_path_is_file' to avoid this code duplication.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

perf/aggregate: add --sort-by=regression optionChristian Couder Mon, 26 Mar 2018 07:24:31 +0000 (09:24 +0200)

perf/aggregate: add --sort-by=regression option

One of the most interesting thing one can be interested in when
looking at performance test results is possible performance
regressions.

This new option makes it easy to spot such possible regressions.

This new option is named '--sort-by=regression' to make it
possible and easy to add other ways to sort the results, like for
example '--sort-by=utime'.

If we would like to sort according to how much the stime regressed
we could also add a new option called '--sort-by=regression:stime'.
Then '--sort-by=regression' could become a synonym for
'--sort-by=regression:rtime'.

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

perf/aggregate: add display_dir()Christian Couder Mon, 26 Mar 2018 07:24:30 +0000 (09:24 +0200)

perf/aggregate: add display_dir()

This new helper function will be reused in a subsequent
commit.

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

t/helper: merge test-write-cache into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:45:05 +0000 (08:45 +0100)

t/helper: merge test-write-cache into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-wildmatch into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:45:04 +0000 (08:45 +0100)

t/helper: merge test-wildmatch into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-urlmatch-normalization into test... Nguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:45:03 +0000 (08:45 +0100)

t/helper: merge test-urlmatch-normalization into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-subprocess into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:45:02 +0000 (08:45 +0100)

t/helper: merge test-subprocess into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-submodule-config into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:45:01 +0000 (08:45 +0100)

t/helper: merge test-submodule-config into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-string-list into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:45:00 +0000 (08:45 +0100)

t/helper: merge test-string-list into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-strcmp-offset into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:59 +0000 (08:44 +0100)

t/helper: merge test-strcmp-offset into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-sigchain into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:58 +0000 (08:44 +0100)

t/helper: merge test-sigchain into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-sha1-array into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:57 +0000 (08:44 +0100)

t/helper: merge test-sha1-array into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-scrap-cache-tree into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:56 +0000 (08:44 +0100)

t/helper: merge test-scrap-cache-tree into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-run-command into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:55 +0000 (08:44 +0100)

t/helper: merge test-run-command into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-revision-walking into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:54 +0000 (08:44 +0100)

t/helper: merge test-revision-walking into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-regex into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:53 +0000 (08:44 +0100)

t/helper: merge test-regex into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-ref-store into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:52 +0000 (08:44 +0100)

t/helper: merge test-ref-store into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-read-cache into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:51 +0000 (08:44 +0100)

t/helper: merge test-read-cache into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-prio-queue into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:50 +0000 (08:44 +0100)

t/helper: merge test-prio-queue into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-path-utils into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:49 +0000 (08:44 +0100)

t/helper: merge test-path-utils into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-online-cpus into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:48 +0000 (08:44 +0100)

t/helper: merge test-online-cpus into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-mktemp into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:47 +0000 (08:44 +0100)

t/helper: merge test-mktemp into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge (unused) test-mergesort into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:46 +0000 (08:44 +0100)

t/helper: merge (unused) test-mergesort into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge (unused) test-match-trees into test... Nguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:45 +0000 (08:44 +0100)

t/helper: merge (unused) test-match-trees into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-index-version into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:44 +0000 (08:44 +0100)

t/helper: merge test-index-version into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-hashmap into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:43 +0000 (08:44 +0100)

t/helper: merge test-hashmap into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-genrandom into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:42 +0000 (08:44 +0100)

t/helper: merge test-genrandom into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-example-decorate into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:41 +0000 (08:44 +0100)

t/helper: merge test-example-decorate into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-dump-split-index into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:40 +0000 (08:44 +0100)

t/helper: merge test-dump-split-index into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-dump-cache-tree into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:39 +0000 (08:44 +0100)

t/helper: merge test-dump-cache-tree into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-drop-caches into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:38 +0000 (08:44 +0100)

t/helper: merge test-drop-caches into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge (unused) test-delta into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:37 +0000 (08:44 +0100)

t/helper: merge (unused) test-delta into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-date into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:36 +0000 (08:44 +0100)

t/helper: merge test-date into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-ctype into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:35 +0000 (08:44 +0100)

t/helper: merge test-ctype into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-config into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:34 +0000 (08:44 +0100)

t/helper: merge test-config into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-lazy-init-name-hash into test... Nguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:33 +0000 (08:44 +0100)

t/helper: merge test-lazy-init-name-hash into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-sha1 into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:32 +0000 (08:44 +0100)

t/helper: merge test-sha1 into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: merge test-chmtime into test-toolNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:31 +0000 (08:44 +0100)

t/helper: merge test-chmtime into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/helper: add an empty test-tool programNguyễn Thái Ngọc Duy Sat, 24 Mar 2018 07:44:30 +0000 (08:44 +0100)

t/helper: add an empty test-tool program

This will become an umbrella program that absorbs most [1] t/helper
programs in. By having a single executable binary we reduce disk usage
(libgit.a is replicated by every t/helper program) and shorten link
time a bit.

Running "make --jobs=1; du -sh t/helper" with ccache fully populated,
it takes 27 seconds and 277MB at the beginning of this series, 17
seconds and 42MB at the end.

[1] There are a couple programs that will not become part of
test-tool: test-line-buffer and test-svn-fe have extra
dependencies and test-fake-ssh's program name has to be a single
word for some ssh tests.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t2107: abstract away SHA-1-specific constantsbrian m. carlson Sun, 25 Mar 2018 19:20:55 +0000 (19:20 +0000)

t2107: abstract away SHA-1-specific constants

Use the $EMPTY_BLOB variable instead of hard-coding a hash.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t2101: abstract away SHA-1-specific constantsbrian m. carlson Sun, 25 Mar 2018 19:20:54 +0000 (19:20 +0000)

t2101: abstract away SHA-1-specific constants

Adjust the test so that it uses variables and command substitution for
blobs instead of hard-coded hashes.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t2101: modernize test stylebrian m. carlson Sun, 25 Mar 2018 19:20:53 +0000 (19:20 +0000)

t2101: modernize test style

Most of our tests start with the opening quote of the test body on the
same line as the test_expect_success call. Additionally, our tests are
usually indented with a single tab. Update this test to be the same as
most others, which will make it easier to use inline heredocs in the
future.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t2020: abstract away SHA-1 specific constantsbrian m. carlson Sun, 25 Mar 2018 19:20:52 +0000 (19:20 +0000)

t2020: abstract away SHA-1 specific constants

Adjust the test so that it uses variables for the revisions we're
checking out instead of hard-coded hashes.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1507: abstract away SHA-1-specific constantsbrian m. carlson Sun, 25 Mar 2018 19:20:51 +0000 (19:20 +0000)

t1507: abstract away SHA-1-specific constants

Adjust the test so that it uses a variable consisting of the current
HEAD instead of a hard-coded hash.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1411: abstract away SHA-1-specific constantsbrian m. carlson Sun, 25 Mar 2018 19:20:50 +0000 (19:20 +0000)

t1411: abstract away SHA-1-specific constants

Adjust the test so that it uses a variable consisting of the current
HEAD instead of a hard-coded hash.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1405: sort reflog entries in a hash-independent waybrian m. carlson Sun, 25 Mar 2018 19:20:49 +0000 (19:20 +0000)

t1405: sort reflog entries in a hash-independent way

The test enumerates reflog entries in an arbitrary order and then sorts
them. For SHA-1, this produces results that happen to sort in
alphabetical order, but for other hash algorithms they sort differently.
Ensure we sort the reflog entries in a hash-independent way by sorting
on the ref name instead of the object ID. Remove an assumption about
the length of a hash by using cut with the delimiter and field options
instead of the character range option.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1300: abstract away SHA-1-specific constantsbrian m. carlson Sun, 25 Mar 2018 19:20:48 +0000 (19:20 +0000)

t1300: abstract away SHA-1-specific constants

Adjust the test so that it uses the computed blob value instead of
hard-coding a hash.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1304: abstract away SHA-1-specific constantsbrian m. carlson Sun, 25 Mar 2018 19:20:47 +0000 (19:20 +0000)

t1304: abstract away SHA-1-specific constants

Adjust the test so that it uses the $EMPTY_BLOB value instead of
hard-coding the hash.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1011: abstract away SHA-1-specific constantsbrian m. carlson Sun, 25 Mar 2018 19:20:46 +0000 (19:20 +0000)

t1011: abstract away SHA-1-specific constants

Adjust the test so that it computes the expected hash value dynamically
instead of relying on a hard-coded hash. Hoist some code earlier in the
test to make this possible.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Remove contrib/examples/*Ævar Arnfjörð Bjarmason Sun, 25 Mar 2018 20:46:53 +0000 (20:46 +0000)

Remove contrib/examples/*

There were some side discussions at Git Merge this year about how we
should just update the README to tell users they can dig these up from
the history if the need them, do that.

Looking at the "git log" for this directory we get quite a bit more
patch churn than we should here, mainly from things fixing various
tree-wide issues.

There's also confusion on the list occasionally about how these should
be treated, "Re: [PATCH 1/4] stash: convert apply to
builtin" (<CA+CzEk9QpmHK_TSBwQfEedNqrcVSBp3xY7bdv1YA_KxePiFeXw@mail.gmail.com>)
being the latest example of that.

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

packfile: keep prepare_packed_git() privateNguyễn Thái Ngọc Duy Fri, 23 Mar 2018 17:45:27 +0000 (18:45 +0100)

packfile: keep prepare_packed_git() private

The reason callers have to call this is to make sure either packed_git
or packed_git_mru pointers are initialized since we don't do that by
default. Sometimes it's hard to see this connection between where the
function is called and where packed_git pointer is used (sometimes in
separate functions).

Keep this dependency internal because now all access to packed_git and
packed_git_mru must go through get_xxx() wrappers.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

packfile: allow find_pack_entry to handle arbitrary... Stefan Beller Fri, 23 Mar 2018 17:45:26 +0000 (18:45 +0100)

packfile: allow find_pack_entry to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

packfile: add repository argument to find_pack_entryStefan Beller Fri, 23 Mar 2018 17:45:25 +0000 (18:45 +0100)

packfile: add repository argument to find_pack_entry

While at it move the documentation to the header and mention which pack
files are searched.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

packfile: allow reprepare_packed_git to handle arbitrar... Stefan Beller Fri, 23 Mar 2018 17:45:24 +0000 (18:45 +0100)

packfile: allow reprepare_packed_git to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

packfile: allow prepare_packed_git to handle arbitrary... Stefan Beller Fri, 23 Mar 2018 17:45:23 +0000 (18:45 +0100)

packfile: allow prepare_packed_git to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

packfile: allow prepare_packed_git_one to handle arbitr... Stefan Beller Fri, 23 Mar 2018 17:45:22 +0000 (18:45 +0100)

packfile: allow prepare_packed_git_one to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

packfile: add repository argument to reprepare_packed_gitStefan Beller Fri, 23 Mar 2018 17:45:21 +0000 (18:45 +0100)

packfile: add repository argument to reprepare_packed_git

See previous patch for explanation.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

packfile: add repository argument to prepare_packed_gitStefan Beller Fri, 23 Mar 2018 17:45:20 +0000 (18:45 +0100)

packfile: add repository argument to prepare_packed_git

Add a repository argument to allow prepare_packed_git callers to be
more specific about which repository to handle. See commit "sha1_file:
add repository argument to link_alt_odb_entry" for an explanation of
the #define trick.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

packfile: add repository argument to prepare_packed_git_oneStefan Beller Fri, 23 Mar 2018 17:45:19 +0000 (18:45 +0100)

packfile: add repository argument to prepare_packed_git_one

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

packfile: allow install_packed_git to handle arbitrary... Stefan Beller Fri, 23 Mar 2018 17:45:18 +0000 (18:45 +0100)

packfile: allow install_packed_git to handle arbitrary repositories

This conversion was done without the #define trick used in the earlier
series refactoring to have better repository access, because this function
is easy to review, as it only has one caller and all lines but the first
two are converted.

We must not convert 'pack_open_fds' to be a repository specific variable,
as it is used to monitor resource usage of the machine that Git executes
on.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

packfile: allow rearrange_packed_git to handle arbitrar... Stefan Beller Fri, 23 Mar 2018 17:45:17 +0000 (18:45 +0100)

packfile: allow rearrange_packed_git to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

packfile: allow prepare_packed_git_mru to handle arbitr... Stefan Beller Fri, 23 Mar 2018 17:45:16 +0000 (18:45 +0100)

packfile: allow prepare_packed_git_mru to handle arbitrary repositories

This conversion was done without the #define trick used in the earlier
series refactoring to have better repository access, because this function
is easy to review, as all lines are converted and it has only one caller

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_file: allow sha1_loose_object_info to handle arbit... Jonathan Nieder Fri, 23 Mar 2018 17:21:21 +0000 (18:21 +0100)

sha1_file: allow sha1_loose_object_info to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>