Re: [PATCH v2 11/19] pull: check if in unresolved merge state

2015-06-14 Thread Paul Tan
On Thu, Jun 11, 2015 at 1:14 AM, Junio C Hamano gits...@pobox.com wrote: I (or at least some part of me) actually view git_config_get_*() as if you are only going to peek a few variables, you do not have to do the looping yourself convenience, which leads me (or at least that part of me) to

Re: [PATCH v2 11/19] pull: check if in unresolved merge state

2015-06-10 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Paul Tan pyoka...@gmail.com writes: @@ -422,6 +423,14 @@ int cmd_pull(int argc, const char **argv, const char *prefix) parse_repo_refspecs(argc, argv, repo, refspecs); +git_config(git_default_config, NULL); + +if

Re: [PATCH v2 11/19] pull: check if in unresolved merge state

2015-06-10 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: On Wed, Jun 10, 2015 at 10:38 PM, Junio C Hamano gits...@pobox.com wrote: If you are going to do the git_config() call yourself, it might make more sense to define git_pull_config() callback and parse the pull.ff yourself, updating the use of the lazy

Re: [PATCH v2 11/19] pull: check if in unresolved merge state

2015-06-10 Thread Paul Tan
On Wed, Jun 10, 2015 at 10:38 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: Paul Tan pyoka...@gmail.com writes: @@ -422,6 +423,14 @@ int cmd_pull(int argc, const char **argv, const char *prefix) parse_repo_refspecs(argc, argv, repo, refspecs);

Re: [PATCH v2 11/19] pull: check if in unresolved merge state

2015-06-09 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: @@ -422,6 +423,14 @@ int cmd_pull(int argc, const char **argv, const char *prefix) parse_repo_refspecs(argc, argv, repo, refspecs); + git_config(git_default_config, NULL); + + if (read_cache_unmerged()) +

[PATCH v2 11/19] pull: check if in unresolved merge state

2015-06-03 Thread Paul Tan
Since d38a30d (Be more user-friendly when refusing to do something because of conflict., 2010-01-12), git-pull will error out with user-friendly advices if the user is in the middle of a merge or has unmerged files. Re-implement this behavior. While the has unmerged files case can be handled by