aboutsummaryrefslogtreecommitdiff
path: root/sha1_name.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-03-02 03:21:23 -0500
committerJunio C Hamano <gitster@pobox.com>2017-03-02 11:05:03 -0800
commite322b60d65a14578995839caa5f48f5426236fdf (patch)
tree27b09fd5d1e06593d4c407862339be3b257859b4 /sha1_name.c
parent13228c30a6476456ee64eb7cefb7786d82fd2ca7 (diff)
downloadgit-e322b60d65a14578995839caa5f48f5426236fdf.tar.gz
git-e322b60d65a14578995839caa5f48f5426236fdf.tar.xz
interpret_branch_name: move docstring to header file
We generally put docstrings with function declarations, because it's the callers who need to know how the function works. Let's do so for interpret_branch_name(). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_name.c')
-rw-r--r--sha1_name.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/sha1_name.c b/sha1_name.c
index 9b5d14b4b..28865b3a1 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -1238,27 +1238,6 @@ static int interpret_branch_mark(const char *name, int namelen,
return len + at;
}
-/*
- * This reads short-hand syntax that not only evaluates to a commit
- * object name, but also can act as if the end user spelled the name
- * of the branch from the command line.
- *
- * - "@{-N}" finds the name of the Nth previous branch we were on, and
- * places the name of the branch in the given buf and returns the
- * number of characters parsed if successful.
- *
- * - "<branch>@{upstream}" finds the name of the other ref that
- * <branch> is configured to merge with (missing <branch> defaults
- * to the current branch), and places the name of the branch in the
- * given buf and returns the number of characters parsed if
- * successful.
- *
- * If the input is not of the accepted format, it returns a negative
- * number to signal an error.
- *
- * If the input was ok but there are not N branch switches in the
- * reflog, it returns 0.
- */
int interpret_branch_name(const char *name, int namelen, struct strbuf *buf)
{
char *at;