git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] guilt: add option guilt.diffstat

From
JSJosef Jeff Sipek <jeffpc@josefsipek.net>
Date
Dec 13, 2008, 04:43 UTC
Message-ID
<20081213044357.GD15407@josefsipek.net>
In-Reply-To
<20081213021422.GA28249@localhost>
On Sat, Dec 13, 2008 at 10:14:22AM +0800, Wu Fengguang wrote:
> Introduce option guilt.diffstat so that we don't have to type
> "guilt refresh --diffstat" in its full form every time.
Good idea.
Show 13 quoted lines
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
> ---
>  guilt |    9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> --- guilt.orig	2008-12-13 09:53:32.000000000 +0800
> +++ guilt	2008-12-13 10:01:03.000000000 +0800
> @@ -538,7 +538,7 @@ __refresh_patch()
>  
>  		[ ! -z "$4" ] && diffopts="-C -M --find-copies-harder"
>  		
> -		if [ ! -z "$5" ]; then
> +		if [ -n "$5" -o "x$diffstat" = "x1" ]; then

Why the 'x' thing? I've seen it is some scripts before, but I can't think of a reason to use it if the variable is surrounded in quotation marks.

Show 24 quoted lines
>  			(
>  				echo "---"
>  				git diff --stat $diffopts "$2"
> @@ -627,6 +627,9 @@ guilt_push_diff_context=1
>  # default autotag value
>  AUTOTAG_DEFAULT=1
>  
> +# default diffstat value
> +DIFFSTAT_DEFAULT=0
> +
>  #
>  # Parse any part of .git/config that belongs to us
>  #
> @@ -635,6 +638,10 @@ AUTOTAG_DEFAULT=1
>  autotag=`git config guilt.autotag`
>  [ -z "$autotag" ] && autotag=$AUTOTAG_DEFAULT
>  
> +# generate diffstat?
> +diffstat=`git config guilt.diffstat`
> +[ -z "$diffstat" ] && diffstat=$DIFFSTAT_DEFAULT
> +
>  #
>  # The following gets run every time this file is source'd
>  #
Could you throw a quick note into the manpages?
Thanks,
Josef 'Jeff' Sipek.
-- 
My public GPG key can be found at
http://www.josefsipek.net/gpg/public-0xC7958FFE.txt
Previous: Wu FengguangNext: Boyd Stephen Smith Jr.
Message 2 of 9 in “guilt: add option guilt.diffstat”
  1. guilt: add option guilt.diffstatWu Fengguang, Dec 13, 2008
  2. Josef Jeff SipekDec 13, 2008
  3. Boyd Stephen Smith Jr.Dec 13, 2008
  4. Josef Jeff SipekDec 13, 2008
  5. Wu FengguangDec 13, 2008
  6. [RESEND] guilt: add option guilt.diffstatWu Fengguang, Dec 18, 2008
  7. Josef Jeff SipekDec 18, 2008
  8. Wu FengguangDec 19, 2008
  9. Josef Jeff SipekDec 20, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.