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

Re: [PATCH] Replace the cryptic messages from "git stash show".

From
JXJing Xue <jingxue@digizenstudio.com>
Date
Dec 15, 2007, 17:08 UTC
Message-ID
<20071215170805.GA16589@fawkes>
In-Reply-To
<7v63z0o59r.fsf@gitster.siamese.dyndns.org>
On Fri, Dec 14, 2007 at 10:12:32PM -0800, Junio C Hamano wrote:
> 
> Is it just me who feels that the added code is much worse than the
> disease?

I wouldn't be surprised. Shell scripting is by no means my long suit - in fact, I am not even sure it's "a suit" of mine at all. I didn't like what I saw and basically had two options:

1. Send a "this is not user friendly" rant and get beaten up by "why
don't you even try?"
2. Try and hack together something, submit it, and keep fixing it until
it makes it - and learn something in the process, maybe at the price of
being mocked at, but I don't care.

In particular, as far as I _could_ see, there are probably at least one place I'm doing something potentially absurd, but couldn't figure out anything better:

I'm not sure how to test if there is a stash name specified, so I tried:

test "$flags" = "$@"

but then it breaks when $@ has a space in it. Hence the pointless assignment to $arguments first.

The reason I removed the --default option to rev-parse is that it doesn't distinguish between no stash name or an invalid one.

I'm sure there are other things people don't like - some because my shell scripting sucks, some others maybe because of style differences. At any rate, I'm open to criticism. So bring it on. 8-)

-- 
Jing Xue
Previous: Junio C Hamano
Message 5 of 5 in “Makes 'git-stash show' stay quiet when there are no stashes.”
  1. Makes 'git-stash show' stay quiet when there are no stashes.Jing Xue, Dec 14, 2007
  2. Junio C HamanoDec 14, 2007
  3. Replace the cryptic messages from "git stash show".Jing Xue, Dec 15, 2007
  4. Junio C HamanoDec 15, 2007
  5. Jing XueDec 15, 2007

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.