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

Re: [ITCH] pull.default

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Apr 13, 2013, 21:54 UTC
Message-ID
<CALkWK0kbsYgOy6KjcgZe8+cKucqzWPQ3wyp3SqaYy372pW0eFw@mail.gmail.com>
In-Reply-To
<7vy5dkmt7k.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 7 quoted lines
> I think you can shrink and enhance the above repertoire at the same
> time by separating "do I want to have stash and stash pop around"
> bit into an orthogonal axis.  The other orthogonal axes are "Under
> what condition do I integrate the work from the upstream?" (e.g.
> "only when I do not have anything, aka, ff-only") and "How would I
> integrate the work from the upstream?" (e.g. "rebase my work" and
> "discard anything I did aka reset --hard").
Okay, so this is what I currently have:
- pull.condition = clean-worktree | ff-update | no-local-changes |
always | never
- pull.action = merge | rebase* | reset
- pull.resetType = soft | hard | merge | keep
- pull.autostash = true | false

(ff-update is satisfied when FETCH_HEAD is directly ahead of refs/remotes/<branch>, while no-local-changes is satisfied when FETCH_HEAD is directly ahead of refs/heads/<branch>)

Personally, I would love the defaults pull.condition = ff-update, pull.action = rebase, pull.autostash = true. However, there are branches that I have where this isn't applicable. Any clues on how to design branch-specific options for all these (there's branch.<name>.pullAction is a bit yuck)?

Did I manage to cover everything? Now that pull.autostash is done, I will start writing pull.condition after feedback.

* pull.rebase is pending deprecation
Previous: Ramkumar Ramachandra
Message 4 of 4 in “[ITCH] pull.default”
  1. Ramkumar RamachandraMar 18, 2013
  2. Junio C HamanoMar 18, 2013
  3. Ramkumar RamachandraMar 18, 2013
  4. Ramkumar RamachandraApr 13, 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.