datalad / git-annex

A non-official clone of git-annex established for DataLad purposes. No PRs will be merged, but could be used to test perspective git-annex patches. Official git-annex repository: https://git.kitenet.net/index.cgi/git-annex.git/
16 stars 3 forks source link

invoke pull with recommended configuration #120

Closed yarikoptic closed 2 years ago

yarikoptic commented 2 years ago

ATM cron emails from smaug are full of

2022-04-04 00:00:01 [INFO    ] testannex: Updating client config repo ...                                                                                                                                            
hint: Pulling without specifying how to reconcile divergent branches is                                                                                                                                              
hint: discouraged. You can squelch this message by running one of the following                                                                                                                                      
hint: commands sometime before your next pull:                                                                                                                                                                       
hint:                                                                                                                                                                                                                
hint:   git config pull.rebase false  # merge (the default strategy)                                                                                                                                                 
hint:   git config pull.rebase true   # rebase                                                                                                                                                                       
hint:   git config pull.ff only       # fast-forward only                                                                                                                                                            
hint:                                                                                                                                                                                                                
hint: You can replace "git config" with "git config --global" to set a default                                                                                                                                       
hint: preference for all repositories. You can also pass --rebase, --no-rebase,                                                                                                                                      
hint: or --ff-only on the command line to override the configured default per                                                                                                                                        
hint: invocation.                                                                                                                                                                                                    

although it might be desired to just inform client users about preferable configuration, I wonder if either we should overload $HOME while running client tests with some custom .gitconfig or just provide desired config via -c in git pull invocation of the client script.

jwodder commented 2 years ago

@yarikoptic Exactly which configuration is recommended here?

yarikoptic commented 2 years ago

for you to decide but I think -c pull.rebase=false (i.e. merge) unless we want to ensure fast forward