git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] pull: respect rebase.autostash

From
Phil Hord <phil.hord@gmail.com>
Date
Jun 14, 2013, 12:41 UTC
Message-ID
<CABURp0rPF3WSm9dQe70DBOKtJDtUTL_BdpQOv1h-nwwcCZpD9g@mail.gmail.com>
In-Reply-To
<20130614122950.GE23890@serenity.lan>
On Fri, Jun 14, 2013 at 8:29 AM, John Keeping <john@keeping.me.uk> wrote:
Show 49 quoted lines
> 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
Previous: John KeepingNext: Ramkumar Ramachandra
Message 10 of 14 in “Rebasing pull with autostash”
  1. 0/2 Rebasing pull with autostashRamkumar Ramachandra, Jun 14, 2013
  2. 1/2 pull: respect rebase.autostashRamkumar Ramachandra, Jun 14, 2013
  3. Matthieu MoyJun 14, 2013
  4. Ramkumar RamachandraJun 14, 2013
  5. Phil HordJun 14, 2013
  6. Junio C HamanoJun 14, 2013
  7. Phil HordJun 14, 2013
  8. Phil HordJun 14, 2013
  9. John KeepingJun 14, 2013
  10. Phil HordJun 14, 2013
  11. Ramkumar RamachandraJun 14, 2013
  12. 2/2 pull: clarify the large && { ... } formRamkumar Ramachandra, Jun 14, 2013
  13. Matthieu MoyJun 14, 2013
  14. Ramkumar RamachandraJun 14, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.