From: "Damir Shayhutdinov" <damir@altlinux.org>
To: "ALT Linux Team development discussions" <devel@lists.altlinux.org>
Subject: Re: [devel] Q: git fake merge
Date: Wed, 10 Oct 2007 15:53:11 +0400
Message-ID: <679044850710100453u17d96d0ckaa4d0e591ad18253@mail.gmail.com> (raw)
In-Reply-To: <20071010151758.9ea19764.bga@altlinux.org>
> > git-merge -s ours
> >
> > Жалко что нету git-merge -s theirs, это иногда тоже полезно.
>
> А если переключиться на "тот" бранч и сделать git-merge -s ours,
> не поможет? =)
Коммит-merge должен быть на этом бранче, а не на том :)
Но вообще я конечно умею делать аналог "git-merge -s theirs" путем
комбинации git-commit-tree, git-rev-parse и git-update-ref. Это не
сложно.
THEIR_REF="$1" # what to merge
THEIR_COMM=`git-rev-parse "$THEIR_REF^{commit}"`
OURS=`git-rev-parse HEAD`
THEIR_TREE=`git-rev-parse "$THEIR_COMM^{tree}"`
MERGECOMMIT=`echo "Merging commit $THEIR_REF with -s theirs" |
git-commit-tree "$THEIR_TREE" -p "$OURS" -p "$THEIR_COMM"`
git-update-ref -m "Merging $THEIR_REF with -s theirs" HEAD
"$MERGECOMMIT" "$OURS"
next prev parent reply other threads:[~2007-10-10 11:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-10 0:17 Konstantin A. Lepikhov
2007-10-10 9:39 ` Alexey I. Froloff
2007-10-10 10:10 ` Damir Shayhutdinov
2007-10-10 11:17 ` Grigory Batalov
2007-10-10 11:41 ` Ivan Fedorov
2007-10-10 11:53 ` Damir Shayhutdinov [this message]
2007-10-10 12:02 ` Damir Shayhutdinov
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=679044850710100453u17d96d0ckaa4d0e591ad18253@mail.gmail.com \
--to=damir@altlinux.org \
--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