From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Tomas Carnecky <tomas.carnecky@gmail.com>,
Seth Robertson <in-gitvger@baka.org>,
Woody Wu <narkewoody@gmail.com>, git <git@vger.kernel.org>
Subject: Re: Find the starting point of a local branch
Date: Tue, 25 Dec 2012 08:09:17 +0700 [thread overview]
Message-ID: <CACsJy8ChvEMt7FMs-zdyF9SOhL8U01x266OebEk3SHR+19908g@mail.gmail.com> (raw)
In-Reply-To: <7vbodjnu5c.fsf@alter.siamese.dyndns.org>
On Tue, Dec 25, 2012 at 2:10 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> I looked briefly at reflog before writing my previous mail and noticed
>> that when I create a new branch (usually using "git checkout -b branch
>> ref") it does not record the base commit.
>
> Hmph. Perhaps you are referring to something different than what I
> think "the base commit" with that word.
>
> $ git reflog mz/pick-unborn | tail -n 1
> b3cf6f3 mz/pick-unborn@{3}: branch: Created from ko/master
No you're right. My reflogs must be pruned. Creating a new branch does
produce that entry.
>> We could at least invalidate the recorded base in reflog and let user
>> define a new one (I hope).
>
> Please do not even think about going back and rewrite to lose
> information. If the records have full information, you should be
> able to reconstruct what you want from it without rewriting.
>
> Even more importantly, wish to "invalidate" indicates that you know
> at a newer point that you have more authoritative information than
> the older reflog entries, so you should be able to do the moral
> equivalent by writing the event as establishing a new base at that
> point (e.g. "checkout -B"), and stopping at that point in the reflog
> when reading, without losing the older reflog entries.
Exactly. And when we prune the reflog, we could add the base back so
the base is always in reflog.
--
Duy
next prev parent reply other threads:[~2012-12-25 1:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-24 3:58 Find the starting point of a local branch Woody Wu
2012-12-24 4:09 ` Seth Robertson
2012-12-24 5:28 ` Nguyen Thai Ngoc Duy
2012-12-24 5:34 ` Tomas Carnecky
2012-12-24 5:45 ` Nguyen Thai Ngoc Duy
2012-12-24 6:27 ` Junio C Hamano
2012-12-24 11:21 ` Nguyen Thai Ngoc Duy
2012-12-24 19:10 ` Junio C Hamano
2012-12-25 1:09 ` Nguyen Thai Ngoc Duy [this message]
2012-12-24 6:19 ` Jeff King
2012-12-24 11:16 ` Nguyen Thai Ngoc Duy
2012-12-24 15:34 ` Jeff King
2012-12-24 7:31 ` Woody Wu
2012-12-24 9:12 ` Kevin
2012-12-24 17:24 ` Martin von Zweigbergk
2012-12-28 5:15 ` Woody Wu
2012-12-28 6:38 ` Martin von Zweigbergk
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=CACsJy8ChvEMt7FMs-zdyF9SOhL8U01x266OebEk3SHR+19908g@mail.gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=in-gitvger@baka.org \
--cc=narkewoody@gmail.com \
--cc=tomas.carnecky@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).