{"thread":{"id":"64617","subject":"Git replay: How is it supposed to be used with raw commits?","startedAt":"2025-12-12T19:19:55Z","lastAt":"2025-12-12T19:19:55Z","messageCount":1,"participants":["Yee Cheng Chin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"532087","messageId":"CAHTeOx-SMLh_idKhGczPKzZNOKy04uYXmUhL8Z79yRuNpmE4eA@mail.gmail.com","threadId":"64617","inReplyTo":null,"subject":"Git replay: How is it supposed to be used with raw commits?","fromName":"Yee Cheng Chin","fromEmail":"yeecheng.chin@gmail.com","sentAt":"2025-12-12T19:19:17Z","receivedAt":"2025-12-12T19:19:55Z","isPatch":false,"sender":{"key":"yeecheng.chin@gmail.com","avatar":null},"body":"The new `git replay` command allows replaying commits without checking\nthem out in the worktree, but it only updates/prints out the result\ncommit (in handle_ref_update) if the commit you are replaying is tied\nto a local branch (DECORATION_REF_LOCAL). If you just pass a raw\ncommit hash, git replay will happily replay the commits and create new\ncommits in the objects database, but doesn't print anything out. Is\nthere any way to recover the created commit? Right now it feels\nconfusing as the command succeeded, doesn't complain, and yet doesn't\nprint / update anything either, while silently creating new commits.\n\nJust for reference, I mean doing something like:\n\n    git replay --onto master master..45ab67bc\n\nor\n\n    git replay --onto master master..HEAD~\n\nThis could be useful when I'm playing around and don't want to\naccidentally update an important branch, or scripting (where I don't\nreally really want branch names for intermediary commits).\n\nIt feels to me that there could be another display mode that just\nprints all the new commits created and lets the user handle it.\nOtherwise perhaps an error is better to inform the user that they are\nsupposed to be passing in a branch name.\n"}]}