- 27 10月, 2008 2 次提交
-
-
由 Miklos Vajna 提交于
Till now --no-deref was just ignored when deleting refs, fix this. Signed-off-by: NMiklos Vajna <vmiklos@frugalware.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Miklos Vajna 提交于
This had two problems with symrefs. First, it copied the actual sha1 instead of the "pointer", second it failed to remove the old ref after a successful rename. Given that till now delete_ref() always dereferenced symrefs, a new parameters has been introduced to delete_ref() to allow deleting refs without a dereference. Signed-off-by: NMiklos Vajna <vmiklos@frugalware.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 14 7月, 2008 1 次提交
-
-
由 Stephan Beyer 提交于
When you misuse a git command, you are shown the usage string. But this is currently shown in the dashed form. So if you just copy what you see, it will not work, when the dashed form is no longer supported. This patch makes git commands show the dash-less version. For shell scripts that do not specify OPTIONS_SPEC, git-sh-setup.sh generates a dash-less usage string now. Signed-off-by: NStephan Beyer <s-beyer@gmx.net> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 03 6月, 2008 2 次提交
-
-
由 Karl Hasselström 提交于
Giving the old sha1 is already optional when changing a ref, and it's quite handy when running update-ref manually. So make it optional for deleting a ref too. Signed-off-by: NKarl Hasselström <kha@treskal.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Karl Hasselström 提交于
builtin-update-ref's option parsing was somewhat tricky to follow, especially if the -d option was given. This patch cleans it upp a bit, at the expense of making it a bit longer. Signed-off-by: NKarl Hasselström <kha@treskal.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 15 5月, 2008 1 次提交
-
-
由 Johannes Schindelin 提交于
git_config() only had a function parameter, but no callback data parameter. This assumes that all callback functions only modify global variables. With this patch, every callback gets a void * parameter, and it is hoped that this will help the libification effort. Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 30 10月, 2007 1 次提交
-
-
由 Pierre Habouzit 提交于
Signed-off-by: NPierre Habouzit <madcoder@debian.org> Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
- 06 9月, 2007 1 次提交
-
-
由 Carlos Rica 提交于
A function intended to be called from builtins updating refs by locking them before write, specially those that came from scripts using "git update-ref". [jc: with minor fixups] Signed-off-by: NCarlos Rica <jasampler@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 30 7月, 2007 1 次提交
-
-
由 Junio C Hamano 提交于
Earlier these tools refused to create a reflog entry when the message given by the calling Porcelain had a LF in it, partially to keep the file format integrity of reflog file, which is one-entry-per-line. These tools should not be dictating such a policy. Instead, let the codepath to write out the reflog entry worry about the format integrity and allow messages with LF in them. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 11 5月, 2007 1 次提交
-
-
由 Sven Verdoolaege 提交于
git-checkout is also adapted to make use of this new option instead of the handcrafted command sequence. Signed-off-by: NSven Verdoolaege <skimo@kotnet.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 29 1月, 2007 1 次提交
-
-
由 Junio C Hamano 提交于
We used to use lock_any_ref_for_update() because the command needs to also update HEAD (which is not under refs/, so lock_ref_sha1() cannot be used). The function however did not check for refs with illegal characters in them. Use check_ref_format() to catch malformed refs. For this check, we specifically do not want to say having less than two levels in the name is illegal to allow HEAD (and perhaps other special refs in the future). Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 28 1月, 2007 1 次提交
-
-
由 Junio C Hamano 提交于
Back when only handful commands that created commit and tag were the only users of committer identity information, it made sense to explicitly call setup_ident() to pre-fill the default value from the gecos information. But it is much simpler for programs to make the call automatic when get_ident() is called these days, since many more programs want to use the information when updating the reflog. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 27 1月, 2007 1 次提交
-
-
由 Junio C Hamano 提交于
It used to throw potentially multi-line log message at reflog. Just record the heads that were given to be merged at the command line and the action. Revert the removal of the check in "git-update-ref -m" I made earlier which was only a work-around for this. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 26 1月, 2007 1 次提交
-
-
由 Junio C Hamano 提交于
The file format dictates that entries are LF terminated so the message cannot have one in it. Chomp the message to make sure it only has a single line if necessary, while removing the leading whitespace. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 27 9月, 2006 2 次提交
-
-
由 Junio C Hamano 提交于
This adds -d flag to update-ref to allow safe deletion of ref. Before deleting it, the command checks if the given <oldvalue> still matches the value the caller thought the ref contained. Similarly, it also accepts 0{40} or an empty string as <oldvalue> to allow safe creation of a new ref. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
This drops "mustexist" parameter lock_ref_sha1() and lock_any_ref_forupdate() functions take. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 24 8月, 2006 1 次提交
-
-
由 Junio C Hamano 提交于
In the same spirit as hashcmp() and hashcpy(). Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 29 7月, 2006 1 次提交
-
-
由 Linus Torvalds 提交于
This changes the calling convention of built-in commands and passes the "prefix" (i.e. pathname of $PWD relative to the project root level) down to them. Signed-off-by: NLinus Torvalds <torvalds@osdl.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 11 7月, 2006 1 次提交
-
-
由 Shawn Pearce 提交于
Apparently calling setup_ident() after git_config causes the user.name and user.email values read from the config file to be replaced with the data obtained from the host. This means that users who have setup their email address in user.email will instead be writing reflog entries with their hostname. Moving setup_ident() to before git_config in update-ref resolves this ordering problem. Signed-off-by: NShawn O. Pearce <spearce@spearce.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 19 6月, 2006 1 次提交
-
-
由 Lukas Sandström 提交于
Signed-off-by: NLukas Sandström <lukass@etek.chalmers.se> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 18 5月, 2006 1 次提交
-
-
由 Shawn Pearce 提交于
This conversion also adds the '-m' switch to update-ref allowing the caller to record why the ref is changing. At present this is merely copied down into the ref_lock API. Signed-off-by: NShawn O. Pearce <spearce@spearce.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 09 5月, 2006 1 次提交
-
-
由 Dmitry V. Levin 提交于
Separate object name errors from usage errors. Signed-off-by: NDmitry V. Levin <ldv@altlinux.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 24 3月, 2006 1 次提交
-
-
由 Junio C Hamano 提交于
This makes sure that many commands that take refs on the command line to honor core.warnambiguousrefs configuration. Earlier, the commands affected by this patch did not read the configuration file. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 15 11月, 2005 1 次提交
-
-
由 Alex Riesen 提交于
Make git-update-ref create references with slashes in them. git-branch and git-checkout already support such reference names. git-branch can use git-update-ref to create the references in a more formal manner now. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 11 11月, 2005 1 次提交
-
-
由 Petr Baudis 提交于
When git-update-ref has hit the "Ref %s changed to %s" error, I just stare at it, left puzzled. This patch attempts to reword that to a more useful and less confusing error message. Signed-off-by: NPetr Baudis <pasky@suse.cz> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 15 10月, 2005 1 次提交
-
-
由 Linus Torvalds 提交于
Do our own ctype.h, just to get the sane semantics: we want locale-independence, _and_ we want the right signed behaviour. Plus we only use a very small subset of ctype.h anyway (isspace, isalpha, isdigit and isalnum). Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 02 10月, 2005 2 次提交
-
-
由 Junio C Hamano 提交于
Symbolic refs are understood by resolve_ref(), so existing read_ref() users will automatically understand them as well. Signed-off-by: NJunio C Hamano <junio@twinsun.com>
-
由 Junio C Hamano 提交于
A symbolic ref is a regular file whose contents is "ref:", followed by optional leading whitespaces, followed by a GIT_DIR relative pathname, followed by optional trailing whitespaces (the optional whitespaces are unconditionally removed, so you cannot have leading nor trailing whitespaces). This can be used in place of a traditional symbolic link .git/HEAD that usually points at "refs/heads/master". You can instead have a regular file .git/HEAD whose contents is "ref: refs/heads/master". [jc: currently the code does not enforce the symbolic ref to begin with refs/, unlike the symbolic link case. It may be worthwhile to require either case to begin with refs/ and not have any /./ nor /../ in them.] Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 29 9月, 2005 1 次提交
-
-
由 Peter Hagervall 提交于
Insert 'static' where appropriate. Signed-off-by: NPeter Hagervall <hager@cs.umu.se> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 26 9月, 2005 2 次提交
-
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Linus Torvalds 提交于
This is a careful version of the script stuff that currently just blindly writes HEAD with a new value. You can use git-update-ref HEAD <newhead> or git-update-ref HEAD <newhead> <oldhead> where the latter version verifies that the old value of HEAD matches oldhead. It basically allows a "ref" file to be a symbolic pointer to another ref file by starting with the four-byte header sequence of "ref:". More importantly, it allows the update of a ref file to follow these symbolic pointers, whether they are symlinks or these "regular file symbolic refs". NOTE! It follows _real_ symlinks only if they start with "refs/": otherwise it will just try to read them and update them as a regular file (ie it will allow the filesystem to follow them, but will overwrite such a symlink to somewhere else with a regular filename). In general, using git-update-ref HEAD "$head" should be a _lot_ safer than doing echo "$head" > "$GIT_DIR/HEAD" both from a symlink following standpoint _and_ an error checking standpoint. The "refs/" rule for symlinks means that symlinks that point to "outside" the tree are safe: they'll be followed for reading but not for writing (so we'll never write through a ref symlink to some other tree, if you have copied a whole archive by creating a symlink tree). Signed-off-by: NLinus Torvalds <torvalds@osdl.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-