git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Steffen Prohaska <prohaska@zib.de>
Cc: Dmitry Potapov <dpotapov@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] safecrlf: Add flag to convert_to_git() to disable safecrlf check
Date: Tue, 15 Jan 2008 15:23:21 -0800	[thread overview]
Message-ID: <7vodbmd66u.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <FF86F119-5BF4-4ED3-B6AD-BADFDC91301D@zib.de> (Steffen Prohaska's message of "Tue, 15 Jan 2008 22:41:53 +0100")

Steffen Prohaska <prohaska@zib.de> writes:

> What is the right way to iterate over the changed files?

I think something like

	read_cache();
        for (i = 0; i < active_nr; i++) {
		struct cache_entry *ce = active_cache[i];
		struct stat st;
		if (!lstat(ce->name, &st) &&
			ce_match_stat(ce, &st, 0)) {
			/* do your thing */
		}
	}

would do.

  reply	other threads:[~2008-01-15 23:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-13 16:30 [PATCH v3] safecrlf: Add mechanism to warn about irreversible crlf conversions Steffen Prohaska
2008-01-13 22:02 ` Dmitry Potapov
2008-01-13 22:13 ` Dmitry Potapov
2008-01-13 23:46 ` [PATCH] Don't display crlf warning twice Dmitry Potapov
2008-01-14  6:17   ` Steffen Prohaska
2008-01-14  6:40     ` Dmitry Potapov
2008-01-14  6:53       ` Steffen Prohaska
2008-01-14 23:20         ` [PATCH] safecrlf: Add flag to convert_to_git() to disable safecrlf check Steffen Prohaska
2008-01-14 23:58           ` Junio C Hamano
2008-01-15 20:52             ` Steffen Prohaska
2008-01-15 21:41               ` Steffen Prohaska
2008-01-15 23:23                 ` Junio C Hamano [this message]
2008-01-15 10:26           ` Dmitry Potapov
2008-01-15 20:39             ` Steffen Prohaska
2008-01-15 23:03               ` Dmitry Potapov

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=7vodbmd66u.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=dpotapov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=prohaska@zib.de \
    --cc=torvalds@linux-foundation.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).