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

stricter pointer spec #246

Merged
merged 16 commits into from Apr 24, 2015
Merged

stricter pointer spec #246

merged 16 commits into from Apr 24, 2015

Conversation

technoweenie
Copy link
Contributor

Tightens up the pointer spec according from @swisspol in #233 and https://gist.github.com/swisspol/b9856fcca81029efb960.

  • implement git pointer commands

@swisspol
Copy link
Contributor

Awesome, thanks!

* Lines of key/value pairs MUST be sorted alphabetically in ascending order
(with the exception of `version`, which is always first).
* Values MUST NOT contain return or newline characters.
* Pointer files SHOULD not have the executable bit set when checked-in in Git.
Copy link
Contributor

Choose a reason for hiding this comment

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

Capsify "NOT" here

@rubyist
Copy link
Contributor

rubyist commented Apr 20, 2015

I think this is a good approach 👍

* Lines of key/value pairs MUST be sorted alphabetically in ascending order
(with the exception of `version`, which is always first).
* Values MUST NOT contain return or newline characters.
* Pointer files SHOULD NOT have the executable bit set when checked-in in Git.
Copy link

Choose a reason for hiding this comment

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

s/checked-in in/checked into/

@technoweenie
Copy link
Contributor Author

I implemented a git lfs pointer command. You can check it out with script/run pointer ... if you have the repository cloned locally. Or, check out the sample pointer output in the spec.

technoweenie added a commit that referenced this pull request Apr 24, 2015
@technoweenie technoweenie merged commit 632a436 into master Apr 24, 2015
@technoweenie technoweenie deleted the 0.5.0-pointer-spec branch April 24, 2015 17:58
This was referenced Apr 24, 2015
rtyley added a commit to rtyley/git-lfs that referenced this pull request Aug 31, 2015
In practice, Git LFS preserves the executable status of files when they are
cleaned-to/smudged-from pointer files - in fact the
[git attributes clean/smudge filter mechanism](http://git-scm.com/docs/gitattributes#__code_filter_code)
doesn't actually provide any support for changing the executable status of
file, they just work on the file's contents with standard input & output.

This is good behaviour, because users don't want their big *.exe files to
stop being executable when they start using Git LFS, and the executable
status is not preserved anywhere else (eg. rightly, it is not stored within
the pointer file).

As an example, here are two *.exe files that have been stored with Git LFS,
which has preserved their exec bit in the file tree object. Note that
`bar.exe` has it's exec bit _set_ (`100755`), contrary to the spec:

```
$ git cat-file -p HEAD^{tree}
100644 blob ce8828c1134a1f9feb8177e9e2b988d94a94d951	.gitattributes
100644 blob 9242c60b11d49b42e829070feef1c5b7cf7a6159	foo.exe
100755 blob 25637885004ac19bd1e0404e2bb0d2247de37805	bar.exe
$ git cat-file -p 25637885004ac19bd1e0404e2bb0d2247de37805
version https://git-lfs.github.com/spec/v1
oid sha256:364ea686b8d77dbf49d1c1ce28023e818954574310b68c61433fbb02596744e2
size 51200
```

I think the spec just needs correcting here. The wording was introduced
with git-lfs#246, tweaked with
git-lfs@4bdecf, but I couldn't find any
justification in those for the statement that the executable bit should
always be cleared.
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

4 participants