Re: [PATCH] Functions for updating refs.

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

 



"Carlos Rica" <jasampler@xxxxxxxxx> 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!



-
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