[PATCH 0/3] Support config-based names

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

 



It can be useful to refer to commits in remotes based on their configured 
relationship to local branches. For example, "git log HEAD^[push]..HEAD" 
would, when pushing is set up, show what hasn't been pushed yet.

I picked base^[word] as the format for sha1 names which are some arbitrary 
function of base. I think this format isn't used for anything yet, isn't 
valid as ref names, and is structureally suitable for having a variety of 
extensions. I added {branch}^[merge] for the default head to merge into 
{branch} and {branch}^[push] for the tracking ref for the remote branch to 
push {branch} to. The push one could be extended to include the branch to 
push to by default at other remotes as {branch}^[push:{remote}]. I'm not 
too picky about the format for this, if there's something better for the 
space of sha1 names that don't have to be super compact and may have lots 
of options.

(In order to prepare this email, I set up a push default of my branch to 
next, and did: "git log --reverse HEAD^[push]..HEAD" and "git diff --stat 
HEAD^[push]...HEAD")

Patch 1 is likely to be independantly useful for things like a 
builtin-fetch, which needs to get configuration for branches along with 
remotes.

 Patch 1: Parse and report branch config
 Patch 2: Search for matching push refspec in configuration
 Patch 3: Add sha1 names using the preceding functions

 remote.c    |  109 +++++++++++++++++++++++++++++++++++++++++++++++++++-------
 remote.h    |   22 +++++++++++-
 sha1_name.c |   50 +++++++++++++++++++++++++++
 3 files changed, 166 insertions(+), 15 deletions(-)

	-Daniel
*This .sig left intentionally blank*
-
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