git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: enzodicicco@gmail.com
To: git@vger.kernel.org
Subject: Reference to a commit inside a commit message
Date: Mon, 28 Apr 2014 20:35:52 +0200	[thread overview]
Message-ID: <20140428183552.GA9709@workstation.Belkin> (raw)

Hi to all, I'm trying to figure out what is the best way (and if it exists) to link a message of a commit to another commit.
I start by saying I don't know Git very well so maybe this question can be very trival for someone but I've googled and searched into the Mailing List with little success.

The goal would be to be able to refer to a specific commit (or a set of it) through its Hash in order to justify some actions done in a commit, mantaining the message compact.

Obviously I don't mean to put the raw Hash, rather I would be happy to find a way to automatize the visits and the insertions of the commits inside the message.

What I mean is  what Gitweb do, naturally adapted for the use of Git through shell.

For example, thinking about it, I've imagined to add this feature to `git commit`:

    git commit --see-also <commit1> <commit2> ...

that adds a label (like "Signed-off-by") such as:

    See-also:
        1: <commit 1>
        2: <commit 2>
        ...

And, to other side, `git show` could have a feature like this:

    git show <commit> --see-also 1

that simply call `git show <commit-1>`.

So, there is a better way to obtain a behaviour like this?
Has ever been discussed the possibility of implementing a similar feature? and There is a way to handle a similar behaviour through Hooks?

Thanks to all,
NaN

             reply	other threads:[~2014-04-28 19:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28 18:35 enzodicicco [this message]
2014-04-28 19:55 ` Reference to a commit inside a commit message Jonathan Nieder
2014-04-28 20:43   ` Vincenzo di Cicco
2014-04-29  3:41 ` Jeff King
2014-04-29  7:57   ` Felipe Contreras
2014-04-29 23:23     ` Vincenzo di Cicco
     [not found]       ` <CAP8UFD1q2zdJZVkJVsNtGfN35LFmuK5txd91nTak5kGmvvKdWA@mail.gmail.com>
2014-04-30 18:29         ` Vincenzo di Cicco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140428183552.GA9709@workstation.Belkin \
    --to=enzodicicco@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).