git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tim Landscheidt <tim@tim-landscheidt.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Duy Nguyen <pclouds@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 0/2] Add "git rebase --show-patch"
Date: Thu, 01 Feb 2018 02:06:51 +0000	[thread overview]
Message-ID: <87inbhbgzo.fsf@passepartout.tim-landscheidt.de> (raw)
In-Reply-To: <xmqqshant7ys.fsf@gitster-ct.c.googlers.com> (Junio C. Hamano's message of "Tue, 30 Jan 2018 12:19:55 -0800")

Junio C Hamano <gitster@pobox.com> wrote:

>> The pseudo ref certainly has an appeal. For people very familiar with
>> Git's peculiarities such as FETCH_HEAD. Such as myself.

>> For users, it is probably substantially worse an experience than having a
>> cmdmode like --show-patch in the very command they were just running.

> I tend to agree with that assessment.  FETCH_HEAD was a required
> mechanism for commands in the toolchain to communicate and wasn't
> meant as a mechanism for end-users.  I do not think it is a good
> idea to add to the pile to these special files the users would need
> to look at, when we do not need to.

> Even if the internal implementation uses such a file, wrapping it
> with a documented command mode would make a better UI.

I disagree with that as I had:

| [alias]
|         original-commit = !git show $(cat .git/rebase-apply/original-commit)

for a long time in my ~/.gitconfig :-) (until I realized
that Git accepted "rebase-apply/original-commit" everywhere;
for single-commit branches I always just used ORIG_HEAD).

This meant that whenever I wanted to look at the lay of the
land upon which the original commit was built, I had to do
"git original-commit" and copy & paste the SHA1 (without my
alias, I had to "git log ORIG_HEAD", pick hopefully the cor-
rect commit and copy & paste its SHA1).  Only with this SHA1
I could then run "git diff", "git show", "git grep", "git
blame", etc., etc., etc. because in my use cases looking at
the patch alone was usually not sufficient: I needed to know
why there was a conflict, i. e. how the file(s) the patch
changed looked before they had been altered upstream.

To me, this type of "algebra" is what makes Git so powerful:
I do not have to build a pipe that gets the SHA1 of a
branch's tip and xargs it to "git show", I can just say "git
show $branch".  Having a SHA1 with a special meaning that
has no easy way to access it by "git rev-parse" breaks this
UI IMHO.

Tim

  reply	other threads:[~2018-02-01  2:22 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-26  9:55 [PATCH 0/2] Add "git rebase --show-patch" Nguyễn Thái Ngọc Duy
2018-01-26  9:55 ` [PATCH 1/2] am: add --show-patch Nguyễn Thái Ngọc Duy
2018-01-26  9:55 ` [PATCH 2/2] rebase: " Nguyễn Thái Ngọc Duy
2018-01-26 11:12   ` Phillip Wood
2018-01-26 11:22     ` Duy Nguyen
2018-01-30 11:15       ` Phillip Wood
2018-01-26 19:11   ` Eric Sunshine
2018-01-27  1:42     ` Duy Nguyen
2018-01-26 18:47 ` [PATCH 0/2] Add "git rebase --show-patch" Tim Landscheidt
2018-01-27  1:45   ` Duy Nguyen
2018-01-27 11:26 ` Ævar Arnfjörð Bjarmason
2018-01-29 15:09 ` Johannes Schindelin
2018-01-30  9:10   ` Duy Nguyen
2018-01-30 12:32     ` Johannes Schindelin
2018-01-30 20:19       ` Junio C Hamano
2018-02-01  2:06         ` Tim Landscheidt [this message]
2018-01-31  9:30 ` [PATCH v2 0/3] " Nguyễn Thái Ngọc Duy
2018-01-31  9:30   ` [PATCH v2 1/3] am: add --show-current-patch Nguyễn Thái Ngọc Duy
2018-01-31  9:40     ` Eric Sunshine
2018-01-31 22:59       ` Junio C Hamano
2018-02-02  9:25         ` Duy Nguyen
2018-02-02  9:46           ` Eric Sunshine
2018-02-02  9:53             ` Duy Nguyen
2018-02-02 18:56           ` Junio C Hamano
2018-01-31  9:30   ` [PATCH] gitignore.txt: elaborate shell glob syntax Nguyễn Thái Ngọc Duy
2018-01-31 23:22     ` Junio C Hamano
2018-02-01  9:59       ` Duy Nguyen
2018-01-31  9:30   ` [PATCH v2 2/3] rebase: add --show-current-patch Nguyễn Thái Ngọc Duy
2018-01-31  9:30   ` [PATCH v2 3/3] rebase: introduce and use pseudo-ref ORIG_COMMIT Nguyễn Thái Ngọc Duy
2018-01-31 23:18     ` Junio C Hamano
2018-02-01 10:02       ` Duy Nguyen
2018-02-02 19:00         ` Junio C Hamano
2018-02-01 11:05     ` Phillip Wood
2018-02-11  9:43   ` [PATCH v3 0/3] Add "git rebase --show-current-patch" Nguyễn Thái Ngọc Duy
2018-02-11  9:43     ` [PATCH v3 1/3] am: add --show-current-patch Nguyễn Thái Ngọc Duy
2018-02-11  9:43     ` [PATCH v3 2/3] rebase: " Nguyễn Thái Ngọc Duy
2018-02-11  9:43     ` [PATCH v3 3/3] rebase: introduce and use pseudo-ref REBASE_HEAD Nguyễn Thái Ngọc Duy
2018-02-22  0:21     ` [PATCH v3 0/3] Add "git rebase --show-current-patch" Junio C Hamano
2018-02-22  0:54       ` Tim Landscheidt
2018-02-23 10:20         ` Duy Nguyen

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=87inbhbgzo.fsf@passepartout.tim-landscheidt.de \
    --to=tim@tim-landscheidt.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@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).