question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow setting rename threshold (-M) on diff-tree

See original GitHub issue

Hello,

In GitRepository the diff-tree command is used to find changed files before TFS checkin(/tool, rcheckin etc.) or shelve. It passes -M (alias for --find-renames) but it doesn’t pass a numeric threshold parameter so this value uses a default of 50%.

So the problem is that if I rename a file and change it significantly, it’s detected as a delete and add (even if git mv was used). I’d like to add both a config setting (maybe git-tfs.rename-threshold?) and command-line option (to CheckinOptions) to allow setting this to a different numeric value.

This looks like a pretty straightforward change and I could probably create a pull request for this. Is it something the Git TFS team would allow to be added?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
siprbaumcommented, Apr 6, 2022

We are trying to clean up old/stale issues. As this issue hasn’t seen any updates (or progress with pull requests) in quite a while, the issue will be closed. In case further information is provided, we can revisit that and reopen the issue again.

0reactions
irontobycommented, Jun 4, 2015

Sounds good, will do

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does git diff-tree show always show rename as add ...
I'm expecting git diff-tree HEAD after each commit to show one R (rename) status but I keep getting two: an A and a...
Read more >
Git - git-diff-tree Documentation
When used with -M, a totally-rewritten file is also considered as the source of a rename (usually -M only considers a file that...
Read more >
Make rename/copy thresholds in git diff configurable
I'm working on a follow-on change to allow stash-config.properties to be updated without restarting Stash. However, that change will not be ...
Read more >
git-diff-tree - man pages section 1: User Commands
Name. git-diff-tree - Compares the content and mode of blobs found via two tree objects · Synopsis. git diff-tree [--stdin] [-m] [-s] [-v]...
Read more >
t9814-git-p4-rename.sh.txt
Rename the new file again adding an extra line, configure a big threshold in # detectRenames and confirm that rename is not detected...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found