Re: [PATCH] Add a -z option to 'git status' to safely feed shell programs with path names
- Date: Fri, 16 May 2008 22:51:33 -0400
- From: "Shawn O. Pearce" <spearce@xxxxxxxxxxx>
- Subject: Re: [PATCH] Add a -z option to 'git status' to safely feed shell programs with path names
Sebastien Gross <seb-git@xxxxxxxxxxx> wrote:
> Add a -z option to 'git status' to get a list of all files
> but ignored, starting with modification type or 'untracked'
> as prefix and ending with '\0'.
Hmm. Is the plumbing really that broken that you need to add -z
support to porcelain rather than using the -z support already built
into the plumbing?
> * Remove all untracked files:
>
> git status -z | gawk 'BEGIN{RS="\0"; ORS="\0";}/^untracked/ \
> {sub("^.+:", "");print}' | xargs -0 -r rm
That I take it is just the long handed way to write `git clean -f` ?
> * List all updated file regardless the modification:
>
> git status -z | gawk 'BEGIN{RS="\0"; ORS="\0";}/^updated/ \
> {sub("^.+:", "");print}' | xargs -0 -n 1
And this is just the long handed way to write `git diff --name-only` ?
A very large and intrusive looking patch for what can already be
obtained easier through existing, stable porcelain. Not something
I am in favor of seeing added at this time.
--
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html