From: Sergey Vlasov <vsu@altlinux.ru>
To: devel@lists.altlinux.org
Subject: Re: [devel] средства импорта проекта в git из тарболлов
Date: Sun, 10 Jun 2007 21:19:43 +0400
Message-ID: <20070610171943.GA4826@procyon.home> (raw)
In-Reply-To: <466C2744.8010709@stc.donpac.ru>
[-- Attachment #1: Type: text/plain, Size: 2800 bytes --]
On Sun, Jun 10, 2007 at 08:31:00PM +0400, Eugene Prokopiev wrote:
> Slava Semushin пишет:
> > 2007/6/9, Eugene Prokopiev <prokopiev / stc.donpac.ru>:
> > [...]
> >
> >>>Попробуй gear-update.
> >>
> >>$ gear-update -f -v ~/callweaver-1.1.99.20070609.tar.gz callweaver/
> >>error: 'callweaver/AUTHORS' has local modifications (hint: try -f)
> >>...
> >>error: 'callweaver/utils/streamplayer.c' has local modifications (hint:
> >>try -f)
> >
> >
> > Я бы попробовал так:
>
> Поясните, пожалуйста, смысл этих манипуляций
>
> > $ PAGER=cat git diff >back.diff
>
> вытаскиваем изменения (между чем и чем?)
Между index и фактически имеющимися в рабочей копии файлами. Хотя в
данном случае следовало бы откатывать не к индексу, а к последнему
коммиту (HEAD).
> кстати, вывод выглядит так:
>
> diff --git a/.gear-rules b/.gear-rules
> diff --git a/callweaver-ael-macro.patch b/callweaver-ael-macro.patch
> ...
diff без фактического содержимого в выводе git-diff появляется в
случае, когда файл в рабочей копии отличается по mtime/inode от
сохранённого в индексе, но на самом деле совпадает по содержимому.
Обычно это происходит в случае, когда файл редактировали, но затем
вернули в первоначальное состояние.
Кстати, вызов git status устранит все несовпадения рабочей копии с
индексом такого рода и покажет, какие файлы реально были
модифицированы.
> > $ PAGER=cat git diff | patch -p1 -R
>
> вливаем эти же изменения поверх самих себя (смысл этого вообще от меня
> ускользает)
Опция -R означает, что изменения откатываются.
> и поскольку на предыдущем шаге мы получили не совсем diff, то
> результатом этой операции является:
>
> patch: **** Only garbage was found in the patch input.
На самом деле вместо patch -p1 -R следовало использовать средства,
имеющиеся в git: git apply -R (а в данном случае ещё и с опцией
--index). А к вызовам git diff тогда следовало бы добавить опцию
--binary - тогда это будет работать и в случае, когда были изменены не
только текстовые файлы.
> > $ gear-update -f -v ~/callweaver-1.1.99.20070609.tar.gz callweaver/
>
> результат аналогичен предыдущему gear-update, ошибки те же:
>
> error: 'callweaver/AUTHORS' has local modifications (hint: try -f)
> error: 'callweaver/BUGS' has local modifications (hint: try -f)
> ...
>
> > $ patch -p1 <back.diff
>
> еще раз накатываем сохраненные изменения
>
> > $ rm -f back.diff
>
> ну это единственное, что понятно :)
>
> > Но, скорее всего это не самое лучшее решение.
>
> да, выглядит просто жутко ...
Вообще в git@ недавно предлагалась реализация команды git-stash,
позволяющей сохранить и временно убрать локальные изменения из рабочей
копии, а потом их восстановить (возможно, наложив уже на обновлённую
версию).
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2007-06-10 17:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-09 9:09 Eugene Prokopiev
2007-06-09 9:17 ` Damir Shayhutdinov
2007-06-09 9:29 ` Eugene Prokopiev
2007-06-10 9:12 ` Slava Semushin
2007-06-10 9:56 ` Alexey Tourbin
2007-06-10 10:03 ` Slava Semushin
2007-06-10 11:20 ` Alexey Tourbin
2007-06-10 11:21 ` Alexey Tourbin
2007-06-10 11:25 ` Slava Semushin
2007-06-10 16:31 ` Eugene Prokopiev
2007-06-10 17:19 ` Sergey Vlasov [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=20070610171943.GA4826@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