From: Phil Hord <phil.hord@gmail.com>
To: John Keeping <john@keeping.me.uk>
Cc: Ramkumar Ramachandra <artagnon@gmail.com>,
Git List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/2] pull: respect rebase.autostash
Date: Fri, 14 Jun 2013 08:41:20 -0400 [thread overview]
Message-ID: <CABURp0rPF3WSm9dQe70DBOKtJDtUTL_BdpQOv1h-nwwcCZpD9g@mail.gmail.com> (raw)
In-Reply-To: <20130614122950.GE23890@serenity.lan>
On Fri, Jun 14, 2013 at 8:29 AM, John Keeping <john@keeping.me.uk> wrote:
> On Fri, Jun 14, 2013 at 08:12:56AM -0400, Phil Hord wrote:
>> On Fri, Jun 14, 2013 at 4:56 AM, Ramkumar Ramachandra
>> <artagnon@gmail.com> wrote:
>> > If a rebasing pull is requested, pull unconditionally runs
>> > require_clean_worktree() resulting in:
>> >
>> > # dirty worktree or index
>> > $ git pull
>> > Cannot pull with rebase: Your index contains uncommitted changes.
>> > Please commit or stash them.
>> >
>> > It does this to inform the user early on that a rebase cannot be run on
>> > a dirty worktree, and that a stash is required. However,
>> > rr/rebase-autostash lifts this limitation on rebase by providing a way
>> > to automatically stash using the rebase.autostash configuration
>> > variable. Read this variable in pull, and take advantage of this
>> > feature.
>>
>> This commit message does not tell me what this commit does. It mostly
>> describes the current situation. Then it refers to something called
>> "rr/rebase-autostash" which will lose meaning in the future when this
>> commit is no longer current on the list. A better way to refer to
>> this commit is to say "this commit". However, even this is not the
>> norm for this project. The norm here is to avoid such noise by
>> speaking in the imperative mood. That is, do not tell me what this
>> commit does; instead, tell the code what to do. See
>> Documentation/SubmittingPatches:
>
> It seems to me that Ram's message is already in the imperative. The
> only (slight) issue is that rr/rebase-autostash will become hard to find
> once Junio cleans up feature branches that have graduated. Since that
> branch has graduated to master, it would be clearer to refer to commit
> 5879477 (rebase: implement --[no-]autostash and rebase.autostash,
> 2013-05-12). Is something like this clearer?
>
> "git pull" currently cannot be used with the "autostash" feature
> added to "git rebase" by commit 5879477 (rebase: implement
> --[no-]autostash and rebase.autostash, 2013-05-12) because it
> unconditionally calls requre_clean_worktree early on, which results
> in:
>
> # dirty worktree or index
> $ git pull
> Cannot pull with rebase: Your index contains uncommitted changes.
> Please commit or stash them.
>
> Remove this restriction by skipping the call to
> require_clean_worktree if the "rebase.autostash" configuration
> variable is set.
Yes, thanks. I was mislead by my poor understanding all the players
involved. This disambiguates things nicely.
Phil
next prev parent reply other threads:[~2013-06-14 12:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-14 8:56 [PATCH 0/2] Rebasing pull with autostash Ramkumar Ramachandra
2013-06-14 8:56 ` [PATCH 1/2] pull: respect rebase.autostash Ramkumar Ramachandra
2013-06-14 9:13 ` Matthieu Moy
2013-06-14 10:41 ` Ramkumar Ramachandra
2013-06-14 11:59 ` Phil Hord
2013-06-14 18:26 ` Junio C Hamano
2013-06-14 12:12 ` Phil Hord
2013-06-14 12:21 ` Phil Hord
2013-06-14 12:29 ` John Keeping
2013-06-14 12:41 ` Phil Hord [this message]
2013-06-14 12:46 ` Ramkumar Ramachandra
2013-06-14 8:56 ` [PATCH 2/2] pull: clarify the large && { ... } form Ramkumar Ramachandra
2013-06-14 9:09 ` Matthieu Moy
2013-06-14 10:47 ` Ramkumar Ramachandra
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=CABURp0rPF3WSm9dQe70DBOKtJDtUTL_BdpQOv1h-nwwcCZpD9g@mail.gmail.com \
--to=phil.hord@gmail.com \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=john@keeping.me.uk \
/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).