sort by:
Revision Author Date Message Commit Date
52604d7 alloc: write out allocator definitions Because the allocator functions for tree, blobs, etc are all very similar, we originally used a macro to avoid repeating ourselves. Since the prior commit, though, the heavy lifting is done by an inline helper function. The macro does still save us a few lines, but at some readability cost. It obfuscates the function definitions (and makes them hard to find via grep). Much worse, though, is the fact that it isn't used consistently for all allocators. Somebody coming later may be tempted to modify DEFINE_ALLOCATOR, but they would miss alloc_commit_node, which is treated specially. Let's just drop the macro and write everything out explicitly. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 July 2014, 17:14:33 UTC
8c3f3f2 alloc.c: remove the alloc_raw_commit_node() function In order to encapsulate the setting of the unique commit index, commit 969eba63 ("commit: push commit_index update into alloc_commit_node", 10-06-2014) introduced a (logically private) intermediary allocator function. However, this function (alloc_raw_commit_node()) was declared as a public function, which undermines its entire purpose. Introduce an inline function, alloc_node(), which implements the main logic of the allocator used by DEFINE_ALLOCATOR, and redefine the macro in terms of the new function. In addition, use the new function in the implementation of the alloc_commit_node() allocator, rather than the intermediary allocator, which can now be removed. Noticed by sparse ("symbol 'alloc_raw_commit_node' was not declared. Should it be static?"). Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 July 2014, 17:14:33 UTC
740c281 Git 2.0.3 Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2014, 18:33:16 UTC
98b12a4 .mailmap: combine Stefan Beller's emails Google mail has had the extension @googlemail.com for a long time in Germany as @gmail.de was already taken by a competitor. Nowadays the original gmail company isn't there anymore(?), hence Googlemail also introduced @gmail.com in Germany, which I switched to. This changed mail address of mine first appeared in 398dd4bd039680b (2014-07-10, .mailmap: map different names with the same email address together) ironically. Signed-off-by: Stefan Beller <stefanbeller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2014, 18:27:05 UTC
405869d git.1: switch homepage for stats According to http://meta.ohloh.net/2014/07/black-duck-open-hub/ the site name of ohloh changed to openhub. Change the man page accordingly. Signed-off-by: Stefan Beller <stefanbeller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2014, 18:26:52 UTC
cd989a9 Merge branch 'ah/fix-http-push' into maint * ah/fix-http-push: http-push.c: make CURLOPT_IOCTLDATA a usable pointer 22 July 2014, 17:29:07 UTC
0d854fc Merge branch 'po/error-message-style' into maint * po/error-message-style: doc: give some guidelines for error messages 22 July 2014, 17:28:59 UTC
a1991f1 Merge branch 'zk/log-graph-showsig' into maint * zk/log-graph-showsig: log: fix indentation for --graph --show-signature 22 July 2014, 17:28:51 UTC
514dd21 Merge branch 'mg/fix-log-mergetag-color' into maint * mg/fix-log-mergetag-color: log: correctly identify mergetag signature verification status 22 July 2014, 17:28:43 UTC
5796c5b Merge branch 'cb/filter-branch-prune-empty-degenerate-merges' into maint * cb/filter-branch-prune-empty-degenerate-merges: filter-branch: eliminate duplicate mapped parents 22 July 2014, 17:28:30 UTC
1a1f7b2 Merge branch 'ye/doc-http-proto' into maint * ye/doc-http-proto: http-protocol.txt: Basic Auth is defined in RFC 2617, not RFC 2616 22 July 2014, 17:28:02 UTC
0196a60 Merge branch 'jm/api-strbuf-doc' into maint * jm/api-strbuf-doc: api-strbuf.txt minor typos 22 July 2014, 17:26:52 UTC
054e22c Merge branch 'jm/dedup-test-config' into maint * jm/dedup-test-config: t/t7810-grep.sh: remove duplicate test_config() 22 July 2014, 17:26:45 UTC
ef93714 Merge branch 'sk/test-cmp-bin' into maint * sk/test-cmp-bin: t5000, t5003: do not use test_cmp to compare binary files 22 July 2014, 17:26:34 UTC
79e9dba Merge branch 'jm/doc-wording-tweaks' into maint * jm/doc-wording-tweaks: Documentation: wording fixes in the user manual and glossary 22 July 2014, 17:26:17 UTC
af3e5d1 Merge branch 'jm/instaweb-apache-24' into maint * jm/instaweb-apache-24: git-instaweb: add support for Apache 2.4 22 July 2014, 17:25:24 UTC
cfececf Merge branch 'bg/xcalloc-nmemb-then-size' into maint * bg/xcalloc-nmemb-then-size: transport-helper.c: rearrange xcalloc arguments remote.c: rearrange xcalloc arguments reflog-walk.c: rearrange xcalloc arguments pack-revindex.c: rearrange xcalloc arguments notes.c: rearrange xcalloc arguments imap-send.c: rearrange xcalloc arguments http-push.c: rearrange xcalloc arguments diff.c: rearrange xcalloc arguments config.c: rearrange xcalloc arguments commit.c: rearrange xcalloc arguments builtin/remote.c: rearrange xcalloc arguments builtin/ls-remote.c: rearrange xcalloc arguments 22 July 2014, 17:25:17 UTC
1fbc6e6 Merge branch 'cb/byte-order' into maint * cb/byte-order: compat/bswap.h: fix endianness detection compat/bswap.h: restore preference __BIG_ENDIAN over BIG_ENDIAN compat/bswap.h: detect endianness on more platforms that don't use BYTE_ORDER 22 July 2014, 17:25:02 UTC
85dd379 Merge branch 'lt/request-pull' into maint * lt/request-pull: fix brown paper bag breakage in t5150-request-pull.sh 22 July 2014, 17:23:41 UTC
63618af Merge branch 'ep/shell-assign-and-export-vars' into maint * ep/shell-assign-and-export-vars: scripts: more "export VAR=VALUE" fixes scripts: "export VAR=VALUE" construct is not portable 22 July 2014, 17:22:57 UTC
bba6acb Merge branch 'maint-1.9' into maint * maint-1.9: Documentation: fix missing text for rev-parse --verify 22 July 2014, 17:17:34 UTC
d31f3ad Merge branch 'maint-1.8.5' into maint-1.9 * maint-1.8.5: Documentation: fix missing text for rev-parse --verify 22 July 2014, 17:16:50 UTC
e6aaa39 Documentation: fix missing text for rev-parse --verify The caret (^) is used as a markup symbol in AsciiDoc. Due to the inability of AsciiDoc to parse a line containing an unmatched caret, it omitted the line from the output, resulting in the man page missing the end of a sentence. Escape this caret so that the man page ends up with the complete text. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2014, 17:10:57 UTC
5c0b13f use xmemdupz() to allocate copies of strings given by start and length Use xmemdupz() to allocate the memory, copy the data and make sure to NUL-terminate the result, all in one step. The resulting code is shorter, doesn't contain the constants 1 and '\0', and avoids duplicating function parameters. For blame, the last copied byte (o->file.ptr[o->file.size]) is always set to NUL by fake_working_tree_commit() or read_sha1_file(), so no information is lost by the conversion to using xmemdupz(). Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 July 2014, 17:37:02 UTC
51a60f5 use xcalloc() to allocate zero-initialized memory Use xcalloc() instead of xmalloc() followed by memset() to allocate and zero out memory because it's shorter and avoids duplicating the function parameters. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 July 2014, 17:30:21 UTC
ebc5da3 Git 2.0.2 Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 July 2014, 18:19:56 UTC
2e93184 Merge branch 'jc/fix-clone-single-starting-at-a-tag' into maint "git clone -b brefs/tags/bar" would have mistakenly thought we were following a single tag, even though it was a name of the branch, because it incorrectly used strstr(). * jc/fix-clone-single-starting-at-a-tag: builtin/clone.c: detect a clone starting at a tag correctly 16 July 2014, 18:17:36 UTC
588de86 Merge branch 'jk/pretty-G-format-fixes' into maint "%G" (nothing after G) is an invalid pretty format specifier, but the parser did not notice it as garbage. * jk/pretty-G-format-fixes: move "%G" format test from t7510 to t6006 pretty: avoid reading past end-of-string with "%G" t7510: check %G* pretty-format output t7510: test a commit signed by an unknown key t7510: use consistent &&-chains in loop t7510: stop referring to master in later tests 16 July 2014, 18:17:21 UTC
5a3db94 Merge branch 'rs/fix-alt-odb-path-comparison' into maint Code to avoid adding the same alternate object store twice was subtly broken for a long time, but nobody seems to have noticed. * rs/fix-alt-odb-path-comparison: sha1_file: avoid overrunning alternate object base string 16 July 2014, 18:17:08 UTC
5c18fde Merge branch 'jk/commit-buffer-length' into maint A handful of code paths had to read the commit object more than once when showing header fields that are usually not parsed. The internal data structure to keep track of the contents of the commit object has been updated to reduce the need for this double-reading, and to allow the caller find the length of the object. * 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 16 July 2014, 18:16:38 UTC
64630d8 Merge branch 'bc/fix-rebase-merge-skip' into maint During "git rebase --merge", a conflicted patch could not be skipped with "--skip" if the next one also conflicted. * bc/fix-rebase-merge-skip: rebase--merge: fix --skip with two conflicts in a row 16 July 2014, 18:16:16 UTC
9092a96 Merge branch 'maint-1.9' into maint * maint-1.9: annotate: use argv_array 16 July 2014, 18:11:06 UTC
d22acac Merge branch 'maint-1.8.5' into maint-1.9 * maint-1.8.5: annotate: use argv_array t7300: repair filesystem permissions with test_when_finished enums: remove trailing ',' after last item in enum 16 July 2014, 18:10:30 UTC
8c2cfa5 annotate: use argv_array Simplify the code and get rid of some magic constants by using argv_array to build the argument list for cmd_blame. Be lazy and let the OS release our allocated memory, as before. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 July 2014, 18:10:11 UTC
479eaa8 http-push.c: make CURLOPT_IOCTLDATA a usable pointer Fixes a small bug affecting push to remotes which use some sort of multi-pass authentication. In particular the bug affected SabreDAV as configured by Box.com [1]. It must be a weird server configuration for the bug to have survived this long. Someone should write a test for it. [1] http://marc.info/?l=git&m=140460482604482 Signed-off-by: Abbaad Haider <abbaad@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 July 2014, 00:57:59 UTC
42c55ce log: correctly identify mergetag signature verification status A wrong '}' made our code record the results of mergetag signature verification incorrectly. Fix it. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 July 2014, 22:25:03 UTC
0ae0e88 doc: give some guidelines for error messages Clarify error message puntuation to reduce review workload. Signed-off-by: Philip Oakley <philipoakley@iee.org> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 July 2014, 20:31:55 UTC
8693e1c Start preparing for 2.0.2 Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 July 2014, 18:15:10 UTC
cbf4e02 Merge branch 'pb/trim-trailing-spaces' into maint * pb/trim-trailing-spaces: t0008: do not depend on 'echo' handling backslashes specially dir.c:trim_trailing_spaces(): fix for " \ " sequence 10 July 2014, 18:10:52 UTC
f35392b Merge branch 'jk/repack-pack-keep-objects' into maint * 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 10 July 2014, 18:10:05 UTC
3fea9eb Merge branch 'mc/doc-submodule-sync-recurse' into maint * mc/doc-submodule-sync-recurse: submodule: document "sync --recursive" 10 July 2014, 18:08:31 UTC
cf3983d log: fix indentation for --graph --show-signature The git log --graph --show-signature command incorrectly indents the gpg information about signed commits and merged signed tags. It does not follow the level of indentation of the current commit. Example of garbled output: $ git log --show-signature --graph * commit 258e0a237cb69aaa587b0a4fb528bb0316b1b776 |\ gpg: Signature made Mon, Jun 30, 2014 13:22:33 EDT using RSA key ID DA08 gpg: Good signature from "Jason Pyeron <jpye...@pdinc.us>" Merge: 727c355 1ca13ed | | Author: Jason Pyeron <jpye...@pdinc.us> | | Date: Mon Jun 30 13:22:29 2014 -0400 | | | | Merge of 1ca13ed2271d60ba9 branch - rebranding | | | * commit 1ca13ed2271d60ba93d40bcc8db17ced8545f172 | | gpg: Signature made Mon, Jun 23, 2014 9:45:47 EDT using RSA key ID DD37 gpg: Good signature from "Stephen Robert Guglielmo <s...@guglielmo.us>" gpg: aka "Stephen Robert Guglielmo <srguglie...@gmail.com>" Author: Stephen R Guglielmo <s...@guglielmo.us> | | Date: Mon Jun 23 09:45:27 2014 -0400 | | | | Minor URL updates In log-tree.c modify show_sig_lines() function to call graph_show_oneline() after each line of gpg information it has printed in order to preserve the level of indentation for the next output line. Reported-by: Jason Pyeron <jpyeron@pdinc.us> Signed-off-by: Zoltan Klinger <zoltan.klinger@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 July 2014, 16:37:43 UTC
c2f7b10 Merge branch 'maint-1.8.5' into maint * maint-1.8.5: t7300: repair filesystem permissions with test_when_finished enums: remove trailing ',' after last item in enum 02 July 2014, 19:51:50 UTC
45067fc t7300: repair filesystem permissions with test_when_finished 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> 02 July 2014, 19:51:38 UTC
7827352 enums: remove trailing ',' after last item in enum Signed-off-by: Ronnie Sahlberg <sahlberg@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 July 2014, 19:37:05 UTC
80b4785 sha1_file: avoid overrunning alternate object base string While checking if a new alternate object database is a duplicate make sure that old and new base paths have the same length before comparing them with memcmp. This avoids overrunning the buffer of the existing entry if the new one is longer and it stops rejecting foobar/ after foo/ was already added. Signed-off-by: Rene Scharfe <ls.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 01 July 2014, 20:30:50 UTC
79bc4ef filter-branch: eliminate duplicate mapped parents When multiple parents of a merge commit get mapped to the same commit, filter-branch used to pass all instances of the parent commit to the parent and commit filters and to "git commit-tree" or "git_commit_non_empty_tree". This can often happen when extracting a small project from a large repository; merges can join history with no commits on any branch which affect the paths being retained. Once the intermediate commits have been filtered out, all the immediate parents of the merge commit can end up being mapped to the same commit - either the original merge-base or an ancestor of it. "git commit-tree" would display an error but write the commit with the normalized parents in any case. "git_commit_non_empty_tree" would fail to notice that the commit being made was in fact a non-merge commit and would retain it even if a further pass with "--prune-empty" would discard the commit as empty. Ensure that duplicate parents are pruned before the parent filter to make "--prune-empty" idempotent, removing all empty non-merge commits in a singe pass. Signed-off-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 01 July 2014, 15:30:41 UTC
958b2eb move "%G" format test from t7510 to t6006 The final test in t7510 checks that "--format" placeholders that look similar to GPG placeholders (but that we don't actually understand) are passed through. That test was placed in t7510, since the other GPG placeholder tests are there. However, it does not have a GPG prerequisite, because it is not actually checking any signed commits. This causes the test to erroneously fail when gpg is not installed on a system, however. Not because we need signed commits, but because we need _any_ commit to run "git log". If we don't have gpg installed, t7510 doesn't create any commits at all. We can fix this by moving the test into t6006. This is arguably a better place anyway, because it is where we test most of the other placeholders (we do not test GPG placeholders there because of the infrastructure needed to make signed commits). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 June 2014, 22:01:06 UTC
341e7e8 Git 2.0.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 June 2014, 19:21:11 UTC
62bfd83 Merge branch 'na/no-http-test-in-the-middle' into maint 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 25 June 2014, 18:50:13 UTC
287a870 Merge branch 'jl/status-added-submodule-is-never-ignored' into maint "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 25 June 2014, 18:50:03 UTC
1881d2b Merge branch 'ym/fix-opportunistic-index-update-race' into maint "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() 25 June 2014, 18:49:48 UTC
85785df Merge branch 'mk/show-s-no-extra-blank-line-for-merges' into maint "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 25 June 2014, 18:49:39 UTC
d9036cd Merge branch 'rr/rebase-autostash-fix' into maint 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 25 June 2014, 18:49:31 UTC
8675779 Merge branch 'jc/shortlog-ref-exclude' into maint "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 25 June 2014, 18:49:11 UTC
c4f79d1 Merge branch 'jl/remote-rm-prune' into maint "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 25 June 2014, 18:49:01 UTC
ada8710 Merge branch 'fc/rerere-conflict-style' into maint "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 25 June 2014, 18:48:54 UTC
5327207 Merge branch 'rs/pack-objects-no-unnecessary-realloc' into maint "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() 25 June 2014, 18:48:43 UTC
5fa38cc Merge branch 'dt/merge-recursive-case-insensitive' into maint 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 25 June 2014, 18:48:34 UTC
ed5d0d2 Merge branch 'rs/mailinfo-header-cmp' into maint "git mailinfo" used to read beyond the end of header string while parsing an incoming e-mail message to extract the patch. * rs/mailinfo-header-cmp: mailinfo: use strcmp() for string comparison 25 June 2014, 18:48:23 UTC
182c3d6 Merge branch 'jk/index-pack-report-missing' into maint The error reporting from "git index-pack" has been improved to distinguish missing objects from type errors. * jk/index-pack-report-missing: index-pack: distinguish missing objects from type errors 25 June 2014, 18:48:14 UTC
a9041df Merge branch 'nd/index-pack-one-fd-per-thread' into maint We used to disable threaded "git index-pack" on platforms without thread-safe pread(); use a different workaround for such platforms to allow threaded "git index-pack". * nd/index-pack-one-fd-per-thread: index-pack: work around thread-unsafe pread() 25 June 2014, 18:47:58 UTC
75b1b04 Merge branch 'sk/spawn-less-case-insensitively-from-grep-O-i' into maint "git grep -O" to show the lines that hit in the pager did not work well with case insensitive search. We now spawn "less" with its "-I" option when it is used as the pager (which is the default). * sk/spawn-less-case-insensitively-from-grep-O-i: git grep -O -i: if the pager is 'less', pass the '-I' option 25 June 2014, 18:47:49 UTC
94c734a Merge branch 'nd/daemonize-gc' into maint "git gc --auto" was recently changed to run in the background to give control back early to the end-user sitting in front of the terminal, but it forgot that housekeeping involving reflogs should be done without other processes competing for accesses to the refs. * nd/daemonize-gc: gc --auto: do not lock refs in the background 25 June 2014, 18:47:36 UTC
cb4575f Merge branch 'jk/diff-follow-must-take-one-pathspec' into maint "git format-patch" did not enforce the rule that the "--follow" option from the log/diff family of commands must be used with exactly one pathspec. * jk/diff-follow-must-take-one-pathspec: move "--follow needs one pathspec" rule to diff_setup_done 25 June 2014, 18:47:23 UTC
11aae3e Merge branch 'jk/diff-files-assume-unchanged' into maint "git diff --find-copies-harder" sometimes pretended as if the mode bits have changed for paths that are marked with assume-unchanged bit. * jk/diff-files-assume-unchanged: run_diff_files: do not look at uninitialized stat data 25 June 2014, 18:47:09 UTC
b659f81 Merge branch 'jk/commit-C-pick-empty' into maint "git commit --allow-empty-message -C $commit" did not work when the commit did not have any log message. * jk/commit-C-pick-empty: commit: do not complain of empty messages from -C 25 June 2014, 18:46:54 UTC
4d27d8c Merge branch 'bc/blame-crlf-test' into maint "git blame" assigned the blame to the copy in the working-tree if the repository is set to core.autocrlf=input and the file used CRLF line endings. * bc/blame-crlf-test: blame: correctly handle files regardless of autocrlf 25 June 2014, 18:46:45 UTC
6bf8426 Merge branch 'jx/blame-align-relative-time' into maint "git blame" miscounted number of columns needed to show localized timestamps, resulting in jaggy left-side-edge of the source code lines in its output. * jx/blame-align-relative-time: blame: dynamic blame_date_width for different locales blame: fix broken time_buf paddings in relative timestamp 25 June 2014, 18:46:34 UTC
c122c9a Merge branch 'jc/apply-ignore-whitespace' into maint "--ignore-space-change" option of "git apply" ignored the spaces at the beginning of line too aggressively, which is inconsistent with the option of the same name "diff" and "git diff" have. * jc/apply-ignore-whitespace: apply --ignore-space-change: lines with and without leading whitespaces do not match 25 June 2014, 18:46:23 UTC
ff7e96b Merge branch 'jk/complete-merge-pull' into maint The completion scripts (in contrib/) did not know about quite a few options that are common between "git merge" and "git pull", and a couple of options unique to "git merge". * jk/complete-merge-pull: completion: add missing options for git-merge completion: add a note that merge options are shared 25 June 2014, 18:46:12 UTC
fbfdf13 Merge branch 'ow/config-mailmap-pathname' into maint The "mailmap.file" configuration option did not support the tilde expansion (i.e. ~user/path and ~/path). * ow/config-mailmap-pathname: config: respect '~' and '~user' in mailmap.file 25 June 2014, 18:45:55 UTC
ad5d893 Merge branch 'as/pretty-truncate' into maint The "%<(10,trunc)%s" pretty format specifier in the log family of commands is used to truncate the string to a given length (e.g. 10 in the example) with padding to column-align the output, but did not take into account that number of bytes and number of display columns are different. * as/pretty-truncate: pretty.c: format string with truncate respects logOutputEncoding t4205, t6006: add tests that fail with i18n.logOutputEncoding set t4205 (log-pretty-format): use `tformat` rather than `format` t4041, t4205, t6006, t7102: don't hardcode tested encoding value t4205 (log-pretty-formats): don't hardcode SHA-1 in expected outputs 25 June 2014, 18:45:32 UTC
91043fc Merge branch 'jc/revision-dash-count-parsing' into maint "git log -2master" is a common typo that shows two commits starting from whichever random branch that is not 'master' that happens to be checked out currently. * jc/revision-dash-count-parsing: revision: parse "git log -<count>" more carefully 25 June 2014, 18:44:53 UTC
81bd9b1 Merge branch 'jk/report-fail-to-read-objects-better' into maint Reworded the error message given upon a failure to open an existing loose object file due to e.g. permission issues; it was reported as the object being corrupt, but that is not quite true. * jk/report-fail-to-read-objects-better: open_sha1_file: report "most interesting" errno 25 June 2014, 18:43:58 UTC
73505ef Merge branch 'mn/sideband-no-ansi' into maint Tools that read diagnostic output in our standard error stream do not want to see terminal control sequence (e.g. erase-to-eol). Detect them by checking if the standard error stream is connected to a tty. * mn/sideband-no-ansi: sideband.c: do not use ANSI control sequence on non-terminal 25 June 2014, 18:43:43 UTC
e293c56 Merge branch 'je/pager-do-not-recurse' into maint We used to unconditionally disable the pager in the pager process we spawn to feed out output, but that prevented people who want to run "less" within "less" from doing so. * je/pager-do-not-recurse: pager: do allow spawning pager recursively 25 June 2014, 18:43:07 UTC
60a5f5f builtin/clone.c: detect a clone starting at a tag correctly 31b808a0 (clone --single: limit the fetch refspec to fetched branch, 2012-09-20) tried to see if the given "branch" to follow is actually a tag at the remote repository by checking with "refs/tags/" but it incorrectly used strstr(3); it is actively wrong to treat a "branch" "refs/heads/refs/tags/foo" and use the logic for the "refs/tags/" ref hierarchy. What the code really wanted to do is to see if it starts with "refs/tags/". Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 June 2014, 21:31:35 UTC
aa4b78d pretty: avoid reading past end-of-string with "%G" If the user asks for --format=%G with nothing else, we correctly realize that "%G" is not a valid placeholder (it should be "%G?", "%GK", etc). But we still tell the strbuf_expand code that we consumed 2 characters, causing it to jump over the trailing NUL and output garbage. This also fixes the case where "%GX" would be consumed (and produce no output). In other cases, we pass unrecognized placeholders through to the final string. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 June 2014, 20:41:41 UTC
06ca0f4 t7510: check %G* pretty-format output We do not check these along with the other pretty-format placeholders in t6006, because we need signed commits to make them interesting. t7510 has such commits, and can easily exercise them in addition to the regular --show-signature code path. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 June 2014, 20:41:39 UTC
4baf839 t7510: test a commit signed by an unknown key We tested both good and bad signatures, but not ones made correctly but with a key for which we have no trust. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 June 2014, 20:41:28 UTC
7b1732c t7510: use consistent &&-chains in loop We check multiple commits in a loop. Because we want to break out of the loop if any single iteration fails, we use a subshell/exit like: ( for i in $stuff do do-something $i || exit 1 done ) However, we are inconsistent in our loop body. Some commands get their own "|| exit 1", and others try to chain to the next command with "&&", like: X && Y || exit 1 Z || exit 1 This is a little hard to read and follow, because X and Y are treated differently for no good reason. But much worse, the second loop follows a similar pattern and gets it wrong. "Y" is expected to fail, so we use "&& exit 1", giving us: X && Y && exit 1 Z || exit 1 That gets the test for X wrong (we do not exit unless both X fails and Y unexpectedly succeeds, but we would want to exit if _either_ is wrong). We can write this clearly and correctly by consistently using "&&", followed by a single "|| exit 1", and negating Y with "!" (as we would in a normal &&-chain). Like: X && ! Y && Z || exit 1 Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 June 2014, 20:39:52 UTC
526d56e t7510: stop referring to master in later tests Our setup creates a sequence of commits, each with its own tag. However, we sometimes refer to "seventh-signed" as "master". This works, since it is at the tip of the created branch, but is brittle if new tests need to add more commits. Let's use its tag name to be unambiguous. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 June 2014, 20:39:12 UTC
95104c7 rebase--merge: fix --skip with two conflicts in a row If git rebase --merge encountered a conflict, --skip would not work if the next commit also conflicted. The msgnum file would never be updated with the new patch number, so no patch would actually be skipped, resulting in an inescapable loop. Update the msgnum file's value as the first thing in call_merge. This also avoids an "Already applied" message when skipping a commit. There is no visible change for the other contexts in which call_merge is invoked, as the msgnum file's value remains unchanged in those situations. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 June 2014, 20:29:16 UTC
04953bc http-protocol.txt: Basic Auth is defined in RFC 2617, not RFC 2616 Signed-off-by: Yi EungJun <eungjun.yi@navercorp.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 June 2014, 19:00:43 UTC
9393ae7 submodule: document "sync --recursive" The "git submodule sync" command supports the --recursive flag, but the documentation does not mention this. That flag is useful, for example when a remote is changed in a submodule of a submodule. Signed-off-by: Matthew Chen <charlesmchen@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 June 2014, 22:00:17 UTC
97c1364 t0008: do not depend on 'echo' handling backslashes specially The original used to pass with /bin/dash but not with /bin/bash set to $SHELL_PATH. The former turns "\\" into "\", but the latter does not. Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 June 2014, 20:29:03 UTC
218aa3a reuse cached commit buffer when parsing signatures When we call show_signature or show_mergetag, we read the commit object fresh via read_sha1_file and reparse its headers. However, in most cases we already have the object data available, attached to the "struct commit". This is partially laziness in dealing with the memory allocation issues, but partially defensive programming, in that we would always want to verify a clean version of the buffer (not one that might have been munged by other users of the commit). However, we do not currently ever munge the commit buffer, and not using the already-available buffer carries a fairly big performance penalty when we are looking at a large number of commits. Here are timings on linux.git: [baseline, no signatures] $ time git log >/dev/null real 0m4.902s user 0m4.784s sys 0m0.120s [before] $ time git log --show-signature >/dev/null real 0m14.735s user 0m9.964s sys 0m0.944s [after] $ time git log --show-signature >/dev/null real 0m9.981s user 0m5.260s sys 0m0.936s Note that our user CPU time drops almost in half, close to the non-signature case, but we do still spend more wall-clock and system time, presumably from dealing with gpg. An alternative to this is to note that most commits do not have signatures (less than 1% in this repo), yet we pay the re-parsing cost for every commit just to find out if it has a mergetag or signature. If we checked that when parsing the commit initially, we could avoid re-examining most commits later on. Even if we did pursue that direction, however, this would still speed up the cases where we _do_ have signatures. So it's probably worth doing either way. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 June 2014, 19:10:13 UTC
8597ea3 commit: record buffer length in cache Most callsites which use the commit buffer try to use the cached version attached to the commit, rather than re-reading from disk. Unfortunately, that interface provides only a pointer to the NUL-terminated buffer, with no indication of the original length. For the most part, this doesn't matter. People do not put NULs in their commit messages, and the log code is happy to treat it all as a NUL-terminated string. However, some code paths do care. For example, when checking signatures, we want to be very careful that we verify all the bytes to avoid malicious trickery. This patch just adds an optional "size" out-pointer to get_commit_buffer and friends. The existing callers all pass NULL (there did not seem to be any obvious sites where we could avoid an immediate strlen() call, though perhaps with some further refactoring we could). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 June 2014, 19:09:38 UTC
c1b3c71 commit: convert commit->buffer to a slab This will make it easier to manage the buffer cache independently of the "struct commit" objects. It also shrinks "struct commit" by one pointer, which may be helpful. Unfortunately it does not reduce the max memory size of something like "rev-list", because rev-list uses get_cached_commit_buffer() to decide not to show each commit's output (and due to the design of slab_at, accessing the slab requires us to extend it, allocating exactly the same number of buffer pointers we dropped from the commit structs). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 June 2014, 19:08:17 UTC
80cdaba commit-slab: provide a static initializer Callers currently must use init_foo_slab() at runtime before accessing a slab. For global slabs, it's much nicer if we can initialize them in BSS, so that each user does not have to add code to check-and-initialize. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 June 2014, 19:08:17 UTC
bc6b8fc use get_commit_buffer everywhere Each of these sites assumes that commit->buffer is valid. Since they would segfault if this was not the case, they are likely to be correct in practice. However, we can future-proof them by using get_commit_buffer. And as a side effect, we abstract away the final bare uses of commit->buffer. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 June 2014, 19:08:17 UTC
b66103c convert logmsg_reencode to get_commit_buffer Like the callsites in the previous commit, logmsg_reencode already falls back to read_sha1_file when necessary. However, I split its conversion out into its own commit because it's a bit more complex. We return either: 1. The original commit->buffer 2. A newly allocated buffer from read_sha1_file 3. A reencoded buffer (based on either 1 or 2 above). while trying to do as few extra reads/allocations as possible. Callers currently free the result with logmsg_free, but we can simplify this by pointing them straight to unuse_commit_buffer. This is a slight layering violation, in that we may be passing a buffer from (3). However, since the end result is to free() anything except (1), which is unlikely to change, and because this makes the interface much simpler, it's a reasonable bending of the rules. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 June 2014, 19:08:17 UTC
ba41c1c use get_commit_buffer to avoid duplicate code For both of these sites, we already do the "fallback to read_sha1_file" trick. But we can shorten the code by just using get_commit_buffer. Note that the error cases are slightly different when read_sha1_file fails. get_commit_buffer will die() if the object cannot be loaded, or is a non-commit. For get_sha1_oneline, this will almost certainly never happen, as we will have just called parse_object (and if it does, it's probably worth complaining about). For record_author_date, the new behavior is probably better; we notify the user of the error instead of silently ignoring it. And because it's used only for sorting by author-date, somebody examining a corrupt repo can fallback to the regular traversal order. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 June 2014, 19:08:17 UTC
a97934d use get_cached_commit_buffer where appropriate Some call sites check commit->buffer to see whether we have a cached buffer, and if so, do some work with it. In the long run we may want to switch these code paths to make their decision on a different boolean flag (because checking the cache may get a little more expensive in the future). But for now, we can easily support them by converting the calls to use get_cached_commit_buffer. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 June 2014, 19:08:17 UTC
152ff1c provide helpers to access the commit buffer Many sites look at commit->buffer to get more detailed information than what is in the parsed commit struct. However, we sometimes drop commit->buffer to save memory, in which case the caller would need to read the object afresh. Some callers do this (leading to duplicated code), and others do not (which opens the possibility of a segfault if somebody else frees the buffer). Let's provide a pair of helpers, "get" and "unuse", that let callers easily get the buffer. They will use the cached buffer when possible, and otherwise load from disk using read_sha1_file. Note that we also need to add a "get_cached" variant which returns NULL when we do not have a cached buffer. At first glance this seems to defeat the purpose of "get", which is to always provide a return value. However, some log code paths actually use the NULL-ness of commit->buffer as a boolean flag to decide whether to try printing the commit. At least for now, we want to continue supporting that use. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 June 2014, 19:08:17 UTC
66c2827 provide a helper to set the commit buffer Right now this is just a one-liner, but abstracting it will make it easier to change later. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 June 2014, 19:08:17 UTC
0fb370d provide a helper to free commit buffer This converts two lines into one at each caller. But more importantly, it abstracts the concept of freeing the buffer, which will make it easier to change later. Note that we also need to provide a "detach" mechanism for a tricky case in index-pack. We are passed a buffer for the object generated by processing the incoming pack. If we are not using --strict, we just calculate the sha1 on that buffer and return, leaving the caller to free it. But if we are using --strict, we actually attach that buffer to an object, pass the object to the fsck functions, and then detach the buffer from the object again (so that the caller can free it as usual). In this case, we don't want to free the buffer ourselves, but just make sure it is no longer associated with the commit. Note that we are making the assumption here that the attach/detach process does not impact the buffer at all (e.g., it is never reallocated or modified). That holds true now, and we have no plans to change that. However, as we abstract the commit_buffer code, this dependency becomes less obvious. So when we detach, let's also make sure that we get back the same buffer that we gave to the commit_buffer code. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 June 2014, 19:07:47 UTC
9a597ed Merge branch 'jc/rev-parse-argh-dashed-multi-words' into maint * jc/rev-parse-argh-dashed-multi-words: update-index: fix segfault with missing --cacheinfo argument 12 June 2014, 19:17:57 UTC
8f92c77 pull: do not abuse 'break' inside a shell 'case' It is not C. The code would break under mksh when 'pull.ff' is set: $ git pull /usr/lib/git-core/git-pull[67]: break: can't break Already up-to-date. Signed-off-by: Jacek Konieczny <jajcus@jajcus.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 June 2014, 19:15:49 UTC
back to top