Re: [PATCH] init-db: support --import to add all files and commit right after init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 25, 2009 at 01:09:56PM +1100, Nguyễn Thái Ngọc Duy wrote:

> This is equivalent to "git init;git add .;git commit -q -m blah".
> I find myself doing that too many times, hence this shortcut.

I think I would find this handy. Shawn suggested an alias, but I think
this is perhaps "universal enough" to merit an actual command-line
option.

> +-m <message>::
> +--import=<message>::
> +
> +Commit everything to the newly initialized repository. This is equivalent to:

Maybe this is being too lazy, but I think it would be useful to allow
just "--import" without a message to default to "Initial commit",
"initial import from `basename $PWD`", or something like that.

> +		else if (!strcmp(arg, "--import") || !strcmp(arg, "-m")) {
> +			if (i+1 >= argc)
> +				die("--import requires an import message");
> +			import_message = argv[2];
> +			i++;
> +			argv++;
> +		}

I seem to recall that we were phasing out "--long-option <arg>" at some
point, and that all long-options should use "--long-option=". But maybe
I am mis-remembering.

-Peff
--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux