]> git.ipfire.org Git - thirdparty/git.git/commit - submodule.h
update submodules: add submodule_move_head
authorStefan Beller <sbeller@google.com>
Tue, 14 Mar 2017 21:46:37 +0000 (14:46 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Mar 2017 21:07:16 +0000 (14:07 -0700)
commit6e3c1595c66e2b192a2a516447c5645814766339
tree918c43a29b77a93f1a207c7998f7bdc5e4637fcb
parent202275b96b6c3ffc2c380cfb017e4f6a0dd6bddb
update submodules: add submodule_move_head

In later patches we introduce the options and flag for commands
that modify the working directory, e.g. git-checkout.

This piece of code will be used universally for
all these working tree modifications as it
* supports dry run to answer the question:
  "Is it safe to change the submodule to this new state?"
  e.g. is it overwriting untracked files or are there local
  changes that would be overwritten?
* supports a force flag that can be used for resetting
  the tree.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c
submodule.h