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

Re: [PATCH v2] Give git-pull a --reset option

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 21, 2019, 23:38 UTC
Message-ID
<xmqqftqb9bf1.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190421211833.GC6316@genre.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
> It may be helpful to point out that this is essentially the workflow I
> had ...
> I'm not sure if this email is an argument for or against this option,
> but maybe it provides some helpful perspective.
I think you and Phillip misread me.

I did not question if the workflow is common the message you are responding to. I've done my fair share of "I know what I have on my laptop is stale as I pushed it out to elsewhere to continue working on it, so let's get rid of it from the updated upstream and start afresh" myself.

What I questioned was if it is sensible to ensure that it stays common.

We'd be encouraging the dangerous workflow, instead of analysing the situation where people employ it and trying to give them a better alternative to deal with the situation. That is what we'd be doing with "pull --reset", i.e. an easier to type short-hand that robs the chance to double check in the middle of "fetch && inspect && reset" sequence.

As to where the feature should go, if we decide that it is a good idea to promote this workflow element as a supported feature, I agree with Alex's design in the patch that it makes sense to have it as "pull --reset". Existing "pull --merge" and "pull -rebase" are "fetch and then integrate by merging theirs into ours" and "fetch and then integrate by rebasing our stuff on top of theirs"; the new "pull --reset" would fit well sitting next to them with its "fetch and then treat our stuff as valueless and replace it with theirs" semantics.

Previous: brian m. carlsonNext: Phillip Wood
Message 6 of 7 in “Give git-pull a --reset option”
  1. Give git-pull a --reset optionAlex Henrie, Apr 21, 2019
  2. Junio C HamanoApr 21, 2019
  3. Alex HenrieApr 21, 2019
  4. Philip OakleyApr 21, 2019
  5. brian m. carlsonApr 21, 2019
  6. Junio C HamanoApr 21, 2019
  7. Phillip WoodApr 22, 2019

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.