ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Sergey Afonin <asy@altlinux.ru>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] git и пустой каталог (syslog-ng 3.6.1)
Date: Tue, 9 Dec 2014 13:18:27 +0400
Message-ID: <201412091318.27072.asy@altlinux.ru> (raw)
In-Reply-To: <201412061948.38780.asy@altlinux.ru>

On Saturday 06 December 2014, Sergey Y. Afonin wrote:

> Причём, раньше этот самый ./modules/afmongodb/libmongo-client в тарбол
> попадал.

Немного ещё почитал... Пока получается, что пустой каталог для сабмодуля
попадает в репозитарий нормальным образом только при клонировании (ну
или втаскивании изменений из репозитария с сабмодулями). Поломанное 
состояние выглядит как-то так:

Это в исходном состоянии (3.4.7):

$ git submodule status
-ec9066dcc66b33e3767b4729f86844549f004657 lib/ivykis
-7142f05e2aaf61b47cf0472d9e9f468d08a4fdc0 modules/afamqp/rabbitmq-c
-9cbb488fd41464ae85fd1870235300197cbc24ac modules/afmongodb/libmongo-client

А это после git pull git://github.com/balabit/syslog-ng syslog-ng-3.6.1

$ git submodule status
-ec9066dcc66b33e3767b4729f86844549f004657 lib/ivykis
-259c5c0b5fe87c2db41e7a989cc0ab5865170d81 lib/jsonc
-7142f05e2aaf61b47cf0472d9e9f468d08a4fdc0 modules/afamqp/rabbitmq-c
U0000000000000000000000000000000000000000 modules/afmongodb/libmongo-client

видно, что добавился lib/jsonc, а modules/afmongodb/libmongo-client
поломался.

Далее, можно сделать так:

rm -rf ./modules/afmongodb/libmongo-client
git submodule add https://github.com/algernon/libmongo-client.git ./modules/afmongodb/libmongo-client
git submodule deinit -f ./modules/afmongodb/libmongo-client  # тут каталог очистится
git submodule init ./modules/afmongodb/libmongo-client
git add ./modules/afmongodb/libmongo-client

git commit -am "recovered libmongo-client submodule"
[master b7088fb] recovered libmongo-client submodule
 1 file changed, 1 insertion(+)
 create mode 160000 modules/afmongodb/libmongo-client

Видно, что каталог попал в git, и пустой.

В итоге (на самом деле, это после "git submodule add ..." уже так
отображается):

$ git submodule status
-ec9066dcc66b33e3767b4729f86844549f004657 lib/ivykis
-259c5c0b5fe87c2db41e7a989cc0ab5865170d81 lib/jsonc
-7142f05e2aaf61b47cf0472d9e9f468d08a4fdc0 modules/afamqp/rabbitmq-c
-97960a3bcfcae767f9012e9ddc067219f9ef89f1 modules/afmongodb/libmongo-client

Коммит выглядит вот так:

==========================================================
commit b7088fbafc0f1df0d7a5f83b1911791bf7ec0539
Author: Sergey Y. Afonin <asy@altlinux.org>
Date:   Tue Dec 9 12:40:22 2014 +0400

    recovered libmongo-client submodule

diff --git a/modules/afmongodb/libmongo-client b/modules/afmongodb/libmongo-client
new file mode 160000
index 0000000..97960a3
--- /dev/null
+++ b/modules/afmongodb/libmongo-client
@@ -0,0 +1 @@
+Subproject commit 97960a3bcfcae767f9012e9ddc067219f9ef89f1
==========================================================

-- 
С уважением, Сергей Афонин.


      reply	other threads:[~2014-12-09  9:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-06 14:55 Sergey Y. Afonin
2014-12-06 15:27 ` Евгений Терешков
2014-12-06 15:48   ` Sergey Y. Afonin
2014-12-09  9:18     ` Sergey Afonin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201412091318.27072.asy@altlinux.ru \
    --to=asy@altlinux.ru \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git