To push into a non-bare repository, or not to push into it...

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

 



Hi,

how about resolving this recurring subject of discussion by introducing a 
config variable, say "branch.allowPushingIntoHEAD".  We'd teach git-init 
to set it to "false", and receive-pack would refuse to update HEAD if it 
is "false", _unless_ core.bare = true.

Of course, we would default the value to "false" to leave existing setups 
functional.

However, if it is "true" (and core.bare is not true) -- which would need 
user interaction to explicitely set it -- receive-pack would also make 
sure that the working tree is clean (locking the index for the complete 
operation), and call "read-tree -u -m HEAD" in the end.

By refusing the update we would be able to give users a severe *WARNING*, 
but a hint how to put their HEAD in the noose.

I'd do a patch, but I am 1) tired, and 2) more thinking about that 
git-repack enhancement for repo.or.cz.

Ciao,
Dscho

-
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