0

Running tf scorch behaves as I'd expect. However, running tf scorch /? says the syntax for this command should be tf vc scorch. Looking elsewhere on SO I've found this latter syntax used: What does the command tf vc scorch do?.

Does the vc argument have any impact / is there any good reason to include or exclude it?

JohnLBevan
  • 22,735
  • 13
  • 96
  • 178
  • 1
    It would appear to be an disambiguator command, for when a `tf vc foo` and `tf git foo` collide. – CodeCaster Dec 19 '17 at 16:09
  • Perfect; thanks @CodeCaster – JohnLBevan Dec 19 '17 at 16:11
  • @CodeCaster You can post your comment as the answer, then JohnLBevan can accept it as an answer. This can be beneficial to other community members reading this thread. – Andy Li-MSFT Dec 20 '17 at 07:31
  • @Andy yeah I know how answers work, but it was a guess. If you can confirm it to be correct, preferably with a source, I'd be happy to post it as an answer. – CodeCaster Dec 20 '17 at 07:55
  • FYI: Added comment on the official doc site asking that documentation for `VC` be added: https://learn.microsoft.com/en-us/vsts/tfvc/use-team-foundation-version-control-commands. Hopefully we can update this question with an official answer once that appears. Thanks again guys. – JohnLBevan Dec 20 '17 at 14:54

1 Answers1

2

Just run tf.exe /? and it will tell you:

Microsoft (R) TF - Team Foundation Version Control Tool, Version 15.127.27130.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Type tf vc help for a list of supported Version Control commands.
Type tf git help for a list of supported Git commands.
Type tf settings help for a list of supported server settings commands.

So there are a number of TFVC commands, a number of Git commands and a couple of settings commands. Each of these categories already share the help, permission and view command, these require disambiguation.

By including vc or git you're explicitly telling the command line which subcommand you want to use. For backwards compatibility, some commands are automatically routed to vc without specifying the top level differentiator.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • 1
    One note: older versions of TF do not recognise the `VC` parameter. I'm not sure which version this was introduced in; certainly 2010 SP1 does not recognise it, 2013 SP1 does. – JohnLBevan Jan 02 '18 at 14:48