summaryrefslogtreecommitdiff
path: root/credential-cache.c
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2016-10-07 18:08:30 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-10-07 09:29:27 -0700
commit338bc8d81897d19f4795114e4e6a59d6ca44d1db (patch)
treed71f01cf6fe52baaf1cdda71e9624ebd937fd567 /credential-cache.c
parentSync with maint (diff)
downloadtgif-338bc8d81897d19f4795114e4e6a59d6ca44d1db.tar.xz
pull: drop confusing prefix parameter of die_on_unclean_work_tree()
In cmd_pull(), when verifying that there are no changes preventing a rebasing pull, we diligently pass the prefix parameter to the die_on_unclean_work_tree() function which in turn diligently passes it to the has_unstaged_changes() and has_uncommitted_changes() functions. The casual reader might now be curious (as this developer was) whether that means that calling `git pull --rebase` in a subdirectory will ignore unstaged changes in other parts of the working directory. And be puzzled that `git pull --rebase` (correctly) complains about those changes outside of the current directory. The puzzle is easily resolved: while we take pains to pass around the prefix and even pass it to init_revisions(), the fact that no paths are passed to init_revisions() ensures that the prefix is simply ignored. That, combined with the fact that we will *always* want a *full* working directory check before running a rebasing pull, is reason enough to simply do away with the actual prefix parameter and to pass NULL instead, as if we were running this from the top-level working directory anyway. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'credential-cache.c')
0 files changed, 0 insertions, 0 deletions