git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Koch <thomas@koch.ro>
To: git@vger.kernel.org
Cc: nomeata@debian.org
Subject: list empty dirs in commit message trailer
Date: Tue, 18 Aug 2015 16:43 +0200	[thread overview]
Message-ID: <2384709.cc1iR2nLxC@x121e> (raw)

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

                 reply	other threads:[~2015-08-18 14:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2384709.cc1iR2nLxC@x121e \
    --to=thomas@koch.ro \
    --cc=git@vger.kernel.org \
    --cc=nomeata@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).