1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-09 07:06:12 +02:00
Commit Graph

67159 Commits

Author SHA1 Message Date
Ævar Arnfjörð Bjarmason af0aa6904b Makefile & .gitignore: ignore & clean "git.res", not "*.res"
Adjust the overly broad .gitignore and "make clean" rule added in
ce39c2e04c (Provide a Windows version resource for the git
executables., 2012-05-24).

For now this is merely a correctness fix, but needed because a
subsequent commit will want to check in *.res files elsewhere in the
tree, which we shouldn't have to "git add -f".

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-07-06 12:24:43 -07:00
Ævar Arnfjörð Bjarmason 7b63ea5750 Makefile: remove mandatory "spatch" arguments from SPATCH_FLAGS
The "--patch ." part of SPATCH_FLAGS added in f57d11728d (coccinelle:
put sane filenames into output patches, 2018-07-23) should have been
added unconditionally to the "spatch" invocation instead, using it
isn't optional.

Let's also move the other mandatory flag to come after
$(SPATCH_FLAGS), to ensure that our "--sp-file" overrides any provided
in the environment, both --sp-file <arg> and --patch <arg> are
last-option-wins as far as spatch(1) option parsing is concerned.

The environment variable override was initially added in
a9a884aea5 (coccicheck: use --all-includes by default,
2016-09-30). In practice there's probably nobody that's using
SPATCH_FLAGS to try to intentionally break our invocations, but since
we're changing this let's make it clear what (if anything) we expect
to be overridden by user-supplied flags.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-07-06 12:24:43 -07:00
Junio C Hamano 30cc8d0f14 A regression fix for 2.37
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-07-02 21:56:08 -07:00
Junio C Hamano 0f0bc2124b Merge branch 'js/add-i-delete'
Rewrite of "git add -i" in C that appeared in Git 2.25 didn't
correctly record a removed file to the index, which was fixed.

* js/add-i-delete:
  add --interactive: allow `update` to stage deleted files
2022-07-02 21:56:08 -07:00
Johannes Schindelin 4788e8b256 add --interactive: allow `update` to stage deleted files
The scripted version of `git add -i` used `git update-index --add
--remove`, but the built-in version implemented only the `--add` part.

This fixes https://github.com/msys2/MSYS2-packages/issues/3066

Reported-by: Christoph Reiter <reiter.christoph@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-28 15:37:50 -07:00
Junio C Hamano e4a4b31577 Git 2.37
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-27 09:17:55 -07:00
Junio C Hamano 49c837424a Merge branch 'jc/revert-show-parent-info'
* jc/revert-show-parent-info:
  revert: config documentation fixes
2022-06-27 09:13:41 -07:00
Junio C Hamano 5dba4d6540 l10n-2.37.0-rnd1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE37vMEzKDqYvVxs51k24VDd1FMtUFAmK4VO0ACgkQk24VDd1F
 MtUgRw/+MID68Dy6ai1WGQh+tFl03UN4zF7B8fyPwDSBQSmwXPr+e+FEvMPvJhqc
 ES9o+W3YvbS/kQrG8c4bXKgyD76VtL2C6Xc5cs/Ga+m4Rzeq3rVvAhqNfP879jXc
 udiLaXHGpRlkgqnoBa3rVGSFoIPa/mXSJwDEEDJYyo/34eTqpk7wapqznXy/SSKk
 qe8HeP7/4m/xemNcKDkghoYZnxdVeKOahRMxt8rF8DMpaCIj/fgRf8cGnfBQ0qJY
 SuLRzes58tYep73gMANdjnzsPAN870OGcnLTuIHaObx1h5GGYxSLSK5iWu9+coyF
 iLaFbJYmBfz5K4P5bHXtey6ez3CpkQGBk/4rAFVgjt9hwgo8wvUU/V2GPeVTWNSx
 Lu6UFLozjDeHIADsdCd0N14pVhAcN5mGlZPlJmQ7MCZs7x6JEvsqx3ccqrtFIjDK
 ymyep0jHaj7iuEzPBpDM3g5vmhWnJKi17BZwTx3Zoa9yoBkXJh/ENKRcHP4kQD+f
 0YXX2IZSSLfzz72RylDlZVdJNBpwPBgbBagnuq09S8vjNbq5StX2Pz7LsOkM74Sw
 6dH7gAQVGHKbg4FSQfUo9noP7EUGPlEY3khTMNyf11E3Fd69ehSAgvTAQfYv6Mcl
 XC7g+nlT4i7IFmUTtUdyWg6otiQfI+9iCMZi8jR6XtmIkm8bluA=
 =jRiL
 -----END PGP SIGNATURE-----

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

l10n-2.37.0-rnd1

* tag 'l10n-2.37.0-rnd1' of https://github.com/git-l10n/git-po:
  l10n: sv.po: Update Swedish translation (5367t0f0u)
  l10n: ru.po: update Russian translation
  l10n: zh_TW: v2.37.0 round 1
  l10n: vi(5367t): Updated translation
  l10n: fr v2.37 round 1
  l10n: Update Catalan translation
  l10n: po-id for 2.37 (first batch)
  l10n: tr: v2.37.0 round #1
  l10n: README: fix typo
  l10n: TEAMS: Change German translation team leader
  l10n: de.po: Update German translation
  l10n: bg.po: Updated Bulgarian translation (5367t)
  l10n: zh_CN: v2.37.0 round 1
  l10n: es: update translation
2022-06-27 08:39:10 -07:00
René Scharfe fc0f8bcd64 revert: config documentation fixes
43966ab315 (revert: optionally refer to commit in the "reference"
format, 2022-05-26) added the documentation file config/revert.txt.
Actually include it in config.txt.

Make is used with a bare infinitive after the object; remove the "to".

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-27 08:37:36 -07:00
Peter Krefting 71e3a31e40 l10n: sv.po: Update Swedish translation (5367t0f0u)
Run msgmerge with --no-location to drop file locations to decrease the
size of future patches. Also removed old translations.

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2022-06-26 20:38:46 +08:00
Dimitriy Ryazantcev 11d4c8b350 l10n: ru.po: update Russian translation
Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2022-06-26 20:32:33 +08:00
Jiang Xin e7022fcdb5 Merge branch 'l10n/zh_TW/220623' of github.com:l10n-tw/git-po
* 'l10n/zh_TW/220623' of github.com:l10n-tw/git-po:
  l10n: zh_TW: v2.37.0 round 1
2022-06-26 13:54:26 +08:00
Yi-Jyun Pan c9d5deafe2
l10n: zh_TW: v2.37.0 round 1
Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
2022-06-25 21:21:57 +08:00
Jiang Xin 0015f897e5 Merge branch 'master' of github.com:vnwildman/git
* 'master' of github.com:vnwildman/git:
  l10n: vi(5367t): Updated translation
2022-06-25 11:01:20 +08:00
Tran Ngoc Quan 84189f4d15 l10n: vi(5367t): Updated translation
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2022-06-25 08:40:42 +07:00
Jean-Noël Avila 305136b4ff l10n: fr v2.37 round 1
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2022-06-24 21:59:53 +02:00
Jordi Mas a54f9fb9f5 l10n: Update Catalan translation
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2022-06-24 13:30:45 +02:00
Junio C Hamano 39c15e4855 Merge branch 'ab/credentials-in-url-more'
* ab/credentials-in-url-more:
  Documentation/config/transfer.txt: fix typo
2022-06-23 13:22:35 -07:00
Taylor Blau bcb6cdfc03 Documentation/config/transfer.txt: fix typo
Commit 7281c196b1 (transfer doc: move fetch.credentialsInUrl to
"transfer" config namespace, 2022-06-15) propagates a typo from
6dcbdc0d66 (remote: create fetch.credentialsInUrl config, 2022-06-06),
where "other" is misspelled as "oher". Fix the typo accordingly.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-23 12:43:29 -07:00
Jiang Xin 7d7192b91f Merge branch 'po-id' of github.com:bagasme/git-po
* 'po-id' of github.com:bagasme/git-po:
  l10n: po-id for 2.37 (first batch)
2022-06-23 21:01:47 +08:00
Bagas Sanjaya c38261e7d9 l10n: po-id for 2.37 (first batch)
Update following components:

  - apply.c
  - builtin/bisect--helper.c
  - builtin/fetch.c
  - builtin/fsck.c
  - builtin/log.c
  - builtin/notes.c
  - builtin/push.c
  - builtin/submodule--helper.c
  - builtin/worktree.c
  - index-pack.c
  - init-db.c
  - remote.c

Translate following new components:

  - attr.c
  - builtin/name-rev.c
  - builtin/pack-objects.c
  - builtin/pack-refs.c
  - builtin/prune.c
  - builtin/update-server-info.c
  - object-file.c
  - object-name.c
  - object.c
  - pack-bitmap.c
  - pack-mtimes.c
  - pack-revindex.c
  - pack-write.c
  - packfile.c

Besides above, fix minor grammatical issues.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
2022-06-23 15:46:02 +07:00
Emir SARI 160071c38f l10n: tr: v2.37.0 round #1
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2022-06-23 09:47:23 +03:00
Jiang Xin aa6bc5c581 Merge branch 'master' of github.com:ruester/git-po-de
* 'master' of github.com:ruester/git-po-de:
  l10n: TEAMS: Change German translation team leader
  l10n: de.po: Update German translation
2022-06-23 10:45:03 +08:00
Jiang Xin 241dd998bf Merge branch 'master' of github.com:alshopov/git-po
* 'master' of github.com:alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (5367t)
2022-06-23 10:44:43 +08:00
Jiang Xin bf34edf48c Merge branch 'fz/po-zh_CN' of github.com:fangyi-zhou/git-po
* 'fz/po-zh_CN' of github.com:fangyi-zhou/git-po:
  l10n: zh_CN: v2.37.0 round 1
2022-06-23 10:44:30 +08:00
Arthur Milchior 1b51ae591e l10n: README: fix typo
This 10-year old typo was introduced at 75b182ae (Update l10n guide:
change the repository URL, etc, 2012-03-02). The word "l10" should be
"l10n".

Signed-off-by: Arthur Milchior <arthur@milchior.fr>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2022-06-23 10:43:17 +08:00
Matthias Rüster 0411e8aa31 l10n: TEAMS: Change German translation team leader
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2022-06-22 19:19:14 +02:00
Matthias Rüster 13608fdcfb l10n: de.po: Update German translation
Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
2022-06-22 19:19:14 +02:00
Junio C Hamano f770e9f396 Git 2.37-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-22 09:07:56 -07:00
Junio C Hamano b9e4d89ca4 Merge branch 'tb/cruft-packs'
Docfix.

* tb/cruft-packs:
  gc: simplify --cruft description
2022-06-22 09:06:37 -07:00
Alexander Shopov 4ab814526e l10n: bg.po: Updated Bulgarian translation (5367t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2022-06-22 15:45:12 +02:00
Fangyi Zhou db2558009c
l10n: zh_CN: v2.37.0 round 1
Reviewed-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Fangyi Zhou <me@fangyi.io>
2022-06-22 10:28:36 +01:00
Jiang Xin ce51ed5195 Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git:
  name-rev: prefix annotate-stdin with '--' in message
  git-prompt: fix expansion of branch colour codes
  git-prompt: make colourization consistent
2022-06-22 15:46:22 +08:00
Junio C Hamano ddbc07872e Merge branch 'jp/prompt-clear-before-upstream-mark'
Bash command line prompt (in contrib/) update.

* jp/prompt-clear-before-upstream-mark:
  git-prompt: fix expansion of branch colour codes
  git-prompt: make colourization consistent
2022-06-21 10:07:50 -07:00
René Scharfe 378b51993a gc: simplify --cruft description
Remove duplicate "loose objects".

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-21 08:58:04 -07:00
Alexander Shopov 325240dfd7 name-rev: prefix annotate-stdin with '--' in message
This is an option rather than command.  Make the message convey this
similar to the other messages in the file.

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-20 16:20:45 -07:00
Jiang Xin 74e34a0ee2 Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git: (22 commits)
  Git 2.37-rc1
  git-compat-util: allow root to access both SUDO_UID and root owned
  i18n: fix mismatched camelCase config variables
  Another batch of fixes before -rc1
  bug_fl(): correctly initialize trace2 va_list
  relative_url(): fix incorrect condition
  pack-mtimes: avoid closing a bogus file descriptor
  read_index_from(): avoid memory leak
  submodule--helper: avoid memory leak when fetching submodules
  submodule-config: avoid memory leak
  fsmonitor: avoid memory leak in `fsm_settings__get_incompatible_msg()`
  cache-tree: remove cache_tree_find_path()
  pack-write: drop always-NULL parameter
  t5329: test 'git gc --cruft' without '--prune=now'
  t2107: test 'git update-index --verbose'
  perf-lib: fix missing test titles in output
  transfer doc: move fetch.credentialsInUrl to "transfer" config namespace
  fetch doc: note "pushurl" caveat about "credentialsInUrl", elaborate
  ci(github): also mark up compile errors
  ci(github): use grouping also in the `win-build` job
  ...
2022-06-18 14:02:07 +08:00
Junio C Hamano 5b71c59bc3 Git 2.37-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-17 17:15:13 -07:00
Junio C Hamano 694c0cc0fb Merge branch 'cb/path-owner-check-with-sudo-plus'
"sudo git foo" used to consider a repository owned by the original
user a safe one to access; it now also considers a repository owned
by root a safe one, too (after all, if an attacker can craft a
malicious repository owned by root, the box is 0wned already).

* cb/path-owner-check-with-sudo-plus:
  git-compat-util: allow root to access both SUDO_UID and root owned
2022-06-17 17:12:31 -07:00
Carlo Marcelo Arenas Belón 6b11e3d52e git-compat-util: allow root to access both SUDO_UID and root owned
Previous changes introduced a regression which will prevent root for
accessing repositories owned by thyself if using sudo because SUDO_UID
takes precedence.

Loosen that restriction by allowing root to access repositories owned
by both uid by default and without having to add a safe.directory
exception.

A previous workaround that was documented in the tests is no longer
needed so it has been removed together with its specially crafted
prerequisite.

Helped-by: Johanness Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-17 14:03:08 -07:00
Jiang Xin b4eda05d58 i18n: fix mismatched camelCase config variables
Some config variables are combinations of multiple words, and we
typically write them in camelCase forms in manpage and translatable
strings. It's not easy to find mismatches for these camelCase config
variables during code reviews, but occasionally they are identified
during localization translations.

To check for mismatched config variables, I introduced a new feature
in the helper program for localization[^1]. The following mismatched
config variables have been identified by running the helper program,
such as "git-po-helper check-pot".

Lowercase in manpage should use camelCase:

 * Documentation/config/http.txt: http.pinnedpubkey

Lowercase in translable strings should use camelCase:

 * builtin/fast-import.c:  pack.indexversion
 * builtin/gc.c:           gc.logexpiry
 * builtin/index-pack.c:   pack.indexversion
 * builtin/pack-objects.c: pack.indexversion
 * builtin/repack.c:       pack.writebitmaps
 * commit.c:               i18n.commitencoding
 * gpg-interface.c:        user.signingkey
 * http.c:                 http.postbuffer
 * submodule-config.c:     submodule.fetchjobs

Mismatched camelCases, choose the former:

 * Documentation/config/transfer.txt: transfer.credentialsInUrl
   remote.c:                          transfer.credentialsInURL

[^1]: https://github.com/git-l10n/git-po-helper

Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-17 10:38:26 -07:00
Junio C Hamano b81b98f818 Another batch of fixes before -rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-17 10:33:42 -07:00
Junio C Hamano aa11b94ef8 Merge branch 'jk/bug-fl-va-list-fix'
Fix buggy va_list usage in recent code.

* jk/bug-fl-va-list-fix:
  bug_fl(): correctly initialize trace2 va_list
2022-06-17 10:33:32 -07:00
Junio C Hamano 7f5a382aa5 Merge branch 'ab/credentials-in-url-more'
Rename fetch.credentialsInUrl to transfer.credentialsInUrl as the
single configuration variable should work both in pushing and
fetching.

* ab/credentials-in-url-more:
  transfer doc: move fetch.credentialsInUrl to "transfer" config namespace
  fetch doc: note "pushurl" caveat about "credentialsInUrl", elaborate
2022-06-17 10:33:32 -07:00
Junio C Hamano d0d96b8280 Merge branch 'js/ci-github-workflow-markup'
Recent CI update hides certain failures in test jobs, which has
been corrected.

* js/ci-github-workflow-markup:
  ci(github): also mark up compile errors
  ci(github): use grouping also in the `win-build` job
  ci(github): bring back the 'print test failures' step
2022-06-17 10:33:32 -07:00
Junio C Hamano e870c5857f Merge branch 'js/misc-fixes'
Assorted fixes to problems found by Coverity.

* js/misc-fixes:
  relative_url(): fix incorrect condition
  pack-mtimes: avoid closing a bogus file descriptor
  read_index_from(): avoid memory leak
  submodule--helper: avoid memory leak when fetching submodules
  submodule-config: avoid memory leak
  fsmonitor: avoid memory leak in `fsm_settings__get_incompatible_msg()`
2022-06-17 10:33:31 -07:00
Junio C Hamano 99bbf4739d Merge branch 'jc/cocci-cleanup'
Remove a coccinelle rule that is no longer relevant.

* jc/cocci-cleanup:
  cocci: retire is_null_sha1() rule
2022-06-17 10:33:31 -07:00
Junio C Hamano 30327a08c8 Merge branch 'ds/more-test-coverage'
Improve test coverage with a handful of tests.

* ds/more-test-coverage:
  cache-tree: remove cache_tree_find_path()
  pack-write: drop always-NULL parameter
  t5329: test 'git gc --cruft' without '--prune=now'
  t2107: test 'git update-index --verbose'
2022-06-17 10:33:31 -07:00
Junio C Hamano 2fec2d2895 Merge branch 'jk/perf-lib-test-titles'
Show test titles to the performance test output again.

* jk/perf-lib-test-titles:
  perf-lib: fix missing test titles in output
2022-06-17 10:33:31 -07:00
Jiang Xin 2b288c4724 Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git:
  builtin/rebase: remove a redundant space in l10n string
2022-06-17 08:57:35 +08:00