aboutsummaryrefslogtreecommitdiff
path: root/git-bisect.sh
Commit message (Collapse)AuthorAge
* bisect reset: Leave the tree in usable state if git-checkout failedPetr Baudis2006-10-16
| | | | | | | | I had local modifications in the tree and doing bisect reset required me to manually edit .git/HEAD. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Using 'perl' in *.shMichal Rokos2006-07-08
| | | | | | | | Some GIT's shell script are using bare 'perl' for perl invocation. Use @@PERL@@ symbol and replace it with PERL_PATH_SQ everywhere. Signed-off-by: Michal Rokos <michal.rokos@nextsoft.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge some proposed fixesJunio C Hamano2006-02-13
|\ | | | | | | | | | | | | | | Conflicts: Documentation/git-commit.txt - taking the post 1.2.0 semantics. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * bisect: remove BISECT_NAMES after done.Junio C Hamano2006-02-13
| | | | | | | | | | | | | | I noticed that we forgot to clean this file and kept it that way, while trying to help with Andrew's bisect problem. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Properly git-bisect reset after bisecting from non-master headPetr Baudis2006-02-12
|/ | | | | | | | | | | | | | | | | | git-bisect reset without an argument would return to master even if the bisecting started at a non-master branch. This patch makes it save the original branch name to .git/head-name and restore it afterwards. This is also compatible with Cogito and cg-seek, so cg-status will show that we are seeked on the bisect branch and cg-reset will properly restore the original branch. git-bisect start will refuse to work if it is not on a bisect but .git/head-name exists; this is to protect against conflicts with other seeking tools. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Usage message clean-up, take #2Fredrik Kuivinen2005-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | There were some problems with the usage message clean-up patch series. I hadn't realised that subdirectory aware scripts can't source git-sh-setup. I propose that we change this and let the scripts which are subdirectory aware set a variable, SUBDIRECTORY_OK, before they source git-sh-setup. The scripts will also set USAGE and possibly LONG_USAGE before they source git-sh-setup. If LONG_USAGE isn't set it defaults to USAGE. If we go this way it's easy to catch --help in git-sh-setup, print the (long) usage message to stdout and exit cleanly. git-sh-setup can define a 'usage' shell function which can be called by the scripts to print the short usage string to stderr and exit non-cleanly. It will also be easy to change $0 to basename $0 or something else, if would like to do that sometime in the future. What follows is a patch to convert a couple of the commands to this style. If it's ok with everyone to do it this way I will convert the rest of the scripts too. [jc: thrown in to proposed updates queue for comments.] Signed-off-by: Junio C Hamano <junkio@cox.net>
* Use printf rather than echo -n.Jason Riedy2005-12-06
| | | | | | | | | | | | | | | | | | On AIX, there is no -n option to the system's echo. Instead, it needs the '\c' control character. We could replace echo -n "foo" with echo -e "foo\c" but printf is recommended by most man pages. Tested on AIX 5.3, Solaris 8, and Debian. [jc: futureproofed two instances that uses variable with '%s' so later feeding different messages would not break things too easily; others are emitting literal so whoever changes the literal ought to notice more easily so they are safe.] Signed-off-by: E. Jason Riedy <ejr@cs.berkeley.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
* bisect: quote pathnames for eval safety.Junio C Hamano2005-11-28
| | | | | | ... and make sure they are on the same line. Signed-off-by: Junio C Hamano <junkio@cox.net>
* bisect: limit the searchspace by pathspecsLinus Torvalds2005-11-28
| | | | | | | | | | | | | | | | | | | | | | | It was surprisingly easy to do. git bisect start <pathspec> followed by all the normal "git bisect good/bad" stuff. Almost totally untested, and I guarantee that if your pathnames have spaces in them (or your GIT_DIR has spaces in it) this won't work. I don't know how to fix that, my shell programming isn't good enough. This involves small changes to make "git-rev-list --bisect" work in the presense of a pathspec limiter, and then truly trivial (and that's the broken part) changes to make "git bisect" save away and use the pathspec. I tried one bisection, and a "git bisect visualize", and it all looked correct. But hey, don't be surprised if it has problems. Linus Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-sh-setup: die if outside git repository.Junio C Hamano2005-11-25
| | | | | | | | Now all the users of this script detect its exit status and die, complaining that it is outside git repository. So move the code that dies from all callers to git-sh-setup script. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add git-symbolic-refJunio C Hamano2005-10-01
| | | | | | | | | | | | | This adds the counterpart of git-update-ref that lets you read and create "symbolic refs". By default it uses a symbolic link to represent ".git/HEAD -> refs/heads/master", but it can be compiled to use the textfile symbolic ref. The places that did 'readlink .git/HEAD' and 'ln -s refs/heads/blah .git/HEAD' have been converted to use new git-symbolic-ref command, so that they can deal with either implementation. Signed-off-by: Junio C Hamano <junio@twinsun.com>
* Do not fail after calling bisect_auto_next()Junio C Hamano2005-09-17
| | | | | | | | | As a convenience measure, 'bisect bad' or 'bisect good' automatically does 'bisect next' when it knows it can, but the result of that test to see if it can was leaking through as the exit code from the whole thing, which was bad. Noticed by Anton Blanchard. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Keep bisection log so that it can be replayed later.Junio C Hamano2005-09-10
| | | | | | | | | The 'git bisect' command was very unforgiving in that once you made a mistake telling it good/bad it was very hard to take it back. Keep a log of what you told it in an earlier session, so that it can be replayed after removing everything after what you botched last time. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Big tool rename.Junio C Hamano2005-09-07
As promised, this is the "big tool rename" patch. The primary differences since 0.99.6 are: (1) git-*-script are no more. The commands installed do not have any such suffix so users do not have to remember if something is implemented as a shell script or not. (2) Many command names with 'cache' in them are renamed with 'index' if that is what they mean. There are backward compatibility symblic links so that you and Porcelains can keep using the old names, but the backward compatibility support is expected to be removed in the near future. Signed-off-by: Junio C Hamano <junkio@cox.net>