> Le 16 juil. 2025 à 11:17, Junio C Hamano <gitster@xxxxxxxxx> a écrit : > > Johannes Sixt <j6t@xxxxxxxx> writes: > >> Instead of this complexity, it is most likely a lot easier to fix the >> origin of the misconception that `pull.autostash` is the correct >> configuration. After all, it isn't even mentioned in the git-config nor >> the git-pull man page. > > git_pull_config() does pay attention to "rebase.autostash". > > Either it is a bug for the code to do so, or it is a bug that the > documentation does not talk about it. > > The reason why I think "git pull" that pays attention to > rebase.autostash is a bug is because the user is more likely to be > much more familiar with both branches involved and more likely to be > prepared to deal with conflicts potentially created by autostashing > behaviour when making a private merge or rebase of local branches, > than when pulling from other repositories. So those who show > willingness to accept the responsibility of having to resolve > conflicts that arise when popping autostashed changes by setting > rebase.autostash may not want to be cavalier to the same degree when > running "git pull". git_pull_config() that pays attention to > "rebase.autostash" breaks that expectation. On the other hand, a pull that rebases is (conceptually) a fetch followed by a rebase, and there is a lot of description and teaching of pull as fetch+merge. Breaking that expectation is also unnatural. I would consider it far more inconsistent if pulls that rebase don’t honor rebase configuration. So put me in the camp that pull should probably respect merge.autostash, too. (I don’t have any opinion about pull.autostash, which seems reasonable on the surface.) > > There is another curiosity. git_pull_config() does not pay > attention to "merge.autostash", which seems inconsistent. > > If I did not have any existing users, I would actually vote to teach > git_pull_config() stop paying attention to "rebase.autostash", but > we do not live in an ideal world. Perhaps rectify this at Git 3.0?