summaryrefslogtreecommitdiff
path: root/builtin
AgeCommit message (Collapse)AuthorFilesLines
2016-04-22worktree.c: make find_shared_symref() return struct worktree *Libravatar Nguyễn Thái Ngọc Duy2-8/+8
This gives the caller more information and they can answer things like, "is it the main worktree" or "is it the current worktree". The latter question is needed for the "checkout a rebase branch" case later. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-18Merge branch 'jk/branch-shortening-funny-symrefs'Libravatar Junio C Hamano1-7/+12
A change back in version 2.7 to "git branch" broke display of a symbolic ref in a non-standard place in the refs/ hierarchy (we expect symbolic refs to appear in refs/remotes/*/HEAD to point at the primary branch the remote has, and as .git/HEAD to point at the branch we locally checked out). * jk/branch-shortening-funny-symrefs: branch: fix shortening of non-remote symrefs
2016-04-18Merge branch 'ky/branch-m-worktree'Libravatar Junio C Hamano1-2/+1
When "git worktree" feature is in use, "git branch -m" renamed a branch that is checked out in another worktree without adjusting the HEAD symbolic ref for the worktree. * ky/branch-m-worktree: set_worktree_head_symref(): fix error message branch -m: update all per-worktree HEADs refs: add a new function set_worktree_head_symref
2016-04-13Merge branch 'tb/blame-force-read-cache-to-workaround-safe-crlf'Libravatar Junio C Hamano1-0/+1
When running "git blame $path" with unnormalized data in the index for the path, the data in the working tree was blamed, even though "git add" would not have changed what is already in the index, due to "safe crlf" that disables the line-end conversion. It has been corrected. * tb/blame-force-read-cache-to-workaround-safe-crlf: correct blame for files commited with CRLF
2016-04-13Merge branch 'lt/pretty-expand-tabs'Libravatar Junio C Hamano1-0/+1
When "git log" shows the log message indented by 4-spaces, the remainder of a line after a HT does not align in the way the author originally intended. The command now expands tabs by default in such a case, and allows the users to override it with a new option, '--no-expand-tabs'. * lt/pretty-expand-tabs: pretty: test --expand-tabs pretty: allow tweaking tabwidth in --expand-tabs pretty: enable --expand-tabs by default for selected pretty formats pretty: expand tabs in indented logs to make things line up properly
2016-04-13Merge branch 'mj/pull-rebase-autostash'Libravatar Junio C Hamano1-3/+27
"git pull --rebase" learned "--[no-]autostash" option, so that the rebase.autostash configuration variable set to true can be overridden from the command line. * mj/pull-rebase-autostash: t5520: test --[no-]autostash with pull.rebase=true t5520: reduce commom lines of code t5520: factor out common "failing autostash" code t5520: factor out common "successful autostash" code t5520: use better test to check stderr output t5520: ensure consistent test conditions t5520: use consistent capitalization in test titles pull --rebase: add --[no-]autostash flag git-pull.c: introduce git_pull_config()
2016-04-13Merge branch 'cc/apply'Libravatar Junio C Hamano1-15/+15
Minor code clean-up. * cc/apply: builtin/apply: free patch when parse_chunk() fails builtin/apply: handle parse_binary() failure apply: remove unused call to free() in gitdiff_{old,new}name() builtin/apply: get rid of useless 'name' variable
2016-04-13Merge branch 'sb/misc-cleanups'Libravatar Junio C Hamano1-2/+3
Assorted minor clean-ups. * sb/misc-cleanups: credential-cache, send_request: close fd when done bundle: don't leak an fd in case of early return abbrev_sha1_in_line: don't leak memory notes: don't leak memory in git_config_get_notes_strategy
2016-04-13Merge branch 'sk/send-pack-all-fix'Libravatar Junio C Hamano1-1/+1
"git send-pack --all <there>" was broken when its command line option parsing was written in the 2.6 timeframe. * sk/send-pack-all-fix: git-send-pack: fix --all option when used with directory
2016-04-13Merge branch 'ky/branch-d-worktree'Libravatar Junio C Hamano1-8/+14
When "git worktree" feature is in use, "git branch -d" allowed deletion of a branch that is checked out in another worktree * ky/branch-d-worktree: branch -d: refuse deleting a branch which is currently checked out
2016-04-13Merge branch 'rz/worktree-no-checkout'Libravatar Junio C Hamano1-11/+18
"git worktree add" can be given "--no-checkout" option to only create an empty worktree without checking out the files. * rz/worktree-no-checkout: worktree: add: introduce --checkout option
2016-04-13Merge branch 'jk/check-repository-format'Libravatar Junio C Hamano1-21/+24
The repository set-up sequence has been streamlined (the biggest change is that there is no longer git_config_early()), so that we do not attempt to look into refs/* when we know we do not have a Git repository. * jk/check-repository-format: verify_repository_format: mark messages for translation setup: drop repository_format_version global setup: unify repository version callbacks init: use setup.c's repo version verification setup: refactor repo format reading and verification config: drop git_config_early check_repository_format_gently: stop using git_config_early lazily load core.sharedrepository wrap shared_repository global in get/set accessors setup: document check_repository_format()
2016-04-08Merge branch 'nd/apply-report-skip'Libravatar Junio C Hamano1-0/+2
"git apply -v" learned to report paths in the patch that were skipped via --include/--exclude mechanism or being outside the current working directory. * nd/apply-report-skip: apply: report patch skipping in verbose mode
2016-04-08Merge branch 'jc/merge-refuse-new-root'Libravatar Junio C Hamano1-3/+9
"git merge" used to allow merging two branches that have no common base by default, which led to a brand new history of an existing project created and then get pulled by an unsuspecting maintainer, which allowed an unnecessary parallel history merged into the existing project. The command has been taught not to allow this by default, with an escape hatch "--allow-unrelated-histories" option to be used in a rare event that merges histories of two projects that started their lives independently. * jc/merge-refuse-new-root: merge: refuse to create too cool a merge by default
2016-04-06Merge branch 'la/tag-force-signing-annotated-tags'Libravatar Junio C Hamano1-6/+14
"git tag" can create an annotated tag without explicitly given an "-a" (or "-s") option (i.e. when a tag message is given). A new configuration variable, tag.forceSignAnnotated, can be used to tell the command to create signed tag in such a situation. * la/tag-force-signing-annotated-tags: tag: add the option to force signing of annotated tags
2016-04-06Merge branch 'jk/submodule-c-credential'Libravatar Junio C Hamano1-3/+73
"git -c credential.<var>=<value> submodule" can now be used to propagate configuration variables related to credential helper down to the submodules. * jk/submodule-c-credential: git_config_push_parameter: handle empty GIT_CONFIG_PARAMETERS git: submodule honor -c credential.* from command line quote: implement sq_quotef() submodule: fix segmentation fault in submodule--helper clone submodule: fix submodule--helper clone usage submodule: check argc count for git submodule--helper clone submodule: don't pass empty string arguments to submodule--helper clone
2016-04-06Merge branch 'jv/merge-nothing-into-void'Libravatar Junio C Hamano1-5/+5
"git merge FETCH_HEAD" dereferenced NULL pointer when merging nothing into an unborn history (which is arguably unusual usage, which perhaps was the reason why nobody noticed it). * jv/merge-nothing-into-void: merge: fix NULL pointer dereference when merging nothing into void
2016-04-06Merge branch 'ss/commit-squash-msg'Libravatar Junio C Hamano1-1/+10
When "git merge --squash" stopped due to conflict, the concluding "git commit" failed to read in the SQUASH_MSG that shows the log messages from all the squashed commits. * ss/commit-squash-msg: commit: do not lose SQUASH_MSG contents
2016-04-06Merge branch 'sb/submodule-parallel-update'Libravatar Junio C Hamano3-9/+268
A major part of "git submodule update" has been ported to C to take advantage of the recently added framework to run download tasks in parallel. * sb/submodule-parallel-update: clone: allow an explicit argument for parallel submodule clones submodule update: expose parallelism to the user submodule helper: remove double 'fatal: ' prefix git submodule update: have a dedicated helper for cloning run_processes_parallel: rename parameters for the callbacks run_processes_parallel: treat output of children as byte array submodule update: direct error message to stderr fetching submodules: respect `submodule.fetchJobs` config option submodule-config: drop check against NULL submodule-config: keep update strategy around
2016-04-06Merge branch 'ss/receive-pack-parse-options'Libravatar Junio C Hamano1-33/+20
The command line argument parser for "receive-pack" has been rewritten to use parse-options. * ss/receive-pack-parse-options: builtin/receive-pack.c: use parse_options API
2016-04-05correct blame for files commited with CRLFLibravatar Torsten Bögershausen1-0/+1
git blame reports lines as not "Not Committed Yet" when they have CRLF in the index, CRLF in the worktree and core.autocrlf is true. Since commit c4805393 (autocrlf: Make it work also for un-normalized repositories, 2010-05-12), files that have CRLF in the index are not normalized at commit when core.autocrl is set. Add a call to read_cache() early in fake_working_tree_commit(), before calling convert_to_git(). Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-04branch: fix shortening of non-remote symrefsLibravatar Jeff King1-7/+12
Commit aedcb7d (branch.c: use 'ref-filter' APIs, 2015-09-23) adjusted the symref-printing code to look like this: if (item->symref) { skip_prefix(item->symref, "refs/remotes/", &desc); strbuf_addf(&out, " -> %s", desc); } This has three bugs in it: 1. It always skips past "refs/remotes/", instead of skipping past the prefix associated with the branch we are showing (so commonly we see "refs/remotes/" for the refs/remotes/origin/HEAD symref, but the previous code would skip "refs/heads/" when showing a symref it found in refs/heads/. 2. If skip_prefix() does not match, it leaves "desc" untouched, and we show whatever happened to be in it (which is the refname from a call to skip_prefix() earlier in the function). 3. If we do match with skip_prefix(), we stomp on the "desc" variable, which is later passed to add_verbose_info(). We probably want to retain the original refname there (though it likely doesn't matter in practice, since after all, one points to the other). The fix to match the original code is fairly easy: record the prefix to strip based on item->kind, and use it here. However, since we already have a local variable named "prefix", let's give the two prefixes verbose names so we don't confuse them. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-04branch -m: update all per-worktree HEADsLibravatar Kazuki Yamaguchi1-2/+1
When renaming a branch, currently only the HEAD of current working tree is updated, but it must update HEADs of all working trees which point at the old branch. This is the current behavior, /path/to/wt's HEAD is not updated: % git worktree list /path/to 2c3c5f2 [master] /path/to/wt 2c3c5f2 [oldname] % git branch -m master master2 % git worktree list /path/to 2c3c5f2 [master2] /path/to/wt 2c3c5f2 [oldname] % git branch -m oldname newname % git worktree list /path/to 2c3c5f2 [master2] /path/to/wt 0000000 [oldname] This patch fixes this issue by updating all relevant worktree HEADs when renaming a branch. Signed-off-by: Kazuki Yamaguchi <k@rhe.jp> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-03Merge branch 'jk/startup-info'Libravatar Junio C Hamano2-2/+5
The startup_info data, which records if we are working inside a repository (among other things), are now uniformly available to Git subcommand implementations, and Git avoids attempting to touch references when we are not in a repository. * jk/startup-info: use setup_git_directory() in test-* programs grep: turn off gitlink detection for --no-index mailmap: do not resolve blobs in a non-repository remote: don't resolve HEAD in non-repository setup: set startup_info->have_repository more reliably setup: make startup_info available everywhere
2016-04-03Merge branch 'jc/index-pack'Libravatar Junio C Hamano1-18/+17
Code clean-up. * jc/index-pack: index-pack: add a helper function to derive .idx/.keep filename
2016-04-03Merge branch 'gf/fetch-pack-direct-object-fetch'Libravatar Junio C Hamano1-3/+13
Fetching of history by naming a commit object name directly didn't work across remote-curl transport. * gf/fetch-pack-direct-object-fetch: fetch-pack: update the documentation for "<refs>..." arguments fetch-pack: fix object_id of exact sha1
2016-04-03Merge branch 'jc/maint-index-pack-keep'Libravatar Junio C Hamano1-1/+1
"git index-pack --keep[=<msg>] pack-$name.pack" simply did not work. * jc/maint-index-pack-keep: index-pack: correct --keep[=<msg>]
2016-04-03Merge branch 'jk/rev-parse-local-env-vars'Libravatar Junio C Hamano1-18/+32
The "--local-env-vars" and "--resolve-git-dir" options of "git rev-parse" failed to work outside a repository when the command's option parsing was rewritten in 1.8.5 era. * jk/rev-parse-local-env-vars: rev-parse: let some options run outside repository t1515: add tests for rev-parse out-of-repo helpers
2016-04-03Merge branch 'jk/config-get-urlmatch'Libravatar Junio C Hamano1-1/+4
"git config --get-urlmatch", unlike other variants of the "git config --get" family, did not signal error with its exit status when there was no matching configuration. * jk/config-get-urlmatch: Documentation/git-config: fix --get-all description Documentation/git-config: use bulleted list for exit codes config: fail if --get-urlmatch finds no value
2016-04-03Merge branch 'mm/diff-renames-default'Libravatar Junio C Hamano4-5/+14
The end-user facing Porcelain level commands like "diff" and "log" now enables the rename detection by default. * mm/diff-renames-default: diff: activate diff.renames by default log: introduce init_log_defaults() t: add tests for diff.renames (true/false/unset) t4001-diff-rename: wrap file creations in a test Documentation/diff-config: fix description of diff.renames
2016-04-01notes: don't leak memory in git_config_get_notes_strategyLibravatar Stefan Beller1-2/+3
This function asks for the value of a configuration and after using the value does not have to retain ownership of it. git_config_get_string_const() however is a function to get a copy of the value, but we forget to free it before we return. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-01builtin/apply: free patch when parse_chunk() failsLibravatar Christian Couder1-1/+3
When parse_chunk() fails it can return -1, for example when find_header() doesn't find a patch header. In this case it's better in apply_patch() to free the "struct patch" that we just allocated instead of leaking it. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-01builtin/apply: handle parse_binary() failureLibravatar Christian Couder1-0/+7
In parse_binary() there is: forward = parse_binary_hunk(&buffer, &size, &status, &used); if (!forward && !status) /* there has to be one hunk (forward hunk) */ return error(_("unrecognized binary patch at line %d"), linenr-1); so parse_binary() can return -1, because that's what error() returns. Also parse_binary_hunk() sets "status" to -1 in case of error and parse_binary() does "if (status) return status;". In this case parse_chunk() should not add -1 to the patchsize it computes. It is better for future libification efforts to make it just return -1. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-31git-send-pack: fix --all option when used with directoryLibravatar Stanislav Kolotinskiy1-1/+1
When using git send-pack with --all option and a target repository specification ([<host>:]<directory>), usage message is being displayed instead of performing the actual transmission. The reason for this issue is that destination and refspecs are being set in the same conditional and are populated from argv. When a target repository is passed, refspecs is being populated as well with its value. This makes the check for refspecs not being NULL to always return true, which, in conjunction with the check for --all or --mirror options, is always true as well and returns usage message instead of proceeding. This ensures that send-pack will stop execution only when --all or --mirror switch is used in conjunction with any refspecs passed. Signed-off-by: Stanislav Kolotinskiy <stanislav@assembla.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-30pretty: enable --expand-tabs by default for selected pretty formatsLibravatar Junio C Hamano1-0/+1
"git log --pretty={medium,full,fuller}" and "git log" by default prepend 4 spaces to the log message, so it makes sense to enable the new "expand-tabs" facility by default for these formats. Add --no-expand-tabs option to override the new default. The change alone breaks a test in t4201 that runs "git shortlog" on the output from "git log", and expects that the output from "git log" does not do such a tab expansion. Adjust the test to explicitly disable expand-tabs with --no-expand-tabs. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-29branch -d: refuse deleting a branch which is currently checked outLibravatar Kazuki Yamaguchi1-8/+14
When a branch is checked out by current working tree, deleting the branch is forbidden. However when the branch is checked out only by other working trees, deleting incorrectly succeeds. Use find_shared_symref() to check if the branch is in use, not just comparing with the current working tree's HEAD. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Kazuki Yamaguchi <k@rhe.jp> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-29worktree: add: introduce --checkout optionLibravatar Ray Zhang1-11/+18
By adding this option which defaults to true, we can use the corresponding --no-checkout to make some customizations before the checkout, like sparse checkout, etc. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Helped-by: Junio C Hamano <gitster@pobox.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Ray Zhang <zhanglei002@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-24Merge branch 'sb/submodule-module-list-pathspec-fix'Libravatar Junio C Hamano1-3/+3
A fix for a small regression in "module_list" helper that was rewritten in C (also applies to 2.7.x). * sb/submodule-module-list-pathspec-fix: submodule: fix regression for deinit without submodules
2016-03-24apply: report patch skipping in verbose modeLibravatar Nguyễn Thái Ngọc Duy1-0/+2
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-23merge: refuse to create too cool a merge by defaultLibravatar Junio C Hamano1-3/+9
While it makes sense to allow merging unrelated histories of two projects that started independently into one, in the way "gitk" was merged to "git" itself aka "the coolest merge ever", such a merge is still an unusual event. Worse, if somebody creates an independent history by starting from a tarball of an established project and sends a pull request to the original project, "git merge" however happily creates such a merge without any sign of something unusual is happening. Teach "git merge" to refuse to create such a merge by default, unless the user passes a new "--allow-unrelated-histories" option to tell it that the user is aware that two unrelated projects are merged. Because such a "two project merge" is a rare event, a configuration option to always allow such a merge is not added. We could add the same option to "git pull" and have it passed through to underlying "git merge". I do not have a fundamental opposition against such a feature, but this commit does not do so and instead leaves it as low-hanging fruit for others, because such a "two project merge" would be done after fetching the other project into some location in the working tree of an existing project and making sure how well they fit together, it is sufficient to allow a local merge without such an option pass-through from "git pull" to "git merge". Many tests that are updated by this patch does the pass-through manually by turning: git pull something into its equivalent: git fetch something && git merge --allow-unrelated-histories FETCH_HEAD If somebody is inclined to add such an option, updated tests in this change need to be adjusted back to: git pull --allow-unrelated-histories something Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-23merge: fix NULL pointer dereference when merging nothing into voidLibravatar Junio C Hamano1-5/+5
When we are on an unborn branch and merging only one foreign parent, we allow "git merge" to fast-forward to that foreign parent commit. This codepath incorrectly attempted to dereference the list of parents that the merge is going to record even when the list is empty. It must refuse to operate instead when there is no parent. All other codepaths make sure the list is not empty before they dereference it, and are safe. Reported-by: Jose Ivan B. Vilarouca Filho Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-22submodule: fix regression for deinit without submodulesLibravatar Stefan Beller1-3/+3
Per Cederqvist wrote: > It used to be possible to run > > git submodule deinit -f . > > to remove any submodules, no matter how many submodules you had. That > is no longer possible in projects that don't have any submodules at > all. The command will fail with: > > error: pathspec '.' did not match any file(s) known to git. This regression was introduced in 74703a1e4dfc (submodule: rewrite `module_list` shell function in C, 2015-09-02), as we changed the order of checking in new module listing to first check whether it is a gitlin before feeding it to match_pathspec(). It used to be that a pathspec that does not match any path were diagnosed as an error, but the new code complains for a pathspec that does not match any submodule path. Arguably the new behaviour may give us a better diagnosis, but that is inconsistent with the suggestion "deinit" gives, and also this was an unintended accident. The new behaviour hopefully can be redesigned and implemented better in future releases, but for now, switch these two checks to restore the same behavior as before. In an empty repository, giving the pathspec '.' will still get the same "did not match" error, but that is the same bug we had before 1.7.0. Reported-by: Per Cederqvist <cederp@opera.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-22tag: add the option to force signing of annotated tagsLibravatar Laurent Arnoud1-6/+14
The `tag.forcesignannotated` configuration variable makes "git tag" that would implicitly create an annotated tag to instead create a signed tag. For example $ git tag -m "This is a message" tag-with-message $ git tag -F message-file tag-with-message would create a signed tag if the configuration variable is in effect. To override this from the command line, the user can explicitly ask for an annotated tag, like so: $ git tag -a -m "This is a message" tag-with-message $ git tag -a -F message-file tag-with-message Creation of a light-weight tag, i.e. $ git tag lightweight is not affected. Signed-off-by: Laurent Arnoud <laurent@spkdev.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-22apply: remove unused call to free() in gitdiff_{old,new}name()Libravatar Junio C Hamano1-6/+0
These two functions keep a copy of filename it was given, let gitdiff_verify_name() to rewrite it to a new filename and then free the original if they receive a newly minted filename. However (1) when the original name is NULL, gitdiff_verify_name() returns either NULL or a newly minted value. Either case, we do not have to worry about calling free() on the original NULL. (2) when the original name is not NULL, gitdiff_verify_name() either returns that as-is, or calls die() when it finds inconsistency in the patch. When the function returns, we know that "if ()" statement always is false. Noticed by Christian Couder. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-22builtin/apply: get rid of useless 'name' variableLibravatar Christian Couder1-8/+5
While at it put an 'else' on the same line as the previous '}'. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-21commit: do not lose SQUASH_MSG contentsLibravatar Sven Strickroth1-1/+10
When concluding a conflicted "git merge --squash", the command failed to read SQUASH_MSG that was prepared by "git merge", and showed only the "# Conflicts:" list of conflicted paths. Place the contents from SQUASH_MSG at the beginning, just like we show the commit log skeleton first when concluding a normal merge, and then show the "# Conflicts:" list, to help the user write the log message for the resulting commit. Test by Junio C Hamano <gitster@pobox.com>. Signed-off-by: Sven Strickroth <sven@cs-ware.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-21pull --rebase: add --[no-]autostash flagLibravatar Mehul Jain1-0/+12
If rebase.autoStash configuration variable is set, there is no way to override it for "git pull --rebase" from the command line. Teach "git pull --rebase" the --[no-]autostash command line flag which overrides the current value of rebase.autoStash, if set. As "git rebase" understands the --[no-]autostash option, it's just a matter of passing the option to underlying "git rebase" when "git pull --rebase" is called. Helped-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Paul Tan <pyokagan@gmail.com> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-21git-pull.c: introduce git_pull_config()Libravatar Mehul Jain1-3/+15
git-pull makes a seperate call to git_config_get_bool() to read the value of "rebase.autostash". This can be reduced as a call to git_config() is already there in the code. Introduce a callback function git_pull_config() to read "rebase.autostash" along with other variables. Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Paul Tan <pyokagan@gmail.com> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-16Merge branch 'jk/path-name-safety-2.6' into jk/path-name-safety-2.7Libravatar Junio C Hamano2-21/+6
* jk/path-name-safety-2.6: list-objects: pass full pathname to callbacks list-objects: drop name_path entirely list-objects: convert name_path to a strbuf show_object_with_name: simplify by using path_name() http-push: stop using name_path tree-diff: catch integer overflow in combine_diff_path allocation add helpers for detecting size_t overflow
2016-03-16Merge branch 'jk/path-name-safety-2.5' into jk/path-name-safety-2.6Libravatar Junio C Hamano2-21/+6
* jk/path-name-safety-2.5: list-objects: pass full pathname to callbacks list-objects: drop name_path entirely list-objects: convert name_path to a strbuf show_object_with_name: simplify by using path_name() http-push: stop using name_path tree-diff: catch integer overflow in combine_diff_path allocation add helpers for detecting size_t overflow