Re: [RFC] Teach git-branch howto rename a branch

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

 



On 11/25/06, Shawn Pearce <spearce@xxxxxxxxxxx> wrote:
Jakub Narebski <jnareb@xxxxxxxxx> wrote:
>
> And of course reflog should store the fact of renaming branch.

Yes, I think that's a worthwhile thing to log.  Problem is the
logging system tends to throw away pointless entries (sha1 ->
same sha1) so the rename log entry needs to be forced somehow...

Is it ok to put

static int log_ref_write(struct ref_lock *lock,
	const unsigned char *sha1, const char *msg)

into refs.h?

Then it should be possibly to do something like this:

 lock = lock_ref_sha1(ref, sha1);
 lock->force_write = 1;
 log_ref_write(lock, sha1, "Renamed oldname to newname");
 unlock_ref(lock);

...after moving the reflog...

--
larsh
-
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]