summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-07-21replace: add test for --graft with a mergetagLibravatar Christian Couder1-0/+22
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-21replace: check mergetags when using --graftLibravatar Christian Couder1-0/+47
When using --graft, with a mergetag in the original commit, we should check that the commit pointed to by the mergetag is still a parent of then new commit we create, otherwise the mergetag could be misleading. If the commit pointed to by the mergetag is no more a parent of the new commit, we could remove the mergetag, but in this case there is a good chance that the title or other elements of the commit might also be misleading. So let's just error out and suggest to use --edit instead on the commit. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-21replace: add test for --graft with signed commitLibravatar Christian Couder1-0/+24
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-21replace: remove signature when using --graftLibravatar Christian Couder3-0/+41
It could be misleading to keep a signature in a replacement commit, so let's remove it. Note that there should probably be a way to sign the replacement commit created when using --graft, but this can be dealt with in another commit or patch series. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-21contrib: add convert-grafts-to-replace-refs.shLibravatar Christian Couder2-1/+31
This patch adds into contrib/ an example script to convert grafts from an existing grafts file into replace refs using the new --graft option of "git replace". While at it let's mention this new script in the "git replace" documentation for the --graft option. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-21Documentation: replace: add --graft optionLibravatar Christian Couder1-0/+8
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-21replace: add test for --graftLibravatar Christian Couder1-1/+44
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-21replace: add --graft optionLibravatar Christian Couder1-1/+73
The usage string for this option is: git replace [-f] --graft <commit> [<parent>...] First we create a new commit that is the same as <commit> except that its parents are [<parents>...] Then we create a replace ref that replace <commit> with the commit we just created. With this new option, it should be straightforward to convert grafts to replace refs. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-07replace: cleanup redirection style in testsLibravatar Christian Couder1-24/+24
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-07commit: add for_each_mergetag()Libravatar Christian Couder3-11/+22
In the same way as there is for_each_ref() to iterate on refs, for_each_mergetag() allows the caller to iterate on the mergetags of a given commit. Use it to rewrite show_mergetag() used in "git log". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-02Merge branch 'dt/refs-check-refname-component-sse'Libravatar Junio C Hamano4-18/+250
Further micro-optimization of a leaf-function. * dt/refs-check-refname-component-sse: refs.c: SSE2 optimizations for check_refname_component
2014-07-02Merge branch 'ye/http-extract-charset'Libravatar Junio C Hamano3-2/+11
* ye/http-extract-charset: http: fix charset detection of extract_content_type()
2014-07-02Merge branch 'bc/fix-rebase-merge-skip'Libravatar Junio C Hamano2-2/+18
"git rebase --skip" did not work well when it stopped due to a conflict twice in a row. * bc/fix-rebase-merge-skip: rebase--merge: fix --skip with two conflicts in a row
2014-07-02Merge branch 'jk/commit-buffer-length'Libravatar Junio C Hamano27-197/+284
Move "commit->buffer" out of the in-core commit object and keep track of their lengths. Use this to optimize the code paths to validate GPG signatures in commit objects. * jk/commit-buffer-length: reuse cached commit buffer when parsing signatures commit: record buffer length in cache commit: convert commit->buffer to a slab commit-slab: provide a static initializer use get_commit_buffer everywhere convert logmsg_reencode to get_commit_buffer use get_commit_buffer to avoid duplicate code use get_cached_commit_buffer where appropriate provide helpers to access the commit buffer provide a helper to set the commit buffer provide a helper to free commit buffer sequencer: use logmsg_reencode in get_message logmsg_reencode: return const buffer do not create "struct commit" with xcalloc commit: push commit_index update into alloc_commit_node alloc: include any-object allocations in alloc_report replace dangerous uses of strbuf_attach commit_tree: take a pointer/len pair rather than a const strbuf
2014-07-02enums: remove trailing ',' after last item in enumLibravatar Ronnie Sahlberg1-1/+1
Signed-off-by: Ronnie Sahlberg <sahlberg@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-02Merge branch 'maint'Libravatar Junio C Hamano3-4/+4
* maint: t7300: repair filesystem permissions with test_when_finished enums: remove trailing ',' after last item in enum
2014-07-02Merge branch 'maint-1.8.5' into maintLibravatar Junio C Hamano3-4/+4
* maint-1.8.5: t7300: repair filesystem permissions with test_when_finished enums: remove trailing ',' after last item in enum
2014-07-02t7300: repair filesystem permissions with test_when_finishedLibravatar Jeff King1-2/+2
We create a directory that cannot be removed, confirm that it cannot be removed, and then fix it like: chmod 0 foo && test_must_fail git clean -d -f && chmod 755 foo If the middle step fails but leaves the directory (e.g., the bug is that clean does not notice the failure), this pollutes the test repo with an unremovable directory. Not only does this cause further tests to fail, but it means that "rm -rf" fails on the whole trash directory, and the user has to intervene manually to even re-run the test script. We can bump the "chmod 755" recovery to a test_when_finished block to be sure that it always runs. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-02enums: remove trailing ',' after last item in enumLibravatar Ronnie Sahlberg2-2/+2
Signed-off-by: Ronnie Sahlberg <sahlberg@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-27Merge git://ozlabs.org/~paulus/gitkLibravatar Junio C Hamano1-6/+18
* git://ozlabs.org/~paulus/gitk: gitk: Add visiblerefs option, which lists always-shown branches gitk: Catch mkdtemp errors gitk: Use mktemp -d to avoid predictable temporary directories gitk: Honor TMPDIR when viewing external diffs
2014-06-27gitk: Add visiblerefs option, which lists always-shown branchesLibravatar Max Kirillov1-4/+6
When many branches contain a commit, the branches used to be shown in the form "A, B and many more", where A, B can be master of current HEAD. But there are more which might be interesting to always know about. For example, "origin/master". The new option, visiblerefs, is stored in ~/.gitk. It contains a list of references which are always shown before "and many more" if they contain the commit. By default it is `{"master"}', which is compatible with previous behavior. Signed-off-by: Max Kirillov <max@max630.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2014-06-27gitk: Catch mkdtemp errorsLibravatar David Aguilar1-1/+3
105b5d3f ("gitk: Use mktemp -d to avoid predictable temporary directories") introduced a dependency on mkdtemp, which is not available on Windows. Use the original temporary directory behavior when mkdtemp fails. This makes the code use mkdtemp when available and gracefully fallback to the existing behavior when it is not available. Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2014-06-26Merge early parts from git://ozlabs.org/~paulus/gitk.gitLibravatar Junio C Hamano2-6/+1391
* master~2: gitk: Show staged submodules regardless of ignore config gitk: Allow displaying time zones from author and commit dates timestamps gitk: Switch to patch mode when searching for line origin gitk: Replace SHA1 entry field on keyboard paste l10n: Init Vietnamese translation
2014-06-26Merge git://repo.or.cz/git-guiLibravatar Junio C Hamano2-1/+8
* git://repo.or.cz/git-gui: git-gui: tolerate major version changes when comparing the git version git-gui: show staged submodules regardless of ignore config
2014-06-25Sync with maintLibravatar Junio C Hamano2-1/+117
2014-06-25Fifth batch for 2.1Libravatar Junio C Hamano1-2/+14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-25Merge branch 'jm/dedup-name-compare'Libravatar Junio C Hamano6-35/+16
* jm/dedup-name-compare: cleanup duplicate name_compare() functions name-hash.c: replace cache_name_compare() with memcmp(3)
2014-06-25Merge branch 'ep/avoid-test-a-o'Libravatar Junio C Hamano18-50/+58
Update tests and scripts to avoid "test ... -a ...", which is often more error-prone than "test ... && test ...". Squashed misconversion fix-up into git-submodule.sh updates. * ep/avoid-test-a-o: git-submodule.sh: avoid "echo" path-like values git-submodule.sh: avoid "test <cond> -a/-o <cond>" t/test-lib-functions.sh: avoid "test <cond> -a/-o <cond>" t/t9814-git-p4-rename.sh: avoid "test <cond> -a/-o <cond>" t/t5538-push-shallow.sh: avoid "test <cond> -a/-o <cond>" t/t5403-post-checkout-hook.sh: avoid "test <cond> -a/-o <cond>" t/t5000-tar-tree.sh: avoid "test <cond> -a/-o <cond>" t/t4102-apply-rename.sh: avoid "test <cond> -a/-o <cond>" t/t0026-eol-config.sh: avoid "test <cond> -a/-o <cond>" t/t0025-crlf-auto.sh: avoid "test <cond> -a/-o <cond>" t/lib-httpd.sh: avoid "test <cond> -a/-o <cond>" git-rebase--interactive.sh: avoid "test <cond> -a/-o <cond>" git-mergetool.sh: avoid "test <cond> -a/-o <cond>" git-bisect.sh: avoid "test <cond> -a/-o <cond>" contrib/examples/git-resolve.sh: avoid "test <cond> -a/-o <cond>" contrib/examples/git-repack.sh: avoid "test <cond> -a/-o <cond>" contrib/examples/git-merge.sh: avoid "test <cond> -a/-o <cond>" contrib/examples/git-commit.sh: avoid "test <cond> -a/-o <cond>" contrib/examples/git-clone.sh: avoid "test <cond> -a/-o <cond>" check_bindir: avoid "test <cond> -a/-o <cond>"
2014-06-25Merge branch 'tb/unicode-7.0-display-width'Libravatar Junio C Hamano1-7/+42
* tb/unicode-7.0-display-width: Update of unicode_width.h to Unicode Version 7.0
2014-06-25Merge branch 'ye/doc-http-proto'Libravatar Junio C Hamano1-1/+1
* ye/doc-http-proto: http-protocol.txt: Basic Auth is defined in RFC 2617, not RFC 2616
2014-06-25Merge branch 'rs/blame-refactor'Libravatar Junio C Hamano1-28/+14
* rs/blame-refactor: blame: simplify prepare_lines() blame: factor out get_next_line()
2014-06-25Merge branch 'pb/trim-trailing-spaces'Libravatar Junio C Hamano1-6/+8
* pb/trim-trailing-spaces: t0008: do not depend on 'echo' handling backslashes specially
2014-06-25Merge branch 'mc/doc-submodule-sync-recurse'Libravatar Junio C Hamano1-1/+1
* mc/doc-submodule-sync-recurse: submodule: document "sync --recursive"
2014-06-25Merge branch 'sp/complete-ext-alias'Libravatar Junio C Hamano2-0/+37
* sp/complete-ext-alias: completion: handle '!f() { ... }; f' and "!sh -c '...' -" aliases
2014-06-25Merge branch 'mc/git-p4-prepare-p4-only'Libravatar Junio C Hamano1-6/+6
* mc/git-p4-prepare-p4-only: git-p4: fix submit in non --prepare-p4-only mode
2014-06-25Merge branch 'jk/repack-pack-writebitmaps-config'Libravatar Junio C Hamano6-20/+22
* jk/repack-pack-writebitmaps-config: t7700: drop explicit --no-pack-kept-objects from .keep test repack: introduce repack.writeBitmaps config option repack: simplify handling of --write-bitmap-index pack-objects: stop respecting pack.writebitmaps
2014-06-25Merge branch 'nd/init-restore-env'Libravatar Junio C Hamano2-6/+51
Some subcommands do not want to be aliased because of the side effects that happens while the definitions of the aliases are looked up from configuration system. * nd/init-restore-env: git potty: restore environments after alias expansion
2014-06-25Merge branch 'jk/repack-pack-keep-objects'Libravatar Junio C Hamano2-7/+27
Recent updates to "git repack" started to duplicate objects that are in packfiles marked with .keep flag into the new packfile by mistake. * jk/repack-pack-keep-objects: repack: s/write_bitmap/&s/ in code repack: respect pack.writebitmaps repack: do not accidentally pack kept objects by default
2014-06-25Merge branch 'fr/sequencer-fail-with-not-one-upon-no-ff'Libravatar Junio C Hamano1-1/+1
* fr/sequencer-fail-with-not-one-upon-no-ff: sequencer: signal failed ff as an aborted, not a conflicted merge
2014-06-25Git 2.0.1Libravatar Junio C Hamano4-3/+119
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-25Merge branch 'na/no-http-test-in-the-middle' into maintLibravatar Junio C Hamano2-59/+100
The mode to run tests with HTTP server tests disabled was broken. * na/no-http-test-in-the-middle: t5538: move http push tests out to t5542
2014-06-25Merge branch 'jl/status-added-submodule-is-never-ignored' into maintLibravatar Junio C Hamano5-8/+108
"git status" (and "git commit") behaved as if changes in a modified submodule are not there if submodule.*.ignore configuration is set, which was misleading. The configuration is only to unclutter diff output during the course of development, and should not to hide changes in the "status" output to cause the users forget to commit them. * jl/status-added-submodule-is-never-ignored: commit -m: commit staged submodules regardless of ignore config status/commit: show staged submodules regardless of ignore config
2014-06-25Merge branch 'ym/fix-opportunistic-index-update-race' into maintLibravatar Junio C Hamano6-5/+90
"git status", even though it is a read-only operation, tries to update the index with refreshed lstat(2) info to optimize future accesses to the working tree opportunistically, but this could race with a "read-write" operation that modify the index while it is running. Detect such a race and avoid overwriting the index. * ym/fix-opportunistic-index-update-race: read-cache.c: verify index file before we opportunistically update it wrapper.c: add xpread() similar to xread()
2014-06-25Merge branch 'mk/show-s-no-extra-blank-line-for-merges' into maintLibravatar Junio C Hamano4-11/+15
"git show -s" (i.e. show log message only) used to incorrectly emit an extra blank line after a merge commit. * mk/show-s-no-extra-blank-line-for-merges: git-show: fix 'git show -s' to not add extra terminator after merge commit
2014-06-25Merge branch 'rr/rebase-autostash-fix' into maintLibravatar Junio C Hamano3-3/+27
The autostash mode of "git rebase -i" did not restore the dirty working tree state if the user aborted the interactive rebase by emptying the insn sheet. * rr/rebase-autostash-fix: rebase -i: test "Nothing to do" case with autostash rebase -i: handle "Nothing to do" case with autostash
2014-06-25Merge branch 'jc/shortlog-ref-exclude' into maintLibravatar Junio C Hamano2-0/+7
"git log --exclude=<glob> --all | git shortlog" worked as expected, but "git shortlog --exclude=<glob> --all", which is supposed to be identical to the above pipeline, was not accepted at the command line argument parser level. * jc/shortlog-ref-exclude: shortlog: allow --exclude=<glob> to be passed
2014-06-25Merge branch 'jl/remote-rm-prune' into maintLibravatar Junio C Hamano3-9/+52
"git remote rm" and "git remote prune" can involve removing many refs at once, which is not a very efficient thing to do when very many refs exist in the packed-refs file. * jl/remote-rm-prune: remote prune: optimize "dangling symref" check/warning remote: repack packed-refs once when deleting multiple refs remote rm: delete remote configuration as the last
2014-06-25Merge branch 'fc/rerere-conflict-style' into maintLibravatar Junio C Hamano1-0/+2
"git rerere forget" did not work well when merge.conflictstyle was set to a non-default value. * fc/rerere-conflict-style: rerere: fix for merge.conflictstyle
2014-06-25Merge branch 'rs/pack-objects-no-unnecessary-realloc' into maintLibravatar Junio C Hamano1-2/+2
"git pack-objects" unnecessarily copied the previous contents when extending the hashtable, even though it will populate the table from scratch anyway. * rs/pack-objects-no-unnecessary-realloc: pack-objects: use free()+xcalloc() instead of xrealloc()+memset()
2014-06-25Merge branch 'dt/merge-recursive-case-insensitive' into maintLibravatar Junio C Hamano3-1/+61
On a case insensitive filesystem, merge-recursive incorrectly deleted the file that is to be renamed to a name that is the same except for case differences. * dt/merge-recursive-case-insensitive: mv: allow renaming to fix case on case insensitive filesystems merge-recursive.c: fix case-changing merge bug