git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: "Taylor Blau" <me@ttaylorr.com>, "Git List" <git@vger.kernel.org>,
	"Harri Mehtälä" <harri.mehtala@finago.com>,
	"Duy Nguyen" <pclouds@gmail.com>
Subject: Re: [PATCH 2/2] restore: default to HEAD when combining --worktree and --staged
Date: Mon, 4 May 2020 22:44:49 -0600	[thread overview]
Message-ID: <20200505044449.GA67132@syl.local> (raw)
In-Reply-To: <CAPig+cTAab6E4TPLL5AA75Ss9hQxCo2ZKLQaDakO=gGPvse+cQ@mail.gmail.com>

On Tue, May 05, 2020 at 12:00:08AM -0400, Eric Sunshine wrote:
> On Fri, May 1, 2020 at 6:20 PM Taylor Blau <me@ttaylorr.com> wrote:
> > On Fri, May 01, 2020 at 04:27:46AM -0400, Eric Sunshine wrote:
> > > The default restore source for --worktree is the index, and the default
> > > source for --staged is HEAD. However, when combining --worktree and
> >
> > I think that you could very reasonably drop the first sentence here,
> > especially because it is repeated verbatim from the previous commit.
>
> The repetition is intentional so that each commit can be understood
> stand-alone (without having to know what came before it).

Fair enough; I figure that the commits will probably be read most often
in conjunction with one another, but a little bit of extra commentary
doesn't hurt, either.

> > In fact... this whole paragraph looks similar to me. Maybe just:
> >
> >  When invoking 'git restore' with both '--worktree' and '--staged', it
> >  is required that the ambiguity of which source to restore from be
> >  resolved by also passing '--source'.
>
> I'll see if I can trim it down a bit -- Junio also found it too long.

Thanks. I'm happy to read whatever you have once you're ready.

> > > -By default, the restore sources for working tree and the index are the
> > > -index and `HEAD` respectively. `--source` could be used to specify a
> > > -commit as the restore source; it is required when combining `--staged`
> > > -and `--worktree`.
> > > +By default, the restore source for `--worktree` is the index, and the
> > > +restore source for `--staged` is `HEAD`. When combining `--worktree` and
> > > +`--staged`, the restore source is `HEAD`. `--source` can be used to specify
> >
> > This is extremely nit-pick-y, but is this line a little over-long? My
> > memory is that Documentation should be wrapped at 72 characters instead
> > of 80. I culd be totally wrong.
>
> Column 72 for commit messages, certainly, but I don't think there is
> any such guideline about documentation also being wrapped at 72. As an
> old-schooler who still uses 80-column terminal and editor windows, I'm
> quite sensitive to line length -- these lines are wrapped at 79.

Hmm... I've always wrapped changes in the Documentation tree at 72
characters, but I could very easily be in the wrong there ;). I tried to
find something in Documentation about wrapping at 72 characters, but I
failed. So, please disregard my original suggestion, and sorry for the
trouble there.


Thanks,
Taylor

      reply	other threads:[~2020-05-05  4:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01  8:27 [PATCH 0/2] enhance "git restore --worktree --staged" behavior Eric Sunshine
2020-05-01  8:27 ` [PATCH 1/2] restore: require --source when combining --worktree and --staged Eric Sunshine
2020-05-01  8:49   ` Eric Sunshine
2020-05-01 22:16   ` Taylor Blau
2020-05-01  8:27 ` [PATCH 2/2] restore: default to HEAD " Eric Sunshine
2020-05-01 15:32   ` Junio C Hamano
2020-05-05  3:53     ` Eric Sunshine
2020-05-01 22:19   ` Taylor Blau
2020-05-05  4:00     ` Eric Sunshine
2020-05-05  4:44       ` Taylor Blau [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200505044449.GA67132@syl.local \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=harri.mehtala@finago.com \
    --cc=pclouds@gmail.com \
    --cc=sunshine@sunshineco.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).