summaryrefslogtreecommitdiff
path: root/builtin
AgeCommit message (Collapse)AuthorFilesLines
2016-06-01builtin/apply: move 'apply_with_reject' global into 'struct apply_state'Libravatar Christian Couder1-7/+7
To libify the apply functionality the 'apply_with_reject' variable should not be static and global to the file. Let's move it into 'struct apply_state'. Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-01builtin/apply: move 'apply_in_reverse' global into 'struct apply_state'Libravatar Christian Couder1-19/+31
To libify the apply functionality the 'apply_in_reverse' variable should not be static and global to the file. Let's move it into 'struct apply_state'. Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-01builtin/apply: move 'check_index' global into 'struct apply_state'Libravatar Christian Couder1-29/+37
To libify the apply functionality the 'check_index' variable should not be static and global to the file. Let's move it into 'struct apply_state'. Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-01builtin/apply: move 'check' global into 'struct apply_state'Libravatar Christian Couder1-7/+7
To libify the apply functionality the 'check' variable should not be static and global to the file. Let's move it into 'struct apply_state'. Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-01builtin/apply: move 'unidiff_zero' global into 'struct apply_state'Libravatar Christian Couder1-18/+25
To libify the apply functionality the 'unidiff_zero' variable should not be static and global to the file. Let's move it into 'struct apply_state'. Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-01builtin/apply: move 'state' init into init_apply_state()Libravatar Christian Couder1-10/+22
When the apply functionality will be libified, the 'struct apply_state' will be used by different pieces of code. To properly initialize a 'struct apply_state', let's provide a nice and easy to use init_apply_state() function. Let's also provide clear_apply_state() to release memory used by 'struct apply_state' members, so that a 'struct apply_state' instance can be easily reused without leaking memory. Note that clear_apply_state() does nothing for now, but it will later. While at it, let's rename 'prefix_' parameter to 'prefix'. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-12builtin/apply: introduce 'struct apply_state' to start libifyingLibravatar Christian Couder1-38/+56
Currently commands that want to use the apply functionality have to launch a "git apply" process which can be bad for performance. Let's start libifying the apply functionality and to do that we first need to get rid of the global variables in "builtin/apply.c". This patch introduces "struct apply_state" into which all the previously global variables will be moved. A new parameter called "state" that is a pointer to the "apply_state" structure will come at the beginning of the helper functions that need it and will be passed around the call chain. To start let's move the "prefix" and "prefix_length" global variables into "struct apply_state". Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-12builtin/apply: move 'read_stdin' global into cmd_apply()Libravatar Christian Couder1-1/+1
The 'read_stdin' variable doesn't need to be static and global to the file. It can be local to cmd_apply(), so let's move it there. This will make it easier to libify the apply functionality. Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-12builtin/apply: move 'options' variable into cmd_apply()Libravatar Christian Couder1-1/+1
The 'options' variable doesn't need to be static and global to the file. It can be local to cmd_apply(), so let's move it there. This will make it easier to libify the apply functionality. Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-12builtin/apply: extract line_by_line_fuzzy_match() from match_fragment()Libravatar Christian Couder1-55/+71
The match_fragment() function is very big and contains a big special case algorithm that does line by line fuzzy matching. So let's extract this algorithm in a separate line_by_line_fuzzy_match() function. Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-12builtin/apply: avoid local variable shadowing 'len' parameterLibravatar Christian Couder1-10/+10
This is just a cleanup to avoid errors when compiling with -Wshadow and to make it safer to later move global variables into a "state" struct. Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-12builtin/apply: avoid parameter shadowing 'linenr' globalLibravatar Christian Couder1-24/+24
Let's just rename the global 'state_linenr' as it will become 'state->linenr' in a following patch. This also avoid errors when compiling with -Wshadow and makes it safer to later move global variables into a "state" struct. Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-12builtin/apply: avoid parameter shadowing 'p_value' globalLibravatar Christian Couder1-17/+17
Let's just rename the global 'state_p_value' as it will become 'state->p_value' in a following patch. This also avoid errors when compiling with -Wshadow and makes it safer to later move global variables into a "state" struct. Helped-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-12builtin/apply: make gitdiff_verify_name() return voidLibravatar Christian Couder1-13/+13
As the value returned by gitdiff_verify_name() is put into the same variable that is passed as a parameter to this function, it is simpler to pass the address of the variable and have gitdiff_verify_name() change the variable itself. This also makes it possible to later have this function return -1 instead of die()ing in case of error. Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-10Merge branch 'ew/doc-split-pack-disables-bitmap'Libravatar Junio C Hamano1-1/+8
Doc update. * ew/doc-split-pack-disables-bitmap: pack-objects: warn on split packs disabling bitmaps
2016-05-06Merge branch 'bc/object-id'Libravatar Junio C Hamano4-16/+16
Move from unsigned char[20] to struct object_id continues. * bc/object-id: match-trees: convert several leaf functions to use struct object_id tree-walk: convert tree_entry_extract() to use struct object_id struct name_entry: use struct object_id instead of unsigned char sha1[20] match-trees: convert shift_tree() and shift_tree_by() to use object_id test-match-trees: convert to use struct object_id sha1-name: introduce a get_oid() function
2016-05-06Merge branch 'sb/clone-shallow-passthru'Libravatar Junio C Hamano1-0/+7
"git clone" learned "--shallow-submodules" option. * sb/clone-shallow-passthru: clone: add `--shallow-submodules` flag
2016-05-03Merge branch 'js/name-rev-use-oldest-ref'Libravatar Junio C Hamano1-6/+13
"git describe --contains" often made a hard-to-justify choice of tag to give name to a given commit, because it tried to come up with a name with smallest number of hops from a tag, causing an old commit whose close descendant that is recently tagged were not described with respect to an old tag but with a newer tag. It did not help that its computation of "hop" count was further tweaked to penalize being on a side branch of a merge. The logic has been updated to favor using the tag with the oldest tagger date, which is a lot easier to explain to the end users: "We describe a commit in terms of the (chronologically) oldest tag that contains the commit." * js/name-rev-use-oldest-ref: name-rev: include taggerdate in considering the best name
2016-04-29Merge branch 'st/verify-tag'Libravatar Junio C Hamano2-61/+8
Unify internal logic between "git tag -v" and "git verify-tag" commands by making one directly call into the other. * st/verify-tag: tag -v: verify directly rather than exec-ing verify-tag verify-tag: move tag verification code to tag.c verify-tag: prepare verify_tag for libification verify-tag: update variable name and type t7030: test verifying multiple tags builtin/verify-tag.c: ignore SIGPIPE in gpg-interface
2016-04-29Merge branch 'jc/merge-refuse-new-root'Libravatar Junio C Hamano1-0/+6
"git pull" has been taught to pass --allow-unrelated-histories option to underlying "git merge". * jc/merge-refuse-new-root: pull: pass --allow-unrelated-histories to "git merge" t3033: avoid 'ambiguous refs' warning
2016-04-29Merge branch 'js/replace-edit-use-editor-configuration'Libravatar Junio C Hamano1-0/+1
"git replace -e" did not honour "core.editor" configuration. * js/replace-edit-use-editor-configuration: replace --edit: respect core.editor
2016-04-29Merge branch 'sb/mv-submodule-fix'Libravatar Junio C Hamano1-9/+12
"git mv old new" did not adjust the path for a submodule that lives as a subdirectory inside old/ directory correctly. * sb/mv-submodule-fix: mv: allow moving nested submodules
2016-04-28pack-objects: warn on split packs disabling bitmapsLibravatar Eric Wong1-1/+8
It can be tempting for a server admin to want a stable set of long-lived packs for dumb clients; but also want to enable bitmaps to serve smart clients more quickly. Unfortunately, such a configuration is impossible; so at least warn users of this incompatibility since commit 21134714 (pack-objects: turn off bitmaps when we split packs, 2014-10-16). Tested the warning by inspecting the output of: make -C t t5310-pack-bitmaps.sh GIT_TEST_OPTS=-v Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-26clone: add `--shallow-submodules` flagLibravatar Stefan Beller1-0/+7
When creating a shallow clone of a repository with submodules, the depth argument does not influence the submodules, i.e. the submodules are done as non-shallow clones. It is unclear what the best default is for the depth of submodules of a shallow clone, so we need to have the possibility to do all kinds of combinations: * shallow super project with shallow submodules e.g. build bots starting always from scratch. They want to transmit the least amount of network data as well as using the least amount of space on their hard drive. * shallow super project with unshallow submodules e.g. The superproject is just there to track a collection of repositories and it is not important to have the relationship between the repositories intact. However the history of the individual submodules matter. * unshallow super project with shallow submodules e.g. The superproject is the actual project and the submodule is a library which is rarely touched. The new switch to select submodules to be shallow or unshallow supports all of these three cases. It is easy to transition from the first to the second case by just unshallowing the submodules (`git submodule foreach git fetch --unshallow`), but it is not possible to transition from the second to the first case (as we would have already transmitted the non shallow over the network). That is why we want to make the first case the default in case of a shallow super project. This leads to the inconvenience in the second case with the shallow super project and unshallow submodules, as you need to pass `--no-shallow-submodules`. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-25Merge branch 'en/merge-trivial-fix'Libravatar Junio C Hamano1-0/+8
When "git merge" notices that the merge can be resolved purely at the tree level (without having to merge blobs) and the resulting tree happens to already exist in the object store, it forgot to update the index, which lead to an inconsistent state for later operations. * en/merge-trivial-fix: builtin/merge.c: fix a bug with trivial merges t7605: add a testcase demonstrating a bug with trivial merges
2016-04-25Merge branch 'dt/pre-refs-backend'Libravatar Junio C Hamano4-7/+5
Code restructuring around the "refs" area to prepare for pluggable refs backends. * dt/pre-refs-backend: (24 commits) refs: on symref reflog expire, lock symref not referrent refs: move resolve_ref_unsafe into common code show_head_ref(): check the result of resolve_ref_namespace() check_aliased_update(): check that dst_name is non-NULL checkout_paths(): remove unneeded flag variable cmd_merge(): remove unneeded flag variable fsck_head_link(): remove unneeded flag variable read_raw_ref(): change flags parameter to unsigned int files-backend: inline resolve_ref_1() into resolve_ref_unsafe() read_raw_ref(): manage own scratch space files-backend: break out ref reading resolve_ref_1(): eliminate local variable "bad_name" resolve_ref_1(): reorder code resolve_ref_1(): eliminate local variable resolve_ref_unsafe(): ensure flags is always set resolve_ref_unsafe(): use for loop to count up to MAXDEPTH resolve_missing_loose_ref(): simplify semantics t1430: improve test coverage of deletion of badly-named refs t1430: test for-each-ref in the presence of badly-named refs t1430: don't rely on symbolic-ref for creating broken symrefs ...
2016-04-25struct name_entry: use struct object_id instead of unsigned char sha1[20]Libravatar brian m. carlson4-16/+16
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-22Merge branch 'ad/commit-have-m-option'Libravatar Junio C Hamano1-3/+3
"git commit" misbehaved in a few minor ways when an empty message is given via -m '', all of which has been corrected. * ad/commit-have-m-option: commit: do not ignore an empty message given by -m '' commit: --amend -m '' silently fails to wipe message
2016-04-22Merge branch 'sb/submodule-helper-clone-regression-fix'Libravatar Junio C Hamano1-24/+16
A partial rewrite of "git submodule" in the 2.7 timeframe changed the way the gitdir: pointer in the submodules point at the real repository location to use absolute paths by accident. This has been corrected. * sb/submodule-helper-clone-regression-fix: submodule--helper, module_clone: catch fprintf failure submodule--helper: do not borrow absolute_path() result for too long submodule--helper, module_clone: always operate on absolute paths submodule--helper clone: create the submodule path just once submodule--helper: fix potential NULL-dereference recursive submodules: test for relative paths
2016-04-22tag -v: verify directly rather than exec-ing verify-tagLibravatar Santiago Torres1-7/+1
Instead of having tag -v fork to run verify-tag, use the gpg_verify_tag() function directly. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Santiago Torres <santiago@nyu.edu> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-22verify-tag: move tag verification code to tag.cLibravatar Santiago Torres1-54/+1
The PGP verification routine for tags could be accessed by other modules that require to do so. Publish the verify_tag function in tag.c and rename it to gpg_verify_tag so it does not conflict with builtin/mktag's static function. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Santiago Torres <santiago@nyu.edu> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-22verify-tag: prepare verify_tag for libificationLibravatar Santiago Torres1-9/+17
The current interface of verify_tag() resolves reference names to SHA1, however, the plan is to make this functionality public and the current interface is cumbersome for callers: they are expected to supply the textual representation of a sha1/refname. In many cases, this requires them to turn the sha1 to hex representation, just to be converted back inside verify_tag. Add a SHA1 parameter to use instead of the name parameter, and rename the name parameter to "name_to_report" for reporting purposes only. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Santiago Torres <santiago@nyu.edu> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-22name-rev: include taggerdate in considering the best nameLibravatar Johannes Schindelin1-6/+13
We most likely want the oldest tag that contained the commit to be reported. So let's remember the taggerdate, and make it more important than anything else when choosing the best name for a given commit. Suggested by Linus Torvalds. Note that we need to update t9903 because it tested for the old behavior (which preferred the description "b1~1" over "tags/t2~1"). We might want to introduce a --heed-taggerdate option, and make the new behavior dependent on that, if it turns out that some scripts rely on the old name-rev method. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-21pull: pass --allow-unrelated-histories to "git merge"Libravatar Junio C Hamano1-0/+6
The previous commit said: 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". Prepare a patch to make it a reality, just in case it is needed. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-20replace --edit: respect core.editorLibravatar Johannes Schindelin1-0/+1
We simply need to read the config, is all. This fixes https://github.com/git-for-windows/git/issues/733 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-19verify-tag: update variable name and typeLibravatar Santiago Torres1-5/+6
The run_gpg_verify() function has two variables, size and len. This may come off as confusing when reading the code. Clarify which one pertains to the length of the tag headers by renaming len to payload_size. Additionally, change the type of payload_size to size_t to match the return type of parse_signature. Signed-off-by: Santiago Torres <santiago@nyu.edu> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-19mv: allow moving nested submodulesLibravatar Stefan Beller1-9/+12
When directories are moved using `git mv` all files in the directory have been just moved, but no further action was taken on them. This was done by assigning the mode = WORKING_DIRECTORY to the files inside a moved directory. submodules however need to update their link to the git directory as well as updates to the .gitmodules file. By removing the condition of `mode != INDEX` (the remaining modes are BOTH and WORKING_DIRECTORY) for the required submodule actions, we perform these for submodules in a moved directory. Signed-off-by: Stefan Beller <sbeller@google.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-14Merge branch 'jv/merge-nothing-into-void' into maintLibravatar 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-14Merge branch 'ss/commit-squash-msg' into maintLibravatar 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-14Merge branch 'jk/startup-info' into maintLibravatar 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-14Merge branch 'gf/fetch-pack-direct-object-fetch' into maintLibravatar 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-14Merge branch 'jk/rev-parse-local-env-vars' into maintLibravatar 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-14Merge branch 'jk/config-get-urlmatch' into maintLibravatar 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-14Merge branch 'jc/index-pack' into maintLibravatar Junio C Hamano1-18/+17
Code clean-up. * jc/index-pack: index-pack: add a helper function to derive .idx/.keep filename index-pack: correct --keep[=<msg>]
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