Git development
 help / color / mirror / Atom feed
From: Chris Wedgwood <cw@f00f.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Junio C Hamano <junkio@cox.net>, Git Mailing List <git@vger.kernel.org>
Subject: Re: Make "git-ls-files" work in subdirectories
Date: Sun, 21 Aug 2005 15:46:22 -0700	[thread overview]
Message-ID: <20050821224622.GB26241@taniwha.stupidest.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0508211210500.3317@g5.osdl.org>

On Sun, Aug 21, 2005 at 12:55:33PM -0700, Linus Torvalds wrote:

> -		} else if (!strcmp(arg, "-t")) {
> +			continue;
> +		}
> +		if (!strcmp(arg, "-t")) {
>  			tag_cached = "H ";
>  			tag_unmerged = "M ";
>  			tag_removed = "R ";
>  			tag_other = "? ";
>  			tag_killed = "K ";
> -		} else if (!strcmp(arg, "-c") || !strcmp(arg, "--cached")) {
> +			continue;
> +		}
> +		if (!strcmp(arg, "-c") || !strcmp(arg, "--cached")) {
>  			show_cached = 1;
> -		} else if (!strcmp(arg, "-d") || !strcmp(arg, "--deleted")) {
> +			continue;
> +		}
> +		if (!strcmp(arg, "-d") || !strcmp(arg, "--deleted")) {
>  			show_deleted = 1;
> -		} else if (!strcmp(arg, "-o") || !strcmp(arg, "--others")) {
> +			continue;
> +		}
> +		if (!strcmp(arg, "-o") || !strcmp(arg, "--others")) {
>  			show_others = 1;
> -		} else if (!strcmp(arg, "-i") || !strcmp(arg, "--ignored")) {
> +			continue;
> +		}
> +		if (!strcmp(arg, "-i") || !strcmp(arg, "--ignored")) {
>  			show_ignored = 1;
> -		} else if (!strcmp(arg, "-s") || !strcmp(arg, "--stage")) {
> +			continue;
> +		}
> +		if (!strcmp(arg, "-s") || !strcmp(arg, "--stage")) {
>  			show_stage = 1;
> -		} else if (!strcmp(arg, "-k") || !strcmp(arg, "--killed")) {
> +			continue;
> +		}
> +		if (!strcmp(arg, "-k") || !strcmp(arg, "--killed")) {
>  			show_killed = 1;
> -		} else if (!strcmp(arg, "-u") || !strcmp(arg, "--unmerged")) {
> +			continue;
> +		}
> +		if (!strcmp(arg, "-u") || !strcmp(arg, "--unmerged")) {
>  			/* There's no point in showing unmerged unless
>  			 * you also show the stage information.
>  			 */
>  			show_stage = 1;
>  			show_unmerged = 1;
> -		} else if (!strcmp(arg, "-x") && i+1 < argc) {
> +			continue;
> +		}
> +		if (!strcmp(arg, "-x") && i+1 < argc) {
>  			exc_given = 1;
>  			add_exclude(argv[++i], "", 0, &exclude_list[EXC_CMDL]);
> -		} else if (!strncmp(arg, "--exclude=", 10)) {
> +			continue;
> +		}
> +		if (!strncmp(arg, "--exclude=", 10)) {
>  			exc_given = 1;
>  			add_exclude(arg+10, "", 0, &exclude_list[EXC_CMDL]);
> -		} else if (!strcmp(arg, "-X") && i+1 < argc) {
> +			continue;
> +		}
> +		if (!strcmp(arg, "-X") && i+1 < argc) {
>  			exc_given = 1;
>  			add_excludes_from_file(argv[++i]);
> -		} else if (!strncmp(arg, "--exclude-from=", 15)) {
> +			continue;
> +		}
> +		if (!strncmp(arg, "--exclude-from=", 15)) {
>  			exc_given = 1;
>  			add_excludes_from_file(arg+15);
> -		} else if (!strncmp(arg, "--exclude-per-directory=", 24)) {
> +			continue;
> +		}
> +		if (!strncmp(arg, "--exclude-per-directory=", 24)) {
>  			exc_given = 1;
>  			exclude_per_dir = arg + 24;
> -		} else
> +			continue;
> +		}
> +		if (!strcmp(arg, "--full-name")) {
> +			prefix_offset = 0;
> +			continue;
> +		}
> +		if (glob || *arg == '-')
>  			usage(ls_files_usage);
> +		glob = arg;

is there some aversion to getopt or similar get?

  reply	other threads:[~2005-08-21 22:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-21 19:55 Make "git-ls-files" work in subdirectories Linus Torvalds
2005-08-21 22:46 ` Chris Wedgwood [this message]
2005-08-21 23:17   ` Linus Torvalds
2005-08-21 23:45     ` Chris Wedgwood
2005-08-21 23:50     ` YOSHIFUJI Hideaki / 吉藤英明

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=20050821224622.GB26241@taniwha.stupidest.org \
    --to=cw@f00f.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=torvalds@osdl.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