Junio C Hamano [Thu, 17 Jun 2021 02:26:17 +0000 (11:26 +0900)]
Merge branch 'ab/describe-tests-fix' into jch
Various updates to tests around "git describe"
* ab/describe-tests-fix:
describe tests: support -C in "check_describe"
describe tests: fix nested "test_expect_success" call
describe tests: don't rely on err.actual from "check_describe"
describe tests: refactor away from glob matching
describe tests: improve test for --work-tree & --dirty
Junio C Hamano [Thu, 17 Jun 2021 02:26:17 +0000 (11:26 +0900)]
Merge branch 'ab/pickaxe-pcre2' into jch
Rewrite the backend for "diff -G/-S" to use pcre2 engine when
available.
* ab/pickaxe-pcre2: (22 commits)
xdiff-interface: replace discard_hunk_line() with a flag
xdiff users: use designated initializers for out_line
pickaxe -G: don't special-case create/delete
pickaxe -G: terminate early on matching lines
xdiff-interface: allow early return from xdiff_emit_line_fn
xdiff-interface: prepare for allowing early return
pickaxe -S: slightly optimize contains()
pickaxe: rename variables in has_changes() for brevity
pickaxe -S: support content with NULs under --pickaxe-regex
pickaxe: assert that we must have a needle under -G or -S
pickaxe: refactor function selection in diffcore-pickaxe()
perf: add performance test for pickaxe
pickaxe/style: consolidate declarations and assignments
diff.h: move pickaxe fields together again
pickaxe: die when --find-object and --pickaxe-all are combined
pickaxe: die when -G and --pickaxe-regex are combined
pickaxe tests: add missing test for --no-pickaxe-regex being an error
pickaxe tests: test for -G, -S and --find-object incompatibility
pickaxe tests: add test for "log -S" not being a regex
pickaxe tests: add test for diffgrep_consume() internals
...
Junio C Hamano [Thu, 17 Jun 2021 02:26:16 +0000 (11:26 +0900)]
Merge branch 'tv/p4-fallback-encoding' into jch
"git p4" learns the fallbackEncoding configuration variable to
safely accept changeset descriptions that aren't written in UTF-8.
* tv/p4-fallback-encoding:
git-p4: git-p4.fallbackEncoding to specify non UTF-8 charset
Junio C Hamano [Thu, 17 Jun 2021 02:26:16 +0000 (11:26 +0900)]
Merge branch 'hn/prep-tests-for-reftable' into jch
Preliminary clean-up of tests before the main reftable changes
hits the codebase.
* hn/prep-tests-for-reftable: (22 commits)
t1415: set REFFILES for test specific to storage format
t4202: mark bogus head hash test with REFFILES
t7003: check reflog existence only for REFFILES
t7900: stop checking for loose refs
t1404: mark tests that muck with .git directly as REFFILES.
t2017: mark --orphan/logAllRefUpdates=false test as REFFILES
t1414: mark corruption test with REFFILES
t1407: require REFFILES for for_each_reflog test
test-lib: provide test prereq REFFILES
t5304: use "reflog expire --all" to clear the reflog
t5304: restyle: trim empty lines, drop ':' before >
t7003: use rev-parse rather than FS inspection
t5000: inspect HEAD using git-rev-parse
t5000: reformat indentation to the latest fashion
t1301: fix typo in error message
t1413: use tar to save and restore entire .git directory
t1401-symbolic-ref: avoid direct filesystem access
t1401: use tar to snapshot and restore repo state
t5601: read HEAD using rev-parse
t9300: check ref existence using test-helper rather than a file system check
...
Junio C Hamano [Thu, 17 Jun 2021 02:26:16 +0000 (11:26 +0900)]
Merge branch 'fc/push-simple-updates-cleanup' into jch
Some more code and doc clarification around "git push".
* fc/push-simple-updates-cleanup:
push: don't get a full remote object
push: only check same_remote when needed
push: remove trivial function
push: remove redundant check
push: factor out the typical case
push: get rid of all the setup_push_* functions
push: trivial simplifications
push: make setup_push_* return the dst
push: only get the branch when needed
push: factor out null branch check
push: split switch cases
push: return immediately in trivial switch case
push: create new get_upstream_ref() helper
Junio C Hamano [Thu, 17 Jun 2021 02:26:15 +0000 (11:26 +0900)]
Merge branch 'fc/push-simple-updates' into jch
Some code and doc clarification around "git push".
* fc/push-simple-updates:
doc: push: explain default=simple correctly
push: remove unused code in setup_push_upstream()
push: simplify setup_push_simple()
push: reorganize setup_push_simple()
push: copy code to setup_push_simple()
push: hedge code of default=simple
push: rename !triangular to same_remote
Junio C Hamano [Thu, 17 Jun 2021 02:26:13 +0000 (11:26 +0900)]
Merge branch 'js/trace2-discard-event-docfix' into jch
Docfix.
* js/trace2-discard-event-docfix:
docs: fix api-trace2 doc for "too_many_files" event
Junio C Hamano [Thu, 17 Jun 2021 02:26:12 +0000 (11:26 +0900)]
Merge branch 'tb/complete-diff-anchored' into jch
The command line completion (in contrib/) learned that "git diff"
takes the "--anchored" option.
* tb/complete-diff-anchored:
completion: add --anchored to diff's options
Junio C Hamano [Thu, 17 Jun 2021 02:26:12 +0000 (11:26 +0900)]
Merge branch 'tk/partial-clone-repack-doc' into jch
Docfix.
* tk/partial-clone-repack-doc:
Remove warning that repack only works on non-promisor packfiles
Junio C Hamano [Mon, 14 Jun 2021 04:23:28 +0000 (13:23 +0900)]
The second batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 14 Jun 2021 04:33:29 +0000 (13:33 +0900)]
Merge branch 'fc/doc-build-cleanup'
Preparatory build procedure clean-up for documentation.
* fc/doc-build-cleanup:
doc: avoid using rm directly
doc: simplify Makefile using .DELETE_ON_ERROR
doc: remove unnecessary rm instances
doc: improve asciidoc dependencies
doc: refactor common asciidoc dependencies
Junio C Hamano [Mon, 14 Jun 2021 04:33:29 +0000 (13:33 +0900)]
Merge branch 'ab/test-lib-updates'
Test clean-up.
* ab/test-lib-updates:
test-lib: split up and deprecate test_create_repo()
test-lib: do not show advice about init.defaultBranch under --verbose
test-lib: reformat argument list in test_create_repo()
submodule tests: use symbolic-ref --short to discover branch name
test-lib functions: add --printf option to test_commit
describe tests: convert setup to use test_commit
test-lib functions: add an --annotated option to "test_commit"
test-lib-functions: document test_commit --no-tag
test-lib-functions: reword "test_commit --append" docs
test-lib tests: remove dead GIT_TEST_FRAMEWORK_SELFTEST variable
test-lib: bring $remove_trash out of retirement
Junio C Hamano [Mon, 14 Jun 2021 04:33:28 +0000 (13:33 +0900)]
Merge branch 'dd/honor-users-tar-in-tests'
Test portability fix.
* dd/honor-users-tar-in-tests:
t: use configured TAR instead of tar
Junio C Hamano [Mon, 14 Jun 2021 04:33:28 +0000 (13:33 +0900)]
Merge branch 'ps/rev-list-object-type-filter'
Message update.
* ps/rev-list-object-type-filter:
help: fix small typo in error message
Junio C Hamano [Mon, 14 Jun 2021 04:33:28 +0000 (13:33 +0900)]
Merge branch 'ab/trace2-squelch-gcc-warning'
Workaround compiler warnings.
* ab/trace2-squelch-gcc-warning:
trace2: refactor to avoid gcc warning under -O3
Junio C Hamano [Mon, 14 Jun 2021 04:33:27 +0000 (13:33 +0900)]
Merge branch 'so/log-m-implies-p'
The "-m" option in "git log -m" that does not specify which format,
if any, of diff is desired did not have any visible effect; it now
implies some form of diff (by default "--patch") is produced.
* so/log-m-implies-p:
diff-merges: let "-m" imply "-p"
diff-merges: rename "combined_imply_patch" to "merges_imply_patch"
stash list: stop passing "-m" to "git log"
git-svn: stop passing "-m" to "git rev-list"
diff-merges: move specific diff-index "-m" handling to diff-index
t4013: test "git diff-index -m"
t4013: test "git diff-tree -m"
t4013: test "git log -m --stat"
t4013: test "git log -m --raw"
t4013: test that "-m" alone has no effect in "git log"
Junio C Hamano [Mon, 14 Jun 2021 04:33:26 +0000 (13:33 +0900)]
Merge branch 'en/ort-perf-batch-11'
Optimize out repeated rename detection in a sequence of mergy
operations.
* en/ort-perf-batch-11:
merge-ort, diffcore-rename: employ cached renames when possible
merge-ort: handle interactions of caching and rename/rename(1to1) cases
merge-ort: add helper functions for using cached renames
merge-ort: preserve cached renames for the appropriate side
merge-ort: avoid accidental API mis-use
merge-ort: add code to check for whether cached renames can be reused
merge-ort: populate caches of rename detection results
merge-ort: add data structures for in-memory caching of rename detection
t6429: testcases for remembering renames
fast-rebase: write conflict state to working tree, index, and HEAD
fast-rebase: change assert() to BUG()
Documentation/technical: describe remembering renames optimization
t6423: rename file within directory that other side renamed
Junio C Hamano [Mon, 14 Jun 2021 04:33:26 +0000 (13:33 +0900)]
Merge branch 'jk/fetch-pack-v2-half-close-early'
"git fetch" over protocol v2 left its side of the socket open after
it finished speaking, which unnecessarily wasted the resource on
the other side.
* jk/fetch-pack-v2-half-close-early:
fetch-pack: signal v2 server that we are done making requests
Junio C Hamano [Mon, 14 Jun 2021 04:33:26 +0000 (13:33 +0900)]
Merge branch 'ds/write-index-with-hashfile-api'
Use the hashfile API in the codepath that writes the index file to
reduce code duplication.
* ds/write-index-with-hashfile-api:
read-cache: delete unused hashing methods
read-cache: use hashfile instead of git_hash_ctx
csum-file.h: increase hashfile buffer size
hashfile: use write_in_full()
Junio C Hamano [Mon, 14 Jun 2021 04:33:26 +0000 (13:33 +0900)]
Merge branch 'jk/clone-clean-upon-transport-error'
Recent "git clone" left a temporary directory behind when the
transport layer returned an failure.
* jk/clone-clean-upon-transport-error:
clone: clean up directory after transport_fetch_refs() failure
Junio C Hamano [Mon, 14 Jun 2021 04:33:26 +0000 (13:33 +0900)]
Merge branch 'ga/send-email-sendmail-cmd'
"git send-email" learned the "--sendmail-cmd" command line option
and the "sendemail.sendmailCmd" configuration variable, which is a
more sensible approach than the current way of repurposing the
"smtp-server" that is meant to name the server to instead name the
command to talk to the server.
* ga/send-email-sendmail-cmd:
git-send-email: add option to specify sendmail command
Junio C Hamano [Mon, 14 Jun 2021 04:33:25 +0000 (13:33 +0900)]
Merge branch 'zh/ref-filter-atom-type'
The code to handle the "--format" option in "for-each-ref" and
friends made too many string comparisons on %(atom)s used in the
format string, which has been corrected by converting them into
enum when the format string is parsed.
* zh/ref-filter-atom-type:
ref-filter: introduce enum atom_type
ref-filter: add objectsize to used_atom
Junio C Hamano [Thu, 10 Jun 2021 02:37:04 +0000 (11:37 +0900)]
The first batch post Git 2.32
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 10 Jun 2021 03:04:27 +0000 (12:04 +0900)]
Merge branch 'ah/setup-extensions-message-i18n-fix'
Message update.
* ah/setup-extensions-message-i18n-fix:
setup: split "extensions found" messages into singular and plural
Junio C Hamano [Thu, 10 Jun 2021 03:04:27 +0000 (12:04 +0900)]
Merge branch 'ah/fetch-reject-warning-grammofix'
Message update.
* ah/fetch-reject-warning-grammofix:
fetch: improve grammar of "shallow roots" message
Junio C Hamano [Thu, 10 Jun 2021 03:04:26 +0000 (12:04 +0900)]
Merge branch 'jk/doc-color-pager'
The documentation for "color.pager" configuration variable has been
updated.
* jk/doc-color-pager:
doc: explain the use of color.pager
Junio C Hamano [Thu, 10 Jun 2021 03:04:26 +0000 (12:04 +0900)]
Merge branch 'tl/fix-packfile-uri-doc'
Doc fix.
* tl/fix-packfile-uri-doc:
packfile-uri.txt: fix blobPackfileUri description
Junio C Hamano [Thu, 10 Jun 2021 03:04:25 +0000 (12:04 +0900)]
Merge branch 'ry/clarify-fast-forward-in-glossary'
The description of "fast-forward" in the glossary has been updated.
* ry/clarify-fast-forward-in-glossary:
docs: improve fast-forward in glossary content
Junio C Hamano [Thu, 10 Jun 2021 03:04:25 +0000 (12:04 +0900)]
Merge branch 'wm/rev-parse-die-i18n'
Quite a many die() messages in rev-parse haven't been marked for
translation.
* wm/rev-parse-die-i18n:
rev-parse: mark die() messages for translation
Junio C Hamano [Thu, 10 Jun 2021 03:04:25 +0000 (12:04 +0900)]
Merge branch 'jc/clarify-revision-range'
Doc update.
* jc/clarify-revision-range:
revisions(7): clarify that most commands take a single revision range
Junio C Hamano [Thu, 10 Jun 2021 03:04:24 +0000 (12:04 +0900)]
Merge branch 'ah/doc-describe'
Doc update.
* ah/doc-describe:
describe-doc: clarify default length of abbreviation
Junio C Hamano [Thu, 10 Jun 2021 03:04:24 +0000 (12:04 +0900)]
Merge branch 'ah/submodule-helper-module-summary-parseopt'
Message update.
* ah/submodule-helper-module-summary-parseopt:
submodule: use the imperative mood to describe the --files option
Junio C Hamano [Thu, 10 Jun 2021 03:04:23 +0000 (12:04 +0900)]
Merge branch 'ah/stash-usage-i18n-fix'
i18n update.
* ah/stash-usage-i18n-fix:
stash: don't translate literal commands
Junio C Hamano [Thu, 10 Jun 2021 03:04:23 +0000 (12:04 +0900)]
Merge branch 'ah/merge-usage-i18n-fix'
i18n update.
* ah/merge-usage-i18n-fix:
merge: don't translate literal commands
Junio C Hamano [Thu, 10 Jun 2021 03:04:23 +0000 (12:04 +0900)]
Merge branch 'jn/size-t-casted-to-off-t-fix'
Rewrite code that triggers undefined behaiour warning.
* jn/size-t-casted-to-off-t-fix:
xsize_t: avoid implementation defined behavior when len < 0
Junio C Hamano [Thu, 10 Jun 2021 03:04:22 +0000 (12:04 +0900)]
Merge branch 'mt/parallel-checkout-with-padded-oidcpy'
The parallel checkout codepath did not initialize object ID field
used to talk to the worker processes in a futureproof way.
* mt/parallel-checkout-with-padded-oidcpy:
parallel-checkout: send the new object_id algo field to the workers
Junio C Hamano [Thu, 10 Jun 2021 03:04:22 +0000 (12:04 +0900)]
Merge branch 'ef/mailinfo-short-name'
We historically rejected a very short string as an author name
while accepting a patch e-mail, which has been loosened.
* ef/mailinfo-short-name:
mailinfo: don't discard names under 3 characters
Junio C Hamano [Sun, 6 Jun 2021 06:40:01 +0000 (15:40 +0900)]
Git 2.32
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 6 Jun 2021 06:39:21 +0000 (15:39 +0900)]
Merge tag 'l10n-2.32.0-rnd1.1' of git://github.com/git-l10n/git-po
l10n-2.32.0-rnd1.1
* tag 'l10n-2.32.0-rnd1.1' of git://github.com/git-l10n/git-po: (25 commits)
l10n: es: 2.32.0 round 1
l10n: zh_CN: for git v2.32.0 l10n round 1
l10n: Update Catalan translation
l10n: de.po: Update German translation for Git v2.32.0
l10n: README: note on fuzzy translations
l10n: README: document l10n conventions
l10n: README: document "core translation"
l10n: README: document git-po-helper
l10n: README: add file extention ".md"
l10n: pt_PT: add Portuguese translations part 3
l10n: bg.po: Updated Bulgarian translation (5204t)
l10n: id: po-id for 2.32.0 (round 1)
l10n: vi.po(5204t): Updated Vietnamese translation for v2.32.0
l10n: zh_TW.po: localized
l10n: zh_TW.po: v2.32.0 round 1 (11 untranslated)
l10n: sv.po: Update Swedish translation (5204t0f0u)
l10n: fix typos in po/TEAMS
l10n: fr: v2.32.0 round 1
l10n: tr: v2.32.0-r1
l10n: fr: fixed inconsistencies
...
Junio C Hamano [Sun, 6 Jun 2021 06:39:10 +0000 (15:39 +0900)]
Merge branch 'rs/parallel-checkout-test-fix'
Test fix.
* rs/parallel-checkout-test-fix:
parallel-checkout: avoid dash local bug in tests
Junio C Hamano [Sun, 6 Jun 2021 06:39:09 +0000 (15:39 +0900)]
Merge branch 'jc/fsync-can-fail-with-eintr'
Last minute portability fix.
* jc/fsync-can-fail-with-eintr:
fsync(): be prepared to see EINTR
René Scharfe [Sun, 6 Jun 2021 01:01:57 +0000 (03:01 +0200)]
parallel-checkout: avoid dash local bug in tests
Dash bug https://bugs.launchpad.net/ubuntu/+source/dash/+bug/139097
lets the shell erroneously perform field splitting on the expansion of a
command substitution during declaration of a local variable. It causes
the parallel-checkout tests to fail e.g. when running them with
/bin/dash on MacOS 11.4, where they error out like this:
./t2080-parallel-checkout-basics.sh: 33: local: 0: bad variable name
That's because the output of wc -l contains leading spaces and the
returned number of lines is treated as another variable to declare, i.e.
as in "local workers= 0".
Work around it by enclosing the command substitution in quotes.
Helped-by: Matheus Tavares Bernardino <matheus.bernardino@usp.br>
Helped-by: SZEDER Gábor <szeder.dev@gmail.com>
Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christopher Diaz Riveros [Sun, 6 Jun 2021 01:06:23 +0000 (20:06 -0500)]
l10n: es: 2.32.0 round 1
Signed-off-by: Christopher Diaz Riveros <christopher.diaz.riv@gmail.com>
Jiang Xin [Sat, 5 Jun 2021 09:54:23 +0000 (17:54 +0800)]
l10n: zh_CN: for git v2.32.0 l10n round 1
Translate 126 new messages (5204t0f0u) for git 2.32.0.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Sat, 5 Jun 2021 13:30:30 +0000 (21:30 +0800)]
Merge branch 'fix_typo' of github.com:e-yes/git
* 'fix_typo' of github.com:e-yes/git:
l10n: ru.po: fix typo in Russian translation
Junio C Hamano [Fri, 4 Jun 2021 01:36:11 +0000 (10:36 +0900)]
fsync(): be prepared to see EINTR
Some platforms, like NonStop do not automatically restart fsync()
when interrupted by a signal, even when that signal is setup with
SA_RESTART.
This can lead to test breakage, e.g., where "--progress" is used,
thus SIGALRM is sent often, and can interrupt an fsync() syscall.
Make sure we deal with such a case by retrying the syscall
ourselves. Luckily, we call fsync() fron a single wrapper,
fsync_or_die(), so the fix is fairly isolated.
Reported-by: Randall S. Becker <randall.becker@nexbridge.ca>
Helped-by: Jeff King <peff@peff.net>
Helped-by: Taylor Blau <me@ttaylorr.com>
[jc: the above two did most of the work---I just tied the loose end]
Helped-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jiang Xin [Fri, 4 Jun 2021 10:59:17 +0000 (18:59 +0800)]
Merge branch 'pt-PT' of github.com:git-l10n-pt-PT/git-po
* 'pt-PT' of github.com:git-l10n-pt-PT/git-po:
l10n: pt_PT: add Portuguese translations part 3
l10n: pt_PT: add Portuguese translations part 2
Jordi Mas [Fri, 4 Jun 2021 04:58:05 +0000 (06:58 +0200)]
l10n: Update Catalan translation
Signed-off-by: Jordi Mas <jmas@softcatala.org>
Josh Steadmon [Fri, 4 Jun 2021 02:41:30 +0000 (19:41 -0700)]
docs: fix api-trace2 doc for "too_many_files" event
In
87db61a (trace2: write discard message to sentinel files,
2019-10-04), we added a new "too_many_files" event for when trace2
logging would create too many files in an output directory.
Unfortunately, the api-trace2 doc described a "discard" event instead.
Fix the doc to use the correct event name.
Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tao Klerks [Wed, 2 Jun 2021 11:47:26 +0000 (11:47 +0000)]
Remove warning that repack only works on non-promisor packfiles
The git-repack doc clearly states that it *does* operate on promisor
packfiles (in a separate partition), with "-a" specified. Presumably
the statements here are outdated, as they feature from the first doc
in 2017 (and the repack support was added in 2018)
Signed-off-by: Tao Klerks <tao@klerks.biz>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Acked-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthias Rüster [Sun, 23 May 2021 09:33:21 +0000 (11:33 +0200)]
l10n: de.po: Update German translation for Git v2.32.0
Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
Junio C Hamano [Wed, 2 Jun 2021 03:51:09 +0000 (12:51 +0900)]
Git 2.32-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
David Aguilar [Tue, 1 Jun 2021 20:52:29 +0000 (13:52 -0700)]
contrib/completion: fix zsh completion regression from
59d85a2a05
A recent change to make git-completion.bash use $__git_cmd_idx
in more places broke a number of completions on zsh because it
modified __git_main but did not update __git_zsh_main.
Notably, completions for "add", "branch", "mv" and "push" were
broken as a result of this change.
In addition to the undefined variable usage, "git mv <tab>" also
prints the following error:
__git_count_arguments:7: bad math expression:
operand expected at `"1"'
_git_mv:[:7: unknown condition: -gt
Remove the quotes around $__git_cmd_idx in __git_count_arguments
and set __git_cmd_idx=1 early in __git_zsh_main to fix the
regressions from
59d85a2a05.
This was tested on zsh 5.7.1 (x86_64-apple-darwin19.0).
Suggested-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Acked-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Bagas Sanjaya [Mon, 17 May 2021 12:40:38 +0000 (19:40 +0700)]
l10n: README: note on fuzzy translations
Fuzzy translation problem can occur when updating translations.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Bagas Sanjaya [Thu, 11 Mar 2021 11:36:57 +0000 (18:36 +0700)]
l10n: README: document l10n conventions
Document the conventions that l10n contributors must follow.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Bagas Sanjaya [Thu, 11 Mar 2021 11:01:34 +0000 (18:01 +0700)]
l10n: README: document "core translation"
Contributor for a new language must complete translations of a small set
of l10n messages.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Bagas Sanjaya [Thu, 11 Mar 2021 10:57:15 +0000 (17:57 +0700)]
l10n: README: document git-po-helper
Document the PO helper program (git-po-helper) with installation and
basic usage.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Wed, 26 May 2021 09:38:56 +0000 (17:38 +0800)]
l10n: README: add file extention ".md"
Add file extension ".md" to "po/README" to help to display this markdown
file properly.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Felipe Contreras [Mon, 31 May 2021 19:51:24 +0000 (14:51 -0500)]
push: don't get a full remote object
All we need to know is that their names are the same.
Additionally this might be easier to parse for some since
remote_for_branch is more descriptive than remote_get(NULL).
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:51:23 +0000 (14:51 -0500)]
push: only check same_remote when needed
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:51:22 +0000 (14:51 -0500)]
push: remove trivial function
It's a single line that is used in a single place, and the variable has
the same name as the function.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:51:21 +0000 (14:51 -0500)]
push: remove redundant check
If fetch_remote is NULL (i.e. the branch remote is invalid), then it
can't possibly be same as remote, which can't be NULL.
The check is redundant, and so is the extra variable.
Also, fix the Yoda condition: we want to check if remote is the same as
the branch remote, not the other way around.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:51:20 +0000 (14:51 -0500)]
push: factor out the typical case
Only override dst on the odd case.
This allows a preemptive break on the `simple` case.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:51:19 +0000 (14:51 -0500)]
push: get rid of all the setup_push_* functions
Their code is much simpler now and can move into the parent function.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:51:18 +0000 (14:51 -0500)]
push: trivial simplifications
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:51:17 +0000 (14:51 -0500)]
push: make setup_push_* return the dst
All of the setup_push_* functions are appending a refspec. Do this only
once on the parent function.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:51:16 +0000 (14:51 -0500)]
push: only get the branch when needed
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:51:15 +0000 (14:51 -0500)]
push: factor out null branch check
No need to do it in every single function.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:51:14 +0000 (14:51 -0500)]
push: split switch cases
We want all the cases that don't do anything with a branch first, and
then the rest. That way we will be able to get the branch and die if
there's a problem in the parent function, instead of inside the function
of each mode.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:51:13 +0000 (14:51 -0500)]
push: return immediately in trivial switch case
There's no need to break when nothing else will be executed.
Will help next patches.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:51:12 +0000 (14:51 -0500)]
push: create new get_upstream_ref() helper
This code is duplicated among multiple functions.
No functional changes.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:32:37 +0000 (14:32 -0500)]
doc: push: explain default=simple correctly
Now that the code has been simplified and it's clear what it's
actually doing, update the documentation to reflect that.
Namely; the simple mode only barfs when working on a centralized
workflow, and there's no configured upstream branch with the same name.
Cc: Elijah Newren <newren@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:32:36 +0000 (14:32 -0500)]
push: remove unused code in setup_push_upstream()
Now it's not used for the simple mode.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:32:35 +0000 (14:32 -0500)]
push: simplify setup_push_simple()
There's a safety check to make sure branch->refname isn't different
from branch->merge[0]->src, otherwise we die().
Therefore we always push to branch->refname.
Suggestions-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:32:34 +0000 (14:32 -0500)]
push: reorganize setup_push_simple()
Simply move the code around and remove dead code. In particular the
'!same_remote' conditional is a no-op since that part of the code is the
same_remote leg of the conditional beforehand.
No functional changes.
Suggestions-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:32:33 +0000 (14:32 -0500)]
push: copy code to setup_push_simple()
In order to avoid doing unnecessary things and simplify it in further
patches. In particular moving the additional name safety out of
setup_push_upstream() and into setup_push_simple() and thus making both
more straightforward.
The code is copied exactly as-is; no functional changes.
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:32:32 +0000 (14:32 -0500)]
push: hedge code of default=simple
`simple` is the most important mode so move the relevant code to its own
function to make it easier to see what it's doing.
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Mon, 31 May 2021 19:32:31 +0000 (14:32 -0500)]
push: rename !triangular to same_remote
The typical case is what git was designed for: distributed remotes.
It's only the atypical case--fetching and pushing to the same
remote--that we need to keep an eye on.
No functional changes.
Liked-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:37 +0000 (16:56 +0000)]
t1415: set REFFILES for test specific to storage format
Packing refs (and therefore checking that certain refs are not packed)
is a property of the packed/loose ref storage. Add a comment to explain
what the test checks.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:36 +0000 (16:56 +0000)]
t4202: mark bogus head hash test with REFFILES
In reftable, hashes are correctly formed by design.
Split off test for git-log in empty repo.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:35 +0000 (16:56 +0000)]
t7003: check reflog existence only for REFFILES
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:34 +0000 (16:56 +0000)]
t7900: stop checking for loose refs
Given that git-maintenance simply calls out git-pack-refs, it seems superfluous
to test the functionality of pack-refs itself, as that is covered by
t3210-pack-refs.sh.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:33 +0000 (16:56 +0000)]
t1404: mark tests that muck with .git directly as REFFILES.
The packed/loose ref storage is an overlay combination of packed-refs (refs and
tags in a single file) and one-file-per-ref. This creates all kinds of edge
cases related to directory/file conflicts, (non-)empty directories, and the
locking scheme, none of which applies to reftable.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:32 +0000 (16:56 +0000)]
t2017: mark --orphan/logAllRefUpdates=false test as REFFILES
In reftable, there is no notion of a per-ref 'existence' of a reflog. Each
reflog entry has its own key, so it is not possible to distinguish between
{reflog doesn't exist,reflog exists but is empty}. This makes the logic
in log_ref_setup() (file refs/files-backend.c), which depends on the existence
of the reflog file infeasible.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:31 +0000 (16:56 +0000)]
t1414: mark corruption test with REFFILES
The test checks what happens if reflog and ref database disagree on the state of
the latest commit. This seems to require accessing reflog storage directly.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:30 +0000 (16:56 +0000)]
t1407: require REFFILES for for_each_reflog test
Add extensive comment why this test needs a REFFILES annotation.
I tried forcing universal reflog creation with core.logAllRefUpdates=true, but
that apparently also doesn't cause reflogs to be created for pseudorefs
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:29 +0000 (16:56 +0000)]
test-lib: provide test prereq REFFILES
REFFILES can be used to mark tests that are specific to the packed/loose ref
storage format and its limitations. Marking such tests is a preparation for
introducing the reftable storage backend.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:28 +0000 (16:56 +0000)]
t5304: use "reflog expire --all" to clear the reflog
This test checks that unreachable objects are really removed. For the test to
work, it has to ensure that no reflog retain any reachable objects.
Previously, it did this by manipulating the file system to remove reflog in the
first test, and relying on git not updating the reflog if the relevant logfile
doesn't exist in follow-up tests.
Now, explicitly clear the reflog using 'reflog expire'. This reduces the
dependency between test functions. It also is more amenable to use with
reftable, which has no concept of (non)-existence of a reflog
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:27 +0000 (16:56 +0000)]
t5304: restyle: trim empty lines, drop ':' before >
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:26 +0000 (16:56 +0000)]
t7003: use rev-parse rather than FS inspection
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:25 +0000 (16:56 +0000)]
t5000: inspect HEAD using git-rev-parse
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:24 +0000 (16:56 +0000)]
t5000: reformat indentation to the latest fashion
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:23 +0000 (16:56 +0000)]
t1301: fix typo in error message
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:22 +0000 (16:56 +0000)]
t1413: use tar to save and restore entire .git directory
This makes the test independent of the particulars of the storage formats.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:21 +0000 (16:56 +0000)]
t1401-symbolic-ref: avoid direct filesystem access
Use symbolic-ref and rev-parse to inspect refs.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:20 +0000 (16:56 +0000)]
t1401: use tar to snapshot and restore repo state
This is agnostic to the ref storage format
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:19 +0000 (16:56 +0000)]
t5601: read HEAD using rev-parse
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:18 +0000 (16:56 +0000)]
t9300: check ref existence using test-helper rather than a file system check
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:17 +0000 (16:56 +0000)]
t/helper/ref-store: initialize oid in resolve-ref
This will print $ZERO_OID when asking for a non-existent ref from the
test-helper.
Since resolve-ref provides direct access to refs_resolve_ref_unsafe(), it
provides a reliable mechanism for accessing REFNAME, while avoiding the implicit
resolution to refs/heads/REFNAME.
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Han-Wen Nienhuys [Mon, 31 May 2021 16:56:16 +0000 (16:56 +0000)]
t4202: split testcase for invalid HEAD symref and HEAD hash
Reftable will prohibit invalid hashes at the storage level, but
git-symbolic-ref can still create branches ending in ".lock".
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>