From: Jonathan Nieder <jrnieder@gmail.com> To: Stefan Beller <sbeller@google.com> Cc: git <git@vger.kernel.org> Subject: Re: [PATCH 5/5] submodule: submodule_move_head omits old argument in forced case Date: Tue, 19 Dec 2017 16:01:48 -0800 Message-ID: <20171220000148.GJ240141@aiede.mtv.corp.google.com> (raw) In-Reply-To: <CAGZ79kake8k2dM=NPwNoqB5Vkxy+k67PACz01-aXx6-njcisgQ@mail.gmail.com> Stefan Beller wrote: > On Tue, Dec 19, 2017 at 2:44 PM, Jonathan Nieder <jrnieder@gmail.com> wrote: >> checkout -f >> I think I would expect this not to touch a submodule that >> hasn't changed, since that would be consistent with its >> behavior on files that haven't changed. [...] > I may have a different understanding of git commands than you do, > but a plain "checkout -f" with no further arguments is the same as > a hard reset IMHO, and could be used interchangeably? A kind person pointed out privately that you were talking about "git checkout -f" with no further arguments, not "git checkout -f <commit>". In that context, the competing meanings I mentioned in https://crbug.com/git/5 don't exist: either a given entry in the worktree matches the index or it doesn't. So plain "git checkout -f" is similar to plain "git reset --hard" in that it means "make the worktree (and index, in the reset case) look just like this". checkout -f makes the worktree look like the index; reset --hard makes the worktree and index look like HEAD. In that context, more aggressively making the submodule in the worktree get into the defined state sounds to me like a good change. Hopefully my confusion helps illustrate what a commit message focusing on the end user experience might want to mention. Thanks again, Jonathan
next prev parent reply index Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-12-19 22:26 [PATCH 0/5] Fix --recurse-submodules for submodule worktree changes Stefan Beller 2017-12-19 22:26 ` [PATCH 1/5] t/lib-submodule-update.sh: clarify test Stefan Beller 2017-12-19 22:26 ` [PATCH 2/5] t/lib-submodule-update.sh: Fix test ignoring ignored files in submodules Stefan Beller 2017-12-22 19:34 ` Junio C Hamano 2017-12-27 19:27 ` Stefan Beller 2017-12-19 22:26 ` [PATCH 3/5] t/lib-submodule-update.sh: add new test for submodule internal change Stefan Beller 2017-12-19 22:31 ` Jonathan Nieder 2017-12-19 22:35 ` Stefan Beller 2017-12-19 22:26 ` [PATCH 4/5] unpack-trees: Fix same() for submodules Stefan Beller 2017-12-19 22:26 ` [PATCH 5/5] submodule: submodule_move_head omits old argument in forced case Stefan Beller 2017-12-19 22:44 ` Jonathan Nieder 2017-12-19 22:54 ` Stefan Beller 2017-12-19 23:15 ` Jonathan Nieder 2017-12-20 0:01 ` Jonathan Nieder [this message] 2017-12-20 19:36 ` Stefan Beller 2017-12-20 19:38 ` Stefan Beller 2017-12-27 22:57 ` [PATCHv2 0/5] Fix --recurse-submodules for submodule worktree changes Stefan Beller 2017-12-27 22:57 ` [PATCHv2 1/5] t/helper/test-lazy-name-hash: fix compilation Stefan Beller 2017-12-27 22:57 ` [PATCHv2 2/5] t/lib-submodule-update.sh: clarify test Stefan Beller 2017-12-27 22:57 ` [PATCHv2 3/5] t/lib-submodule-update.sh: Fix test ignoring ignored files in submodules Stefan Beller 2017-12-27 22:57 ` [PATCHv2 4/5] unpack-trees: oneway_merge to update submodules Stefan Beller 2018-01-02 19:43 ` Junio C Hamano 2018-01-02 23:04 ` Stefan Beller 2018-01-03 1:12 ` [PATCHv3 0/5] Fix --recurse-submodules for submodule worktree changes Stefan Beller 2018-01-03 1:12 ` [PATCH 1/5] t/helper/test-lazy-name-hash: fix compilation Stefan Beller 2018-01-03 1:12 ` [PATCH 2/5] t/lib-submodule-update.sh: clarify test Stefan Beller 2018-01-03 1:12 ` [PATCH 3/5] t/lib-submodule-update.sh: Fix test ignoring ignored files in submodules Stefan Beller 2018-01-03 1:12 ` [PATCH 4/5] unpack-trees: oneway_merge to update submodules Stefan Beller 2018-01-03 1:12 ` [PATCH 5/5] submodule: submodule_move_head omits old argument in forced case Stefan Beller 2018-01-03 20:49 ` [PATCHv3 0/5] Fix --recurse-submodules for submodule worktree changes Junio C Hamano 2018-01-03 21:16 ` Stefan Beller 2018-01-05 20:03 ` [PATCHv4 0/4] " Stefan Beller 2018-01-05 20:03 ` [PATCHv4 1/4] t/lib-submodule-update.sh: clarify test Stefan Beller 2018-01-05 20:03 ` [PATCHv4 2/4] t/lib-submodule-update.sh: Fix test ignoring ignored files in submodules Stefan Beller 2018-01-05 20:03 ` [PATCHv4 3/4] unpack-trees: oneway_merge to update submodules Stefan Beller 2018-01-05 20:03 ` [PATCHv4 4/4] submodule: submodule_move_head omits old argument in forced case Stefan Beller 2018-01-09 22:45 ` [PATCHv4 0/4] Fix --recurse-submodules for submodule worktree changes Junio C Hamano 2017-12-27 22:57 ` [PATCHv2 5/5] submodule: submodule_move_head omits old argument in forced case Stefan Beller
Reply instructions: You may reply publically to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: http://vger.kernel.org/majordomo-info.html * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20171220000148.GJ240141@aiede.mtv.corp.google.com \ --to=jrnieder@gmail.com \ --cc=git@vger.kernel.org \ --cc=sbeller@google.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
git@vger.kernel.org mailing list mirror (one of many) Archives are clonable: git clone --mirror https://public-inbox.org/git git clone --mirror http://ou63pmih66umazou.onion/git git clone --mirror http://czquwvybam4bgbro.onion/git git clone --mirror http://hjrcffqmbrq6wope.onion/git Newsgroups are available over NNTP: nntp://news.public-inbox.org/inbox.comp.version-control.git nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git nntp://news.gmane.org/gmane.comp.version-control.git note: .onion URLs require Tor: https://www.torproject.org/ or Tor2web: https://www.tor2web.org/ AGPL code for this site: git clone https://public-inbox.org/ public-inbox