1
0
mirror of https://github.com/git/git.git synced 2024-09-24 10:21:06 +02:00
Commit Graph

66615 Commits

Author SHA1 Message Date
Taylor Blau
f9825d1cf7 builtin/repack.c: support generating a cruft pack
Expose a way to split the contents of a repository into a main and cruft
pack when doing an all-into-one repack with `git repack --cruft -d`, and
a complementary configuration variable.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-26 15:48:26 -07:00
Taylor Blau
a7d493833f builtin/pack-objects.c: --cruft with expiration
In a previous patch, pack-objects learned how to generate a cruft pack
so long as no objects are dropped.

This patch teaches pack-objects to handle the case where a non-never
`--cruft-expiration` value is passed. This case is slightly more
complicated than before, because we want pack-objects to save
unreachable objects which would have been pruned when there is another
recent (i.e., non-prunable) unreachable object which reaches the other.
We'll call these objects "unreachable but reachable-from-recent".

Here is how pack-objects handles `--cruft-expiration`:

  - Instead of adding all objects outside of the kept pack(s) into the
    packing list, only handle the ones whose mtime is within the grace
    period.

  - Construct a reachability traversal whose tips are the
    unreachable-but-recent objects.

  - Then, walk along that traversal, stopping if we reach an object in
    the kept pack. At each step along the traversal, we add the object
    we are visiting to the packing list.

In the majority of these cases, any object we visit in this traversal
will already be in our packing list. But we will sometimes encounter
reachable-from-recent cruft objects, which we want to retain even if
they aged out of the grace period.

The most subtle point of this process is that we actually don't need to
bother to update the rescued object's mtime. Even though we will write
an .mtimes file with a value that is older than the expiration window,
it will continue to survive cruft repacks so long as any objects which
reach it haven't aged out.

That is, a future repack will also exclude that object from the initial
packing list, only to discover it later on when doing the reachability
traversal.

Finally, stopping early once an object is found in a kept pack is safe
to do because the kept packs ordinarily represent which packs will
survive after repacking. Assuming that it _isn't_ safe to halt a
traversal early would mean that there is some ancestor object which is
missing, which implies repository corruption (i.e., the complete set of
reachable objects isn't present).

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-26 15:48:26 -07:00
Taylor Blau
fb546d6e43 reachable: report precise timestamps from objects in cruft packs
When generating a cruft pack, the caller within pack-objects will want
to know the precise timestamps of cruft objects (i.e., their
corresponding values in the .mtimes table) rather than the mtime of the
cruft pack itself.

Teach add_recent_packed() to lookup each object's precise mtime from the
.mtimes file if one exists (indicated by the is_cruft bit on the
packed_git structure).

A couple of small things worth noting here:

  - load_pack_mtimes() needs to be called before asking for
    nth_packed_mtime(), and that call is done lazily here. That function
    exits early if the .mtimes file has already been opened and parsed,
    so only the first call is slow.

  - Checking the is_cruft bit can be done without any extra work on the
    caller's behalf, since it is set up for us automatically as a
    side-effect of calling add_packed_git() (just like the 'pack_keep'
    and 'pack_promisor' bits).

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-26 15:48:26 -07:00
Taylor Blau
2fb90409b8 reachable: add options to add_unseen_recent_objects_to_traversal
This function behaves very similarly to what we will need in
pack-objects in order to implement cruft packs with expiration. But it
is lacking a couple of things. Namely, it needs:

  - a mechanism to communicate the timestamps of individual recent
    objects to some external caller

  - and, in the case of packed objects, our future caller will also want
    to know the originating pack, as well as the offset within that pack
    at which the object can be found

  - finally, it needs a way to skip over packs which are marked as kept
    in-core.

To address the first two, add a callback interface in this patch which
reports the time of each recent object, as well as a (packed_git,
off_t) pair for packed objects.

Likewise, add a new option to the packed object iterators to skip over
packs which are marked as kept in core. This option will become
implicitly tested in a future patch.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-26 15:48:26 -07:00
Taylor Blau
b757353676 builtin/pack-objects.c: --cruft without expiration
Teach `pack-objects` how to generate a cruft pack when no objects are
dropped (i.e., `--cruft-expiration=never`). Later patches will teach
`pack-objects` how to generate a cruft pack that prunes objects.

When generating a cruft pack which does not prune objects, we want to
collect all unreachable objects into a single pack (noting and updating
their mtimes as we accumulate them). Ordinary use will pass the result
of a `git repack -A` as a kept pack, so when this patch says "kept
pack", readers should think "reachable objects".

Generating a non-expiring cruft packs works as follows:

  - Callers provide a list of every pack they know about, and indicate
    which packs are about to be removed.

  - All packs which are going to be removed (we'll call these the
    redundant ones) are marked as kept in-core.

    Any packs the caller did not mention (but are known to the
    `pack-objects` process) are also marked as kept in-core. Packs not
    mentioned by the caller are assumed to be unknown to them, i.e.,
    they entered the repository after the caller decided which packs
    should be kept and which should be discarded.

    Since we do not want to include objects in these "unknown" packs
    (because we don't know which of their objects are or aren't
    reachable), these are also marked as kept in-core.

  - Then, we enumerate all objects in the repository, and add them to
    our packing list if they do not appear in an in-core kept pack.

This results in a new cruft pack which contains all known objects that
aren't included in the kept packs. When the kept pack is the result of
`git repack -A`, the resulting pack contains all unreachable objects.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-26 15:48:26 -07:00
Taylor Blau
fa23090b0c builtin/pack-objects.c: return from create_object_entry()
A new caller in the next commit will want to immediately modify the
object_entry structure created by create_object_entry(). Instead of
forcing that caller to wastefully look-up the entry we just created,
return it from create_object_entry() instead.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-26 15:48:26 -07:00
Taylor Blau
2bd4427824 t/helper: add 'pack-mtimes' test-tool
In the next patch, we will implement and test support for writing a
cruft pack via a special mode of `git pack-objects`. To make sure that
objects are written with the correct timestamps, and a new test-tool
that can dump the object names and corresponding timestamps from a given
`.mtimes` file.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-26 15:48:26 -07:00
Taylor Blau
5dfaf49a5a pack-mtimes: support writing pack .mtimes files
Now that the `.mtimes` format is defined, supplement the pack-write API
to be able to conditionally write an `.mtimes` file along with a pack by
setting an additional flag and passing an oidmap that contains the
timestamps corresponding to each object in the pack.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-26 15:48:26 -07:00
Taylor Blau
d9fef9d90d chunk-format.h: extract oid_version()
There are three definitions of an identical function which converts
`the_hash_algo` into either 1 (for SHA-1) or 2 (for SHA-256). There is a
copy of this function for writing both the commit-graph and
multi-pack-index file, and another inline definition used to write the
.rev header.

Consolidate these into a single definition in chunk-format.h. It's not
clear that this is the best header to define this function in, but it
should do for now.

(Worth noting, the .rev caller expects a 4-byte unsigned, but the other
two callers work with a single unsigned byte. The consolidated version
uses the latter type, and lets the compiler widen it when required).

Another caller will be added in a subsequent patch.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-26 15:48:26 -07:00
Taylor Blau
1c573cdd72 pack-write: pass 'struct packing_data' to 'stage_tmp_packfiles'
This structure will be used to communicate the per-object mtimes when
writing a cruft pack. Here, we need the full packing_data structure
because the mtime information is stored in an array there, not on the
individual object_entry's themselves (to avoid paying the overhead in
structure width for operations which do not generate a cruft pack).

We haven't passed this information down before because one of the two
callers (in bulk-checkin.c) does not have a packing_data structure at
all. In that case (where no cruft pack will be generated), NULL is
passed instead.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-26 15:48:26 -07:00
Taylor Blau
94cd775a6c pack-mtimes: support reading .mtimes files
To store the individual mtimes of objects in a cruft pack, introduce a
new `.mtimes` format that can optionally accompany a single pack in the
repository.

The format is defined in Documentation/technical/pack-format.txt, and
stores a 4-byte network order timestamp for each object in name (index)
order.

This patch prepares for cruft packs by defining the `.mtimes` format,
and introducing a basic API that callers can use to read out individual
mtimes.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-26 15:48:26 -07:00
Taylor Blau
3d89a8c118 Documentation/technical: add cruft-packs.txt
Create a technical document to explain cruft packs. It contains a brief
overview of the problem, some background, details on the implementation,
and a couple of alternative approaches not considered here.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-20 22:31:21 -07:00
Junio C Hamano
6cd33dceed Git 2.36
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-17 22:21:51 -07:00
Junio C Hamano
b908065ea2 l10n-2.36.0-rnd2.1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE37vMEzKDqYvVxs51k24VDd1FMtUFAmJctFUACgkQk24VDd1F
 MtUc/g//QeCHrROXhmyAmu4k0a9yVaEEkvd2S0JR3oR9Cx3Vr4C9AZb8/ESLj8iU
 rDQiUu6icyQCT9GLLJYCUySMSg8gJDgxN3WvxtoyvCVSqmKHxDJODO2lj3NRY/+X
 qwO0ZZyTFbfV3U3MmrGfjpSY85ieKjqNC67VqPwhCKHXlCmK3Uq7pJBQmXTHJr7D
 hctvKDas1YfaicSQ4EWGzEI0V/DGOjkD+1heaJZy1oTEVDe9RzkwZJHnWko79jO7
 Kd7L76omo0aWEct8bRv1alB/+JHUMN7YyvQUxH+Tkzc/aHAhZPU02Tq5aPKsgULA
 1kU7k0+/rTfatE5na0KAJu6jEChaxDpJHz8stKjApW/J7h+Kr4ZQxqEmqxED53JE
 b5tU1Qu/8TZeRomWJh+EQ1WO1X0zaj8ud7+UtGdyxSsrILFTeDDrbgTKnW7r+4nV
 ZaIFnT7IKD/QwA0dIP9SOr2u7EqRVHTvOKHKeAZjZWIUmcyFgo5+/Fu3x053GBTt
 7MAlpz2Qy2vp6S4nZkl/S4RO+f2uimyBG4RkOmV6kSMGkLq8j2JRZe2Q3yYX5iQ/
 y5EfGw1a12qd05n7G5fwUo/tYxxqkXpAxgqQMzVFTxkyvEBw+RJEbKrxEnRCWQQi
 T6HVKTpJBCIqVD960M0+8fBKAEOFgMpgN+AWpa+nZbyJx7CO5Z8=
 =LZrG
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.36.0-rnd2.1' of https://github.com/git-l10n/git-po

l10n-2.36.0-rnd2.1

* tag 'l10n-2.36.0-rnd2.1' of https://github.com/git-l10n/git-po:
  l10n: sv.po: Update Swedish translation (5282t0f0u)
  l10n: Update Catalan translation
  l10n: po-id for 2.36 (round 2)
  l10n: de.po: Update German translation
  l10n: zh_CN v2.36.0 round 2
  l10n: pt_PT: update Portuguese translation
  l10n: vi(5285t): v2.36.0 round 2
  l10n: zh_TW: v2.36.0 round 2
  l10n: fr: v2.36 round 2
  l10n: tr: v2.36.0 round 2
  l10n: git.pot: v2.36.0 round 2 (4 new, 3 removed)
  l10n: fr: v2.36 round 1
  l10n: zh_CN v2.36.0 round 1
  l10n: Update zh_CN repo link
  l10n: po-id for 2.36 (round 1)
  l10n: tr: v2.36.0 round 1
  l10n: git.pot: v2.36.0 round 1 (192 new, 106 removed)
  l10n: pt_PT: update TEAMS file
  l10n: pt_PT: update Portuguese translation
2022-04-17 22:20:49 -07:00
Junio C Hamano
db4361bb29 Merge branch 'cb/buggy-gcc-12-workaround'
A couple of work around for CI breaking warnings from gcc 12.

* cb/buggy-gcc-12-workaround:
  config.mak.dev: alternative workaround to gcc 12 warning in http.c
  config.mak.dev: workaround gcc 12 bug affecting "pedantic" CI job
2022-04-17 16:32:05 -07:00
Peter Krefting
9b23d2c7b8 l10n: sv.po: Update Swedish translation (5282t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2022-04-17 18:13:34 +01:00
Jiang Xin
1208041f05 Merge branch 'master' of github.com:Softcatala/git-po
* 'master' of github.com:Softcatala/git-po:
  l10n: Update Catalan translation
2022-04-17 09:07:28 +08:00
Jordi Mas
ac87f9697f l10n: Update Catalan translation
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2022-04-16 20:17:17 +02:00
Bagas Sanjaya
aac04e07ae l10n: po-id for 2.36 (round 2)
Translate following new components:
  * setup.c
  * split-index.c
  * strbuf.c
  * trailer.c

Also delete obsolete strings.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2022-04-16 18:04:26 +08:00
Carlo Marcelo Arenas Belón
9c539d1027 config.mak.dev: alternative workaround to gcc 12 warning in http.c
This provides a "no code change needed" option to the "fix" currently
queued as part of ab/http-gcc-12-workaround and therefore should be
reverted once that gets merged.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-15 16:27:04 -07:00
Carlo Marcelo Arenas Belón
846a29afb0 config.mak.dev: workaround gcc 12 bug affecting "pedantic" CI job
Originally noticed by Peff[1], but yet to be corrected[2] and planned to
be released with Fedora 36 (scheduled for Apr 19).

  dir.c: In function ‘git_url_basename’:
  dir.c:3085:13: error: ‘memchr’ specified bound [9223372036854775808, 0] exceeds maximum object size 9223372036854775807 [-Werror=stringop-overread]
   3085 |         if (memchr(start, '/', end - start) == NULL
        |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fedora is used as part of the CI, and therefore that release will trigger
failures, unless the version of the image used is locked to an older
release, as an alternative.

Restricting the flag to the affected source file, as well as implementing
an independent facility to track these workarounds was specifically punted
to minimize the risk of introducing problems so close to a release.

This change should be reverted once the underlying gcc bug is solved and
which should be visible by NOT triggering a warning, otherwise.

[1] https://lore.kernel.org/git/YZQhLh2BU5Hquhpo@coredump.intra.peff.net/
[2] https://bugzilla.redhat.com/show_bug.cgi?id=2075786

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-15 16:26:16 -07:00
Jiang Xin
c616d188aa Merge branch 'master' of github.com:ruester/git-po-de
* 'master' of github.com:ruester/git-po-de:
  l10n: de.po: Update German translation
2022-04-15 08:26:53 +08:00
Jiang Xin
cb6da3213e Merge branch 'fz/po-2.36.0-round2' of github.com:fangyi-zhou/git-po
* 'fz/po-2.36.0-round2' of github.com:fangyi-zhou/git-po:
  l10n: zh_CN v2.36.0 round 2
2022-04-15 08:26:06 +08:00
Junio C Hamano
4027e30c53 Merge branch 'jc/revert-ref-transaction-hook-changes'
Revert the "deletion of a ref should not trigger transaction events
for loose and packed ref backends separately" that regresses the
behaviour when a ref is not modified since it was packed.

* jc/revert-ref-transaction-hook-changes:
  RelNotes: revert the description on the reverted topics
  Revert "fetch: increase test coverage of fetches"
  Revert "Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs'"
2022-04-14 14:17:12 -07:00
Junio C Hamano
b32632c327 Merge branch 'jc/relnotes-updates'
Wording updates for 2.36 release notes.

* jc/relnotes-updates:
  RelNotes: mention safe.directory
  RelNotes: clarify "bisect run unexecutable" tweak
2022-04-14 14:17:12 -07:00
Matthias Rüster
4ac22f8cc0 l10n: de.po: Update German translation
Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com>
Reviewed-by: Phillip Szelat <phillip.szelat@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
2022-04-14 17:03:02 +02:00
Fangyi Zhou
40f35416c1
l10n: zh_CN v2.36.0 round 2
Signed-off-by: Fangyi Zhou <me@fangyi.io>
2022-04-14 15:49:18 +01:00
Daniel Santos
b3717a8943 l10n: pt_PT: update Portuguese translation
* update the following words translations: commit, untracked, stage,
   cache, stash, work..., index, reset, label, check..., tags, graft,
   alternate object, amend, ancestor, cherry-pick, bisect, blame, chain,
   cache, bug, chunk, branch, bundle, clean, clone, commit-graph, commit
   object, commit-ish, committer, cover letter, conflict, dangling,
   detach, dir, dumb, fast-forward, file system, fixup, fork, fetch, Git
   archive, gitdir, graft, replace ref
 * correct some mispellings
 * git-po-helper update
 * remove some obsolete lines
 * unfuzzy entries
 * random translation updates
 * update contact in pt_PT.po
 * add the following words to the translation table: override, recurse,
   print, offset, unbundle, mirror repository, multi-pack, bad,
   whitespace, batch
 * remove the following words of the translation table: core Git
 * change the following words on the translation table: dry-run, apply,
   patch, replay, blame, chain, gitdir, file system, fork, unset, handle
 * some translation to the first person
 * update copyright text
 * word 'utilização:' to 'uso:'
 * word 'pai' to 'parente'

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-04-14 12:09:07 +01:00
Tran Ngoc Quan
2a7f398a6e l10n: vi(5285t): v2.36.0 round 2
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2022-04-14 15:34:48 +07:00
Jiang Xin
dd6cf19403 Merge branch 'loc/tw/0407' of github.com:l10n-tw/git-po
* 'loc/tw/0407' of github.com:l10n-tw/git-po:
  l10n: zh_TW: v2.36.0 round 2
2022-04-14 13:13:38 +08:00
Yi-Jyun Pan
c9f01d5f5f
l10n: zh_TW: v2.36.0 round 2
Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
2022-04-14 08:07:08 +08:00
Junio C Hamano
43159864b6 RelNotes: revert the description on the reverted topics
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-13 16:55:36 -07:00
Junio C Hamano
255ede9980 RelNotes: mention safe.directory
Helped-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-13 16:51:41 -07:00
Junio C Hamano
26ff9be6e7 RelNotes: clarify "bisect run unexecutable" tweak
We do not have to guess how common the mistake the change targets is
when describing it.  Such an argument may be good while proposing a
change, but does not quite belong in the record of what has already
happened, i.e. a release note.

Helped-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-13 16:42:33 -07:00
Junio C Hamano
347cc1b11d Revert "fetch: increase test coverage of fetches"
This reverts commit 2a0cafd464,
as it expects a working "a ref deletion must produce a single
transaction, not one for loose and another for packed" topic,
which we do not have.
2022-04-13 15:58:04 -07:00
Junio C Hamano
c6da34a610 Revert "Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs'"
This reverts commit 991b4d47f0, reversing
changes made to bcd020f88e.
2022-04-13 15:51:33 -07:00
Junio C Hamano
1ac7422e39 Git 2.35.3
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4fA2sf7nIh/HeOzvsLXohpav5ssFAmJXTO4ACgkQsLXohpav
 5ss62xAAzwmmKlJkcgdKRcVimfMF+hPNvBFsnKBZZRtAV+4vCOFa2EN2bgWJexZh
 SfuDzdJrFf+A4Emb0Z2nd9ZmSJJznybwYJCkHatfEnH+qy/H+5ju3NwgD84DOCad
 DauretQn2zhwosJDsF82MbogQrOTYQjfftalFZZwYyD5AoSbsiR/diIrjjP6q+Qo
 RlKXagPM8hxZLrdOjMir75Wr/OrFDXMlO2kE2+5IgR/EO8KmjltFZgeciLnFXllN
 qQ77Klu1B9xsUjypK0/Vxbg389pqSHRCR28MaKwHbPQsXz8+ZTeCfgv7u500BWa+
 Yl3Cye1GtZtD3zCu4Ik/D++Bu53P8NmHXzAst6hhMnyZZUQ8meeVoLdZH5eZscc6
 vlv+wyLiyqILWknWIEibATavqjBWeFAqRXC//RPdZbUjoeE7fAVA8u+LZvOBCKna
 altnI497uJAL15eWU8878X8y1rmZJfXpx0euwYZbmo6Hj/GHY/1w3RYanJ+shOkk
 f8Qu4AUWNYAyHUANbxczSVoV3VR9xLdKgqbuGZsNZDRPUMo6POBNSxnjExsAnr6b
 SRmpmQQsbZr2vO9i12dPQJbqRCo5++rrmM/qi+ozmM1xGCDyeSiHgsnDUQV7AGkZ
 0/hwg+mhykvLEnMIbDLZirI1uNecomO83Q/YhcWdBFlsDXb0IJw=
 =AeAR
 -----END PGP SIGNATURE-----

Sync with Git 2.35.3
2022-04-13 15:26:32 -07:00
Junio C Hamano
d516b2db0a Git 2.35.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-13 15:21:34 -07:00
Junio C Hamano
2f0dde7852 Git 2.34.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-13 15:21:31 -07:00
Junio C Hamano
1f65dd6ae6 Git 2.33.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-13 15:21:28 -07:00
Junio C Hamano
1530434434 Git 2.32.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-13 15:21:26 -07:00
Junio C Hamano
09f66d65f8 Git 2.31.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-13 15:21:08 -07:00
Junio C Hamano
17083c79ae Git 2.30.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-13 13:31:29 -07:00
Derrick Stolee
0f85c4a30b setup: opt-out of check with safe.directory=*
With the addition of the safe.directory in 8959555ce
(setup_git_directory(): add an owner check for the top-level directory,
2022-03-02) released in v2.35.2, we are receiving feedback from a
variety of users about the feature.

Some users have a very large list of shared repositories and find it
cumbersome to add this config for every one of them.

In a more difficult case, certain workflows involve running Git commands
within containers. The container boundary prevents any global or system
config from communicating `safe.directory` values from the host into the
container. Further, the container almost always runs as a different user
than the owner of the directory in the host.

To simplify the reactions necessary for these users, extend the
definition of the safe.directory config value to include a possible '*'
value. This value implies that all directories are safe, providing a
single setting to opt-out of this protection.

Note that an empty assignment of safe.directory clears all previous
values, and this is already the case with the "if (!value || !*value)"
condition.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-13 12:42:51 -07:00
Matheus Valadares
bb50ec3cc3 setup: fix safe.directory key not being checked
It seems that nothing is ever checking to make sure the safe directories
in the configs actually have the key safe.directory, so some unrelated
config that has a value with a certain directory would also make it a
safe directory.

Signed-off-by: Matheus Valadares <me@m28.io>
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-13 12:42:51 -07:00
Derrick Stolee
e47363e5a8 t0033: add tests for safe.directory
It is difficult to change the ownership on a directory in our test
suite, so insert a new GIT_TEST_ASSUME_DIFFERENT_OWNER environment
variable to trick Git into thinking we are in a differently-owned
directory. This allows us to test that the config is parsed correctly.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-13 12:42:49 -07:00
Jean-Noël Avila
cdfc63f714 l10n: fr: v2.36 round 2
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2022-04-13 21:21:48 +02:00
Emir SARI
783c5f4bc3 l10n: tr: v2.36.0 round 2
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2022-04-13 13:35:48 +03:00
Jiang Xin
2731109c91 l10n: git.pot: v2.36.0 round 2 (4 new, 3 removed)
Generate po/git.pot from v2.36.0-rc2 for git v2.36.0 l10n round 2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2022-04-13 14:55:25 +08:00
Jiang Xin
61de00a321 Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git: (25 commits)
  Git 2.36-rc2
  i18n: fix some badly formatted i18n strings
  Git 2.36-rc1
  t9902: split test to run on appropriate systems
  ls-tree doc: document interaction with submodules
  Documentation: add --batch-command to cat-file synopsis
  git-ls-tree.txt: fix the name of "%(objectsize:padded)"
  submodule-helper: fix usage string
  doc: replace "--" with {litdd} in credential-cache/fsmonitor
  contrib/scalar: fix 'all' target in Makefile
  Documentation/Makefile: fix "make info" regression in dad9cd7d51
  configure.ac: fix HAVE_SYNC_FILE_RANGE definition
  git-compat-util: really support openssl as a source of entropy
  ls-tree: `-l` should not imply recursive listing
  Git 2.35.2
  Git 2.34.2
  Git 2.33.2
  Git 2.32.1
  Git 2.31.2
  Git 2.30.3
  ...
2022-04-13 14:51:53 +08:00