- 05 10月, 2018 4 次提交
-
-
由 Phillip Wood 提交于
This is obvious in retrospect, it was found with asan. Signed-off-by: NPhillip Wood <phillip.wood@dunelm.org.uk> Reviewed-by: NStefan Beller <sbeller@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Phillip Wood 提交于
Don't duplicate the indentation string if we're not going to use it. This was found with asan. Signed-off-by: NPhillip Wood <phillip.wood@dunelm.org.uk> Reviewed-by: NStefan Beller <sbeller@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Phillip Wood 提交于
When adjusting the start of the string to take account of the change in indentation the code was not checking that the string being adjusted was in fact longer than the indentation change. This was detected by asan. Signed-off-by: NPhillip Wood <phillip.wood@dunelm.org.uk> Reviewed-by: NStefan Beller <sbeller@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Phillip Wood 提交于
Running git diff --color-moved-ws=allow-indentation-change v2.18.0 v2.19.0 results in a crash due to a double free. This happens when two potential moved blocks start with consecutive lines. As pmb_advance_or_null_multi_match() advances it copies the ws_delta from the last matching line to the next. When the first of our consecutive lines is advanced its ws_delta well be copied to the second, overwriting the ws_delta of the block containing the second line. Then when the second line is advanced it will copy the new ws_delta to the line below it and so on. Eventually one of these blocks will stop matching and the ws_delta will be freed. From then on the other block is in a use-after-free state and when it stops matching it will try to free the ws_delta that has already been freed by the other block. The solution is to store the ws_delta in the array of potential moved blocks rather than with the lines. This means that it no longer needs to be copied around and one block cannot overwrite the ws_delta of another. Additionally it saves some malloc/free calls as we don't keep allocating and freeing ws_deltas. Signed-off-by: NPhillip Wood <phillip.wood@dunelm.org.uk> Reviewed-by: NStefan Beller <sbeller@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 25 9月, 2018 22 次提交
-
-
由 Junio C Hamano 提交于
-
由 Junio C Hamano 提交于
Recently added "range-diff" had a corner-case bug to cause it segfault, which has been corrected. * tg/range-diff-corner-case-fix: linear-assignment: fix potential out of bounds memory access
-
由 Junio C Hamano 提交于
Test updates. * sg/split-index-test: t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index t1700-split-index: drop unnecessary 'grep'
-
由 Junio C Hamano 提交于
"git update-ref" learned to make both "--no-deref" and "--stdin" work at the same time. * en/update-ref-no-deref-stdin: update-ref: allow --no-deref with --stdin update-ref: fix type of update_flags variable to match its usage
-
由 Junio C Hamano 提交于
Update error messages given by "git remote" and make them consistent. * ms/remote-error-message-update: builtin/remote: quote remote name on error to display empty name
-
由 Junio C Hamano 提交于
The code to backfill objects in lazily cloned repository did not work correctly, which has been corrected. * jt/lazy-object-fetch-fix: fetch-object: set exact_oid when fetching fetch-object: unify fetch_object[s] functions
-
由 Junio C Hamano 提交于
"git rebase" etc. in Git 2.19 fails to abort when given an empty commit log message as result of editing, which has been corrected. * en/sequencer-empty-edit-result-aborts: sequencer: fix --allow-empty-message behavior, make it smarter
-
由 Junio C Hamano 提交于
Recent update broke the reachability algorithm when refs (e.g. tags) that point at objects that are not commit were involved, which has been fixed. * ds/reachable: commit-reach: fix memory and flag leaks commit-reach: properly peel tags
-
由 Junio C Hamano 提交于
"git add ':(attr:foo)'" is not supported and is supposed to be rejected while the command line arguments are parsed, but we fail to reject such a command line upfront. * nd/attr-pathspec-fix: add: do not accept pathspec magic 'attr'
-
由 Junio C Hamano 提交于
Doc fix. * bw/protocol-v2: config: document value 2 for protocol.version
-
由 Junio C Hamano 提交于
Code clean-up. * sb/string-list-remove-unused: string-list: remove unused function print_string_list
-
由 Junio C Hamano 提交于
Build tweak to help developers. * jk/dev-build-format-security: config.mak.dev: add -Wformat-security
-
由 Junio C Hamano 提交于
Test update. * sg/t3701-tighten-trace: t3701-add-interactive: tighten the check of trace output
-
由 Junio C Hamano 提交于
Bugfix. * sb/diff-color-move-more: diff: fix --color-moved-ws=allow-indentation-change
-
由 Junio C Hamano 提交于
A corner case bugfix in "git rerere" code. * en/rerere-multi-stage-1-fix: rerere: avoid buffer overrun t4200: demonstrate rerere segfault on specially crafted merge
-
由 Junio C Hamano 提交于
Further fix for O_APPEND emulation on Windows * js/mingw-o-append: mingw: fix mingw_open_append to work with named pipes t0051: test GIT_TRACE to a windows named pipe
-
由 Junio C Hamano 提交于
Code clean-up. * en/double-semicolon-fix: Remove superfluous trailing semicolons
-
由 Junio C Hamano 提交于
Fix for a long-standing bug that leaves the index file corrupt when it shrinks during a partial commit. * jk/reopen-tempfile-truncate: reopen_tempfile(): truncate opened file
-
由 Junio C Hamano 提交于
When fsmonitor is in use, after operation on submodules updates .gitmodules, we lost track of the fact that we did so and relied on stale fsmonitor data. * bp/mv-submodules-with-fsmonitor: git-mv: allow submodules and fsmonitor to work together
-
由 Junio C Hamano 提交于
* ds/format-patch-range-diff-test: t3206-range-diff.sh: cover single-patch case
-
由 Junio C Hamano 提交于
Code clean-up. * tb/void-check-attr: Make git_check_attr() a void function
-
由 Junio C Hamano 提交于
"git rebase -i" did not clear the state files correctly when a run of "squash/fixup" is aborted and then the user manually amended the commit instead, which has been corrected. * js/rebase-i-autosquash-fix: rebase -i: be careful to wrap up fixup/squash chains rebase -i --autosquash: demonstrate a problem skipping the last squash
-
- 22 9月, 2018 3 次提交
-
-
由 Derrick Stolee 提交于
The can_all_from_reach_with_flag() method uses 'assign_flag' as a value we can use to mark objects temporarily during our commit walk. The intent is that these flags are removed from all objects before returning. However, this is not the case. The 'from' array could also contain objects that are not commits, and we mark those objects with 'assign_flag'. Add a loop to the 'cleanup' section that removes these markers. Also, we forgot to free() the memory for 'list', so add that to the 'cleanup' section. Signed-off-by: NDerrick Stolee <dstolee@microsoft.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Derrick Stolee 提交于
The can_all_from_reach_with_flag() algorithm was refactored in 4fbcca4e "commit-reach: make can_all_from_reach... linear" but incorrectly assumed that all objects provided were commits. During a fetch negotiation, ok_to_give_up() in upload-pack.c may provide unpeeled tags to the 'from' array. The current code creates a segfault. Add a direct call to can_all_from_reach_with_flag() in 'test-tool reach' and add a test in t6600-test-reach.sh that demonstrates this segfault. Correct the issue by peeling tags when investigating the initial list of objects in the 'from' array. Signed-off-by: NJeff King <peff@peff.net> Signed-off-by: NDerrick Stolee <dstolee@microsoft.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Nguyễn Thái Ngọc Duy 提交于
Commit b0db7046 (pathspec: allow querying for attributes - 2017-03-13) adds new pathspec magic 'attr' but only with match_pathspec(). "git add" has some pathspec related code that still does not know about 'attr' and will bail out: $ git add ':(attr:foo)' fatal: BUG:dir.c:1584: unsupported magic 40 A better solution would be making this code support 'attr'. But I don't know how much work is needed (I'm not familiar with this new magic). For now, let's simply reject this magic with a friendlier message: $ git add ':(attr:foo)' fatal: :(attr:foo): pathspec magic not supported by this command: 'attr' Update t6135 so that the expected error message is from the "graceful" rejection codepath, not "oops, we were supposed to reject the request to trigger this magic" codepath. Reported-by: smaudet@sebastianaudet.com Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 21 9月, 2018 3 次提交
-
-
由 Junio C Hamano 提交于
The rules used by "git push" and "git fetch" to determine if a ref can or cannot be updated were inconsistent; specifically, fetching to update existing tags were allowed even though tags are supposed to be unmoving anchoring points. "git fetch" was taught to forbid updates to existing tags without the "--force" option. This is a backward incompatible change but in a good way; it may still need to be treated carefully. * ab/fetch-tags-noclobber: fetch doc: correct grammar in --force docs push doc: add spacing between two words
-
由 Junio C Hamano 提交于
"git checkout -b newbranch [HEAD]" should not have to do as much as checking out a commit different from HEAD. An attempt is made to optimize this special case. * bp/checkout-new-branch-optim: config doc: add missing list separator for checkout.optimizeNewBranch
-
由 Ævar Arnfjörð Bjarmason 提交于
Correct a grammar error (saying "the receiving" made no sense) in the recently landed documentation added in my 0bc8d71b ("fetch: stop clobbering existing tags without --force", 2018-08-31) by rephrasing the sentence. Also correct 'fetching work the same way' by s/work/&s/; Signed-off-by: NÆvar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 20 9月, 2018 2 次提交
-
-
由 Ævar Arnfjörð Bjarmason 提交于
Fix a formatting error introduced in my recently landed fe802bd2 ("push doc: correct lies about how push refspecs work", 2018-08-31). Signed-off-by: NÆvar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Ævar Arnfjörð Bjarmason 提交于
The documentation added in fa655d84 ("checkout: optimize "git checkout -b <new_branch>"", 2018-08-16) didn't add the double-colon needed for the labeled list separator, as a result the added documentation all got squashed into one paragraph. Fix that by adding the list separator. Signed-off-by: NÆvar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 18 9月, 2018 6 次提交
-
-
由 Junio C Hamano 提交于
-
由 Junio C Hamano 提交于
Debugging aid update. * nd/bisect-show-list-fix: bisect.c: make show_list() build again
-
由 Junio C Hamano 提交于
The rules used by "git push" and "git fetch" to determine if a ref can or cannot be updated were inconsistent; specifically, fetching to update existing tags were allowed even though tags are supposed to be unmoving anchoring points. "git fetch" was taught to forbid updates to existing tags without the "--force" option. * ab/fetch-tags-noclobber: fetch: stop clobbering existing tags without --force fetch: document local ref updates with/without --force push doc: correct lies about how push refspecs work push doc: move mention of "tag <tag>" later in the prose push doc: remove confusing mention of remote merger fetch tests: add a test for clobbering tag behavior push tests: use spaces in interpolated string push tests: make use of unused $1 in test description fetch: change "branch" to "reference" in --force -h output
-
由 Junio C Hamano 提交于
Fix a bug in which the same path could be registered under multiple worktree entries if the path was missing (for instance, was removed manually). Also, as a convenience, expand the number of cases in which --force is applicable. * es/worktree-forced-ops-fix: doc-diff: force worktree add worktree: delete .git/worktrees if empty after 'remove' worktree: teach 'remove' to override lock when --force given twice worktree: teach 'move' to override lock when --force given twice worktree: teach 'add' to respect --force for registered but missing path worktree: disallow adding same path multiple times worktree: prepare for more checks of whether path can become worktree worktree: generalize delete_git_dir() to reduce code duplication worktree: move delete_git_dir() earlier in file for upcoming new callers worktree: don't die() in library function find_worktree()
-
由 Junio C Hamano 提交于
Docfix. * sg/doc-trace-appends: Documentation/git.txt: clarify that GIT_TRACE=/path appends
-
由 Junio C Hamano 提交于
Dev doc update. * jk/diff-rendered-docs: Revert "doc/Makefile: drop doc-diff worktree and temporary files on "make clean"" doc/Makefile: drop doc-diff worktree and temporary files on "make clean" doc-diff: add --clean mode to remove temporary working gunk doc-diff: fix non-portable 'man' invocation doc-diff: always use oids inside worktree SubmittingPatches: mention doc-diff
-