aboutsummaryrefslogtreecommitdiff
path: root/git-revert.sh
Commit message (Collapse)AuthorAge
* Suggest 'add' in am/revert/cherry-pick.Shawn O. Pearce2006-12-21
| | | | | | | | | | | Now that we have decided to make 'add' behave like 'update-index' (and therefore fully classify update-index as strictly plumbing) the am/revert/cherry-pick family of commands should not steer the user towards update-index. Instead send them to the command they probably already know, 'add'. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'lj/refs'Junio C Hamano2006-11-01
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lj/refs: (63 commits) Fix show-ref usagestring t3200: git-branch testsuite update sha1_name.c: avoid compilation warnings. Make git-branch a builtin ref-log: fix D/F conflict coming from deleted refs. git-revert with conflicts to behave as git-merge with conflicts core.logallrefupdates thinko-fix git-pack-refs --all core.logallrefupdates create new log file only for branch heads. Remove bashism from t3210-pack-refs.sh ref-log: allow ref@{count} syntax. pack-refs: call fflush before fsync. pack-refs: use lockfile as everybody else does. git-fetch: do not look into $GIT_DIR/refs to see if a tag exists. lock_ref_sha1_basic does not remove empty directories on BSD Do not create tag leading directories since git update-ref does it. Check that a tag exists using show-ref instead of looking for the ref file. Use git-update-ref to delete a tag instead of rm()ing the ref file. Fix refs.c;:repack_without_ref() clean-up path Clean up "git-branch.sh" and add remove recursive dir test cases. ...
| * git-revert with conflicts to behave as git-merge with conflictsLuben Tuikov2006-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a busy project, reverting a commit almost always results in a conflict between one or more files (depending on the commit being reverted). It is useful to record this conflict in the commit-to-be message of the resulting commit (after the resolve). The process now becomes: git-revert <SHA-1> <git complains and prints failed automatic> <user manually resolves> git-update-index <resolved files> git-commit -s And the commit message is now a merge of the revert commit message and the conflict commit message, giving the user a chance to edit it or add more information: Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix git-revertJunio C Hamano2006-10-09
| | | | | | | | | | | | | | | | | | Defaulting to $replay for the sake of fixing cherry-pick was not done conditionally, which broke git-revert. Noticed by Luben. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | cherry-pick: make -r the defaultJunio C Hamano2006-10-05
|/ | | | | | | And introduce -x to expose (possibly) private commit object name for people who cherry-pick between public branches. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix grammatical error in git-revertJunio C Hamano2006-07-12
| | | | | | | | | | | | We always talk about "commit xyz". We never talk about "xyz commit", except when we end up talking about a commit as a branch head (notably, I would say "the HEAD commit", or possibly "the top-of-master commit", but here $commit is a SHA1 name, not anything else). Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* revert/cherry-pick: use aggressive merge.Linus Torvalds2006-05-09
| | | | | | | | After doing an in-index 3-way merge, we always do the stock "merge-index merge-one-file" without doing anything fancy; use of --aggressive helps performance quite a bit. Signed-off-by: Junio C Hamano <junkio@cox.net>
* cherry-pick/revert: error-help message rewording.Junio C Hamano2006-02-21
| | | | | | | | | | | | | | It said "after fixing up, commit the result using -F .msg", but it was not clear for new people how "fix up" should be done. Hint "git-update-index <path>". We could recommend "git commit -a -F .msg" instead, but I am hesitant to give that suggestion in the blind -- you could do a cherry-pick, revert or a merge in general in a dirty working tree as long as local modifications do not overlap with the merge, but using "commit -a" would include them in the result. Signed-off-by: Junio C Hamano <junkio@cox.net>
* revert/cherry-pick: handle single quote in author name.Junio C Hamano2006-01-07
| | | | | | | The same fix as aa66c7ec77d474b737da607d6cb2d07f56628def is needed here. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-revert: Usage string clean-upfreku045@student.liu.se2005-12-14
| | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add documentation for git-revert and git-cherry-pick.Nikolai Weibull2005-12-08
| | | | | | | | | | * Added the -e option to the documentation of git-cherry-pick. * Added the -e and --no-commit option to git-revert. * Removed redundant case expression for -n as --no-edit (already taken by --no-commit). Signed-off-by: Nikolai Weibull <nikolai@bitwi.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document the --(no-)edit switch of git-revert and git-cherry-pickPetr Baudis2005-12-04
| | | | | | | | | This switch was not documented properly. I decided not to mention the --no-edit switch in the git-cherry-pick documentation since we always default to no editing. Signed-off-by: Petr Baudis <pasky@suse.cz> 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>
* git-revert: make --edit default.Junio C Hamano2005-11-23
| | | | | | | | | | | | | Revert always should explain why, so make --edit the default, unless stdin is not a terminal. If you really don't want to say anything, you can say "git-revert --no-edit $commit", or if you are really sick, you could also say "git-revert $commit </dev/null". But please don't. You can also say "git-cherry-pick --edit $commit". Not editting the commit log message is the default for cherry-pick. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Allow editing of a revert-messageLinus Torvalds2005-11-23
| | | | | | | | | | | | | | | | I think all commit operations should allow editing of the message (ie we should do this for merges too), but that's _particularly_ true of doing a "git revert". We should always explain why we needed to revert something. This patch adds a "-e" or "--edit" flag to "git revert", although I actually suspect it should be on by default (and we should have a "--no-edit" flag to disable it, probably together with an automatic disable if stdin isn't a terminal). Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Do not lose author name information to locale gotchas.Junio C Hamano2005-11-11
| | | | | | | | | | | | I noticed format-patch loses authorship information of Lukas' patch when I run git tools with LC_LANG set to ja_JP. It turns out that the sed script to set environment variables were not working on his name (encoded in UTF-8), which is unfortunate but technically correct. Force sed invocation under C locale because we always want literal byte semantics. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Do not require clean tree when reverting and cherry-picking.Junio C Hamano2005-09-26
| | | | | | | | | | | | | | My stupidity deserved to be yelled at by Linus ... there is no reason to require the working tree to be clean when merging -- the only requirements are index to match HEAD commit and the paths involved in merge are up to date in the working tree. Revert and cherry-pick are just specialized forms of merge, and the requirements should be the same. Remove the 'general purpose routine to make sure tree is clean' from git-sh-setup, to prevent me from getting tempted again. 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>