Commit Graph

27 Commits

Author SHA1 Message Date
Taylor Blau
49bdc2b1b0 commands/{un,}track: local-prefix agnostic comparison
This patch use the trimCurrentPrefix utility introduced in the previous
patch to make all .gitattributes comparisons agnostic to the
"current-prefix" of "./" or ".\".

Since we treat both sides of the comparison as having passed through
"trimCurrentPrefix", we harden ourselves against "legacy"-style
.gitattributes patterns containing prefixes, and "modern"-style ones
lacking prefixes.

That means that both combinations of "git lfs untrack ./a.dat" and "git
lfs untrack a.dat" will remove both of these lines from a .gittatributes
file:

  ./a.dat filter=lfs ...
  a.dat filter=lfs ...

Signed-off-by: Taylor Blau <me@ttaylorr.com>
2018-04-05 10:51:26 -07:00
Taylor Blau
2409b3e99f commands/{un,}track: rename conversion functions 2018-03-20 20:02:52 -04:00
rick olson
97fc2ed06b remove reliance on global config filesystem vars 2017-10-18 18:09:33 -06:00
rick olson
57fc68e3cc lfs: move hook installation helpers to commands pkg 2017-10-18 16:58:20 -06:00
Taylor Blau
b61a8d4524 commands/untrack: quote pattern in output of untrack command 2017-03-24 11:13:11 -06:00
Taylor Blau
b94fda170d commands/untrack: scan .gitattributes against escaped pattern 2017-03-23 17:19:00 -06:00
risk danger olson
bba8f3b876 update package imports 2016-11-15 10:01:18 -07:00
risk danger olson
093e6d49a2 update all command setup to use RegisterCommand 2016-09-01 08:46:26 -06:00
Taylor Blau
0f63130c23 commands, lfs: resolve localstorage in PreRun, not init 2016-08-22 16:21:04 -06:00
risk danger olson
98af5944e1 build commands outside of package init() 2016-08-10 09:33:25 -06:00
Taylor Blau
4593d0a641 vendor: vendor dependencies in vendor/ using Glide
- script/vendor received an update in order to work with Glide
- import paths have been rewritten to work with GO15VENDOREXPERIMENT
2016-05-23 12:10:35 -06:00
Steve Streeting
c4bbd3724e Major refactor to pull things into config, httputil, tools
Mainly required to avoid cyclical dependencies when separating other things
2016-05-13 17:38:06 +01:00
Kale Worsley
33b15245e2 attribtues -> attributes. 2015-10-02 08:37:35 +13:00
rick
795a1ebc0e remove all Short messages 2015-09-17 16:08:28 -06:00
Michael Käufl
92cb8ebf42 Extracted function 2015-06-16 16:48:13 +02:00
Michael Käufl
26dfdc4656 Break out of loop 2015-06-16 16:48:12 +02:00
Michael Käufl
b83fe22e57 Used defer to close the attributes file 2015-06-16 16:48:12 +02:00
Michael Käufl
7f9275d971 Don't remove lines without filter=lfs
Fixes github/git-lfs#397
2015-06-16 16:31:20 +02:00
Michael Käufl
1db4857cdf Only untrack if we're in a repo's work tree 2015-06-16 16:31:19 +02:00
Rick Olson
d678d4bf33 update import paths 2015-05-25 12:20:50 -06:00
Rick Olson
216623196a Use goimports instead of gofmt 2015-05-13 13:43:41 -06:00
kafkaf-
e2d50bfdc0 Grammer 2015-04-11 14:49:29 +03:00
kafkaf-
37d03f6701 Small doc refactor 2015-04-11 14:48:44 +03:00
kafkaf-
21815f10e0 Small refactor 2015-04-11 13:59:38 +03:00
kafkaf-
6da94596db logical doc inside untrackCommand 2015-04-11 13:56:50 +03:00
kafkaf-
34f1d3918e untrackCommand doc 2015-04-11 13:54:05 +03:00
Rick Olson
b500178a06 rename path => track 2015-03-22 12:50:06 -06:00