aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/reset.c
AgeCommit message (Expand)AuthorFilesLines
2025-08-04Merge branch 'lm/add-p-context'Junio C Hamano1-2/+15
2025-07-29add-patch: add diff.context command line overridesLeon Michalak1-2/+15
2025-07-23config: drop `git_config()` wrapperPatrick Steinhardt1-1/+1
2025-05-16reset: integrate sparse index with --patchDerrick Stolee1-3/+3
2024-12-06diff.h: fix index used to loop through unsigned integerPatrick Steinhardt1-1/+0
2024-12-06global: mark code units that generate warnings with `-Wsign-compare`Patrick Steinhardt1-0/+3
2024-09-23Merge branch 'jc/pass-repo-to-builtins'Junio C Hamano1-2/+5
2024-09-13builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.hJohn Cai1-1/+1
2024-09-13builtin: add a repository parameter for builtin functionsJohn Cai1-1/+4
2024-09-12environment: make `get_git_work_tree()` accept a repositoryPatrick Steinhardt1-2/+3
2024-05-16Merge branch 'ps/refs-without-the-repository'Junio C Hamano1-5/+8
2024-05-07cocci: apply rules to rewrite callers of "refs" interfacesPatrick Steinhardt1-5/+8
2024-04-18builtin: stop using `the_index`Patrick Steinhardt1-16/+16
2024-03-07Merge branch 'js/merge-tree-3-trees'Junio C Hamano1-0/+4
2024-02-23Always check `parse_tree*()`'s return valueJohannes Schindelin1-0/+4
2024-02-13add-patch: classify '@' as a synonym for 'HEAD'Ghanshyam Thakkar1-1/+3
2023-12-26treewide: remove unnecessary includes in source filesElijah Newren1-3/+0
2023-07-27Merge branch 'jc/parse-options-reset'Junio C Hamano1-11/+18
2023-07-19reset: reject --no-(mixed|soft|hard|merge|keep) optionJunio C Hamano1-11/+18
2023-07-06Merge branch 'gc/config-context'Junio C Hamano1-2/+3
2023-06-28config: add ctx arg to config_fn_tGlen Choo1-2/+3
2023-06-21diff.h: remove unnecessary include of oidset.hElijah Newren1-0/+1
2023-06-21repository: remove unnecessary include of path.hElijah Newren1-0/+1
2023-06-21sparse-index.h: move declarations for sparse-index.c from cache.hElijah Newren1-0/+1
2023-04-11object-name.h: move declarations for object-name.c functions from cache.hElijah Newren1-0/+1
2023-04-11treewide: be explicit about dependence on advice.hElijah Newren1-0/+1
2023-04-11treewide: be explicit about dependence on trace.h & trace2.hElijah Newren1-0/+2
2023-04-04Merge branch 'ab/remove-implicit-use-of-the-repository' into en/header-split-...Junio C Hamano1-10/+12
2023-03-28cocci: apply the "refs.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason1-1/+2
2023-03-28cocci: apply the "cache.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason1-9/+10
2023-03-21setup.h: move declarations for setup.c functions from cache.hElijah Newren1-0/+1
2023-03-21environment.h: move declarations for environment.c functions from cache.hElijah Newren1-0/+1
2023-03-21treewide: be explicit about dependence on gettext.hElijah Newren1-0/+1
2023-03-19Merge branch 'jk/bundle-use-dash-for-stdfiles'Junio C Hamano1-1/+3
2023-03-06parse-options: consistently allocate memory in fix_filename()Jeff King1-1/+3
2023-02-23cache.h: remove dependence on hex.h; make other files include it explicitlyElijah Newren1-0/+1
2023-02-22Merge branch 'ab/various-leak-fixes'Junio C Hamano1-3/+8
2023-02-06various: add missing clear_pathspec(), fix leaksÆvar Arnfjörð Bjarmason1-3/+8
2023-02-06add API: remove run_add_interactive() wrapper functionÆvar Arnfjörð Bjarmason1-1/+3
2022-12-26Merge branch 'jk/unused-post-2.39'Junio C Hamano1-1/+2
2022-12-14Merge branch 'ab/various-leak-fixes'Junio C Hamano1-0/+2
2022-12-13diff: mark unused parameters in callbacksJeff King1-1/+2
2022-11-21{reset,merge}: call discard_index() before returningÆvar Arnfjörð Bjarmason1-0/+2
2022-11-21cocci: apply "pending" index-compatibility to some "builtin/*.c"Ævar Arnfjörð Bjarmason1-4/+5
2022-11-21cocci & cache.h: apply variable section of "pending" index-compatibilityÆvar Arnfjörð Bjarmason1-1/+1
2022-11-21cocci & cache.h: apply a selection of "pending" index-compatibilityÆvar Arnfjörð Bjarmason1-2/+3
2022-11-21cocci & cache.h: remove rarely used "the_index" compat macrosÆvar Arnfjörð Bjarmason1-2/+2
2022-11-10reset: use 'skip_cache_tree_update' optionVictoria Dye1-0/+2
2022-08-08pathspec.h: move pathspec_needs_expanded_index() from reset.c to hereShaoxuan Yuan1-83/+1
2022-03-24reset: show --no-refresh in the short-helpJunio C Hamano1-3/+3
2022-03-23reset: remove 'reset.refresh' config optionVictoria Dye1-3/+1
2022-03-23reset: remove 'reset.quiet' config optionVictoria Dye1-1/+0
2022-03-23reset: do not make '--quiet' disable index refreshVictoria Dye1-8/+1
2022-03-14reset: suppress '--no-refresh' advice if logging is silencedVictoria Dye1-1/+1
2022-03-14reset: replace '--quiet' with '--no-refresh' in performance adviceVictoria Dye1-4/+4
2022-03-14reset: introduce --[no-]refresh option to --mixedVictoria Dye1-1/+12
2022-03-14reset: revise index refresh adviceVictoria Dye1-2/+2
2022-02-25Merge branch 'ab/diff-free-more'Junio C Hamano1-1/+0
2022-02-17Merge branch 'vd/sparse-clean-etc'Junio C Hamano1-3/+9
2022-02-16diff.[ch]: have diff_free() call clear_pathspec(opts.pathspec)Ævar Arnfjörð Bjarmason1-1/+0
2022-01-13reset: reorder wildcard pathspec conditionsVictoria Dye1-3/+9
2022-01-05i18n: turn even more messages into "cannot be used together" onesJean-Noël Avila1-1/+1
2022-01-05i18n: factorize "--foo requires --bar" and the likeJean-Noël Avila1-2/+2
2022-01-05i18n: turn "options are incompatible" into "cannot be used together"Jean-Noël Avila1-2/+2
2021-12-10Merge branch 'vd/sparse-reset'Junio C Hamano1-6/+107
2021-11-29reset: make --mixed sparse-awareVictoria Dye1-2/+85
2021-11-29reset: integrate with sparse indexVictoria Dye1-3/+7
2021-10-27reset: preserve skip-worktree bit in mixed resetVictoria Dye1-0/+14
2021-10-07reset: rename is_missing to !is_in_reset_treeVictoria Dye1-3/+3
2021-09-27Change unpack_trees' 'reset' flag into an enumElijah Newren1-2/+7
2021-09-27Remove ignored files by default when they are in the wayElijah Newren1-2/+1
2021-09-27unpack-trees: introduce preserve_ignored to unpack_trees_optionsElijah Newren1-0/+2
2021-08-25advice: remove read uses of most global `advice_` variablesBen Boeckel1-1/+1
2021-03-14reset: free instead of leaking unneeded refAndrzej Hunt1-1/+1
2020-09-02wt-status: tolerate dangling marksJonathan Tan1-1/+1
2020-04-28Use OPT_CALLBACK and OPT_CALLBACK_FDenton Liu1-2/+2
2020-03-16builtin/reset: compute checkout metadata for resetbrian m. carlson1-3/+13
2019-12-10Merge branch 'am/pathspec-from-file'Junio C Hamano1-4/+21
2019-11-25reset: parse rev as tree-ish in patch modeNika Layzell1-1/+1
2019-11-20reset: support the `--pathspec-from-file` optionAlexandr Miloslavskiy1-2/+19
2019-11-20doc: reset: synchronize <pathspec> descriptionAlexandr Miloslavskiy1-2/+2
2019-07-19Merge branch 'nd/tree-walk-with-repo'Junio C Hamano1-2/+2
2019-07-09Merge branch 'nd/switch-and-restore'Junio C Hamano1-1/+1
2019-06-27tree-walk.c: remove the_repo from fill_tree_descriptor()Nguyễn Thái Ngọc Duy1-2/+2
2019-04-25Merge branch 'bp/post-index-change-hook'Junio C Hamano1-0/+1
2019-04-02checkout: inform the user when removing branch stateNguyễn Thái Ngọc Duy1-1/+1
2019-02-22trace2:data: add subverb to reset commandJeff Hostetler1-0/+6
2019-02-15read-cache: add post-index-change hookBen Peart1-0/+1
2019-01-24cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switchNguyễn Thái Ngọc Duy1-0/+1
2019-01-04Merge branch 'nd/the-index'Junio C Hamano1-2/+2
2018-11-12cache-tree.c: remove the_repository referencesNguyễn Thái Ngọc Duy1-1/+1
2018-11-12branch.c: remove the_repository referenceNguyễn Thái Ngọc Duy1-1/+1
2018-10-24reset: warn when refresh_index() takes more than 2 secondsBen Peart1-1/+13
2018-10-24reset: add new reset.quiet config settingBen Peart1-0/+1
2018-10-24reset: don't compute unstaged changes after reset when --quietBen Peart1-1/+1
2018-09-21diff.c: reduce implicit dependency on the_indexNguyễn Thái Ngọc Duy1-0/+1
2018-08-02Merge branch 'jm/cache-entry-from-mem-pool'Junio C Hamano1-1/+1
2018-07-03block alloc: add lifecycle APIs for cache_entry structsJameson Miller1-1/+1
2018-07-03read-cache: teach make_cache_entry to take object_idJameson Miller1-1/+1
2018-06-29commit: add repository argument to lookup_commit_referenceStefan Beller1-2/+2
2018-06-29Merge branch 'sb/object-store-grafts' into sb/object-store-lookupJunio C Hamano1-1/+1
2018-05-18path.c: migrate global git_path_* to take a repository argumentStefan Beller1-1/+1
2018-05-02builtin/reset: convert use of EMPTY_TREE_SHA1_BINbrian m. carlson1-1/+1
2018-03-14Convert find_unique_abbrev* to struct object_idbrian m. carlson1-1/+1
2018-02-15Merge branch 'tg/reset-hard-show-head-with-pretty'Junio C Hamano1-18/+10
2018-02-02reset --hard: make use of the pretty machineryThomas Gummerer1-18/+10
2017-12-27Merge branch 'ot/pretty'Junio C Hamano1-1/+1
2017-12-12format: create pretty.h fileOlga Telezhnaya1-1/+1
2017-11-09Merge branch 'bw/diff-opt-impl-to-bitfields'Junio C Hamano1-1/+1
2017-11-01diff: make struct diff_flags members lowercaseBrandon Williams1-1/+1
2017-11-01diff: remove DIFF_OPT_SET macroBrandon Williams1-1/+1
2017-10-31add, reset: use DIFF_OPT_SET macro to set a diff flagBrandon Williams1-1/+1
2017-10-16refs: convert update_ref and refs_update_ref to use struct object_idbrian m. carlson1-2/+2
2017-10-16refs: convert delete_ref and refs_delete_ref to struct object_idbrian m. carlson1-1/+1
2017-09-19Merge branch 'jk/leak-checkers'Junio C Hamano1-6/+16
2017-09-06reset: free allocated tree buffersJeff King1-5/+13
2017-09-06reset: make tree counting less confusingJeff King1-3/+5
2017-09-06stop leaking lock structs in some simple casesJeff King1-3/+3
2017-08-26Merge branch 'bw/submodule-config-cleanup'Junio C Hamano1-2/+1
2017-08-14tree-walk: convert fill_tree_descriptor() to object_idRené Scharfe1-2/+2
2017-08-03submodule: remove gitmodules_configBrandon Williams1-2/+0
2017-08-02add, reset: ensure submodules can be added or resetBrandon Williams1-0/+1
2017-07-17sha1_name: convert get_sha1* to get_oid*brian m. carlson1-5/+5
2017-06-24Merge branch 'bw/config-h'Junio C Hamano1-0/+1
2017-06-15config: don't include config.h by defaultBrandon Williams1-0/+1
2017-06-13Merge branch 'sb/submodule-blanket-recursive'Junio C Hamano1-27/+12
2017-06-01Introduce 'submodule.recurse' option for worktree manipulatorsStefan Beller1-1/+9
2017-05-30reset/checkout/read-tree: unify config callback for submodule recursionStefan Beller1-25/+2
2017-05-30submodule recursing: do not write a config variable twiceStefan Beller1-1/+1
2017-05-30Merge branch 'bw/pathspec-sans-the-index'Junio C Hamano1-1/+0
2017-05-29Merge branch 'bc/object-id'Junio C Hamano1-5/+5
2017-05-12pathspec: remove PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAPBrandon Williams1-1/+0
2017-05-08tree: convert parse_tree_indirect to struct object_idbrian m. carlson1-2/+2
2017-05-08diff-lib: convert do_diff_cache to struct object_idbrian m. carlson1-1/+1
2017-05-08Convert lookup_commit* to struct object_idbrian m. carlson1-2/+2
2017-04-23builtin/reset: add --recurse-submodules switchStefan Beller1-0/+30
2017-02-20delete_ref: accept a reflog message argumentKyle Meyer1-1/+1
2016-12-07hold_locked_index(): align error handling with hold_lockfile_for_update()Junio C Hamano1-1/+1
2016-10-17Merge branch 'js/reset-usage'Junio C Hamano1-1/+1
2016-10-11reset: fix usageJohannes Schindelin1-1/+1
2016-09-07builtin/reset: convert to use struct object_idbrian m. carlson1-26/+26
2016-07-19Merge branch 'bc/cocci'Junio C Hamano1-2/+2
2016-07-11Merge branch 'js/find-commit-subject-ignore-leading-blanks'Junio C Hamano1-1/+1
2016-06-29reset --hard: skip blank lines when reporting the commit subjectJohannes Schindelin1-1/+1
2016-06-28diff: convert struct diff_filespec to struct object_idbrian m. carlson1-2/+2
2016-06-02pathspec: rename free_pathspec() to clear_pathspec()Junio C Hamano1-1/+1
2015-11-20Remove get_object_hash.brian m. carlson1-1/+1
2015-11-20Convert struct object to object_idbrian m. carlson1-14/+14
2015-11-20Add several uses of get_object_hash.brian m. carlson1-1/+1
2015-08-10memoize common git-path "constant" filesJeff King1-1/+1
2014-10-01lockfile.h: extract new header file for the functions in lockfile.cMichael Haggerty1-0/+1
2014-07-16Merge branch 'nd/split-index'Junio C Hamano1-4/+3
2014-07-02Merge branch 'jk/commit-buffer-length'Junio C Hamano1-2/+2
2014-06-13convert logmsg_reencode to get_commit_bufferJeff King1-1/+1
2014-06-13cache-tree: mark istate->cache_changed on prime_cache_tree()Nguyễn Thái Ngọc Duy1-1/+1
2014-06-13read-cache: new API write_locked_index instead of write_index/write_cacheNguyễn Thái Ngọc Duy1-3/+2
2014-06-12logmsg_reencode: return const bufferJeff King1-1/+1
2014-04-07refs.h: rename the action_on_err constantsMichael Haggerty1-2/+4
2014-03-14Merge branch 'nd/reset-setup-worktree'Junio C Hamano1-3/+4
2014-02-18reset: optionally setup worktree and refresh index on --mixedNguyễn Thái Ngọc Duy1-3/+4
2014-02-05reset: support "--mixed --intent-to-add" modeNguyễn Thái Ngọc Duy1-12/+28
2013-10-25reset: pass real rev name to add--interactiveJeff King1-1/+1
2013-10-17Merge branch 'jk/trailing-slash-in-pathspec'Junio C Hamano1-2/+6
2013-09-20Merge branch 'bk/refs-multi-update'Junio C Hamano1-2/+2
2013-09-17Merge branch 'fc/trivial'Junio C Hamano1-7/+4
2013-09-13reset: handle submodule with trailing slashJohn Keeping1-2/+6
2013-09-09Merge branch 'jl/submodule-mv'Junio C Hamano1-13/+20
2013-08-30reset: trivial style cleanupFelipe Contreras1-1/+1
2013-08-30reset: trivial refactoringFelipe Contreras1-6/+3
2013-08-30reset: rename update_refs to reset_refsBrad King1-2/+2
2013-08-05Replace deprecated OPT_BOOLEAN by OPT_BOOLStefan Beller1-1/+1
2013-07-15remove diff_tree_{setup,release}_pathsNguyễn Thái Ngọc Duy1-4/+5
2013-07-15convert run_add_interactive to use struct pathspecNguyễn Thái Ngọc Duy1-4/+4
2013-07-15reset: convert to use parse_pathspecNguyễn Thái Ngọc Duy1-10/+16
2013-06-26pretty: --format output should honor logOutputEncodingAlexey Shumkin1-1/+4
2013-01-16reset: update documentation to require only tree-ish with pathsMartin von Zweigbergk1-2/+2
2013-01-15reset [--mixed]: use diff-based reset whether or not pathspec was givenMartin von Zweigbergk1-1/+1
2013-01-15reset: allow reset on unborn branchMartin von Zweigbergk1-6/+10
2013-01-15reset $sha1 $pathspec: require $sha1 only to be treeishMartin von Zweigbergk1-21/+27
2013-01-15reset.c: inline update_index_refresh()Martin von Zweigbergk1-9/+5
2013-01-15reset.c: finish entire cmd_reset() whether or not pathspec is givenMartin von Zweigbergk1-24/+18
2013-01-15reset [--mixed]: only write index file onceMartin von Zweigbergk1-9/+5
2013-01-15reset.c: move lock, write and commit out of update_index_refresh()Martin von Zweigbergk1-16/+18
2013-01-15reset.c: move update_index_refresh() call out of read_from_tree()Martin von Zweigbergk1-9/+9
2013-01-15reset.c: replace switch by if-elseMartin von Zweigbergk1-10/+3
2013-01-15reset: avoid redundant error messageMartin von Zweigbergk1-5/+3
2013-01-15reset --keep: only write index file onceMartin von Zweigbergk1-11/+10
2013-01-15reset.c: share call to die_if_unmerged_cache()Martin von Zweigbergk1-8/+6
2013-01-15reset.c: extract function for updating {ORIG_,}HEADMartin von Zweigbergk1-16/+23
2013-01-15reset.c: remove unnecessary variable 'i'Martin von Zweigbergk1-17/+16
2013-01-15reset.c: extract function for parsing argumentsMartin von Zweigbergk1-32/+38
2013-01-15reset: don't allow "git reset -- $pathspec" in bare repoMartin von Zweigbergk1-2/+4
2013-01-15reset.c: pass pathspec around instead of (prefix, argv) pairMartin von Zweigbergk1-17/+10
2013-01-15reset $pathspec: exit with code 0 if successfulMartin von Zweigbergk1-5/+3
2013-01-15reset $pathspec: no need to discard indexMartin von Zweigbergk1-15/+1
2012-08-20i18n: reset: mark parseopt strings for translationNguyễn Thái Ngọc Duy1-10/+10
2012-07-22Merge branch 'jc/sha1-name-more'Junio C Hamano1-2/+8
2012-07-09reset: the command takes committishJunio C Hamano1-2/+8
2012-06-18verify_filename(): ask the caller to chose the kind of diagnosisMatthieu Moy1-1/+1
2011-12-06reset: update cache-tree data when appropriateThomas Rast1-0/+7