sort by:
Revision Author Date Message Commit Date
a5bf71b submodule documentation: Reorder introductory paragraphs It's better to start the man page with a description of what submodules actually are instead of saying what they are not. Reorder the paragraphs such that the first short paragraph introduces the submodule concept, the second paragraph highlights the usage of the submodule command, the third paragraph giving background information, and finally the fourth paragraph discusing alternatives such as subtrees and remotes, which we don't want to be confused with. This ordering deepens the knowledge on submodules with each paragraph. First the basic questions like "How/what" will be answered, while the underlying concepts will be taught at a later time. Making sure it is not confused with subtrees and remotes is not really enhancing knowledge of submodules itself, but rather painting the big picture of git concepts, so you could also argue to have it as the second paragraph. Personally I think this may confuse readers, specially newcomers though. Additionally to reordering the paragraphs, they have been slightly reworded. Signed-off-by: Stefan Beller <sbeller@google.com> 22 May 2015, 19:17:52 UTC
6c1249c Third batch for 2.5 cycle Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 May 2015, 20:24:08 UTC
4295abc Merge branch 'sb/ref-lock-lose-lock-fd' The refs API uses ref_lock struct which had its own "int fd", even though the same file descriptor was in the lock struct it contains. Clean-up the code to lose this redundant field. * sb/ref-lock-lose-lock-fd: refs.c: remove lock_fd from struct ref_lock 19 May 2015, 20:17:59 UTC
3b7d373 Merge branch 'kn/cat-file-literally' Add the "--allow-unknown-type" option to "cat-file" to allow inspecting loose objects of an experimental or a broken type. * kn/cat-file-literally: t1006: add tests for git cat-file --allow-unknown-type cat-file: teach cat-file a '--allow-unknown-type' option cat-file: make the options mutually exclusive sha1_file: support reading from a loose object of unknown type 19 May 2015, 20:17:58 UTC
949d167 Merge branch 'nd/dwim-wildcards-as-pathspecs' A heuristic to help the "git <cmd> <revs> <pathspec>" command line convention to catch mistyped paths is to make sure all the non-rev parameters in the later part of the command line are names of the files in the working tree, but that means "git grep $str -- \*.c" must always be disambiguated with "--", because nobody sane will create a file whose name literally is asterisk-dot-see. Loosen the heuristic to declare that with a wildcard string the user likely meant to give us a pathspec. * nd/dwim-wildcards-as-pathspecs: pathspec: avoid the need of "--" when wildcard is used 19 May 2015, 20:17:58 UTC
bcd1ecd Merge branch 'jc/merge' "git merge FETCH_HEAD" learned that the previous "git fetch" could be to create an Octopus merge, i.e. recording multiple branches that are not marked as "not-for-merge"; this allows us to lose an old style invocation "git merge <msg> HEAD $commits..." in the implementation of "git pull" script; the old style syntax can now be deprecated. * jc/merge: merge: deprecate 'git merge <message> HEAD <commit>' syntax merge: handle FETCH_HEAD internally merge: decide if we auto-generate the message early in collect_parents() merge: make collect_parents() auto-generate the merge message merge: extract prepare_merge_message() logic out merge: narrow scope of merge_names merge: split reduce_parents() out of collect_parents() merge: clarify collect_parents() logic merge: small leakfix and code simplification merge: do not check argc to determine number of remote heads merge: clarify "pulling into void" special case t5520: test pulling an octopus into an unborn branch t5520: style fixes merge: simplify code flow merge: test the top-level merge driver 19 May 2015, 20:17:57 UTC
eae0216 Merge branch 'ph/rebase-i-redo' "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 19 May 2015, 20:17:56 UTC
072f391 Merge branch 'jc/test-prereq-validate' Help us to find broken test script that splits the body part of the test by mistaken use of wrong kind of quotes. * jc/test-prereq-validate: test: validate prerequistes syntax 19 May 2015, 20:17:55 UTC
7a4f891 Merge branch 'bc/connect-plink' 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 19 May 2015, 20:17:55 UTC
da3d507 Merge branch 'jk/test-chain-lint' Developer support to automatically detect broken &&-chain in the test scripts is now turned on by default. * jk/test-chain-lint: test-lib: turn on GIT_TEST_CHAIN_LINT by default t7502-commit.sh: fix a broken and-chain 19 May 2015, 20:17:54 UTC
3e199de Merge branch 'fg/document-commit-message-stripping' * fg/document-commit-message-stripping: Documentation: clarify how "git commit" cleans up the edited log message 19 May 2015, 20:17:53 UTC
05c3967 Merge branch 'jk/stash-require-clean-index' "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 19 May 2015, 20:17:52 UTC
1645dbe Merge branch 'jk/git-no-more-argv0-path-munging' 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 19 May 2015, 20:17:52 UTC
20cf8b5 Merge branch 'jc/gitignore-precedence' 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 19 May 2015, 20:17:51 UTC
d0c6922 Merge branch 'nd/diff-i-t-a' After "git add -N", the path appeared in output of "git diff HEAD" and "git diff --cached HEAD", leading "git status" to classify it as "Changes to be committed". Such a path, however, is not yet to be scheduled to be committed. "git diff" showed the change to the path as modification, not as a "new file", in the header of its output. Treat such paths as "yet to be added to the index but Git already know about them"; "git diff HEAD" and "git diff --cached HEAD" should not talk about them, and "git diff" should show them as new files yet to be added to the index. * nd/diff-i-t-a: diff-lib.c: adjust position of i-t-a entries in diff 19 May 2015, 20:17:49 UTC
1ea28e1 Sync with 2.4.1 * maint: Git 2.4.1 13 May 2015, 21:35:05 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
c518059 Merge branch 'maint' * maint: Git 2.3.8 11 May 2015, 21:39:39 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
22aca1b Second batch for 2.5 cycle Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 May 2015, 21:31:28 UTC
558e5a8 Merge branch 'pt/xdg-config-path' 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() 11 May 2015, 21:24:01 UTC
7cb5073 Merge branch 'ep/do-not-feed-a-pointer-to-array-size' Catch a programmer mistake to feed a pointer not an array to ARRAY_SIZE() macro, by using a couple of GCC extensions. * ep/do-not-feed-a-pointer-to-array-size: git-compat-util.h: implement a different ARRAY_SIZE macro for for safely deriving the size of array 11 May 2015, 21:24:00 UTC
051086b Merge branch 'jc/hash-object' "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 11 May 2015, 21:23:59 UTC
b9f5d38 Merge branch 'sb/prefix-path-free-results' Code clean-up (not a leak-fix). * sb/prefix-path-free-results: prefix_path(): unconditionally free results in the callers 11 May 2015, 21:23:58 UTC
5c38a1f Merge branch 'sg/completion-no-redundant-all-command-list' Code simplification. * sg/completion-no-redundant-all-command-list: completion: remove redundant __git_compute_all_commands() call 11 May 2015, 21:23:57 UTC
465868a Merge branch 'sg/complete-decorate-full-not-long' The completion for "log --decorate=" parameter value was incorrect. * sg/complete-decorate-full-not-long: completion: fix and update 'git log --decorate=' options 11 May 2015, 21:23:56 UTC
02f8203 Merge branch 'jk/filter-branch-use-of-sed-on-incomplete-line' "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 11 May 2015, 21:23:54 UTC
9e4d2f6 Merge branch 'jc/daemon-no-ipv6-for-2.4.1' "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 11 May 2015, 21:23:53 UTC
a0c0c2e Merge branch 'jn/clean-use-error-not-fprintf-on-stderr' Some error messages in "git config" were emitted without calling the usual error() facility. * jn/clean-use-error-not-fprintf-on-stderr: config: use error() instead of fprintf(stderr, ...) 11 May 2015, 21:23:53 UTC
5fa9e4c Merge branch 'tb/blame-resurrect-convert-to-git' 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 11 May 2015, 21:23:52 UTC
1efadd7 Merge branch 'va/fix-git-p4-tests' * va/fix-git-p4-tests: git-p4: t9814: prevent --chain-lint failure 11 May 2015, 21:23:51 UTC
ee2309d Merge branch 'ld/p4-case-fold' * ld/p4-case-fold: git-p4: add failing tests for case-folding p4d 11 May 2015, 21:23:50 UTC
3526182 Merge branch 'jk/rebase-quiet-noop' "git rebase --quiet" was not quite quiet when there is nothing to do. * jk/rebase-quiet-noop: rebase: silence "git checkout" for noop rebase 11 May 2015, 21:23:49 UTC
0495983 Merge branch 'va/p4-client-path' git p4 attempts to better handle branches in Perforce. * va/p4-client-path: git-p4: improve client path detection when branches are used t9801: check git-p4's branch detection with client spec enabled 11 May 2015, 21:23:48 UTC
331fe94 Merge branch 'mm/add-p-split-error' When "add--interactive" splits a hunk into two overlapping hunks and then let the user choose only one, it sometimes feeds an incorrect patch text to "git apply". Add tests to demonstrate this. I have a slight suspicion that this may be $gmane/87202 coming back and biting us (I seem to have said "let's run with this and see what happens" back then). * mm/add-p-split-error: stash -p: demonstrate failure of split with mixed y/n t3904-stash-patch: factor PERL prereq at the top of the file t3904-stash-patch: fix test description add -p: demonstrate failure when running 'edit' after a split t3701-add-interactive: simplify code 11 May 2015, 21:23:47 UTC
7e98292 Merge branch 'tb/t0027-crlf' More line-ending tests. * tb/t0027-crlf: t0027: Add repoMIX and LF_nul t0027: support NATIVE_CRLF platforms t0027: cleanup: rename functions; avoid non-leading TABs 11 May 2015, 21:23:47 UTC
120c585 Merge branch 'ls/p4-changes-block-size' "git p4" learned "--changes-block-size <n>" to read the changes in chunks from Perforce, instead of making one call to "p4 changes" that may trigger "too many rows scanned" error from Perforce. * ls/p4-changes-block-size: git-p4: use -m when running p4 changes 11 May 2015, 21:23:46 UTC
789e98d Merge branch 'jc/plug-fmt-merge-msg-leak' * jc/plug-fmt-merge-msg-leak: fmt-merge-msg: plug small leak of commit buffer 11 May 2015, 21:23:46 UTC
eb10a85 Merge branch 'nd/slim-index-pack-memory-usage' Memory usage of "git index-pack" has been trimmed by tens of per-cent. * nd/slim-index-pack-memory-usage: index-pack: kill union delta_base to save memory index-pack: reduce object_entry size to save memory 11 May 2015, 21:23:44 UTC
84e55dc Merge branch 'jk/still-interesting' "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 11 May 2015, 21:23:43 UTC
6cc983d Merge branch 'jk/reading-packed-refs' An earlier rewrite to use strbuf_getwholeline() instead of fgets(3) to read packed-refs file revealed that the former is unacceptably inefficient. * jk/reading-packed-refs: t1430: add another refs-escape test read_packed_refs: avoid double-checking sane refs strbuf_getwholeline: use getdelim if it is available strbuf_getwholeline: avoid calling strbuf_grow strbuf_addch: avoid calling strbuf_grow config: use getc_unlocked when reading from file strbuf_getwholeline: use getc_unlocked git-compat-util: add fallbacks for unlocked stdio strbuf_getwholeline: use getc macro 11 May 2015, 21:23:42 UTC
66ff763 Merge branch 'lm/squelch-bg-progress' Many long-running operations show progress eye-candy, even when they are later backgrounded. Hide the eye-candy when the process is sent to the background instead. * lm/squelch-bg-progress: compat/mingw: stubs for getpgid() and tcgetpgrp() progress: no progress in background 11 May 2015, 21:23:42 UTC
cedeffe Merge branch 'jk/sha1-file-reduce-useless-warnings' * jk/sha1-file-reduce-useless-warnings: sha1_file: squelch "packfile cannot be accessed" warnings 11 May 2015, 21:23:41 UTC
68a2e6a Merge branch 'nd/multiple-work-trees' A replacement for contrib/workdir/git-new-workdir that does not rely on symbolic links and make sharing of objects and refs safer by making the borrowee and borrowers aware of each other. * nd/multiple-work-trees: (41 commits) prune --worktrees: fix expire vs worktree existence condition t1501: fix test with split index t2026: fix broken &&-chain t2026 needs procondition SANITY git-checkout.txt: a note about multiple checkout support for submodules checkout: add --ignore-other-wortrees checkout: pass whole struct to parse_branchname_arg instead of individual flags git-common-dir: make "modules/" per-working-directory directory checkout: do not fail if target is an empty directory t2025: add a test to make sure grafts is working from a linked checkout checkout: don't require a work tree when checking out into a new one git_path(): keep "info/sparse-checkout" per work-tree count-objects: report unused files in $GIT_DIR/worktrees/... gc: support prune --worktrees gc: factor out gc.pruneexpire parsing code gc: style change -- no SP before closing parenthesis checkout: clean up half-prepared directories in --to mode checkout: reject if the branch is already checked out elsewhere prune: strategies for linked checkouts checkout: support checking out into a new working directory ... 11 May 2015, 21:23:39 UTC
17c7f4d Merge branch 'pt/credential-xdg' Tweak the sample "store" backend of the credential helper to honor XDG configuration file locations when specified. * pt/credential-xdg: 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 11 May 2015, 21:23:38 UTC
1238ac8 refs.c: remove lock_fd from struct ref_lock The 'lock_fd' is the same as 'lk->fd'. No need to store it twice so remove it. No functional changes intended. Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 May 2015, 04:13:26 UTC
3e370f9 t1006: add tests for git cat-file --allow-unknown-type Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 May 2015, 20:47:18 UTC
39e4ae3 cat-file: teach cat-file a '--allow-unknown-type' option 'git cat-file' throws an error while trying to print the type or size of a broken/corrupt object. This is because these objects are usually of unknown types. Teach git cat-file a '--allow-unknown-type' option where it prints the type or size of a broken/corrupt object without throwing an error. Modify '-t' and '-s' options to call sha1_object_info_extended() directly to support the '--allow-unknown-type' option. Add documentation for 'cat-file --allow-unknown-type'. Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Karthik Nayak <karthik.188@gmail.com> cat-file: add documentation for '--allow-unknown-type' option. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 May 2015, 20:35:48 UTC
b48158a cat-file: make the options mutually exclusive We only parse the options if 2 or 3 arguments are specified. Update 'struct option options[]' to use OPT_CMDMODE rather than OPT_SET_INT to allow only one mutually exclusive option and avoid the need for checking number of arguments. This was written by Junio C Hamano, tested by me. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 May 2015, 20:35:48 UTC
46f0344 sha1_file: support reading from a loose object of unknown type Update sha1_loose_object_info() to optionally allow it to read from a loose object file of unknown/bogus type; as the function usually returns the type of the object it read in the form of enum for known types, add an optional "typename" field to receive the name of the type in textual form and a flag to indicate the reading of a loose object file of unknown/bogus type. Add parse_sha1_header_extended() which acts as a wrapper around parse_sha1_header() allowing more information to be obtained. Add unpack_sha1_header_to_strbuf() to unpack sha1 headers of unknown/corrupt objects which have a unknown sha1 header size to a strbuf structure. This was written by Junio C Hamano but tested by me. Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Helped-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Hepled-by: Jeff King <peff@peff.net> Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 May 2015, 20:35:48 UTC
846e5df path.c: remove home_config_paths() home_config_paths() combines distinct functionality already implemented by expand_user_path() and xdg_config_home(), and it also hard-codes the path ~/.gitconfig, which makes it unsuitable to use for other home config file paths. Since its use will just add unnecessary complexity to the code, remove it. Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 May 2015, 18:33:53 UTC
509adc3 git-config: replace use of home_config_paths() Since home_config_paths() combines distinct functionality already implemented by expand_user_path() and xdg_config_home(), and hides the home config file path ~/.gitconfig. Make the code more explicit by replacing the use of home_config_paths() with expand_user_path() and xdg_config_home(). Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 May 2015, 18:33:48 UTC
e682c9d git-commit: replace use of home_config_paths() Since home_config_paths() combines two distinct functionality already implemented by expand_user_path() and xdg_config_home(), and hides the home config file path ~/.gitconfig. Make the code more explicit by replacing the use of home_config_paths() with expand_user_path() and xdg_config_home(). Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 May 2015, 18:33:42 UTC
64ab71d credential-store.c: replace home_config_paths() with xdg_config_home() Since only the xdg credentials file path is required, and home_config_paths() is unable to construct the path ~/.git-credentials, simplify the code by replacing home_config_paths() with xdg_config_home(). Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 May 2015, 18:33:24 UTC
2845ce7 dir.c: replace home_config_paths() with xdg_config_home() Since only the xdg excludes file path is required, simplify the code by replacing use of home_config_paths() with xdg_config_home(). Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 May 2015, 18:33:17 UTC
2527bbc attr.c: replace home_config_paths() with xdg_config_home() Since only the xdg attributes file path is required, simplify the code by using xdg_config_home() instead of home_config_paths(). Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 May 2015, 18:32:46 UTC
ea19289 path.c: implement xdg_config_home() The XDG base dir spec[1] specifies that configuration files be stored in a subdirectory in $XDG_CONFIG_HOME. To construct such a configuration file path, home_config_paths() can be used. However, home_config_paths() combines distinct functionality: 1. Retrieve the home git config file path ~/.gitconfig 2. Construct the XDG config path of the file specified by `file`. This function was introduced in commit 21cf3227 ("read (but not write) from $XDG_CONFIG_HOME/git/config file"). While the intention of the function was to allow the home directory configuration file path and the xdg directory configuration file path to be retrieved with one function call, the hard-coding of the path ~/.gitconfig prevents it from being used for other configuration files. Furthermore, retrieving a file path relative to the user's home directory can be done with expand_user_path(). Hence, it can be seen that home_config_paths() introduces unnecessary complexity, especially if a user just wants to retrieve the xdg config file path. As such, implement a simpler function xdg_config_home() for constructing the XDG base dir spec configuration file path. This function, together with expand_user_path(), can replace all uses of home_config_paths(). [1] http://standards.freedesktop.org/basedir-spec/basedir-spec-0.7.html Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 May 2015, 18:21:04 UTC
8440f74 First batch for 2.5 cycle Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 May 2015, 04:13:30 UTC
e3b199a Merge branch 'jk/prune-mtime' 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 06 May 2015, 04:00:37 UTC
6749850 Merge branch 'mm/usage-log-l-can-take-regex' Documentation fix. * mm/usage-log-l-can-take-regex: log -L: improve error message on malformed argument Documentation: change -L:<regex> to -L:<funcname> 06 May 2015, 04:00:36 UTC
64c9e02 Merge branch 'ep/fix-test-lib-functions-report' * ep/fix-test-lib-functions-report: test-lib-functions.sh: fix the second argument to some helper functions 06 May 2015, 04:00:36 UTC
2e1dfd6 Merge branch 'cn/bom-in-gitignore' 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 06 May 2015, 04:00:34 UTC
39a5d50 Merge branch 'jc/epochtime-wo-tz' "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 06 May 2015, 04:00:33 UTC
ef8163c Merge branch 'nd/t1509-chroot-test' Correct test bitrot. * nd/t1509-chroot-test: t1509: update prepare script to be able to run t1509 in chroot again 06 May 2015, 04:00:32 UTC
67e5a00 Merge branch 'oh/fix-config-default-user-name-section' 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 06 May 2015, 04:00:31 UTC
1156097 Merge branch 'jk/type-from-string-gently' "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 06 May 2015, 04:00:29 UTC
b9032b2 Merge branch 'sb/test-bitmap-free-at-end' * sb/test-bitmap-free-at-end: pack-bitmap.c: fix a memleak 06 May 2015, 04:00:28 UTC
a9d00b6 Merge branch 'ld/p4-filetype-detection' * ld/p4-filetype-detection: git-p4: fix filetype detection on files opened exclusively git-p4: small fix for locked-file-move-test git-p4: fix small bug in locked test scripts 06 May 2015, 04:00:28 UTC
e971a1f Merge branch 'ts/checkout-advice-plural' * ts/checkout-advice-plural: checkout: call a single commit "it" intead of "them" 06 May 2015, 04:00:27 UTC
7502b23 Merge branch 'jk/init-core-worktree-at-root' 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 06 May 2015, 04:00:27 UTC
b02a94d Merge branch 'mh/show-branch-topic' "git show-branch --topics HEAD" (with no other arguments) did not do anything interesting. Instead, contrast the given revision against all the local branches by default. * mh/show-branch-topic: show-branch: show all local heads when only giving one rev along --topics 06 May 2015, 04:00:26 UTC
8ff1ddd Merge branch 'sb/line-log-plug-pairdiff-leak' * sb/line-log-plug-pairdiff-leak: line-log.c: fix a memleak 06 May 2015, 04:00:25 UTC
03761c9 Merge branch 'jc/diff-no-index-d-f' 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" 06 May 2015, 04:00:24 UTC
a916cb5 Merge branch 'bc/object-id' Identify parts of the code that knows that we use SHA-1 hash to name our objects too much, and use (1) symbolic constants instead of hardcoded 20 as byte count and/or (2) use struct object_id instead of unsigned char [20] for object names. * bc/object-id: apply: convert threeway_stage to object_id patch-id: convert to use struct object_id commit: convert parts to struct object_id diff: convert struct combine_diff_path to object_id bulk-checkin.c: convert to use struct object_id zip: use GIT_SHA1_HEXSZ for trailers archive.c: convert to use struct object_id bisect.c: convert leaf functions to use struct object_id define utility functions for object IDs define a structure for object IDs 06 May 2015, 04:00:23 UTC
89c855e git-compat-util.h: implement a different ARRAY_SIZE macro for for safely deriving the size of array To get number of elements in an array git use the ARRAY_SIZE macro defined as: #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0])) The problem with it is a possibility of mistakenly passing to it a pointer instead an array. The ARRAY_SIZE macro as conventionally defined does not provide good type-safety and the open-coded approach is more fragile, more verbose and provides no improvement in type-safety. Use instead a different but compatible ARRAY_SIZE() macro, which will also break compile if you try to use it on a pointer. This implemention revert to the original code if the compiler doesn't know the typeof and __builtin_types_compatible_p GCC extensions. This can ensure our code is robust to changes, without needing a gratuitous macro or constant. A similar ARRAY_SIZE implementation also exists in the linux kernel. Credits to Rusty Russell and his ccan library. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 05 May 2015, 22:26:48 UTC
d358f77 daemon: unbreak NO_IPV6 build regression When 01cec54e (daemon: deglobalize hostname information, 2015-03-07) wrapped the global variables such as hostname inside a struct, it forgot to convert one location that spelled "hostname" that needs to be updated to "hi->hostname". This was inside NO_IPV6 block, and was not caught by anybody. Signed-off-by: Junio C Hamano <gitster@pobox.com> 05 May 2015, 18:03:24 UTC
d7a643b prefix_path(): unconditionally free results in the callers As of d089ebaa (setup: sanitize absolute and funny paths in get_pathspec(), 2008-01-28), prefix_path() always returns a newly allocated string, so callers should free its result. Additionally, drop the const from variables to which the result of the prefix_path() is assigned, so they can be free()'d without having to cast-away the constness. Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 05 May 2015, 17:31:51 UTC
1427a7f write_sha1_file(): do not use a separate sha1[] array In the beginning, write_sha1_file() did not have a way to tell the caller the name of the object it wrote to the caller. This was changed in d6d3f9d0 (This implements the new "recursive tree" write-tree., 2005-04-09) by adding the "returnsha1" parameter to the function so that the callers who are interested in the value can optionally pass a pointer to receive it. It turns out that all callers do want to know the name of the object it just has written. Nobody passes a NULL to this parameter, hence it is not necessary to use a separate sha1[] array to receive the result from write_sha1_file_prepare(), and copy the result to the returnsha1 supplied by the caller. Signed-off-by: Junio C Hamano <gitster@pobox.com> 05 May 2015, 17:17:56 UTC
383c342 t1007: add hash-object --literally tests git-hash-object learned a --literally option in 5ba9a93 (hash-object: add --literally option, 2014-09-11). Check that --literally allows object creation with a bogus type, with two type strings whose length is reasonably short and very long. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 05 May 2015, 17:17:54 UTC
0c3db67 hash-object --literally: fix buffer overrun with extra-long object type "hash-object" learned in 5ba9a93 (hash-object: add --literally option, 2014-09-11) to allow crafting a corrupt/broken object of unknown type. When the user-provided type is particularly long, however, it can overflow the relatively small stack-based character array handed to write_sha1_file_prepare() by hash_sha1_file() and write_sha1_file(), leading to stack corruption (and crash). Introduce a custom helper to allow arbitrarily long typenames just for "hash-object --literally". [jc: Eric's original used a strbuf in the more common codepaths, and I rewrote it to avoid penalizing the non-literally code. Bugs are mine] Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 05 May 2015, 17:14:18 UTC
95d6212 config: use error() instead of fprintf(stderr, ...) The die() / error() / warning() helpers put a fatal: / error: / warning: prefix in front of the error message they print describing the message's severity, which users are likely to be accustomed to seeing these days. This change will also be useful when marking the message for translation: the argument to error() includes no newline at the end, so it is less fussy for translators to translate without lines running together in the translated output. While we're here, start the error messages with a lowercase letter to match the usual typography of error messages. A quick web search and a code search at codesearch.debian.net finds no scripts trying to parse these error messages, so this change should be safe. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 04 May 2015, 21:38:15 UTC
83115ac git-hash-object.txt: document --literally option Document the git-hash-object --literally option added by 5ba9a93 (hash-object: add --literally option, 2014-09-11). While here, also correct a minor typesetting oversight. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 04 May 2015, 21:19:23 UTC
af16bda completion: fix and update 'git log --decorate=' options 'git log --decorate=' understands the 'full', 'short' and 'no' options. From these the completion script only offered 'short' and it offered 'long' instead of 'full'. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 May 2015, 18:46:14 UTC
110062a completion: remove redundant __git_compute_all_commands() call During lazy-initialization of the lists of all commands and porcelain commands the function __git_compute_all_commands() is called twice. The relevant part of the call sequence looks like this: __git_compute_porcelain_commands() __git_compute_all_commands() <finds list of all commands uninitialized> __git_list_all_commands() <initializes list of all commands> __git_list_porcelain_commands() __git_compute_all_commands() <finds list of all commands already initialized, does nothing> <filters porcelains from list of all commands> Either one of the two calls could be removed and the initialization of both command lists would still work as a whole, but let's remove the call from __git_compute_porcelain_commands(), because this way __git_list_porcelain_commands() will keep working in itself. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 May 2015, 18:44:49 UTC
28fcc0b pathspec: avoid the need of "--" when wildcard is used When "--" is lacking from the command line and a command can take both revs and paths, the idea is if an argument can be seen as both an extended SHA-1 and a path, then "--" is required or git refuses to continue. It's currently implemented as: (1) if an argument is rev, then it must not exist in worktree (2) else, it must exist in worktree (3) else, "--" is required. These rules work for literal paths, but when non-literal pathspec is involved, it almost always requires the user to add "--" because it fails (2) and (1) is really rarely met (take "*.c" for example, (1) is met if there is a ref named "*.c"). This patch modifies the rules a bit by considering any valid (*) wildcard pathspec "exist in worktree". The rules become: (1) if an arg is a rev, then it must either exist in worktree or not be a valid wildcard pathspec. (2) else, it either exists in worktree or is a wildcard pathspec (3) else, "--" is required. With the new rules, "--" is not needed most of the time when wildcard pathspec is involved. Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 May 2015, 18:40:13 UTC
4bf256d blame: CRLF in the working tree and LF in the repo A typical setup under Windows is to set core.eol to CRLF, and text files are marked as "text" in .gitattributes, or core.autocrlf is set to true. After 4d4813a5 "git blame" no longer works as expected for such a set-up. Every line is annotated as "Not Committed Yet", even though the working directory is clean. This is because the commit removed the conversion in blame.c for all files, with or without CRLF in the repo. Having files with CRLF in the repo and core.autocrlf=input is a temporary situation, and the files, if committed as is, will be normalized in the repo, which _will_ be a notable change. Blaming them with "Not Committed Yet" is the right result. Revert commit 4d4813a5 which was a misguided attempt to "solve" a non-problem. Add two test cases in t8003 to verify the correct CRLF conversion. Suggested-By: Stepan Kasal <kasal@ucw.cz> Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 May 2015, 18:00:10 UTC
3d4a3ff Git 2.4 Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 April 2015, 18:25:06 UTC
back to top