- Sep 27, 2018
-
-
Junio C Hamano authored
Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Junio C Hamano authored
* maint-2.17: Git 2.17.2 fsck: detect submodule paths starting with dash fsck: detect submodule urls starting with dash Git 2.16.5 Git 2.15.3 Git 2.14.5 submodule-config: ban submodule paths that start with a dash submodule-config: ban submodule urls that start with dash submodule--helper: use "--" to signal end of clone options
-
Junio C Hamano authored
Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff King authored
As with urls, submodule paths with dashes are ignored by git, but may end up confusing older versions. Detecting them via fsck lets us prevent modern versions of git from being a vector to spread broken .gitmodules to older versions. Compared to blocking leading-dash urls, though, this detection may be less of a good idea: 1. While such paths provide confusing and broken results, they don't seem to actually work as option injections against anything except "cd". In particular, the submodule code seems to canonicalize to an absolute path before running "git clone" (so it passes /your/clone/-sub). 2. It's more likely that we may one day make such names actually work correctly. Even after we revert this fsck check, it will continue to be a hassle until hosting servers are all updated. On the other hand, it's not entirely clear that the behavior in older versions is safe. And if we do want to eventually allow this, we may end up doing so with a special syntax anyway (e.g., writing "./-sub" in the .gitmodules file, and teaching the submodule code to canonicalize it when comparing). So on balance, this is probably a good protection. Signed-off-by:
Jeff King <peff@peff.net> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff King authored
Urls with leading dashes can cause mischief on older versions of Git. We should detect them so that they can be rejected by receive.fsckObjects, preventing modern versions of git from being a vector by which attacks can spread. Signed-off-by:
Jeff King <peff@peff.net> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Junio C Hamano authored
* maint-2.16: Git 2.16.5 Git 2.15.3 Git 2.14.5 submodule-config: ban submodule paths that start with a dash submodule-config: ban submodule urls that start with dash submodule--helper: use "--" to signal end of clone options
-
Junio C Hamano authored
Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Junio C Hamano authored
* maint-2.15: Git 2.15.3 Git 2.14.5 submodule-config: ban submodule paths that start with a dash submodule-config: ban submodule urls that start with dash submodule--helper: use "--" to signal end of clone options
-
Junio C Hamano authored
Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Junio C Hamano authored
* maint-2.14: Git 2.14.5 submodule-config: ban submodule paths that start with a dash submodule-config: ban submodule urls that start with dash submodule--helper: use "--" to signal end of clone options
-
Junio C Hamano authored
Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff King authored
We recently banned submodule urls that look like command-line options. This is the matching change to ban leading-dash paths. As with the urls, this should not break any use cases that currently work. Even with our "--" separator passed to git-clone, git-submodule.sh gets confused. Without the code portion of this patch, the clone of "-sub" added in t7417 would yield results like: /path/to/git-submodule: 410: cd: Illegal option -s /path/to/git-submodule: 417: cd: Illegal option -s /path/to/git-submodule: 410: cd: Illegal option -s /path/to/git-submodule: 417: cd: Illegal option -s Fetched in submodule path '-sub', but it did not contain b56243f8f4eb91b2f1f8109452e659f14dd3fbe4. Direct fetching of that commit failed. Moreover, naively adding such a submodule doesn't work: $ git submodule add $url -sub The following path is ignored by one of your .gitignore files: -sub even though there is no such ignore pattern (the test script hacks around this with a well-placed "git mv"). Unlike leading-dash urls, though, it's possible that such a path _could_ be useful if we eventually made it work. So this commit should be seen not as recommending a particular policy, but rather temporarily closing off a broken and possibly dangerous code-path. We may revisit this decision later. There are two minor differences to the tests in t7416 (that covered urls): 1. We don't have a "./-sub" escape hatch to make this work, since the submodule code expects to be able to match canonical index names to the path field (so you are free to add submodule config with that path, but we would never actually use it, since an index entry would never start with "./"). 2. After this patch, cloning actually succeeds. Since we ignore the submodule.*.path value, we fail to find a config stanza for our submodule at all, and simply treat it as inactive. We still check for the "ignoring" message. Signed-off-by:
Jeff King <peff@peff.net> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff King authored
The previous commit taught the submodule code to invoke our "git clone $url $path" with a "--" separator so that we aren't confused by urls or paths that start with dashes. However, that's just one code path. It's not clear if there are others, and it would be an easy mistake to add one in the future. Moreover, even with the fix in the previous commit, it's quite hard to actually do anything useful with such an entry. Any url starting with a dash must fall into one of three categories: - it's meant as a file url, like "-path". But then any clone is not going to have the matching path, since it's by definition relative inside the newly created clone. If you spell it as "./-path", the submodule code sees the "/" and translates this to an absolute path, so it at least works (assuming the receiver has the same filesystem layout as you). But that trick does not apply for a bare "-path". - it's meant as an ssh url, like "-host:path". But this already doesn't work, as we explicitly disallow ssh hostnames that begin with a dash (to avoid option injection against ssh). - it's a remote-helper scheme, like "-scheme::data". This _could_ work if the receiver bends over backwards and creates a funny-named helper like "git-remote--scheme". But normally there would not be any helper that matches. Since such a url does not work today and is not likely to do anything useful in the future, let's simply disallow them entirely. That protects the existing "git clone" path (in a belt-and-suspenders way), along with any others that might exist. Our tests cover two cases: 1. A file url with "./" continues to work, showing that there's an escape hatch for people with truly silly repo names. 2. A url starting with "-" is rejected. Note that we expect case (2) to fail, but it would have done so even without this commit, for the reasons given above. So instead of just expecting failure, let's also check for the magic word "ignoring" on stderr. That lets us know that we failed for the right reason. Signed-off-by:
Jeff King <peff@peff.net> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Jeff King authored
When we clone a submodule, we call "git clone $url $path". But there's nothing to say that those components can't begin with a dash themselves, confusing git-clone into thinking they're options. Let's pass "--" to make it clear what we expect. There's no test here, because it's actually quite hard to make these names work, even with "git clone" parsing them correctly. And we're going to restrict these cases even further in future commits. So we'll leave off testing until then; this is just the minimal fix to prevent us from doing something stupid with a badly formed entry. Reported-by:
joernchen <joernchen@phenoelit.de> Signed-off-by:
Jeff King <peff@peff.net> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
- Jun 21, 2018
-
-
Junio C Hamano authored
Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
- Jun 19, 2018
-
-
Junio C Hamano authored
* en/rename-directory-detection-reboot: merge-recursive: use xstrdup() instead of fixed buffer
-
git://github.com/git-l10n/git-poJunio C Hamano authored
Merge Korean translation for l10n of Git 2.18.0 round 3 * tag 'l10n-2.18.0-rnd3.1' of git://github.com/git-l10n/git-po: l10n: ko.po: Update Korean translation
-
Junio C Hamano authored
* cf/submodule-progress-dissociate: t7400: encapsulate setup code in test_expect_success
-
Junio C Hamano authored
* js/rebase-i-root-fix: t3404: check root commit in 'rebase -i --root reword root commit'
-
Stefan Beller authored
When running t7400 in a shell you observe more output than expected: ... ok 8 - setup - hide init subdirectory ok 9 - setup - repository to add submodules to ok 10 - submodule add [master (root-commit) d79ce16] one Author: A U Thor <author@example.com> 1 file changed, 1 insertion(+) create mode 100644 one.t ok 11 - redirected submodule add does not show progress ok 12 - redirected submodule add --progress does show progress ok 13 - submodule add to .gitignored path fails ... Fix the output by encapsulating the setup code in test_expect_success Signed-off-by:
Stefan Beller <sbeller@google.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Todd Zullinger authored
When testing a reworded root commit, ensure that the squash-onto commit which is created and amended is still the root commit. Suggested-by:
Phillip Wood <phillip.wood@talktalk.net> Helped-by:
Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by:
Todd Zullinger <tmz@pobox.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Karthikeyan Singaravelan authored
Signed-off-by:
Karthikeyan Singaravelan <tir.karthi@gmail.com> Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
- Jun 18, 2018
-
-
Junio C Hamano authored
Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Junio C Hamano authored
"make NO_ICONV=NoThanks" did not override NEEDS_LIBICONV (i.e. linkage of -lintl, -liconv, etc. that are platform-specific tweaks), which has been corrected. * es/make-no-iconv: Makefile: make NO_ICONV really mean "no iconv"
-
Junio C Hamano authored
Test fix. * sg/t7406-chain-fix: t7406-submodule-update: fix broken &&-chains
-
Junio C Hamano authored
A test title has been reworded to clarify it. * ks/branch-set-upstream: t3200: clarify description of --set-upstream test
-
Junio C Hamano authored
A regression to "rebase -i --root" introduced during this cycle has been fixed. * js/rebase-i-root-fix: rebase --root: fix amending root commit messages rebase --root: demonstrate a bug while amending root commit messages
-
Junio C Hamano authored
The code to read compressed bitmap was not careful to avoid reading past the end of the file, which has been corrected. * jk/ewah-bounds-check: ewah: adjust callers of ewah_read_mmap() ewah_read_mmap: bounds-check mmap reads
-
git://github.com/git-l10n/git-poJunio C Hamano authored
l10n for Git 2.18.0 round 3 * tag 'l10n-2.18.0-rnd3' of git://github.com/git-l10n/git-po: l10n: zh_CN: for git v2.18.0 l10n round 1 to 3 l10n: bg.po: Updated Bulgarian translation (3608t) l10n: vi.po(3608t): Update Vietnamese translation for v2.18.0 round 3 l10n: fr.po v2.18.0 round 3 l10n: es.po: Spanish update for v2.18.0 round 3 l10n: git.pot: v2.18.0 round 3 (1 new, 1 removed) l10n: vi.po(3608t): Update Vietnamese translation for v2.18.0 round2 l10n: bg.po: Updated Bulgarian translation (3608t) l10n: es.po: Spanish update for v2.18.0 round 2 l10n: sv.po: Update Swedish translation (3608t0f0u) l10n: sv.po: Update Swedish translation (3470t0f0u) l10n: git.pot: v2.18.0 round 2 (144 new, 6 removed) l10n: fr.po v2.18 round 1 l10n: vi(3470t): Updated Vietnamese translation for v2.18.0 l10n: es.po: Spanish update for v2.18.0 round 1 l10n: git.pot: v2.18.0 round 1 (108 new, 14 removed) l10n: TEAMS: remove inactive de team members l10n: de.po: fix typos l10n: Update Catalan translation
-
Junio C Hamano authored
Signed-off-by:
Junio C Hamano <gitster@pobox.com>
-
Changwoo Ryu authored
Update the Korean translation and change the team leader to Gwan-gyeong Mun. Signed-off-by:
Gwan-gyeong Mun <elongbug@gmail.com> Signed-off-by:
Changwoo Ryu <cwryu@debian.org> Reviewed-by:
Gwan-gyeong Mun <elongbug@gmail.com>
-
Junio C Hamano authored
Leakfix. * sb/blame-color: blame: release string_list after use in parse_color_fields()
-
Junio C Hamano authored
Fix old merge glitch in Documentation during v2.13-rc0 era. * mw/doc-merge-enumfix: doc: update the order of the syntax `git merge --continue`
-
Junio C Hamano authored
Newly added codepath in merge-recursive had potential buffer overrun, which has been fixed. * en/rename-directory-detection: merge-recursive: use xstrdup() instead of fixed buffer
-
Junio C Hamano authored
Doc update. * rd/doc-remote-tracking-with-hyphen: Use hyphenated "remote-tracking branch" (docs and comments)
-
Junio C Hamano authored
Make zlib inflate codepath more robust against versions of zlib that clobber unused portion of outbuf. * jl/zlib-restore-nul-termination: packfile: correct zlib buffer handling
-
Junio C Hamano authored
Hotfix for contrib/ stuff broken by this cycle. * ab/cred-netrc-no-autodie: git-credential-netrc: remove use of "autodie"
-
Junio C Hamano authored
Typofix. * km/doc-workflows-typofix: gitworkflows: fix grammar in 'Merge upwards' rule
-
Junio C Hamano authored
"git p4" updates. * ld/git-p4-updates: git-p4: auto-size the block git-p4: narrow the scope of exceptions caught when parsing an int git-p4: raise exceptions from p4CmdList based on error from p4 server git-p4: better error reporting when p4 fails git-p4: add option to disable syncing of p4/master with p4 git-p4: disable-rebase: allow setting this via configuration git-p4: add options --commit and --disable-rebase
-
Junio C Hamano authored
Typofix. * rd/diff-options-typofix: diff-options.txt: fix minor typos, font inconsistencies, in docs
-