swh:1:snp:47f1e8bb459169b0feb652a9c3d9cbabd8526d4a

sort by:
Revision Author Date Message Commit Date
69f9a6e Git 2.4.3 Signed-off-by: Junio C Hamano <gitster@pobox.com> 05 June 2015, 19:22:33 UTC
cbac706 Merge branch 'dl/branch-error-message' into maint Error messages from "git branch" called remote-tracking branches as "remote branches". * dl/branch-error-message: branch: do not call a "remote-tracking branch" a "remote branch" 05 June 2015, 19:00:29 UTC
c538004 Merge branch 'jk/skip-http-tests-under-no-curl' into maint Test clean-up. * jk/skip-http-tests-under-no-curl: tests: skip dav http-push tests under NO_EXPAT=NoThanks t/lib-httpd.sh: skip tests if NO_CURL is defined 05 June 2015, 19:00:28 UTC
e41f8d9 Merge branch 'ps/doc-packfile-vs-pack-file' into maint Doc consistency updates. * ps/doc-packfile-vs-pack-file: doc: fix inconsistent spelling of "packfile" pack-protocol.txt: fix insconsistent spelling of "packfile" git-unpack-objects.txt: fix inconsistent spelling of "packfile" git-verify-pack.txt: fix inconsistent spelling of "packfile" 05 June 2015, 19:00:27 UTC
48feda5 Merge branch 'fg/document-commit-message-stripping' into maint * fg/document-commit-message-stripping: Documentation: clarify how "git commit" cleans up the edited log message 05 June 2015, 19:00:26 UTC
5c2e654 Merge branch 'jk/rerere-forget-check-enabled' into maint "git rerere forget" in a repository without rerere enabled gave a cryptic error message; it should be a silent no-op instead. * jk/rerere-forget-check-enabled: rerere: exit silently on "forget" when rerere is disabled 05 June 2015, 19:00:25 UTC
4cb9fe3 Merge branch 'pt/pull-log-n' into maint "git pull --log" and "git pull --no-log" worked as expected, but "git pull --log=20" did not. * pt/pull-log-n: pull: handle --log=<n> 05 June 2015, 19:00:24 UTC
7e46f27 Merge branch 'pt/pull-ff-vs-merge-ff' into maint The pull.ff configuration was supposed to override the merge.ff configuration, but it didn't. * pt/pull-ff-vs-merge-ff: pull: parse pull.ff as a bool or string pull: make pull.ff=true override merge.ff 05 June 2015, 19:00:23 UTC
0662990 Merge branch 'rs/plug-leak-in-pack-bitmaps' into maint The code to read pack-bitmap wanted to allocate a few hundred pointers to a structure, but by mistake allocated and leaked memory enough to hold that many actual structures. Correct the allocation size and also have it on stack, as it is small enough. * rs/plug-leak-in-pack-bitmaps: pack-bitmaps: plug memory leak, fix allocation size for recent_bitmaps 05 June 2015, 19:00:22 UTC
7c1ff53 Merge branch 'ja/tutorial-asciidoctor-fix' into maint A literal block in the tutorial had lines with unequal lengths to delimit it from the rest of the document, which choke GitHub's AsciiDoc renderer. * ja/tutorial-asciidoctor-fix: doc: fix unmatched code fences 05 June 2015, 19:00:22 UTC
413a715 Merge branch 'jk/stripspace-asciidoctor-fix' into maint A literal block in the tutorial had lines with unequal lengths to delimit it from the rest of the document, which choke GitHub's AsciiDoc renderer. * jk/stripspace-asciidoctor-fix: doc: fix unmatched code fences in git-stripspace 05 June 2015, 19:00:21 UTC
96b7f93 Merge branch 'jk/asciidoc-markup-fix' into maint Various documentation mark-up fixes to make the output more consistent in general and also make AsciiDoctor (an alternative formatter) happier. * jk/asciidoc-markup-fix: doc: convert AsciiDoc {?foo} to ifdef::foo[] doc: put example URLs and emails inside literal backticks doc: drop backslash quoting of some curly braces doc: convert \--option to --option doc/add: reformat `--edit` option doc: fix length of underlined section-title doc: fix hanging "+"-continuation doc: fix unquoted use of "{type}" doc: fix misrendering due to `single quote' 05 June 2015, 19:00:19 UTC
51f319c Merge branch 'ps/bundle-verify-arg' into maint "git bundle verify" did not diagnose extra parameters on the command line. * ps/bundle-verify-arg: bundle: verify arguments more strictly 05 June 2015, 19:00:18 UTC
7c997bc Merge branch 'mh/write-refs-sooner-2.4' into maint Multi-ref transaction support we merged a few releases ago unnecessarily kept many file descriptors open, risking to fail with resource exhaustion. This is for 2.4.x track. * mh/write-refs-sooner-2.4: ref_transaction_commit(): fix atomicity and avoid fd exhaustion ref_transaction_commit(): remove the local flags variable ref_transaction_commit(): inline call to write_ref_sha1() rename_ref(): inline calls to write_ref_sha1() from this function commit_ref_update(): new function, extracted from write_ref_sha1() write_ref_to_lockfile(): new function, extracted from write_ref_sha1() t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZE update-ref: test handling large transactions properly ref_transaction_commit(): fix atomicity and avoid fd exhaustion ref_transaction_commit(): remove the local flags variable ref_transaction_commit(): inline call to write_ref_sha1() rename_ref(): inline calls to write_ref_sha1() from this function commit_ref_update(): new function, extracted from write_ref_sha1() write_ref_to_lockfile(): new function, extracted from write_ref_sha1() t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZE update-ref: test handling large transactions properly 05 June 2015, 19:00:17 UTC
4ba8846 Merge branch 'mh/ref-directory-file' into maint The ref API did not handle cases where 'refs/heads/xyzzy/frotz' is removed at the same time as 'refs/heads/xyzzy' is added (or vice versa) very well. * mh/ref-directory-file: reflog_expire(): integrate lock_ref_sha1_basic() errors into ours ref_transaction_commit(): delete extra "the" from error message ref_transaction_commit(): provide better error messages rename_ref(): integrate lock_ref_sha1_basic() errors into ours lock_ref_sha1_basic(): improve diagnostics for ref D/F conflicts lock_ref_sha1_basic(): report errors via a "struct strbuf *err" verify_refname_available(): report errors via a "struct strbuf *err" verify_refname_available(): rename function refs: check for D/F conflicts among refs created in a transaction ref_transaction_commit(): use a string_list for detecting duplicates is_refname_available(): use dirname in first loop struct nonmatching_ref_data: store a refname instead of a ref_entry report_refname_conflict(): inline function entry_matches(): inline function is_refname_available(): convert local variable "dirname" to strbuf is_refname_available(): avoid shadowing "dir" variable is_refname_available(): revamp the comments t1404: new tests of ref D/F conflicts within transactions 05 June 2015, 19:00:16 UTC
5efef30 Merge branch 'mg/log-decorate-HEAD' into maint The "log --decorate" enhancement in Git 2.4 that shows the commit at the tip of the current branch e.g. "HEAD -> master", did not work with --decorate=full. * mg/log-decorate-HEAD: log: do not shorten decoration names too early log: decorate HEAD with branch name under --decorate=full, too 05 June 2015, 19:00:15 UTC
5e896a3 Merge branch 'sb/t1020-cleanup' into maint There was a commented-out (instead of being marked to expect failure) test that documented a breakage that was fixed since the test was written; turn it into a proper test. * sb/t1020-cleanup: subdirectory tests: code cleanup, uncomment test 05 June 2015, 19:00:14 UTC
e9f767e Merge branch 'jc/gitignore-precedence' into maint core.excludesfile (defaulting to $XDG_HOME/git/ignore) is supposed to be overridden by repository-specific .git/info/exclude file, but the order was swapped from the beginning. This belatedly fixes it. * jc/gitignore-precedence: ignore: info/exclude should trump core.excludesfile 05 June 2015, 19:00:13 UTC
2d8bb46 Merge branch 'bc/connect-plink' into maint The connection initiation code for "ssh" transport tried to absorb differences between the stock "ssh" and Putty-supplied "plink" and its derivatives, but the logic to tell that we are using "plink" variants were too loose and falsely triggered when "plink" appeared anywhere in the path (e.g. "/home/me/bin/uplink/ssh"). * bc/connect-plink: connect: improve check for plink to reduce false positives t5601: fix quotation error leading to skipped tests connect: simplify SSH connection code path 05 June 2015, 19:00:11 UTC
c7b4de2 Merge branch 'ph/rebase-i-redo' into maint "git rebase -i" moved the "current" command from "todo" to "done" a bit too prematurely, losing a step when a "pick" did not even start. * ph/rebase-i-redo: rebase -i: redo tasks that die during cherry-pick 05 June 2015, 19:00:10 UTC
8d5ef5a Merge branch 'jk/add-e-kill-editor' into maint "git add -e" did not allow the user to abort the operation by killing the editor. * jk/add-e-kill-editor: add: check return value of launch_editor 05 June 2015, 19:00:09 UTC
a3821a1 Merge branch 'mh/clone-verbosity-fix' into maint Git 2.4 broke setting verbosity and progress levels on "git clone" with native transports. * mh/clone-verbosity-fix: clone: call transport_set_verbosity before anything else on the newly created transport 05 June 2015, 19:00:08 UTC
3c91e99 Merge branch 'jk/sha1-file-reduce-useless-warnings' into maint * jk/sha1-file-reduce-useless-warnings: sha1_file: squelch "packfile cannot be accessed" warnings 05 June 2015, 19:00:07 UTC
1d93ec9 Merge branch 'tb/blame-resurrect-convert-to-git' into maint Some time ago, "git blame" (incorrectly) lost the convert_to_git() call when synthesizing a fake "tip" commit that represents the state in the working tree, which broke folks who record the history with LF line ending to make their project portabile across platforms while terminating lines in their working tree files with CRLF for their platform. * tb/blame-resurrect-convert-to-git: blame: CRLF in the working tree and LF in the repo 05 June 2015, 19:00:06 UTC
bdf204f Merge branch 'jc/plug-fmt-merge-msg-leak' into maint * jc/plug-fmt-merge-msg-leak: fmt-merge-msg: plug small leak of commit buffer 05 June 2015, 19:00:05 UTC
d9c82fa Merge branch 'pt/xdg-config-path' into maint Code clean-up for xdg configuration path support. * pt/xdg-config-path: path.c: remove home_config_paths() git-config: replace use of home_config_paths() git-commit: replace use of home_config_paths() credential-store.c: replace home_config_paths() with xdg_config_home() dir.c: replace home_config_paths() with xdg_config_home() attr.c: replace home_config_paths() with xdg_config_home() path.c: implement xdg_config_home() t0302: "unreadable" test needs POSIXPERM t0302: test credential-store support for XDG_CONFIG_HOME git-credential-store: support XDG_CONFIG_HOME git-credential-store: support multiple credential files 05 June 2015, 19:00:04 UTC
9eabf5b Git 2.4.2 Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 May 2015, 20:49:59 UTC
df08eb3 Merge branch 'jk/still-interesting' into maint "git rev-list --objects $old --not --all" to see if everything that is reachable from $old is already connected to the existing refs was very inefficient. * jk/still-interesting: limit_list: avoid quadratic behavior from still_interesting 26 May 2015, 20:49:26 UTC
1e6c8ba Merge branch 'jc/hash-object' into maint "hash-object --literally" introduced in v2.2 was not prepared to take a really long object type name. * jc/hash-object: write_sha1_file(): do not use a separate sha1[] array t1007: add hash-object --literally tests hash-object --literally: fix buffer overrun with extra-long object type git-hash-object.txt: document --literally option 26 May 2015, 20:49:25 UTC
5d53433 Merge branch 'jk/rebase-quiet-noop' into maint "git rebase --quiet" was not quite quiet when there is nothing to do. * jk/rebase-quiet-noop: rebase: silence "git checkout" for noop rebase 26 May 2015, 20:49:23 UTC
23903b9 Merge branch 'sg/complete-decorate-full-not-long' into maint The completion for "log --decorate=" parameter value was incorrect. * sg/complete-decorate-full-not-long: completion: fix and update 'git log --decorate=' options 26 May 2015, 20:49:22 UTC
a2e5c79 Merge branch 'jk/filter-branch-use-of-sed-on-incomplete-line' into maint "filter-branch" corrupted commit log message that ends with an incomplete line on platforms with some "sed" implementations that munge such a line. Work it around by avoiding to use "sed". * jk/filter-branch-use-of-sed-on-incomplete-line: filter-branch: avoid passing commit message through sed 26 May 2015, 20:49:20 UTC
6fd5836 Merge branch 'jc/daemon-no-ipv6-for-2.4.1' into maint "git daemon" fails to build from the source under NO_IPV6 configuration (regression in 2.4). * jc/daemon-no-ipv6-for-2.4.1: daemon: unbreak NO_IPV6 build regression 26 May 2015, 20:49:19 UTC
cb9ec8e Merge branch 'jk/stash-require-clean-index' into maint "git stash pop/apply" forgot to make sure that not just the working tree is clean but also the index is clean. The latter is important as a stash application can conflict and the index will be used for conflict resolution. * jk/stash-require-clean-index: stash: require a clean index to apply t3903: avoid applying onto dirty index t3903: stop hard-coding commit sha1s 26 May 2015, 20:49:19 UTC
af6d7a6 Merge branch 'jk/git-no-more-argv0-path-munging' into maint We have prepended $GIT_EXEC_PATH and the path "git" is installed in (typically "/usr/bin") to $PATH when invoking subprograms and hooks for almost eternity, but the original use case the latter tried to support was semi-bogus (i.e. install git to /opt/foo/git and run it without having /opt/foo on $PATH), and more importantly it has become less and less relevant as Git grew more mainstream (i.e. the users would _want_ to have it on their $PATH). Stop prepending the path in which "git" is installed to users' $PATH, as that would interfere the command search order people depend on (e.g. they may not like versions of programs that are unrelated to Git in /usr/bin and want to override them by having different ones in /usr/local/bin and have the latter directory earlier in their $PATH). * jk/git-no-more-argv0-path-munging: stop putting argv[0] dirname at front of PATH 26 May 2015, 20:49:18 UTC
bbf431c doc: fix inconsistent spelling of "packfile" Fix remaining instances where "pack-file" is used instead of "packfile". Some places remain where we still use "pack-file", This is the case when we explicitly refer to a file with a ".pack" extension as opposed to a data source providing a pack data stream. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 May 2015, 16:00:17 UTC
599dc76 pack-bitmaps: plug memory leak, fix allocation size for recent_bitmaps Use an automatic variable for recent_bitmaps, an array of pointers. This way we don't allocate too much and don't have to free the memory at the end. The old code over-allocated because it reserved enough memory to store all of the structs it is only pointing to and never freed it. 160 64-bit pointers take up 1280 bytes, which is not too much to be placed on the stack. MAX_XOR_OFFSET is turned into a preprocessor constant to make it constant enough for use in an non-variable array declaration. Noticed-by: Stefan Beller <stefanbeller@gmail.com> Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 May 2015, 16:31:09 UTC
822f0c4 clone: call transport_set_verbosity before anything else on the newly created transport Commit 2879bc3 made the progress and verbosity options sent to remote helper earlier than they previously were. But nothing else after that would send updates if the value is changed later on with transport_set_verbosity. While for fetch and push, transport_set_verbosity is the first thing that is done after creating the transport, it was not the case for clone. So commit 2879bc3 broke changing progress and verbosity for clone, for urls requiring a remote helper only (so, not git:// urls, for instance). Moving transport_set_verbosity to just after the transport is created works around the issue. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 May 2015, 16:05:55 UTC
66d2e04 subdirectory tests: code cleanup, uncomment test Back when these tests were written, we wanted to make sure that Git notices it is in a bare repository and "git show -s HEAD" would refrain from complaining that HEAD might mean a file it sees in its current working directory (because it does not). But the version of Git back then didn't behave well, without (doubly) being told that it is inside a bare repository by exporting "GIT_DIR=.". The form of the test we originally wanted to have was left commented out as a reminder. Nowadays the test as originally intended works, so add it to the test suite. We'll keep the old test that explicitly sets GIT_DIR=. to make sure that use case will not regress. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 18 May 2015, 22:22:49 UTC
db9bb28 pull: parse pull.ff as a bool or string Since b814da8 (pull: add pull.ff configuration, 2014-01-15) git-pull supported setting --(no-)ff via the pull.ff configuration value. However, as it only matches the string values of "true" and "false", it does not support other boolean aliases such as "on", "off", "1", "0". This is inconsistent with the merge.ff setting, which supports these aliases. Fix this by using the bool_or_string_config function to retrieve the value of pull.ff. Signed-off-by: Paul Tan <pyokagan@gmail.com> Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 18 May 2015, 18:22:38 UTC
eb8dc05 pull: make pull.ff=true override merge.ff Since b814da8 (pull: add pull.ff configuration, 2014-01-15), running git-pull with the configuration pull.ff=false or pull.ff=only is equivalent to passing --no-ff and --ff-only to git-merge. However, if pull.ff=true, no switch is passed to git-merge. This leads to the confusing behavior where pull.ff=false or pull.ff=only is able to override merge.ff, while pull.ff=true is unable to. Fix this by adding the --ff switch if pull.ff=true, and add a test to catch future regressions. Furthermore, clarify in the documentation that pull.ff overrides merge.ff. Signed-off-by: Paul Tan <pyokagan@gmail.com> Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 18 May 2015, 18:22:27 UTC
5061a44 pull: handle --log=<n> Since efb779f (merge, pull: add '--(no-)log' command line option, 2008-04-06) git-pull supported the (--no-)log switch and would pass it to git-merge. 96e9420 (merge: Make '--log' an integer option for number of shortlog entries, 2010-09-08) implemented support for the --log=<n> switch, which would explicitly set the number of shortlog entries. However, git-pull does not recognize this option, and will instead pass it to git-fetch, leading to "unknown option" errors. Fix this by matching --log=* in addition to --log and --no-log. Implement a test for this use case. Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 18 May 2015, 18:19:36 UTC
3890dae pack-protocol.txt: fix insconsistent spelling of "packfile" Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 May 2015, 18:25:00 UTC
4667391 git-unpack-objects.txt: fix inconsistent spelling of "packfile" Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 May 2015, 18:24:58 UTC
d017a45 git-verify-pack.txt: fix inconsistent spelling of "packfile" Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 May 2015, 18:24:57 UTC
0544574 rerere: exit silently on "forget" when rerere is disabled If you run "git rerere forget foo" in a repository that does not have rerere enabled, git hits an internal error: $ git init -q $ git rerere forget foo fatal: BUG: attempt to commit unlocked object The problem is that setup_rerere() will not actually take the lock if the rerere system is disabled. We should notice this and return early. We can return with a success code here, because we know there is nothing to forget. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 May 2015, 19:33:15 UTC
d0258b9 doc: convert AsciiDoc {?foo} to ifdef::foo[] The former seems to just be syntactic sugar for the latter. And as it's sugar that AsciiDoctor doesn't understand, it would be nice to avoid it. Since there are only two spots, and the resulting source is not significantly harder to read, it's worth doing. Note that this does slightly affect the generated HTML (it has an extra newline), but the rendered result for both HTML and docbook should be the same (since the newline is not syntactically significant there). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 May 2015, 16:38:29 UTC
aaa7e0d Git 2.4.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 21:11:43 UTC
a379f25 Merge branch 'sb/line-log-plug-pairdiff-leak' into maint * sb/line-log-plug-pairdiff-leak: line-log.c: fix a memleak 13 May 2015, 21:05:56 UTC
071e93a Merge branch 'sb/test-bitmap-free-at-end' into maint * sb/test-bitmap-free-at-end: pack-bitmap.c: fix a memleak 13 May 2015, 21:05:56 UTC
36ec67d Merge branch 'nd/t1509-chroot-test' into maint Correct test bitrot. * nd/t1509-chroot-test: t1509: update prepare script to be able to run t1509 in chroot again 13 May 2015, 21:05:55 UTC
c1c4a87 Merge branch 'jk/type-from-string-gently' into maint "git cat-file bl $blob" failed to barf even though there is no object type that is "bl". * jk/type-from-string-gently: type_from_string_gently: make sure length matches 13 May 2015, 21:05:54 UTC
21b56b9 Merge branch 'ep/fix-test-lib-functions-report' into maint * ep/fix-test-lib-functions-report: test-lib-functions.sh: fix the second argument to some helper functions 13 May 2015, 21:05:53 UTC
8a1d897 Merge branch 'cn/bom-in-gitignore' into maint Teach the codepaths that read .gitignore and .gitattributes files that these files encoded in UTF-8 may have UTF-8 BOM marker at the beginning; this makes it in line with what we do for configuration files already. * cn/bom-in-gitignore: attr: skip UTF8 BOM at the beginning of the input file config: use utf8_bom[] from utf.[ch] in git_parse_source() utf8-bom: introduce skip_utf8_bom() helper add_excludes_from_file: clarify the bom skipping logic dir: allow a BOM at the beginning of exclude files 13 May 2015, 21:05:51 UTC
ebb464f Merge branch 'jk/prune-mtime' into maint Access to objects in repositories that borrow from another one on a slow NFS server unnecessarily got more expensive due to recent code becoming more cautious in a naive way not to lose objects to pruning. * jk/prune-mtime: sha1_file: only freshen packs once per run sha1_file: freshen pack objects before loose reachable: only mark local objects as recent 13 May 2015, 21:05:50 UTC
a60abe1 Merge branch 'jk/init-core-worktree-at-root' into maint We avoid setting core.worktree when the repository location is the ".git" directory directly at the top level of the working tree, but the code misdetected the case in which the working tree is at the root level of the filesystem (which arguably is a silly thing to do, but still valid). * jk/init-core-worktree-at-root: init: don't set core.worktree when initializing /.git 13 May 2015, 21:05:49 UTC
429ad20 log: do not shorten decoration names too early The DECORATE_SHORT_REFS option given to load_ref_decorations() affects the way a copy of the refname is stored for each decorated commit, and this forces later steps like current_pointed_by_HEAD() to adjust their behaviour based on this initial settings. Instead, we can always store the full refname and then shorten them when producing the output. Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 19:40:57 UTC
76c61fb log: decorate HEAD with branch name under --decorate=full, too The previous step to teach "log --decorate" to show "HEAD -> master" instead of "HEAD, master" when showing the commit at the tip of the 'master' branch, when the 'master' branch is checked out, did not work for "log --decorate=full". The commands in the "log" family prepare commit decorations for all refs upfront, and the actual string used in a decoration depends on how load_ref_decorations() is called very early in the process. By default, "git log --decorate" stores names with common prefixes such as "refs/heads" stripped; "git log --decorate=full" stores the full refnames. When the current_pointed_by_HEAD() function has to decide if "HEAD" points at the branch a decoration describes, however, what was passed to load_ref_decorations() to decide to strip (or keep) such a common prefix is long lost. This makes it impossible to reliably tell if a decoration that stores "refs/heads/master", for example, is the 'master' branch (under "--decorate" with prefix omitted) or 'refs/heads/master' branch (under "--decorate=full"). Keep what was passed to load_ref_decorations() in a global next to the global variable name_decoration, and use that to decide how to match what was read from "HEAD" and what is in a decoration. Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 17:25:18 UTC
d595bdc doc: put example URLs and emails inside literal backticks This makes sure that AsciiDoc does not turn them into links. Regular AsciiDoc does not catch these cases, but AsciiDoctor does treat them as links. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 05:14:46 UTC
4538a88 doc: drop backslash quoting of some curly braces Text like "{foo}" triggers an AsciiDoc attribute; we have to write "\{foo}" to suppress this. But when the "foo" is not a syntactically valid attribute, we can skip the quoting. This makes the source nicer to read, and looks better under Asciidoctor. With AsciiDoc itself, this patch produces no changes. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 05:14:46 UTC
1c262bb doc: convert \--option to --option Older versions of AsciiDoc would convert the "--" in "--option" into an emdash. According to 565e135 (Documentation: quote double-dash for AsciiDoc, 2011-06-29), this is fixed in AsciiDoc 8.3.0. According to bf17126, we don't support anything older than 8.4.1 anyway, so we no longer need to worry about quoting. Even though this does not change the output at all, there are a few good reasons to drop the quoting: 1. It makes the source prettier to read. 2. We don't quote consistently, which may be confusing when reading the source. 3. Asciidoctor does not like the quoting, and renders a literal backslash. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 05:14:46 UTC
0a3ca9c doc/add: reformat `--edit` option All of the other options in the list put short and long as two separate headings. We can also drop the backslashing of `--`. It isn't used elsewhere and is unnecessary for modern asciidoc (plus it confuses asciidoctor). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 05:13:40 UTC
a367b86 doc: fix length of underlined section-title In AsciiDoc, it is OK to say: this is my title ------------------------- but AsciiDoctor is more strict. Let's match the underline to the title (which also makes the source prettier to read). The output from AsciiDoc is the same either way. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 05:13:40 UTC
5a8a19e doc: fix hanging "+"-continuation In list content that wants to continue to a second paragraph, the "+" continuation and subsequent paragraph need to be left-aligned. Otherwise AsciiDoc seems to insert only a linebreak. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 05:13:40 UTC
b50bfb8 doc: fix unquoted use of "{type}" Curly braces open an "attribute" in AsciiDoc; if there's no such attribute, strange things may happen. In this case, the unquoted "{type}" causes AsciiDoc to omit an entire line of text from the output. We can fix it by putting the whole phrase inside literal backticks (which also lets us get rid of ugly backslash escaping). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 05:13:40 UTC
e08bc7a doc: fix misrendering due to `single quote' AsciiDoc misparses some text that contains a `literal` word followed by a fancy `single quote' word, and treats everything from the start of the literal to the end of the quote as a single-quoted phrase. We can work around this by switching the latter to be a literal, as well. In the first case, this is perhaps what was intended anyway, as it makes us consistent with the the earlier literals in the same paragraph. In the second, the output is arguably better, as we will format our commit references as <code> blocks. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 05:13:39 UTC
ad3967a doc: fix unmatched code fences in git-stripspace The asciidoctor renderer is more picky than classic asciidoc, and insists that the start and end of a code fence be the same size. Found with this hacky perl script: foreach my $fn (@ARGV) { open(my $fh, '<', $fn); my ($fence, $fence_lineno, $prev); while (<$fh>) { chomp; if (/^----+$/) { if ($fence_lineno) { if ($_ ne $fence) { print "$fn:$fence_lineno:mismatched fence: ", length($fence), " != ", length($_), "\n"; } $fence_lineno = undef; } # hacky check to avoid title-underlining elsif ($prev eq '' || $prev eq '+') { $fence = $_; $fence_lineno = $.; } } $prev = $_; } } Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:33:09 UTC
185ce3a Merge branch 'mh/write-refs-sooner-2.3' into mh/write-refs-sooner-2.4 * mh/write-refs-sooner-2.3: ref_transaction_commit(): fix atomicity and avoid fd exhaustion ref_transaction_commit(): remove the local flags variable ref_transaction_commit(): inline call to write_ref_sha1() rename_ref(): inline calls to write_ref_sha1() from this function commit_ref_update(): new function, extracted from write_ref_sha1() write_ref_to_lockfile(): new function, extracted from write_ref_sha1() t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZE update-ref: test handling large transactions properly 13 May 2015, 04:28:54 UTC
cf018ee ref_transaction_commit(): fix atomicity and avoid fd exhaustion The old code was roughly for update in updates: acquire locks and check old_sha for update in updates: if changing value: write_ref_to_lockfile() commit_ref_update() for update in updates: if deleting value: unlink() rewrite packed-refs file for update in updates: if reference still locked: unlock_ref() This has two problems. Non-atomic updates ================== The atomicity of the reference transaction depends on all pre-checks being done in the first loop, before any changes have started being committed in the second loop. The problem is that write_ref_to_lockfile() (previously part of write_ref_sha1()), which is called from the second loop, contains two more checks: * It verifies that new_sha1 is a valid object * If the reference being updated is a branch, it verifies that new_sha1 points at a commit object (as opposed to a tag, tree, or blob). If either of these checks fails, the "transaction" is aborted during the second loop. But this might happen after some reference updates have already been permanently committed. In other words, the all-or-nothing promise of "git update-ref --stdin" could be violated. So these checks have to be moved to the first loop. File descriptor exhaustion ========================== The old code locked all of the references in the first loop, leaving all of the lockfiles open until later loops. Since we might be updating a lot of references, this could result in file descriptor exhaustion. The solution ============ After this patch, the code looks like for update in updates: acquire locks and check old_sha if changing value: write_ref_to_lockfile() else: close_ref() for update in updates: if changing value: commit_ref_update() for update in updates: if deleting value: unlink() rewrite packed-refs file for update in updates: if reference still locked: unlock_ref() This fixes both problems: 1. The pre-checks in write_ref_to_lockfile() are now done in the first loop, before any changes have been committed. If any of the checks fails, the whole transaction can now be rolled back correctly. 2. All lockfiles are closed in the first loop immediately after they are created (either by write_ref_to_lockfile() or by close_ref()). This means that there is never more than one open lockfile at a time, preventing file descriptor exhaustion. To simplify the bookkeeping across loops, add a new REF_NEEDS_COMMIT bit to update->flags, which keeps track of whether the corresponding lockfile needs to be committed, as opposed to just unlocked. (Since "struct ref_update" is internal to the refs module, this change is not visible to external callers.) This change fixes two tests in t1400. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:28:03 UTC
cbf50f9 ref_transaction_commit(): remove the local flags variable Instead, work directly with update->flags. This has the advantage that the REF_DELETING bit, set in the first loop, can be read in the second loop instead of having to be recomputed. Plus, it was potentially confusing having both update->flags and flags, which sometimes had different values. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:28:03 UTC
61e51e0 ref_transaction_commit(): inline call to write_ref_sha1() That was the last caller, so delete function write_ref_sha1(). Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:28:03 UTC
ba43b7f rename_ref(): inline calls to write_ref_sha1() from this function Most of what it does is unneeded from these call sites. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:28:02 UTC
ad4cd6c commit_ref_update(): new function, extracted from write_ref_sha1() Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:28:02 UTC
e6fd3c6 write_ref_to_lockfile(): new function, extracted from write_ref_sha1() This is the first step towards separating the checking and writing of the new reference value to committing the change. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:28:02 UTC
fc38a9b t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZE During creation of the patch series our discussion we could have a more descriptive name for the prerequisite for the test so it stays unique when other limits of ulimit are introduced. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:28:02 UTC
d415ad0 update-ref: test handling large transactions properly Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:28:02 UTC
4ec6591 Merge branch 'mh/write-refs-sooner-2.2' into mh/write-refs-sooner-2.3 * mh/write-refs-sooner-2.2: ref_transaction_commit(): fix atomicity and avoid fd exhaustion ref_transaction_commit(): remove the local flags variable ref_transaction_commit(): inline call to write_ref_sha1() rename_ref(): inline calls to write_ref_sha1() from this function commit_ref_update(): new function, extracted from write_ref_sha1() write_ref_to_lockfile(): new function, extracted from write_ref_sha1() t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZE update-ref: test handling large transactions properly 13 May 2015, 04:26:09 UTC
6c34492 ref_transaction_commit(): fix atomicity and avoid fd exhaustion The old code was roughly for update in updates: acquire locks and check old_sha for update in updates: if changing value: write_ref_to_lockfile() commit_ref_update() for update in updates: if deleting value: unlink() rewrite packed-refs file for update in updates: if reference still locked: unlock_ref() This has two problems. Non-atomic updates ================== The atomicity of the reference transaction depends on all pre-checks being done in the first loop, before any changes have started being committed in the second loop. The problem is that write_ref_to_lockfile() (previously part of write_ref_sha1()), which is called from the second loop, contains two more checks: * It verifies that new_sha1 is a valid object * If the reference being updated is a branch, it verifies that new_sha1 points at a commit object (as opposed to a tag, tree, or blob). If either of these checks fails, the "transaction" is aborted during the second loop. But this might happen after some reference updates have already been permanently committed. In other words, the all-or-nothing promise of "git update-ref --stdin" could be violated. So these checks have to be moved to the first loop. File descriptor exhaustion ========================== The old code locked all of the references in the first loop, leaving all of the lockfiles open until later loops. Since we might be updating a lot of references, this could result in file descriptor exhaustion. The solution ============ After this patch, the code looks like for update in updates: acquire locks and check old_sha if changing value: write_ref_to_lockfile() else: close_ref() for update in updates: if changing value: commit_ref_update() for update in updates: if deleting value: unlink() rewrite packed-refs file for update in updates: if reference still locked: unlock_ref() This fixes both problems: 1. The pre-checks in write_ref_to_lockfile() are now done in the first loop, before any changes have been committed. If any of the checks fails, the whole transaction can now be rolled back correctly. 2. All lockfiles are closed in the first loop immediately after they are created (either by write_ref_to_lockfile() or by close_ref()). This means that there is never more than one open lockfile at a time, preventing file descriptor exhaustion. To simplify the bookkeeping across loops, add a new REF_NEEDS_COMMIT bit to update->flags, which keeps track of whether the corresponding lockfile needs to be committed, as opposed to just unlocked. (Since "struct ref_update" is internal to the refs module, this change is not visible to external callers.) This change fixes two tests in t1400. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:25:27 UTC
805cf6e ref_transaction_commit(): remove the local flags variable Instead, work directly with update->flags. This has the advantage that the REF_DELETING bit, set in the first loop, can be read in the second loop instead of having to be recomputed. Plus, it was potentially confusing having both update->flags and flags, which sometimes had different values. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:25:27 UTC
4da50de ref_transaction_commit(): inline call to write_ref_sha1() And remove the function write_ref_sha1(), as it is no longer used. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:25:26 UTC
29957fd rename_ref(): inline calls to write_ref_sha1() from this function Most of what it does is unneeded from these call sites. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:25:26 UTC
38e50e8 commit_ref_update(): new function, extracted from write_ref_sha1() Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:25:26 UTC
1d45523 write_ref_to_lockfile(): new function, extracted from write_ref_sha1() This is the first step towards separating the checking and writing of the new reference value to committing the change. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:25:26 UTC
71ad050 t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZE During creation of the patch series, our discussion revealed that we could have a more descriptive name for the prerequisite for the test so it stays unique when other limits of ulimit are introduced. Let's rename the existing ulimit about setting the stack size to a more explicit ULIMIT_STACK_SIZE. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 04:24:36 UTC
cb64800 add: check return value of launch_editor When running "add -e", if launching the editor fails, we do not notice and continue as if the output is what the user asked for. The likely case is that the editor did not touch the contents at all, and we end up adding everything. Reported-by: Russ Cox <rsc@golang.org> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2015, 03:25:08 UTC
975e382 doc: fix unmatched code fences This mismatch upsets the renderer on git-scm.com. Signed-off-by: Jean-Noel Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 May 2015, 20:08:13 UTC
c99fec6 Sync with 2.3.8 Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 May 2015, 21:39:28 UTC
9a3d637 Git 2.3.8 Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 May 2015, 21:36:31 UTC
811ce1b Merge branch 'mm/usage-log-l-can-take-regex' into maint-2.3 Documentation fix. * mm/usage-log-l-can-take-regex: log -L: improve error message on malformed argument Documentation: change -L:<regex> to -L:<funcname> 11 May 2015, 21:34:01 UTC
cd01208 Merge branch 'jc/diff-no-index-d-f' into maint-2.3 The usual "git diff" when seeing a file turning into a directory showed a patchset to remove the file and create all files in the directory, but "git diff --no-index" simply refused to work. Also, when asked to compare a file and a directory, imitate POSIX "diff" and compare the file with the file with the same name in the directory, instead of refusing to run. * jc/diff-no-index-d-f: diff-no-index: align D/F handling with that of normal Git diff-no-index: DWIM "diff D F" into "diff D/F F" 11 May 2015, 21:34:00 UTC
1add9ae Merge branch 'oh/fix-config-default-user-name-section' into maint-2.3 The default $HOME/.gitconfig file created upon "git config --global" that edits it had incorrectly spelled user.name and user.email entries in it. * oh/fix-config-default-user-name-section: config: fix settings in default_user_config template 11 May 2015, 21:33:59 UTC
13ec221 Merge branch 'jc/epochtime-wo-tz' into maint-2.3 "git commit --date=now" or anything that relies on approxidate lost the daylight-saving-time offset. * jc/epochtime-wo-tz: parse_date_basic(): let the system handle DST conversion parse_date_basic(): return early when given a bogus timestamp 11 May 2015, 21:33:58 UTC
c628edf reflog_expire(): integrate lock_ref_sha1_basic() errors into ours Now that lock_ref_sha1_basic() gives us back its error messages via a strbuf, incorporate its error message into our error message rather than emitting two separate error messages. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> 11 May 2015, 18:50:20 UTC
3553944 ref_transaction_commit(): delete extra "the" from error message While we are in the area, let's remove a superfluous definite article from the error message that is emitted when the reference cannot be locked. This improves how it reads and makes it a bit shorter. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> 11 May 2015, 18:50:20 UTC
cbaabcb ref_transaction_commit(): provide better error messages Now that lock_ref_sha1_basic() gives us back its error messages via a strbuf, incorporate its error message into our error message rather than emitting one error messages to stderr immediately and returning a second to our caller. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> 11 May 2015, 18:50:20 UTC
abeef9c rename_ref(): integrate lock_ref_sha1_basic() errors into ours Now that lock_ref_sha1_basic() gives us back its error messages via a strbuf, incorporate its error message into our error message rather than emitting two separate error messages. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> 11 May 2015, 18:50:20 UTC
5b2d8d6 lock_ref_sha1_basic(): improve diagnostics for ref D/F conflicts If there is a failure to lock a reference that is likely caused by a D/F conflict (e.g., trying to lock "refs/foo/bar" when reference "refs/foo" already exists), invoke verify_refname_available() to try to generate a more helpful error message. That function might not detect an error. For example, some non-reference file might be blocking the deletion of an otherwise-empty directory tree, or there might be a race with another process that just deleted the offending reference. In such cases, generate the strerror-based error message like before. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> 11 May 2015, 18:50:20 UTC
4a32b2e lock_ref_sha1_basic(): report errors via a "struct strbuf *err" For now, change the callers to spew the error to stderr like before. But soon we will change them to incorporate the reason for the failure into their own error messages. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> 11 May 2015, 18:50:19 UTC
1146f17 verify_refname_available(): report errors via a "struct strbuf *err" It shouldn't be spewing errors directly to stderr. For now, change its callers to spew the errors to stderr. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> 11 May 2015, 18:50:19 UTC
5baf37d verify_refname_available(): rename function Rename is_refname_available() to verify_refname_available() and change its return value from 1 for success to 0 for success, to be consistent with our error-handling convention. In a moment it will also get a "struct strbuf *err" parameter. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> 11 May 2015, 18:50:19 UTC
back to top