Uploaded image for project: 'Sourcetree For Mac'
  1. Sourcetree For Mac
  2. SRCTREE-2313

Allow empty email on commit action when there is no username or email set

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • 1.9.2
    • None
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      When there is no username or email set for the repository or global config, SourceTree 1.9.1 force user to have non-empty email field in the commit dialog.

      Is it possible to relax this requirement?

          Form Name

            [SRCTREE-2313] Allow empty email on commit action when there is no username or email set

            OK, so the mandatory comment about the email address was about the on-demand pop-up when user details are not supplied already. I've taken that rule out too while allowing this.

            Steve Streeting (Inactive) added a comment - OK, so the mandatory comment about the email address was about the on-demand pop-up when user details are not supplied already. I've taken that rule out too while allowing this.

            FYI it turns out if you force the email to be blank in git's config, it still adds an email address generated from your user / machine ID, for example "steve@Stevens-MacBook-Pro.local".

            The only way to leave the email completely blank is to specify it explicitly when you commit, so if you really want a blank email you should click on the user avatar and use the 'Use alternate author" option. This is saved between commits while SourceTree is open.

            Steve Streeting (Inactive) added a comment - FYI it turns out if you force the email to be blank in git's config, it still adds an email address generated from your user / machine ID, for example "steve@Stevens-MacBook-Pro.local". The only way to leave the email completely blank is to specify it explicitly when you commit, so if you really want a blank email you should click on the user avatar and use the 'Use alternate author" option. This is saved between commits while SourceTree is open.

            Full details:

            • He's editing the user details via repo settings (actually on the on-demand pop-up but it's the same)
            • He acknowledges that the behaviour of these elements hasn't changed in 1.8. If you blank out the email address field, these prefs pages only save the completed fields, meaning that because git has separate fields for name & email address, the default setting from the global settings will 'leak' through to the repository
            • But in 1.8 he used to just edit the author field before committing. You can in fact still do the equivalent in 1.9 by clicking the avatar and completing the details with no email address (the email is not mandatory), but it's an extra click.

            So the issue is not that email field is mandatory, or that fundamental behaviour has actually changed since 1.8, it's that 1.9 makes it slightly harder to delete out the email address on-demand in the commit pane.

            The overall fix is that when you leave the email address blank, we should save a blank value for user.email in the git config instead of omitting the setting, because git inherits the missing one from the global settings. This has been the same since SourceTree's inception but we can address it now.

            Steve Streeting (Inactive) added a comment - Full details: He's editing the user details via repo settings (actually on the on-demand pop-up but it's the same) He acknowledges that the behaviour of these elements hasn't changed in 1.8. If you blank out the email address field, these prefs pages only save the completed fields, meaning that because git has separate fields for name & email address, the default setting from the global settings will 'leak' through to the repository But in 1.8 he used to just edit the author field before committing. You can in fact still do the equivalent in 1.9 by clicking the avatar and completing the details with no email address (the email is not mandatory), but it's an extra click. So the issue is not that email field is mandatory, or that fundamental behaviour has actually changed since 1.8, it's that 1.9 makes it slightly harder to delete out the email address on-demand in the commit pane. The overall fix is that when you leave the email address blank, we should save a blank value for user.email in the git config instead of omitting the setting, because git inherits the missing one from the global settings. This has been the same since SourceTree's inception but we can address it now.

            Waiting for detail on exactly what it expected here, since you can use a blank email on the new 1.9 feature of popping up the author to change temporarily, and the user details in the global preferences and repo settings are exactly the same as 1.8. So we need to know what the user was doing before that's not supported now, because it looks exactly the same.

            Steve Streeting (Inactive) added a comment - Waiting for detail on exactly what it expected here, since you can use a blank email on the new 1.9 feature of popping up the author to change temporarily, and the user details in the global preferences and repo settings are exactly the same as 1.8. So we need to know what the user was doing before that's not supported now, because it looks exactly the same.

              Unassigned Unassigned
              klfoong Foong (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: