From: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
To: Andry <andry@inbox.ru>
Cc: git@vger.kernel.org
Subject: Re: Hash for a commit sourcetree beside to a commit hash
Date: Fri, 3 Feb 2023 09:01:09 +0700 [thread overview]
Message-ID: <Y9xq5VAMjzUqTb6X@danh.dev> (raw)
In-Reply-To: <1798489336.20230203042837@inbox.ru>
On 2023-02-03 04:28:37+0300, Andry <andry@inbox.ru> wrote:
> Hello Git,
>
> Is there a chance to add this property to a commit and a set of
> commands,
Does `git rev-parse commit^{tree}` works for you? E.g.
git rev-parse HEAD^{tree}
> for example, to search a commit by a sourcetree hash?
I'm not sure if I understand your question correctly, but does this
work?
git rev-list <a-commit-tish> |
while read commit; do
if test $(git rev-parse $commit^{tree}) = $hash; then
echo $commit
break
fi
done
> Sometimes a forked branch has edits which does chance commit hashes
> without changing the sourcetree, like user mail rewrite or commits
> remove or just a commit random property change. This leads to
> rewriting the rest commits in a branch or tree.
>
> This feature will be useful to search in all commits including
> rewritten.
>
> Of cause in case of rebase it won't work if is happened at least one
> merge with the interference with other commits in a commit chain.
> But if not, then it might help to search commits even after
> automatic rebase.
>
--
Danh
next prev parent reply other threads:[~2023-02-03 2:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 1:28 Hash for a commit sourcetree beside to a commit hash Andry
2023-02-03 2:01 ` Đoàn Trần Công Danh [this message]
2023-02-03 2:21 ` Andry
2023-02-03 11:11 ` Philip Oakley
2023-02-03 13:37 ` Andry
2023-02-03 15:15 ` Đoàn Trần Công Danh
2023-02-04 4:50 ` Andry
2023-02-03 22:39 ` Philip Oakley
2023-02-05 1:41 ` Andry
2023-02-12 13:27 ` Andry
2023-02-26 9:37 ` Andry
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=Y9xq5VAMjzUqTb6X@danh.dev \
--to=congdanhqx@gmail.com \
--cc=andry@inbox.ru \
--cc=git@vger.kernel.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.