Re: [PATCH 2/2] rebase -i: use some kind of config file to save author information

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

 



Christian Couder <chriscool@xxxxxxxxxxxxx> writes:

> Subject: [PATCH 2/2] rebase -i: use some kind of config file to save author information

Errr... "kind of" config file?  I'd say use config file format for
saving author information.

>
> This is better than saving in a shell script, because it will make
> it much easier to port "rebase -i" to C. This also removes some sed
> regexps and some "eval"s.

Would it?  Well, I guess that at least we will avoid problems with
shell quoting and shell variable expansion rules.

> 
> Signed-off-by: Christian Couder <chriscool@xxxxxxxxxxxxx>
> ---
>  git-rebase--interactive.sh |   78 +++++++++++++++++++++++---------------------
>  1 files changed, 41 insertions(+), 37 deletions(-)
> 
> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> +save_author_ident () {
> +	GIT_CONFIG="$SAVE_AUTHOR_INFO" git config rebase.author.name \
> +		"$author_ident_name" &&
> +	GIT_CONFIG="$SAVE_AUTHOR_INFO" git config rebase.author.mail \
> +		"$author_ident_mail" &&
> +	GIT_CONFIG="$SAVE_AUTHOR_INFO" git config rebase.author.date \
> +		"$author_ident_date"
> +}
> +
> +load_author_ident () {
> +	GIT_AUTHOR_NAME=$(GIT_CONFIG="$SAVE_AUTHOR_INFO" \
> +		git config rebase.author.name) &&
> +	GIT_AUTHOR_EMAIL=$(GIT_CONFIG="$SAVE_AUTHOR_INFO" \
> +		git config rebase.author.mail) &&
> +	GIT_AUTHOR_DATE=$(GIT_CONFIG="$SAVE_AUTHOR_INFO" \
> +		git config rebase.author.date)
>  }

Why not use --file=<filename> option of git-config instead?
-- 
Jakub Narebski
Poland
ShadeHawk on #git
--
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]