Re: Pull is Evil

2014-05-03 Thread Andreas Krey
On Fri, 02 May 2014 10:46:09 +, David Kastrup wrote: ... What the gibbins? I don't even use git pull. I do, but I watch for the fast-forward message and undo as appropriate. I use git fetch, and then, depending on my needs, I rebase or merge. I wouldn't mind that, but I have a century of

Re: Pull is Evil

2014-05-03 Thread David Kastrup
Andreas Krey a.k...@gmx.de writes: On Fri, 02 May 2014 10:46:09 +, David Kastrup wrote: ... What the gibbins? I don't even use git pull. I do, but I watch for the fast-forward message and undo as appropriate. I use git fetch, and then, depending on my needs, I rebase or merge. I

Re: Pull is Evil

2014-05-02 Thread Andreas Krey
On Thu, 01 May 2014 16:21:42 +, Marc Branchaud wrote: ... But these days there's hardly any risk to using a detached HEAD. Plus nowadays I think it's commonly accepted that using topic branches is a git best practice. The notion of doing work on a generically-named branch like maint

Re: Pull is Evil

2014-05-02 Thread Andreas Krey
On Wed, 30 Apr 2014 13:01:49 +, Junio C Hamano wrote: ... I didn't mean replace 'pull' with 'update' everywhere. I meant Introduce 'update' that lets integrate your history into that from the remote, which is to integrate in a direction opposite from how 'pull' does. That still doesn't

Re: Pull is Evil

2014-05-02 Thread Felipe Contreras
Andreas Krey wrote: My personal beef with 'git pull' is still that sometimes (namely in the 'git pull git push' sequence) it should reverse the order of the parents in the merge commit, so that *my* commits look like an integrated topic branch, instead of the former mainline. I haven't

Re: Pull is Evil

2014-05-02 Thread David Kastrup
Andreas Krey a.k...@gmx.de writes: On Wed, 30 Apr 2014 13:01:49 +, Junio C Hamano wrote: ... I didn't mean replace 'pull' with 'update' everywhere. I meant Introduce 'update' that lets integrate your history into that from the remote, which is to integrate in a direction opposite from

Re: Pull is Evil

2014-05-02 Thread W. Trevor King
On Thu, May 01, 2014 at 08:14:29PM -0500, Felipe Contreras wrote: W. Trevor King wrote: My proposed --prompt behavior is for folks who think “I often run this command without thinking it through all the way. I'm also not used to reading Git's output and using 'reset --hard' with the

Re: Pull is Evil

2014-05-02 Thread Felipe Contreras
W. Trevor King wrote: On Thu, May 01, 2014 at 08:14:29PM -0500, Felipe Contreras wrote: W. Trevor King wrote: My proposed --prompt behavior is for folks who think “I often run this command without thinking it through all the way. I'm also not used to reading Git's output and using

Re: Pull is Evil

2014-05-02 Thread W. Trevor King
On Fri, May 02, 2014 at 01:55:36PM -0500, Felipe Contreras wrote: W. Trevor King wrote: On Thu, May 01, 2014 at 08:14:29PM -0500, Felipe Contreras wrote: W. Trevor King wrote: My proposed --prompt behavior is for folks who think “I often run this command without thinking it through

Re: Pull is Evil

2014-05-02 Thread David Kastrup
W. Trevor King wk...@tremily.us writes: On Fri, May 02, 2014 at 01:55:36PM -0500, Felipe Contreras wrote: W. Trevor King wrote: On Thu, May 01, 2014 at 08:14:29PM -0500, Felipe Contreras wrote: W. Trevor King wrote: My proposed --prompt behavior is for folks who think “I often run

Re: Pull is Evil

2014-05-02 Thread Felipe Contreras
W. Trevor King wrote: On Fri, May 02, 2014 at 01:55:36PM -0500, Felipe Contreras wrote: W. Trevor King wrote: On Thu, May 01, 2014 at 08:14:29PM -0500, Felipe Contreras wrote: W. Trevor King wrote: My proposed --prompt behavior is for folks who think “I often run this command

Re: Pull is Evil

2014-05-02 Thread Junio C Hamano
Marc Branchaud marcn...@xiplink.com writes: I may be mistaken, but I think git pull evolved to try to address the detached-HEAD risk (at least in part). You are totally mistaken. git pull was part of the things to make git usable by Linus before 1.0 release, and matches the integrator

Re: Pull is Evil

2014-05-02 Thread W. Trevor King
On Fri, May 02, 2014 at 02:13:25PM -0500, Felipe Contreras wrote: W. Trevor King wrote [1]: On Fri, May 02, 2014 at 01:55:36PM -0500, Felipe Contreras wrote: W. Trevor King wrote: On Thu, May 01, 2014 at 08:14:29PM -0500, Felipe Contreras wrote: W. Trevor King wrote: My

Re: Pull is Evil

2014-05-02 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Marc Branchaud marcn...@xiplink.com writes: I may be mistaken, but I think git pull evolved to try to address the detached-HEAD risk (at least in part). You are totally mistaken. git pull was part of the things to make git usable by Linus before

Re: Pull is Evil

2014-05-02 Thread Felipe Contreras
W. Trevor King wrote: On Fri, May 02, 2014 at 02:13:25PM -0500, Felipe Contreras wrote: It would matter almost exactly zero. Some folks have explicit merge policies, and deciding how much that matters is probably best left up to the projects themselves and not decided in Git code. Let's

Re: Pull is Evil

2014-05-02 Thread W. Trevor King
On Fri, May 02, 2014 at 03:34:34PM -0500, Felipe Contreras wrote: W. Trevor King wrote: On Fri, May 02, 2014 at 02:13:25PM -0500, Felipe Contreras wrote: It would matter almost exactly zero. Some folks have explicit merge policies, and deciding how much that matters is probably best

Re: Pull is Evil

2014-05-02 Thread Felipe Contreras
W. Trevor King wrote: On Fri, May 02, 2014 at 03:34:34PM -0500, Felipe Contreras wrote: W. Trevor King wrote: On Fri, May 02, 2014 at 02:13:25PM -0500, Felipe Contreras wrote: It would matter almost exactly zero. Some folks have explicit merge policies, and deciding how much

pull.prompt or other way to slow/disable 'git pull' (was: Pull is Evil)

2014-05-02 Thread W. Trevor King
On Fri, May 02, 2014 at 04:18:57PM -0500, Felipe Contreras wrote: W. Trevor King wrote: On Fri, May 02, 2014 at 03:34:34PM -0500, Felipe Contreras wrote: W. Trevor King wrote: On Fri, May 02, 2014 at 02:13:25PM -0500, Felipe Contreras wrote: It would matter almost exactly zero.

RE: pull.prompt or other way to slow/disable 'git pull' (was: Pull is Evil)

2014-05-02 Thread Felipe Contreras
W. Trevor King wrote: I've renamed this sub-thread (which started around $gmane/247835) to avoid potential confusion/dilution. Thanks. The goal is to train them to do: % git config --global pull.mode none % git fetch % git merge --no-ff Sticking to my 'no-ff' topic

Re: Pull is Evil

2014-05-01 Thread brian m. carlson
On Wed, Apr 30, 2014 at 05:25:59PM -0500, Felipe Contreras wrote: Marc Branchaud wrote: On 14-04-30 04:14 PM, Felipe Contreras wrote: What is wrong when `git pull` merges a fast-forward? Nothing. Everything. It depends. It depends on what? I don't see how a fast-forward `git pull`

Re: Pull is Evil

2014-05-01 Thread Felipe Contreras
brian m. carlson wrote: On Wed, Apr 30, 2014 at 05:25:59PM -0500, Felipe Contreras wrote: Marc Branchaud wrote: On 14-04-30 04:14 PM, Felipe Contreras wrote: What is wrong when `git pull` merges a fast-forward? Nothing. Everything. It depends. It depends on what? I don't

Re: Pull is Evil

2014-05-01 Thread Marc Branchaud
On 14-05-01 05:46 AM, brian m. carlson wrote: On Wed, Apr 30, 2014 at 05:25:59PM -0500, Felipe Contreras wrote: Marc Branchaud wrote: On 14-04-30 04:14 PM, Felipe Contreras wrote: What is wrong when `git pull` merges a fast-forward? Nothing. Everything. It depends. It depends on what? I

Re: Pull is Evil

2014-05-01 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: brian m. carlson wrote: .. At work, we have a workflow where we merge topic branches as non-fast-forward, so that we have a record of the history (including who reviewed the code), but when we want to just update our local branches, we

Re: [git] Re: Pull is Evil

2014-05-01 Thread W. Trevor King
On Thu, May 01, 2014 at 11:20:44AM -0400, Marc Branchaud wrote: On 14-05-01 05:46 AM, brian m. carlson wrote: git checkout maintenance-branch # Update our maintenance branch to the latest from the main repo. git pull --ff-only git pull --no-ff developer-remote topic-branch git

Re: [git] Re: Pull is Evil

2014-05-01 Thread Marc Branchaud
On 14-05-01 01:56 PM, W. Trevor King wrote: On Thu, May 01, 2014 at 11:20:44AM -0400, Marc Branchaud wrote: On 14-05-01 05:46 AM, brian m. carlson wrote: git checkout maintenance-branch # Update our maintenance branch to the latest from the main repo. git pull --ff-only git pull

Re: Pull is Evil

2014-05-01 Thread Felipe Contreras
Junio C Hamano wrote: Felipe Contreras felipe.contre...@gmail.com writes: brian m. carlson wrote: .. At work, we have a workflow where we merge topic branches as non-fast-forward, so that we have a record of the history (including who reviewed the code), but when we want to just

Re: Pull is Evil

2014-05-01 Thread Felipe Contreras
Marc Branchaud wrote: What's more, it seems to me that the only real advantage git pull provides here is a less typing compared to the non-pull equivalent: git fetch main-repo git checkout main-repo/maintenance-branch git fetch developer-remote git merge --no-ff

Re: Pull is Evil

2014-05-01 Thread Felipe Contreras
brian m. carlson wrote: At work, we have a workflow where we merge topic branches as non-fast-forward, so that we have a record of the history (including who reviewed the code), but when we want to just update our local branches, we always want fast-forward: git checkout

Re: Pull is Evil

2014-05-01 Thread Marc Branchaud
On 14-05-01 03:22 PM, Felipe Contreras wrote: Marc Branchaud wrote: What's more, it seems to me that the only real advantage git pull provides here is a less typing compared to the non-pull equivalent: git fetch main-repo git checkout main-repo/maintenance-branch git fetch

Re: [git] Re: Pull is Evil

2014-05-01 Thread W. Trevor King
On Thu, May 01, 2014 at 02:16:50PM -0500, Felipe Contreras wrote: The only problem would be when it's not desirable, however, that's a problem of the user's ignorance, and the failure of the project's policity to communicate clearly to him that he should be running `git merge --no-ff`. There's

Re: [git] Re: Pull is Evil

2014-05-01 Thread W. Trevor King
On Thu, May 01, 2014 at 02:04:33PM -0400, Marc Branchaud wrote: On 14-05-01 01:56 PM, W. Trevor King wrote: On Thu, May 01, 2014 at 11:20:44AM -0400, Marc Branchaud wrote: On 14-05-01 05:46 AM, brian m. carlson wrote: git checkout maintenance-branch # Update our maintenance branch to

Re: [git] Re: Pull is Evil

2014-05-01 Thread W. Trevor King
On Thu, May 01, 2014 at 12:48:46PM -0700, W. Trevor King wrote: My interest in all of the proposed git-pull-training-wheel patches is that they give users a way to set a finger-breaking configuration that makes pull a no-op (or slows it down, like 'rm -i …'). Then folks who compulsively run

Re: [git] Re: Pull is Evil

2014-05-01 Thread Marc Branchaud
On 14-05-01 02:30 PM, W. Trevor King wrote: I find a local branch useful to mark the amount of the upstream branch that I've reviewed. The reflog helps a bit, but I may go several fetches between reviews. For newbies, I recommend avoiding detached HEADs, where possible, so they don't have

Re: Pull is Evil

2014-05-01 Thread Philip Oakley
From: Marc Branchaud marcn...@xiplink.com Sent: Wednesday, April 30, 2014 8:45 PM [...] I don't think we'll ever be able to create a One Git Pull To Rule Them All. At best we'll end up with something with enough knobs that it could be configured to work in most workflows (I think we're actually

Re: Pull is Evil

2014-05-01 Thread Philip Oakley
Oops.. From: Philip Oakley philipoak...@iee.org From: Marc Branchaud marcn...@xiplink.com Sent: Wednesday, April 30, 2014 8:45 PM [...] I don't think we'll ever be able to create a One Git Pull To Rule Them All. At best we'll end up with something with enough knobs that it could be configured

Re: [git] Re: Pull is Evil

2014-05-01 Thread Felipe Contreras
W. Trevor King wrote: On Thu, May 01, 2014 at 02:16:50PM -0500, Felipe Contreras wrote: The only problem would be when it's not desirable, however, that's a problem of the user's ignorance, and the failure of the project's policity to communicate clearly to him that he should be running

Re: [git] Re: Pull is Evil

2014-05-01 Thread Felipe Contreras
W. Trevor King wrote: On Thu, May 01, 2014 at 12:48:46PM -0700, W. Trevor King wrote: My interest in all of the proposed git-pull-training-wheel patches is that they give users a way to set a finger-breaking configuration that makes pull a no-op (or slows it down, like 'rm -i …'). Then

Re: [git] Re: Pull is Evil

2014-05-01 Thread Felipe Contreras
Marc Branchaud wrote: So what benefit does git pull provide? The same that 'hg update' provies: a way for the user fetch/pull the latest changes and check them out into the working directory. -- Felipe Contreras -- To unsubscribe from this list: send the line unsubscribe git in the body of a

Re: Pull is Evil

2014-05-01 Thread Felipe Contreras
Philip Oakley wrote: The point that there is no easy solution to an updated default pull action that is right for everybody, straight out of the box, I think is now fairly obvious, a summarised by Marc. I certainly avoid pull. Yes, I avoid it too, and quite a lot of people. My 'solution',

Re: [git] Re: Pull is Evil

2014-05-01 Thread brian m. carlson
On Thu, May 01, 2014 at 02:04:33PM -0400, Marc Branchaud wrote: On 14-05-01 01:56 PM, W. Trevor King wrote: On Thu, May 01, 2014 at 11:20:44AM -0400, Marc Branchaud wrote: On 14-05-01 05:46 AM, brian m. carlson wrote: git checkout maintenance-branch # Update our maintenance branch to

Re: [git] Re: Pull is Evil

2014-05-01 Thread Felipe Contreras
brian m. carlson wrote: I just used this to illustrate the fact that there isn't actually one completely correct case with pull. Nobody is arguing otherwise. The argument is that `git pull` by default can be made more sensible. -- Felipe Contreras -- To unsubscribe from this list: send the

Re: Pull is Evil

2014-05-01 Thread W. Trevor King
On Thu, May 01, 2014 at 06:34:06PM -0500, Felipe Contreras wrote: Nobody ever complained about somebody doing a fast-forward by mistake. Unless they fast-forward merged a feature branch into master, but the project prefers explicitly-merged feature branches with a cover-letter explaination in

Re: [git] Re: Pull is Evil

2014-05-01 Thread W. Trevor King
On Thu, May 01, 2014 at 06:25:16PM -0500, Felipe Contreras wrote: W. Trevor King wrote: On Thu, May 01, 2014 at 12:48:46PM -0700, W. Trevor King wrote: My interest in all of the proposed git-pull-training-wheel patches is that they give users a way to set a finger-breaking configuration

Re: Pull is Evil

2014-05-01 Thread Felipe Contreras
W. Trevor King wrote: On Thu, May 01, 2014 at 06:34:06PM -0500, Felipe Contreras wrote: Nobody ever complained about somebody doing a fast-forward by mistake. Unless they fast-forward merged a feature branch into master, but the project prefers explicitly-merged feature branches with a

Re: [git] Re: Pull is Evil

2014-05-01 Thread Felipe Contreras
W. Trevor King wrote: On Thu, May 01, 2014 at 06:25:16PM -0500, Felipe Contreras wrote: W. Trevor King wrote: On Thu, May 01, 2014 at 12:48:46PM -0700, W. Trevor King wrote: My interest in all of the proposed git-pull-training-wheel patches is that they give users a way to set a

Re: Pull is Evil

2014-05-01 Thread W. Trevor King
On Thu, May 01, 2014 at 07:37:04PM -0500, Felipe Contreras wrote: W. Trevor King wrote: On Thu, May 01, 2014 at 06:25:16PM -0500, Felipe Contreras wrote: W. Trevor King wrote: Fast-forward $current_branch by $count commits to $repository $refpec? Why would anyone say 'no' to

Re: Pull is Evil

2014-05-01 Thread Felipe Contreras
W. Trevor King wrote: On Thu, May 01, 2014 at 07:37:04PM -0500, Felipe Contreras wrote: If that was the case the user wouls have run `git merge --no-ff`. Only expereinced users would answer 'no'. Folks who are setting any ff options don't need any of these training wheels. Indeed. My

Pull is Evil (was: Re: A failing attempt to use Git in a centralized environment)

2014-04-30 Thread Marc Branchaud
On 14-04-28 02:41 PM, Junio C Hamano wrote: Marat Radchenko ma...@slonopotamus.org writes: Problem #1: TortoiseGit GUI windows for common tasks have a heck lots of controls that a common Git user will never need. Do people around TortoiseGit lurk on this list? Otherwise this may not be

Re: Pull is Evil (was: Re: A failing attempt to use Git in a centralized environment)

2014-04-30 Thread Junio C Hamano
Marc Branchaud marcn...@xiplink.com writes: But I'm definitely biased because I think pull is pretty much broken: * New users are encouraged to use pull, but all too often the default fetch-then-merge behaviour doesn't match their expectations and they end up starting threads like this one

RE: Pull is Evil (was: Re: A failing attempt to use Git in a centralized environment)

2014-04-30 Thread Felipe Contreras
Marc Branchaud wrote: But I'm definitely biased because I think pull is pretty much broken: * New users are encouraged to use pull, but all too often the default fetch-then-merge behaviour doesn't match their expectations and they end up starting threads like this one on the mailing list.

Re: Pull is Evil

2014-04-30 Thread Matthieu Moy
Felipe Contreras felipe.contre...@gmail.com writes: Marc Branchaud wrote: But I'm definitely biased because I think pull is pretty much broken: * New users are encouraged to use pull, but all too often the default fetch-then-merge behaviour doesn't match their expectations and they end up

Re: Pull is Evil

2014-04-30 Thread Felipe Contreras
Matthieu Moy wrote: Felipe Contreras felipe.contre...@gmail.com writes: Marc Branchaud wrote: But I'm definitely biased because I think pull is pretty much broken: * New users are encouraged to use pull, but all too often the default fetch-then-merge behaviour doesn't match their

Re: Pull is Evil

2014-04-30 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: Matthieu Moy wrote: Felipe Contreras felipe.contre...@gmail.com writes: ... Yes, this has been discussed many times in the past, and everyone agrees the default behavior is not correct. You definitely have a strange notion of everyone.

Re: Pull is Evil

2014-04-30 Thread Felipe Contreras
Junio C Hamano wrote: Felipe Contreras felipe.contre...@gmail.com writes: Matthieu Moy wrote: Felipe Contreras felipe.contre...@gmail.com writes: ... Yes, this has been discussed many times in the past, and everyone agrees the default behavior is not correct. You definitely have

Re: Pull is Evil

2014-04-30 Thread Marc Branchaud
On 14-04-30 10:55 AM, Junio C Hamano wrote: Marc Branchaud marcn...@xiplink.com writes: But I'm definitely biased because I think pull is pretty much broken: * New users are encouraged to use pull, but all too often the default fetch-then-merge behaviour doesn't match their expectations and

Re: Pull is Evil

2014-04-30 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: Junio C Hamano wrote: Felipe Contreras felipe.contre...@gmail.com writes: Matthieu Moy wrote: Felipe Contreras felipe.contre...@gmail.com writes: ... Yes, this has been discussed many times in the past, and everyone agrees the

Re: Pull is Evil

2014-04-30 Thread Junio C Hamano
Marc Branchaud marcn...@xiplink.com writes: On 14-04-30 10:55 AM, Junio C Hamano wrote: Marc Branchaud marcn...@xiplink.com writes: ... Anyway, rather than ranting on I'll just suggest that there's not enough commonality between the ways people use git to make it worthwhile trying to teach

Re: Pull is Evil

2014-04-30 Thread Jonathan Nieder
Marc Branchaud wrote: All that said, I don't object to any attempts at improving the command either. But I also don't see any kind of improvement that would lead me to start using git pull let alone recommending it to new users. If git pull starts using --ff-only by default then I might

Re: Pull is Evil

2014-04-30 Thread Felipe Contreras
Junio C Hamano wrote: Felipe Contreras felipe.contre...@gmail.com writes: Junio C Hamano wrote: Felipe Contreras felipe.contre...@gmail.com writes: Matthieu Moy wrote: Felipe Contreras felipe.contre...@gmail.com writes: ... Yes, this has been discussed many times in the past, and

Re: Pull is Evil

2014-04-30 Thread Felipe Contreras
Marc Branchaud wrote: All that said, I don't object to any attempts at improving the command either. But I also don't see any kind of improvement that would lead me to start using git pull let alone recommending it to new users. What is wrong when `git pull` merges a fast-forward? The

Re: Pull is Evil

2014-04-30 Thread Marc Branchaud
On 14-04-30 04:01 PM, Junio C Hamano wrote: Maybe I was unclear. I didn't mean replace 'pull' with 'update' everywhere. I meant Introduce 'update' that lets integrate your history into that from the remote, which is to integrate in a direction opposite from how 'pull' does. That's

Re: Pull is Evil

2014-04-30 Thread Marc Branchaud
On 14-04-30 04:14 PM, Felipe Contreras wrote: Marc Branchaud wrote: All that said, I don't object to any attempts at improving the command either. But I also don't see any kind of improvement that would lead me to start using git pull let alone recommending it to new users. What is wrong

Re: Pull is Evil

2014-04-30 Thread Felipe Contreras
Marc Branchaud wrote: On 14-04-30 04:14 PM, Felipe Contreras wrote: Marc Branchaud wrote: All that said, I don't object to any attempts at improving the command either. But I also don't see any kind of improvement that would lead me to start using git pull let alone recommending it to