git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* list empty dirs in commit message trailer
@ 2015-08-18 14:43 Thomas Koch
  0 siblings, 0 replies; only message in thread
From: Thomas Koch @ 2015-08-18 14:43 UTC (permalink / raw)
  To: git; +Cc: nomeata

Hi,

I had an idea how to deal with tracking empty directories in git repositories 
when one does not want ".gitkeep" files. Just add a trailer like:

empty-dirs: a b/c a\nnewline exploit\" &&\ rm\ -rf \/ ..

this line would indicate that the worktree contained the empty directories a 
and b/c and contains examples for possible shell quoting problems or exploits.

So one can not just run mkdir -p and the content of the line but needs 
safeguards.

A pre-commit hook could add such a line to the commit message and another tool 
could create the directories for HEAD. There is no staging in this approach 
for empty directories and no ignore mechanism. But for my current use case 
(represent the content of debian source packages) this would be enough.

Do you like the idea?

Regards,

Thomas Koch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-18 14:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-18 14:43 list empty dirs in commit message trailer Thomas Koch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).