From: Junio C Hamano <gitster@pobox.com>
To: "Carlos Rica" <jasampler@gmail.com>
Cc: git@vger.kernel.org, "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] Functions for updating refs.
Date: Tue, 04 Sep 2007 17:16:59 -0700 [thread overview]
Message-ID: <7vd4wym0ec.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1b46aba20709041632x60ee4d3eweae9f5217d2f3b86@mail.gmail.com> (Carlos Rica's message of "Wed, 5 Sep 2007 01:32:32 +0200")
"Carlos Rica" <jasampler@gmail.com> writes:
>> - Why doesn't "or_error" side allow "flags" as "or_die" one?
>> Could the 'quiet' option become part of "flags" perhaps?
>
> I saw that the only code that needed the flags was the
> builtin-update-ref.c, and it also needed to die(). The
> others I saw only want that parameter set to 0.
> builtin-tag.c was doing die() also, not using flags, though.
Ok, when other built-ins start using these functions, they might
want to pass different flags, but it is easy enough for us to
extend the interface later.
>> - They look quite similar. Is it a good idea to refactor them
>> further, or they are so small it does not matter?
>
> The function die() returns 128 and terminates the program,
> prepending "fatal: " in the message, while error() doesn't exit
> and prepend "error: ", so they were very different and I
> resolved to separate them.
Fair enough.
>> - Why isn't lock released with unlock_ref()?
>
> I inspected this some weeks ago, and I finally came to think
> that it is released in the write_ref_sha1 call after the lock.
Ah, that's right!
prev parent reply other threads:[~2007-09-05 0:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-04 13:39 [PATCH] Functions for updating refs Carlos Rica
2007-09-04 13:45 ` Johannes Schindelin
2007-09-04 14:28 ` Johannes Sixt
2007-09-04 14:58 ` Johannes Schindelin
2007-09-04 15:08 ` Johannes Sixt
2007-09-04 15:29 ` Karl Hasselström
2007-09-04 15:33 ` Johannes Schindelin
2007-09-04 17:52 ` Junio C Hamano
2007-09-04 23:32 ` Carlos Rica
2007-09-05 0:16 ` Junio C Hamano [this message]
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=7vd4wym0ec.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=jasampler@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.