Re: [PATCH v3 2/3] refs.c: split delete_ref_loose() into a separate flag-for-deletion and commit phase

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

 



Ronnie Sahlberg <sahlberg@xxxxxxxxxx> writes:

>  int commit_ref_lock(struct ref_lock *lock)
>  {
> +	if (lock->delete_ref) {
> +		int flag = lock->delete_flag;
> +
> +		if (!(flag & REF_ISPACKED) || flag & REF_ISSYMREF) {
> +			/* loose */
> +			int err, i = strlen(lock->lk->filename) - 5; /* .lock */
> +
> +			lock->lk->filename[i] = 0;
> +			err = unlink_or_warn(lock->lk->filename);
> +			lock->lk->filename[i] = '.';
> +			if (err && errno != ENOENT)
> +				return 1;
> +		}
> +	} else
>          if (!lock->skipped_write && commit_ref(lock)) {

	} else if (...) {

Also the previous patch indents the above "if" line in the context
with spaces; please use a tab.
--
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]