зеркало из https://github.com/microsoft/git.git
add reflog entries for HEAD when detached
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Родитель
bd104db164
Коммит
e1dde3d06c
|
@ -259,8 +259,9 @@ if [ "$?" -eq 0 ]; then
|
|||
# git update-ref --detach HEAD $new
|
||||
# or something like that...
|
||||
#
|
||||
echo "$detached" >"$GIT_DIR/HEAD.new" &&
|
||||
mv "$GIT_DIR/HEAD.new" "$GIT_DIR/HEAD" ||
|
||||
git-rev-parse HEAD >"$GIT_DIR/HEAD.new" &&
|
||||
mv "$GIT_DIR/HEAD.new" "$GIT_DIR/HEAD" &&
|
||||
git-update-ref -m "checkout: moving to $arg" HEAD "$detached" ||
|
||||
die "Cannot detach HEAD"
|
||||
if test -n "$detach_warn"
|
||||
then
|
||||
|
|
Загрузка…
Ссылка в новой задаче