From: Jon Forrest <nobozo@gmail.com>
To: Rodrigo Campos <rodrigo@sdfg.com.ar>
Cc: git@vger.kernel.org
Subject: Re: [RFC] A Change to Commit IDs Too Ridiculous to Consider?
Date: Sun, 24 Jul 2016 12:57:50 -0700 [thread overview]
Message-ID: <c0af7511-a5d5-29bb-d279-66b6c3e0519c@gmail.com> (raw)
In-Reply-To: <20160724185132.GN25141@sdfg.com.ar>
On 7/24/2016 11:51 AM, Rodrigo Campos wrote:
> And what is the problem with that, if you are doing it with instructional
> purposes? Let's assume that this helps and not confuses later when the commits
> *do* change. What is the problem you face?
A lot of instructional material contains stuff like "Do [xxx] and you'll
see [zzz]. If you don't then something went wrong so try to figure out
what happened and do it again."
Git, as it stands, for good reason doesn't allow this approach.
I don't think a Git beginner, when using a version of Git that somehow
works the way I proposed, will be confused. The fact that performing the
same steps results in the same commit IDs won't be something that
they'll care about or even notice. The material can include a callout
mentioning the difference between "real" Git and "learners" Git.
> I mean, for some examples you can use HEAD, HEAD^, HEAD~4, etc. and that always
> works, no matter the commit id.
This will work in some cases, but should come later in a Git book.
But, in many cases using relative commit IDs, rather than absolute,
will be less clear (I believe).
> In which cases do you want/need the commit ids to be equal?
> Can you be more specific?
Sure. Take a look at the 2nd or 3rd chapter of Pro Git Reedited, 2nd
Edition (or just Pro Git 2nd Edition - it doesn't matter). You see
lots of output showing 'git commit' commands and the commit IDs that
result. I suspect you'd see the same in almost any book about Git.
Jon
next prev parent reply other threads:[~2016-07-24 19:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-24 18:12 [RFC] A Change to Commit IDs Too Ridiculous to Consider? Jon Forrest
2016-07-24 18:46 ` Jakub Narębski
2016-07-24 19:20 ` Jon Forrest
2016-07-24 20:42 ` Jakub Narębski
2016-07-25 3:56 ` Jon Forrest
2016-07-24 18:51 ` Rodrigo Campos
2016-07-24 19:57 ` Jon Forrest [this message]
2016-07-25 15:03 ` Junio C Hamano
2016-07-25 17:11 ` Junio C Hamano
2016-07-26 14:26 ` Philip Oakley
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=c0af7511-a5d5-29bb-d279-66b6c3e0519c@gmail.com \
--to=nobozo@gmail.com \
--cc=git@vger.kernel.org \
--cc=rodrigo@sdfg.com.ar \
/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).