Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×In the diff views on the Stash web interface, there is an option to ignore whitespace. This is off by default and has to be switched on every time one visits the web interface.(*)
Is it possible to change the global default setting from off to on in the server's config file or somewhere else?
(*) Feature suggestion: store this in a cookie or the user profile so it persists for every user.
There's no setting for changing the default or persisting it longer, unfortunately. The setting is persisted, but only for the life of a browser tab (and any tabs opened from it).
This limited persistence is by design, but I suspect we'll eventually end up extending the persistence to the whole browser indefinitely (as you are not the first to want it). You can track a related issue for side-by-side diff preference here https://jira.atlassian.com/browse/STASH-4693
UPDATE: If you look at that ticket, we've switch to storing this per-browser. So you won't have to update it when returning to Stash Dev in the same browser, but you will have to update it when switching browser
Hi @Adam. I saw your last "UPDATE" but it does not seem to persist the "Ignore whitespace by default" option. As soon as I go to a new page and compare a different diff, the option reverts to default and I have to enabled the "ignore" again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There could be a few things going on:
1. You've disabled localStorage, so that we can't store the option between page loads.
2. Your localStorage is full. Usually this won't be because of Bitbucket Server, but localStorage space is shared across a whole domain, so any other pages/apps that run on the same domain as Bitbucket Server could be filling it up.
3. It's been long enough since the last time you viewed a PR that we cleaned up the stored option preferences (we do this to conserve space in localStorage). The timeout is 28-56 days (we run every 28 days and remove anything older than 28 days).
4. You're on an old version of Stash.
5. Some other error is occurring in your JS that is stopping us from loading the options.
Don't hesitate to open a support case and we can help you debug. It would be useful to see your JS console and whether there are any errors displayed there to see if that is part of the problem.
Cheers,
Adam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is just the Bitbucket cloud server as far as I know.
Steps:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah right! This question was originally about Bitbucket Server, which is a different codebase with sometimes different behaviors. Sorry for the confusion there. I think our redesign of these forums made the cloud/server distinction less apparent.
Bitbucket Cloud/bitbucket.org unfortunately hasn't implemented sticky options yet. So what you're seeing is expected. https://bitbucket.org/site/master/issues/13309/user-setting-to-always-ignore-whitespace looks to be a good issue to track for that. They're putting a lot of effort into improving their PR and diff experience, so I wouldn't be too surprised if they incorporated this if you make your voice heard there.
Cheers!
Adam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.