| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
When a file has no trailing new line at the end diff records this by
appending "\ No newline at end of file" below the last line of the
file. This line should not be counted in the hunk header. Fix the
splitting and coalescing code to count files without a trailing new line
properly and change one of the tests to test splitting without a
trailing new line.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recount the number of preimage and postimage lines in a hunk after it
has been edited so any change in the number of insertions or deletions
can be used to adjust the offsets of subsequent hunks. If an edited
hunk is subsequently split then the offset correction will be lost. It
would be possible to fix this if it is a problem, however the code
here is still an improvement on the status quo for the common case
where an edited hunk is applied without being split.
This is also a necessary step to removing '--recount' and
'--allow-overlap' from the invocation of 'git apply'. Before
'--recount' can be removed the splitting and coalescing counting needs
to be fixed to handle a missing newline at the end of a file. In order
to remove '--allow-overlap' there needs to be i) some way of verifying
the offset data in the edited hunk (probably by correlating the
preimage (or postimage if the patch is going to be applied in reverse)
lines of the edited and unedited versions to see if they are offset or
if any leading/trailing context lines have been removed) and ii) a way of
dealing with edited hunks that change context lines that are shared
with neighbouring hunks.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 8cbd431082 ("git-add--interactive: replace hunk
recounting with apply --recount", 2008-7-2) if a hunk is skipped then
we rely on the context lines to apply subsequent hunks in the right
place. While this works most of the time it is possible for hunks to
end up being applied in the wrong place. To fix this adjust the offset
of subsequent hunks to correct for any change in the number of
insertions or deletions due to the skipped hunk. The change in offset
due to edited hunks that have the number of insertions or deletions
changed is ignored here, it will be fixed in the next commit.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a hunk is skipped by add -i the offsets of subsequent hunks are
not adjusted to account for any missing insertions due to the skipped
hunk. Most of the time this does not matter as apply uses the context
lines to apply the subsequent hunks in the correct place, however in
pathological cases the context lines will match at the now incorrect
offset and the hunk will be applied in the wrong place. The offsets of
hunks following an edited hunk that has had the number of insertions
or deletions changed also need to be updated in the same way. Add
failing tests to demonstrate this.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a filter when comparing diffs to fix the value of non-zero hashes
in diff index lines so we're not hard coding sha1 hash values in the
expected output. This makes it easier to change the expected output if
a test is edited as we don't need to worry about the exact hash value
and means the tests will work when the hash algorithm is transitioned
away from sha1.
Thanks-to: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
|
|
|
|
|
| |
Simplify things slightly by using the above helpers.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
|
|
|
|
|
|
|
| |
Indent here documents in line with the current style for tests.
While at it, quote the end marker of here-docs that do not use
variable interpolation.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
|
|
|
|
|
|
| |
This code is duplicated in a couple of places so make it into a
function as we're going to add some more callers shortly.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|
|
|
| |
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|\
| |
| |
| |
| |
| | |
* bc/hash-algo:
t5601-clone: test case-conflicting files on case-insensitive filesystem
repository: pre-initialize hash algo pointer
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A recently introduced regression caused a segfault at clone time on
case-insensitive filesystems when filenames differing only in case are
present. This bug has already been fixed (repository: pre-initialize
hash algo pointer, 2018-01-18), but it's not the first time similar
problems have arisen. Therefore, introduce a test to catch this case and
protect against future regressions.
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are various git subcommands (among them, clone) which don't set up
the repository (that is, they lack RUN_SETUP or RUN_SETUP_GENTLY) but
end up needing to have information about the hash algorithm in use.
Because the hash algorithm is part of struct repository and it's only
initialized in repository setup, we can end up dereferencing a NULL
pointer in some cases if we call one of these subcommands and look up
the empty blob or empty tree values.
A "git clone" of a project that has two paths that differ only in
case suffers from this if it is run on a case insensitive platform.
When the command attempts to check out one of these two paths after
checking out the other one, the checkout codepath needs to see if
the version that is already on the filesystem (which should not
happen if the FS were case sensitive) is dirty, and it needs to
exercise the hashing code at that point.
In the future, we can add a command line option for this or read it
from the configuration, but until we're ready to expose that
functionality to the user, simply initialize the repository
structure to use the current hash algorithm, SHA-1.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
| |
| |
| |
| | |
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
l10n for Git 2.16.0 round 2
* tag 'l10n-2.16.0-rnd2' of git://github.com/git-l10n/git-po: (24 commits)
l10n: de.po: translate 72 new messages
l10n: de.po: improve messages when a branch starts to track another ref
l10n: bg.po: Updated Bulgarian translation (3288t)
l10n: TEAMS: add zh_CN team members
l10n: zh_CN: for git v2.16.0 l10n round 2
l10n: sv.po: Update Swedish translation (3288t0f0u)
l10n: ru.po: update Russian translation
l10n: TEAMS: Add ko team members
l10n: ko.po: Update Korean translation
l10n: fr.po 2.16 round 2
l10n: es.po: Spanish translation 2.16.0 round 2
l10n: vi.po(3288t): Updated Vietnamese translation for v2.16.0 round 2
l10n: git.pot: v2.16.0 round 2 (8 new, 4 removed)
l10n: es.po: Update Spanish Translation v2.16.0
l10n: fr.po v2.16.0 round 1
l10n: bg.po: Updated Bulgarian translation (3284t)
l10n: sv.po: Update Swedish translation (3284t0f0u)
l10n: fr.po: "worktree list" mistranslated as prune
l10n: git.pot: v2.16.0 round 1 (64 new, 25 removed)
l10n: fixes to German translation
...
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Translate 72 new messages came from git.pot update in 18a907225 (l10n:
git.pot: v2.16.0 round 1 (64 new, 25 removed)) and 005c62fe4 (l10n:
git.pot: v2.16.0 round 2 (8 new, 4 removed)).
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Matthias Rüster <matthias.ruester@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Add Fangyi Zhou to zh_CN l10n team members.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Translate 72 messages (3288t0f0u) for git v2.16.0-rc1.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: 依云 <lilydjwg@gmail.com>
Reviewed-by: Fangyi Zhou <fangyi.zhou@yuriko.moe>
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
* 'master' of git://github.com/nafmo/git-l10n-sv:
l10n: sv.po: Update Swedish translation (3288t0f0u)
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
* 'russian-l10n' of https://github.com/DJm00n/git-po-ru:
l10n: ru.po: update Russian translation
|
| | |/ /
| | | |
| | | |
| | | | |
Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
Add Gwan-gyeong Mun and Sihyeon Jang.
Signed-off-by: Changwoo Ryu <cwryu@debian.org>
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
* 'ko/merge-l10n' of https://github.com/git-l10n-ko/git-l10n-ko:
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>
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
* '2.16' of https://github.com/ChrisADR/git-po:
l10n: es.po: Spanish translation 2.16.0 round 2
|
| | |/ /
| | | |
| | | |
| | | | |
Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
* 'fr_2.16-rc1' of git://github.com/jnavila/git:
l10n: fr.po 2.16 round 2
|
| | |/ /
| | | |
| | | |
| | | | |
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
|
| |/ /
| | |
| | |
| | | |
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Generate po/git.pot from v2.16.0-rc1 for git v2.16.0 l10n round 2.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* 'master' of git://github.com/git-l10n/git-po:
l10n: es.po: Update Spanish Translation v2.16.0
l10n: fr.po v2.16.0 round 1
l10n: bg.po: Updated Bulgarian translation (3284t)
l10n: sv.po: Update Swedish translation (3284t0f0u)
l10n: fr.po: "worktree list" mistranslated as prune
l10n: git.pot: v2.16.0 round 1 (64 new, 25 removed)
l10n: fixes to German translation
l10n: Update Spanish translation
l10n: zh_CN translate parameter name
l10n: zh_CN Fix typo
l10n: Fixes to Catalan translation
|
| | |\ \
| | | | |
| | | | |
| | | | |
| | | | | |
* '2.16' of https://github.com/ChrisADR/git-po:
l10n: es.po: Update Spanish Translation v2.16.0
|
| | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
|
| | |\ \ \
| | | |/ /
| | |/| |
| | | | |
| | | | |
| | | | | |
* 'fr_2.16' of git://github.com/jnavila/git:
l10n: fr.po v2.16.0 round 1
l10n: fr.po: "worktree list" mistranslated as prune
|
| | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
|
| | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: Louis Bettens <louis@bettens.info>
|
| | |\ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* 'master' of git://github.com/alshopov/git-po:
l10n: bg.po: Updated Bulgarian translation (3284t)
|
| | | |/ /
| | | | |
| | | | |
| | | | | |
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
|
| | |/ /
| | | |
| | | |
| | | |
| | | |
| | | | |
Also corrected spelling.
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
|
| | |\ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* 'maint' of git://github.com/git-l10n/git-po:
l10n: fixes to German translation
l10n: Update Spanish translation
l10n: zh_CN translate parameter name
l10n: zh_CN Fix typo
l10n: Fixes to Catalan translation
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Der-, die- and dasselbe and their declensions are spelt as one word in German.
Signed-off-by: Robert Abel <rabel@robertabel.eu>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
|
| | | |\ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* '2.15.1' of https://github.com/ChrisADR/git-po:
l10n: Update Spanish translation
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Translate parameters such as:
* <new-branch-name> in advice.c:126,
* <command>, <path>, <revision> in setup.c:171, setup.c:184,
setup.c:252,
* <base-commit-id> in builtin/log.c:1288,
* <conflicted_files> in git-rebase.sh:58, and more...
Signed-off-by: Fangyi Zhou <fangyi.zhou@yuriko.moe>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
apply.c:125
say -> way
Signed-off-by: Fangyi Zhou <fangyi.zhou@yuriko.moe>
|
| | | |/ /
| | | | |
| | | | |
| | | | | |
Signed-off-by: Jordi Mas <jmas@softcatala.org>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Generate po/git.pot from v2.16.0-rc0 for git v2.16.0 l10n round 1.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|