Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to avoid replicating TFS merges during fetch #582

Closed
wants to merge 2 commits into from

Conversation

ivan-danilov
Copy link
Member

Sometimes TFS guys do merge changesets apparently at random, while in git merge-commit has meaning that all commits in the parent branches are merged. Thus preserving all of the merges sometimes do more harm than good. New setting is tfs.replicateTfsMerges and could be "0" or "1". This setting is turned on by default (i.e. if there's no such value in the git config file - it treats as "1") and is global (not tied to particular tfs remote/branch - mostly because on the per-tfs-remote basis it can do much confusion if configured differently in different places.

Sometimes TFS guys do merge changesets apparently at random, while in git merge-commit has meaning that _all_ commits in the parent branches are merged. Thus preserving all of the merges sometimes do more harm than good. New setting is tfs.replicateTfsMerges and could be "0" or "1". This setting is turned on by default (i.e. if there's no such value in the git config file - it treats as "1") and is global (not tied to particular tfs remote/branch - mostly because on the per-tfs-remote basis it can do much confusion if configured differently in different places.
@@ -27,6 +27,7 @@ public OptionSet OptionSet
{ "ignorecase=", "Ignore case in file paths (default: system default)",
v => GitInitIgnoreCase = ValidateIgnoreCaseValue(v) },
{"bare", "Clone the TFS repository in a bare git repository", v => IsBare = v != null},
{"m|replicateTfsMerges", "Mark TFS merge changesets as merge commits in git", v => ReplicateTfsMerges = v == null || v == "1"},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch changes the default from ReplicateTfsMerges = true to ReplicateTfsMerges = false. @ivan-danilov, @pmiossec - what do you think the default behavior should be?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer default value to ReplicateTfsMerges = true...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would have been my guess. If true is a reasonable default, let's rename the option --ignore-tfs-merges or --no-tfs-merges.

@spraints
Copy link
Member

🤘 I like this.

@pmiossec
Copy link
Member

Also, there is already the same option introduced in #480 ( See pmiossec@f06cba9?w=1 )

@ivan-danilov
Copy link
Member Author

@pmiossec huh, then probably your changes are better suited here ...when they'd be merged in at least :)
Then there's no need to keep this PR open. I'll use binaries from this branch until yours will be merged to master (judging from the sheer size of it - I believe it'd bump at least minor version immediately then)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants