René Scharfe <l.s.r@xxxxxx> writes: > We could use that option in Git's own Makefile to add the file named > "version", which contains $GIT_VERSION. Hmm, but it also contains a > terminating newline, which would be a bit tricky (but not impossible) to > add. Would it make sense to add one automatically if it's missing (e.g. > with strbuf_complete_line)? Not sure. I do not think it is a good UI to give raw file content from the command line, which will be usable only for trivial, even single liner files, and forces people to learn two parallel option, one for trivial ones and the other for contents with meaningful size. "--add-blob=<path>:<blob-object-name>" may be another option, useful when you have done "hash-object -w" already, and can be used to add single-liner, or an entire novel. In any case, "--add-file=<file>", which we already have, would be more appropriate feature to use to record our "version" file, so there is no need to change our Makefile for it.