From: Aleksey Avdeev <solo@solin.spb.ru>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] Git: как правильно избавиться от патча в виде бранча ?
Date: Tue, 22 Sep 2015 13:12:48 +0300
Message-ID: <560129A0.2000508@solin.spb.ru> (raw)
In-Reply-To: <201509221108.26926.asy@altlinux.ru>
[-- Attachment #1: Type: text/plain, Size: 1493 bytes --]
22.09.2015 10:08, Sergey Afonin пишет:
> On Friday 11 September 2015, Aleksey Avdeev wrote:
>
>> Если патч не сильно большой, то как правило помогает git revert
>> его коммитов (+ решение конфликтов от наслоений).
>
> А есть способ их легко найти ? Или только лог смотреть и искать по
> описанию ?
Я обычно использую 2 способа:
1. Если удаляемый патч выделен в отдельный бранч
(patches/other/005-autocreate в вашем случаи), то помогает запуск gitk
--all и проход по истории бранча, содержащий удаляемый патч. Часто так
можно быстро найти все существенные коммиты бранча.
2. Несколько более муторый способ (но и более надёжный):
а) Отобразить фактические изменения происходящие при мерже бранча с патчем:
$ git diff <merge_commit>{^,}
б) Отображаем коммиты, в которых происходят похожие изменения:
$ git log -S '<подстрока>' <бранч> -- <файл>
где:
<подстрока> -- подстрока нового варианта одной из изменённых строк;
<бранч> -- бранч с патчем (patches/other/005-autocreate);
<файл> -- изменённый файл.
в) Просмотр полученных коммитов в gitk -- высока вероятность что один из
них тот, что нужен для git revert (или он находится в их окрестностях).
Примечания:
1. Помимо поиска по подстроке git log позволяет искать и по регулярному
выражению.
2. gitk позволяет простым образом выделить коммиты где:
а) изменялся заданный файл;
б) добавлялась/удалялась строка, содержащая заданную подстроку.
--
С уважением. Алексей.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 278 bytes --]
next prev parent reply other threads:[~2015-09-22 10:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-08 6:58 Sergey Afonin
2015-09-08 12:15 ` Sergey Afonin
2015-09-11 11:50 ` Aleksey Avdeev
2015-09-22 7:08 ` Sergey Afonin
2015-09-22 10:12 ` Aleksey Avdeev [this message]
2015-10-13 13:47 ` Sergey Afonin
2015-09-22 10:39 ` Michael Shigorin
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=560129A0.2000508@solin.spb.ru \
--to=solo@solin.spb.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