summaryrefslogtreecommitdiff
path: root/contrib/git-resurrect.sh
Commit message (Collapse)AuthorAgeFilesLines
* contrib/git-resurrect.sh: use hash-agnostic OID patternDenton Liu2020-10-081-4/+3
| | | | | | | | | Since Git now supports hashes other than SHA-1, the hash length isn't guaranteed to be 40 characters. Replace $_x40 with a hash-agnostic OID pattern. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* contrib/git-resurrect.sh: indent with tabsDenton Liu2020-10-081-4/+4
| | | | | | | | In the git-resurrect script, there are a few lines that are mistakenly indented with spaces. Replace these lines with tabs. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jc/bs-t-is-not-a-tab-for-sed'Junio C Hamano2017-04-161-2/+2
|\ | | | | | | | | | | | | Code cleanup. * jc/bs-t-is-not-a-tab-for-sed: contrib/git-resurrect.sh: do not write \t for HT in sed scripts
| * contrib/git-resurrect.sh: do not write \t for HT in sed scriptsjc/bs-t-is-not-a-tab-for-sedJunio C Hamano2017-03-311-2/+2
| | | | | | | | | | | | | | | | Just like we did in 0d1d6e50 ("t/t7003: replace \t with literal tab in sed expression", 2010-08-12), avoid writing "\t" for HT in sed scripts, which is not portable. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-sh-setup.sh: add variable to use the stuck-long modeNicolas Vigier2014-02-031-0/+1
| | | | | | | | | | | | | | | | | | If the variable $OPTIONS_STUCKLONG is not empty, then rev-parse option parsing is done in --stuck-long mode. Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | request-pull: protect against OPTIONS_KEEPDASHDASH from environmentJonathan Nieder2010-05-011-0/+1
|/ | | | | | | | | | | | | | | | | | | Like most git commands, request-pull supports a -- delimiter to allow callers to pass arguments that would otherwise be treated as an option afterwards. The internal OPTIONS_KEEPDASHDASH variable is passed empty to git-sh-setup to indicate that request-pull itself does not care about the position of the -- delimiter. But if the user has that variable in her environment, request-pull will see the “--” and fail. Empty it explicitly to guard against this. While at it, make the corresponding fix to git-resurrect, too (all other scripts in git.git already protect themselves). Acked-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* contrib git-resurrect: find traces of a branch name and resurrect itThomas Rast2009-02-041-0/+180
Add a tool 'git-resurrect.sh <branch>' that tries to find traces of the <branch> in the HEAD reflog and, optionally, all merge commits in the repository. It can then resurrect the branch, pointing it at the most recent of all candidate commits found. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>