From: Sergey Vlasov <vsu@altlinux.ru>
To: devel@lists.altlinux.org
Subject: Re: [devel] git-commit одиночных файлов
Date: Sun, 3 Dec 2006 21:52:32 +0300
Message-ID: <20061203185232.GB7971@procyon.home> (raw)
In-Reply-To: <20061203180834.GA6352@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 1650 bytes --]
On Sun, Dec 03, 2006 at 09:08:34PM +0300, Денис Смирнов wrote:
> В git workdir изменено несколько файлов.
>
> Пытаюсь делать как раньше:
>
> [mithraen@localhost seirospbx]$ git commit acinclude.m4
> Different in index and the last commit:
> M seirospbx/acinclude.m4
Значит, файлы были не просто изменены - для них вызывался
git-update-index.
> You might have meant to say 'git commit -i paths...', perhaps?
>
> Нет, -i я не хочу, потому как мне не нужен commit остальных изменений.
>
> Потому:
> [mithraen@localhost seirospbx]$ git commit -o acinclude.m4
> Different in index and the last commit:
> M seirospbx/acinclude.m4
> You might have meant to say 'git commit -i paths...', perhaps?
>
> А вот тут я сильно задумался.
>
> git commit -a, ясное дело работает. Но что-то такая ситуация мне немножко не
> нравится.
Только что аналогичная ситуация обсуждалась в рассылке git:
http://thread.gmane.org/gmane.comp.version-control.git/33117/
Чтобы избавиться от мешающих изменений индекса, можно просто выполнить
команду "git reset" (без дополнительных параметров и опций эта команда
сбрасывает только индекс в состояние, соответствующее последнему
коммиту, но не меняет сами файлы в рабочей копии).
Можно также сбросить индекс только для тех файлов, которые нужно
закоммитить отдельно:
git ls-tree HEAD -- that-file | git update-index --index-info
git commit that-file
Возможно, в последующей версии git эта проверка будет совсем удалена
из git-commit - сейчас она там есть только по той причине, что
некоторое время назад поведение git-commit при указании списка файлов
менялось.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-12-03 18:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-03 18:08 Денис Смирнов
2006-12-03 18:52 ` Sergey Vlasov [this message]
2006-12-03 18:58 ` Денис Смирнов
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=20061203185232.GB7971@procyon.home \
--to=vsu@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