git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Rafał Treffler" <tothamon@gmail.com>
To: git@vger.kernel.org
Subject: Git filter clean not working when staging files
Date: Wed, 29 Nov 2017 18:58:53 +0100	[thread overview]
Message-ID: <CAHY8k2DJSQjXrjTq6nysnifNppzLtSsORqseB2J0q1bYnkCF-A@mail.gmail.com> (raw)

Hello,

I've got a question or maybe bug about Git clean filter.
According to documentation[1] clean should be run when staging files.
When I'm staging file I see my script was run (I'm logging execution
into /tmp), but file content is unmodified.
My script is reading stdin and writing to stdout.
Nothing breaks in the script, from logs I see the source and modified
content are proper and I'm returning 0 return code.

Is this behavior intended? What should I do to modify the content?

Smudge works as intended.
But I've also noticed that git status runs clean filter but does not
modify contents.
Is that also intended?

Maybe I'm missing something?

If this is not going to work,
is there other way to modify file content on commit? (so the fixed
content goes to local repo)
Any other options ?

[1] https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#filters_b

-- 
Thanks for help,
Rafal

                 reply	other threads:[~2017-11-29 17:59 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=CAHY8k2DJSQjXrjTq6nysnifNppzLtSsORqseB2J0q1bYnkCF-A@mail.gmail.com \
    --to=tothamon@gmail.com \
    --cc=git@vger.kernel.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).